Bug 13591

Summary: snd_atiixp stops working when acpi-cpufreq is loaded - Toshiba Satellite a30
Product: Drivers Reporter: Sergey Spiridonov (sena)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED OBSOLETE    
Severity: normal CC: alan, rui.zhang, sena
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.18, 2.6.24, 2.6.26, 2.6.29, 2.6.30 Subsystem:
Regression: No Bisected commit-id:
Bug Depends on:    
Bug Blocks: 56331    
Attachments: lspci output 2.6.26
dmesg output 2.6.26
acpi dump
2.6.30 /proc/interrupts when sound broken
2.6.30 cpu_dump cpu stepping on and broken sound
2.6.30 /sys/devices/system/cpu/cpu*/cpufreq cpufreq on broken_sound

Description Sergey Spiridonov 2009-06-20 21:57:53 UTC
Created attachment 22030 [details]
lspci output 2.6.26

Hardware: Toshiba Satellite a30 (lspci in attachment), with sound card ATI Technologies Inc IXP150 AC'97 Audio Controller.
Last working kernel: 2.6.18
Not working: 2.6.26, 2.6.29

Sound stops working after upgrading from kernel 2.6.18 (Debian Etch ) to kernel 2.6.26 (Debian Lenny). Installing kernel 2.6.29 (from lenny-backports) does not help. Additionaly 2.6.29 locks up after some time.

Often the very first time I start playing music after reboot, sound works for certain period of time. Second time xfmedia hangs, mplayer prints out:

[AO_ALSA] alsa-lib: pcm_hw.c:405:(snd_pcm_hw_hwsync) 
SNDRV_PCM_IOCTL_HWSYNC failed: Broken pipe

At this time nothing new appears in dmesg. 

During boot I got following suspicious messages (full dmesg is in attachment):

MP-BIOS bug: 8254 timer not connected to IO-APIC
..trying to set up timer (IRQ0) through the 8259A ...  failed.
...trying to set up timer as Virtual Wire IRQ... works.
[snip]
atiixp: codec reset timeout
atiixp-modem: no codec available

After lots of experimenting with kernel boot options, I found out that sound works with option "acpi=off". Other options, like  noapic, acpi={noirq,strict,force}, pci=noacpi, nolapic_timer do not help.

Using acpi=off is not a very nice solution, because it switches off other usefull features.

Suspicious kernel messages mentioned above, appear also with option "acpi=off".

$ cat /proc/interrupts
           CPU0       
  0:     127460  local-APIC-edge-fasteoi   timer
  1:       5015   IO-APIC-edge      i8042
  8:          2   IO-APIC-edge      rtc0
 12:        184   IO-APIC-edge      i8042
 14:      14311   IO-APIC-edge      ide0
 15:          0   IO-APIC-edge      ide1
 16:          4   IO-APIC-fasteoi   ohci1394, yenta, radeon@pci:0000:01:05.0
 17:          2   IO-APIC-fasteoi   ATI IXP
 19:      41239   IO-APIC-fasteoi   ohci_hcd:usb1, ohci_hcd:usb2, ehci_hcd:usb3, eth0
 21:       1568   IO-APIC-fasteoi   acpi
NMI:          0   Non-maskable interrupts
LOC:      62299   Local timer interrupts
RES:          0   Rescheduling interrupts
CAL:          0   function call interrupts
TLB:          0   TLB shootdowns
TRM:          0   Thermal event interrupts
SPU:          0   Spurious interrupts
ERR:          0
MIS:          0
Comment 1 Sergey Spiridonov 2009-06-20 21:59:20 UTC
Created attachment 22031 [details]
dmesg output 2.6.26
Comment 2 Sergey Spiridonov 2009-06-20 22:01:13 UTC
added me to CC
Comment 3 Sergey Spiridonov 2009-06-21 13:59:11 UTC
Just installed kernel 2.6.18 and 2.6.24 on Debian Lenny and got same error like with 2.6.26 and 2.6.29. So problem is not kernel-dependent, it should be something with libraries.

Sorry for trouble...
Comment 4 Sergey Spiridonov 2009-06-28 04:54:34 UTC
Reopening because found that is is definitely kernel problem. The bug appears only if acpi_cpufreq module is loaded. Removing acpi_cpufreq using rmmod -f or preventing it from loading heals the problem.

Also removing regression tag and adding kernel versions 2.6.18 and to 2.6.24 to broken list.

Also found similar report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=362708
 which is 3 years old. It was reported to Debian bug tracking system and was closed in 2008 with strange comment "in newer kernels acpi_cpufreq is gone".

Please contact me if you need any further info.

PS Subject of the bug should be renamed into something like "acpi_cpufreq and snd_atiixp conflict", but do not know how to do this. Also I am not able to select 2 components (acpi cpufreq and alsa) at the same time.
Comment 5 Sergey Spiridonov 2009-06-28 06:19:06 UTC
If acpi_cpufreq is not loaded at boot time, then the line 

 [   90.530276] atiixp: codec reset timeout

does not appear in the dmesg output after reboot
Comment 6 Zhang Rui 2010-01-28 01:57:26 UTC
sounds interesting.
please attach the acpidump output of your laptop.
Comment 7 Sergey Spiridonov 2010-01-29 00:16:46 UTC
Created attachment 24773 [details]
acpi dump
Comment 8 Zhang Rui 2010-01-29 01:04:17 UTC
this is really weird because the acpi-cpufreq should be a null as there is no ACPI P-state support on this laptop.

please attach the output of "cat /proc/interrupts" and dmesg when acpi is on and snd_atiixp is not working.
Comment 9 Zhang Rui 2010-02-21 06:25:47 UTC
ping...
Comment 10 Sergey Spiridonov 2010-02-22 23:03:39 UTC
Created attachment 25168 [details]
2.6.30 /proc/interrupts when sound broken

This is cat /proc/interrupts created when sound was broken. This was triggered by enabling in BIOS advanced option "processor power management"
Comment 11 Sergey Spiridonov 2010-02-22 23:29:24 UTC
Sorry for big delay, i was on vacations. Will try to answer ASAP now.

There is an advanced option in BIOS "Processor Power Management". If this option is enabled, CPU frequency stepping is enabled, module acpi_cpufreq is loaded and all kinds of problems appear (in addition to broken sound, PC sometimes locks up when CPU get high frequency). If this BIOS option is disabled, CPU frequency is fixed to 1600MHz, module acpi_cpufreq is not loaded and no problem appear. If this BIOS is enabled, but acpi_cpufreq is not loaded or removed, then sound works OK.
Comment 12 Zhang Rui 2010-02-24 02:44:58 UTC
(In reply to comment #8)
> this is really weird because the acpi-cpufreq should be a null as there is no
> ACPI P-state support on this laptop.
> 
Hah, I see, please attach the acpidump when the "Processor Power Management" is enabled in BIOS.
please also attach the output of " grep . /sys/devices/system/cpu/cpu*/cpufreq/*"
when the sound is not working.
Comment 13 Sergey Spiridonov 2010-02-26 02:25:47 UTC
Created attachment 25234 [details]
2.6.30 cpu_dump cpu stepping on and broken sound

2.6.30 acpidump with bios option which enables cpu stepping on and broken sound
Comment 14 Sergey Spiridonov 2010-02-26 02:34:39 UTC
Created attachment 25235 [details]
2.6.30 /sys/devices/system/cpu/cpu*/cpufreq cpufreq on broken_sound

2.6.30 cpufreq on broken_sound, output of
# grep . /sys/devices/system/cpu/cpu*/cpufreq/*
Comment 15 Sergey Spiridonov 2010-02-26 02:38:29 UTC
added 2.6.30
Comment 16 Zhang Rui 2010-03-09 08:42:25 UTC
it seems that ACPI is doing nothing wrong here.
The p-state exported by BIOS also seems normal (1.6G and 2.4G).

(In reply to comment #5)
> If acpi_cpufreq is not loaded at boot time, then the line 
> 
>  [   90.530276] atiixp: codec reset timeout
> 
> does not appear in the dmesg output after reboot

this may be a clue.
re-assign to the alsa category to see if we can get any help there.
Comment 17 Alan 2012-08-29 17:15:04 UTC
If this problem is still seen with modern kernels please update/re-open the bug