Bug 15982 - radeon module update for 2.6.34 breaks ALSA (snd_atiixp and snd_hda_intel)
radeon module update for 2.6.34 breaks ALSA (snd_atiixp and snd_hda_intel)
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel)
i386 Linux
: P1 high
Assigned To: Jaroslav Kysela
:
Depends on:
Blocks: 15310
  Show dependency treegraph
 
Reported: 2010-05-16 08:41 UTC by Sylvia
Modified: 2010-06-13 11:38 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.34
Tree: Mainline
Regression: Yes


Attachments
kernel compile config (70.41 KB, text/plain)
2010-05-16 12:21 UTC, Sylvia
Details
dmesg (25.76 KB, text/plain)
2010-05-16 12:21 UTC, Sylvia
Details
lspci -vv (11.23 KB, text/plain)
2010-05-16 12:21 UTC, Sylvia
Details
dmesg (28.26 KB, application/octet-stream)
2010-05-16 14:58 UTC, xorik
Details
lspci -vv (15.18 KB, application/octet-stream)
2010-05-16 14:59 UTC, xorik
Details
fix (1.33 KB, patch)
2010-05-20 15:30 UTC, Alex Deucher
Details | Diff

Description Sylvia 2010-05-16 08:41:10 UTC
Playing sound via ATI IXP SB400 card does not work, qmmp player reports buffer underruns with ALSA, other (sox for example) applications just hangs, its possible to hear sound via FMOD , but its noisy and jerky

Last worked: 2.6.33.4 , doesnt work for mainline 2.6.34 (tried with rc6 and rc7-git9)


lspci -vv :

00:14.5 Multimedia audio controller: ATI Technologies Inc IXP SB400 AC'97 Audio Controller (rev 02)
        Subsystem: ASUSTeK Computer Inc. Device 1183
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 64 (500ns min), Cache Line Size: 64 bytes
        Interrupt: pin B routed to IRQ 10
        Region 0: Memory at febfcc00 (32-bit, non-prefetchable) [size=256]
        Capabilities: <access denied>
        Kernel driver in use: ATI IXP AC97 controller
        Kernel modules: snd-atiixp


$ lsmod
Module                  Size  Used by
af_packet              14550  2 
ramzswap               11293  1 
lzo_decompress          1921  1 ramzswap
lzo_compress            1638  1 ramzswap
fuse                   46778  5 
lm85                   13313  0 
hwmon_vid               1916  1 lm85
hwmon                   1053  1 lm85
rfcomm                 28298  0 
l2cap                  28430  3 rfcomm
bluetooth              41839  2 rfcomm,l2cap
snd_seq_oss            21061  0 
snd_seq_midi_event      3924  1 snd_seq_oss
snd_seq                34905  4 snd_seq_oss,snd_seq_midi_event
snd_seq_device          3849  2 snd_seq_oss,snd_seq
snd_pcm_oss            31107  0 
snd_mixer_oss          11422  1 snd_pcm_oss
arc4                     946  2 
ecb                     1401  2 
cryptomgr              85846  0 
crypto_hash             8171  1 cryptomgr
aead                    3651  1 cryptomgr
pcompress                857  1 cryptomgr
crypto_blkcipher        7367  2 ecb,cryptomgr
crypto_algapi           9122  7 arc4,ecb,cryptomgr,crypto_hash,aead,pcompress,crypto_blkcipher
rt2500pci              11701  0 
rt2x00pci               4101  1 rt2500pci
rt2x00lib              17608  2 rt2500pci,rt2x00pci
mac80211              118215  2 rt2x00pci,rt2x00lib
cfg80211              100901  2 rt2x00lib,mac80211
rfkill                 10896  2 bluetooth,cfg80211
snd_atiixp              9825  1 
eeprom_93cx6             904  1 rt2500pci
snd_atiixp_modem        7115  0 
usbhid                 15253  0 
pcmcia                 24282  0 
snd_ac97_codec         82624  2 snd_atiixp,snd_atiixp_modem
asus_laptop            12148  0 
joydev                  7320  0 
ac97_bus                 702  1 snd_ac97_codec
mmc_block               6664  0 
sdhci_pci               5250  0 
sdhci                  13041  1 sdhci_pci
yenta_socket           18247  2 
snd_pcm                53401  4 snd_pcm_oss,snd_atiixp,snd_atiixp_modem,snd_ac97_codec
rtc_cmos                7454  0 
snd_timer              14278  2 snd_seq,snd_pcm
mmc_core               39614  2 mmc_block,sdhci
ehci_hcd               32254  0 
ohci_hcd               19709  0 
video                  14806  0 
snd                    35728  12 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_atiixp,snd_atiixp_modem,snd_ac97_codec,snd_pcm,snd_timer
backlight               2648  2 asus_laptop,video
rtc_core                9613  1 rtc_cmos
rsrc_nonstatic          8269  1 yenta_socket
thermal                 9230  0 
ac                      1528  0 
processor              18341  1 
8139too                15014  0 
battery                 3686  0 
soundcore               4303  1 snd
ppdev                   5026  0 
output                  1164  1 video
parport_pc             28009  0 
parport                23883  2 ppdev,parport_pc
rtc_lib                 1402  1 rtc_core
evdev                   6269  13 
led_class               1789  3 rt2x00lib,asus_laptop,sdhci
sg                     19333  0 
button                  3494  0 
usbcore               109287  3 usbhid,ehci_hcd,ohci_hcd
pcmcia_core            22624  3 pcmcia,yenta_socket,rsrc_nonstatic
snd_page_alloc          5185  3 snd_atiixp,snd_atiixp_modem,snd_pcm
psmouse                28785  0 
sr_mod                  9830  0 
pcspkr                  1299  0 
i2c_piix4               7680  0 
mii                     2850  1 8139too
cdrom                  27927  1 sr_mod
nls_base                4761  1 usbcore
Comment 1 Sylvia 2010-05-16 12:21:03 UTC
Created attachment 26393 [details]
kernel compile config
Comment 2 Sylvia 2010-05-16 12:21:37 UTC
Created attachment 26394 [details]
dmesg
Comment 3 Sylvia 2010-05-16 12:21:57 UTC
Created attachment 26395 [details]
lspci -vv
Comment 4 Sylvia 2010-05-16 12:41:14 UTC
Important addition:
by itself sound can be player with console players (aplay, mpg123) 
with Xorg server activity (switching to X11 or screen updated) sound playing breaks immediately


/proc/interrupts

           CPU0       
  0:     526373    XT-PIC-XT        timer
  1:       1307    XT-PIC-XT        i8042
  2:          0    XT-PIC-XT        cascade
  3:          1    XT-PIC-XT      
  4:      11235    XT-PIC-XT        yenta, 0000:03:00.0
  5:        593    XT-PIC-XT        mmc0
  7:          0    XT-PIC-XT        parport0
  8:          1    XT-PIC-XT        rtc0
  9:        491    XT-PIC-XT        acpi
 10:       2438    XT-PIC-XT        radeon, ATI IXP Modem, ATI IXP
 11:       3645    XT-PIC-XT        ohci_hcd:usb1, ehci_hcd:usb2, ohci_hcd:usb3
 12:       6310    XT-PIC-XT        i8042
 14:       6060    XT-PIC-XT        pata_atiixp
 15:         66    XT-PIC-XT        pata_atiixp
NMI:          0   Non-maskable interrupts
MCE:          0   Machine check exceptions
MCP:          2   Machine check polls
ERR:          0

radeon and ATI IXP share same interrupt. Please change component to Video DRI if appropriate. I dont use ATI IXP modem, so i cannot test if it works or not (Its softmodem, no software installed because not needed)
Comment 5 Sylvia 2010-05-16 13:02:35 UTC
enabling local apic for uniprocessors does not help

> CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
> CONFIG_X86_MPPARSE=y
> CONFIG_X86_UP_APIC=y
> CONFIG_X86_UP_IOAPIC=y
> CONFIG_X86_LOCAL_APIC=y
> CONFIG_X86_IO_APIC=y
Comment 6 Sylvia 2010-05-16 13:15:53 UTC
enabling SMP too, /proc/interrupts remains the same arrangement

PS: (if important) kernel is booting with pci=noacpi acpi=noirq parameters due to problems since 2.6.22 with looping sound and USB dying.
Comment 7 xorik 2010-05-16 14:56:46 UTC
I can confirm.
Sound is distorted when I sroll, move windows or change virtual desktop. Before 2.6.34-rc5 everything was good.


$ cat /proc/interrupts
           CPU0       
  0:      68856    XT-PIC-XT        timer
  1:        369    XT-PIC-XT        i8042
  2:          0    XT-PIC-XT        cascade
  7:         37    XT-PIC-XT      
  8:          1    XT-PIC-XT        rtc
  9:        132    XT-PIC-XT        acpi
 10:       4949    XT-PIC-XT        ehci_hcd:usb1, ohci_hcd:usb2, ohci_hcd:usb3
 11:      24219    XT-PIC-XT        radeon, sata_sil, ohci1394, wifi0, hda_intel
 12:        106    XT-PIC-XT        i8042
 15:       1731    XT-PIC-XT        ide0
NMI:          0   Non-maskable interrupts
ERR:         37

$ lsmod
Module                  Size  Used by
wlan_tkip               8174  1 
wlan_ccmp               4518  1 
vboxdrv               109497  0 
ath5k                 109019  0 
wlan_scan_sta           8046  1 
snd_hda_codec_realtek   192134  1 
ath_rate_sample         8254  1 
snd_hda_intel          16047  1 
snd_hda_codec          53669  2 snd_hda_codec_realtek,snd_hda_intel
snd_pcm                52161  2 snd_hda_intel,snd_hda_codec
ath_pci               156360  0 
snd_timer              12974  1 snd_pcm
wlan                  155492  6 wlan_tkip,wlan_ccmp,wlan_scan_sta,ath_rate_sample,ath_pci
ath_hal               334090  3 ath_rate_sample,ath_pci
snd                    33051  7 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer
snd_page_alloc          5581  2 snd_hda_intel,snd_pcm
Comment 8 xorik 2010-05-16 14:58:18 UTC
Created attachment 26396 [details]
dmesg
Comment 9 xorik 2010-05-16 14:59:33 UTC
Created attachment 26397 [details]
lspci -vv
Comment 10 xorik 2010-05-16 15:13:39 UTC
When DRI is disabled (radeon.modeset=0), the problem disappears
Comment 11 Alex Deucher 2010-05-18 14:09:43 UTC
Any chance you can bisect this?
Comment 12 Sylvia 2010-05-18 18:55:50 UTC
(In reply to comment #11)
> Any chance you can bisect this?

2.6.34-rc3 - works
2.6.34-rc4 - broken, ( booting with acpi=off because of kernel oops in acpi module and hang), sounds works with inactive X server, broken otherwise
2.6.34-rc5 - broken

I havent seen any commits for rc4 that affect radeon ( by short description in commit log ) 
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.34.y.git;a=shortlog;h=refs/tags/v2.6.34-rc4  but sound gets broken from rc4
Comment 13 Sylvia 2010-05-18 20:38:27 UTC
(In reply to comment #12)
> I havent seen any commits for rc4 that affect radeon ( by short description in

well, there are 4 more pages of commits, will be trying to find out where exactly its broken
Comment 14 Sylvia 2010-05-18 21:21:09 UTC
rc3 - works
2010-03-30 Alex Deucher drm/radeon/kms: init rdev->num_crtc at asic init - works
2010-03-31 Alex Deucher drm/radeon/kms: add hw_i2c module option - broken
Comment 15 Sylvia 2010-05-18 22:24:50 UTC
2010-03-31 Alex Deucher  drm/radeon/kms: disable MSI on IGP chips - bad
2010-03-31 Alex Deucher  drm/radeon/kms: display watermark updates (v2)  - bad
2010-03-31 Alex Deucher  drm/radeon/kms/dp: disable training pattern on the  - ok
2010-03-31 Alex Deucher  drm/radeon/kms/atom: minor fixes to transmitter setup - ok 
2010-03-31 Michel Dänzer drm/radeon/kms: Only restrict BO to visible VRAM size - ok
2010-03-31 Randy Dunlap  drm: fix build error when SYSRQ is disabled - works


Last working snapshot: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.34.y.git;a=commit;h=3b01a1191fe76bd11e5743eceed7c25d8157239e

First broken snapshot: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.34.y.git;a=commit;h=f46c01208da1881591e3f55ca77d37f54469f8e4

Diff between them: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.34.y.git;a=patch;h=f46c01208da1881591e3f55ca77d37f54469f8e4
Comment 17 Alex Deucher 2010-05-19 21:38:18 UTC
Does booting with radeon.disp_priority=1 fix the issue?
Comment 18 Alex Deucher 2010-05-19 21:43:50 UTC
Apply the settings with a cold boot.
Comment 19 xorik 2010-05-20 06:26:29 UTC
(In reply to comment #17)
> Does booting with radeon.disp_priority=1 fix the issue?

Yes, "radeon.disp_priority=1" fix the issue (tested in 2.6.34)
Comment 20 Sylvia 2010-05-20 09:59:15 UTC
(In reply to comment #17)
> Does booting with radeon.disp_priority=1 fix the issue?

works for me with 2.6.34 release
Comment 21 Sylvia 2010-05-20 10:09:06 UTC
so setting disp_priority to high on all r4xx chips by default isnt that good for RS480 MoBo's with SB4x0 soundcard that have XPress 200m (RC410)
Comment 22 Alex Deucher 2010-05-20 15:30:03 UTC
Created attachment 26460 [details]
fix

This patch should fix it.  I've sent it to Dave to and stable.
Comment 23 Sylvia 2010-05-20 16:45:28 UTC
2.6.34 with patch and default boot params works too, just as expected )
thanks )
Comment 24 Rafael J. Wysocki 2010-05-20 21:44:48 UTC
Patch : https://bugzilla.kernel.org/attachment.cgi?id=26460
Handled-By : Alex Deucher <alexdeucher@gmail.com>
Comment 25 Rafael J. Wysocki 2010-06-13 11:38:53 UTC
Fixed by commit 45737447ed160faaba036c0709226bf9057f7b72 .

Note You need to log in before you can comment on or make changes to this bug.