Bug 9304 - Audigy 2 ZS Notebook prevents snd_emu10k1 module from loading/working
Summary: Audigy 2 ZS Notebook prevents snd_emu10k1 module from loading/working
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: James Courtier-Dutton
URL:
Keywords:
Depends on:
Blocks: 9243
  Show dependency tree
 
Reported: 2007-11-04 05:24 UTC by unggnu
Modified: 2007-12-01 13:14 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.24-rc1
Tree: Mainline
Regression: ---


Attachments
Fix #1 for emu0404 (17.67 KB, patch)
2007-11-05 05:32 UTC, Takashi Iwai
Details | Diff
Fix #2 for emu0404 (1.54 KB, patch)
2007-11-05 05:32 UTC, Takashi Iwai
Details | Diff
.config Kernel configuration (37.50 KB, text/plain)
2007-11-08 14:29 UTC, unggnu
Details
Adds a simple printk line for diag purposes. (552 bytes, text/x-patch)
2007-11-12 04:41 UTC, James Courtier-Dutton
Details
This patch (alsa hg#5530) adds mixer control parameter limit checks. (8.45 KB, text/x-patch)
2007-11-12 06:58 UTC, James Courtier-Dutton
Details
old asoundconf.state (61.64 KB, text/plain)
2007-11-12 07:12 UTC, unggnu
Details

Description unggnu 2007-11-04 05:24:14 UTC
Most recent kernel where this bug did not occur: 2.6.23

Distribution: Ubuntu Gutsy Gibbon 7.10

Software/Hardware Environment:
cat /proc/version 
Linux version 2.6.24-rc1-git11 (tim@uber) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #22 PREEMPT Fri Nov 2 12:33:15 CET 2007

cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : Intel(R) Pentium(R) M processor 1.20GHz
stepping        : 8
cpu MHz         : 1200.000
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx bts est tm2
bogomips        : 1198.37
clflush size    : 64

cat /proc/modules 
ieee80211_crypt_ccmp 5824 2 - Live 0xf8c38000
aes_i586 33344 3 - Live 0xf8c72000
aes_generic 27968 0 - Live 0xf8c6a000
lrw 3264 1 - Live 0xf8a07000
blkcipher 5508 1 lrw, Live 0xf8c3d000
gf128mul 7488 1 lrw, Live 0xf8c61000
cryptomgr 2624 0 - Live 0xf89ff000
crypto_algapi 12096 5 aes_i586,aes_generic,lrw,blkcipher,cryptomgr, Live 0xf8c2d000
binfmt_misc 8328 1 - Live 0xf8c31000
rfcomm 24144 2 - Live 0xf8c0c000
l2cap 20420 11 rfcomm, Live 0xf8c27000
i915 21824 2 - Live 0xf8c05000
drm 70292 3 i915, Live 0xf8c14000
acpi_cpufreq 9612 0 - Live 0xf8bdc000
cpufreq_ondemand 6228 1 - Live 0xf8bad000
cpufreq_performance 1536 0 - Live 0xf89fa000
cpufreq_stats 4100 0 - Live 0xf8baa000
freq_table 3524 3 acpi_cpufreq,cpufreq_ondemand,cpufreq_stats, Live 0xf88e4000
cpufreq_powersave 1344 0 - Live 0xf88f1000
cpufreq_conservative 5472 0 - Live 0xf8834000
fan 3140 0 - Live 0xf8852000
dm_crypt 11012 1 - Live 0xf8ba6000
dm_mod 46016 3 dm_crypt, Live 0xf8bc2000
sbp2 19464 0 - Live 0xf8b2b000
fuse 41748 1 - Live 0xf8bd0000
usbhid 25280 0 - Live 0xf8bba000
snd_emu10k1_synth 5888 0 - Live 0xf8a5a000
snd_emux_synth 31872 1 snd_emu10k1_synth, Live 0xf8bb1000
snd_seq_virmidi 4992 1 snd_emux_synth, Live 0xf8a5d000
snd_seq_midi_emul 5824 1 snd_emux_synth, Live 0xf8a4d000
hci_usb 13020 0 - Live 0xf8a55000
bluetooth 49316 5 rfcomm,l2cap,hci_usb, Live 0xf8a9d000
snd_emu10k1 130560 4 snd_emu10k1_synth, Live 0xf8b31000
snd_ac97_codec 95076 1 snd_emu10k1, Live 0xf8aab000
ac97_bus 1664 1 snd_ac97_codec, Live 0xf89ed000
snd_util_mem 3328 2 snd_emux_synth,snd_emu10k1, Live 0xf8857000
snd_hwdep 6532 2 snd_emux_synth,snd_emu10k1, Live 0xf899a000
snd_hda_intel 51744 0 - Live 0xf8a7e000
snd_pcm_oss 36704 0 - Live 0xf8a74000
snd_mixer_oss 13696 1 snd_pcm_oss, Live 0xf8a16000
snd_pcm 67272 4 snd_emu10k1,snd_ac97_codec,snd_hda_intel,snd_pcm_oss, Live 0xf8a62000
snd_seq_oss 28544 0 - Live 0xf8a45000
snd_seq_midi 6048 0 - Live 0xf89e7000
snd_rawmidi 18848 3 snd_seq_virmidi,snd_emu10k1,snd_seq_midi, Live 0xf8a01000
snd_seq_midi_event 6016 3 snd_seq_virmidi,snd_seq_oss,snd_seq_midi, Live 0xf89ea000
snd_seq 45136 8 snd_emux_synth,snd_seq_virmidi,snd_seq_midi_emul,snd_seq_oss,snd_seq_midi,snd_seq_midi_event, Live 0xf8a09000
thermal 12636 0 - Live 0xf899f000
snd_timer 18884 3 snd_emu10k1,snd_pcm,snd_seq, Live 0xf89dc000
snd_seq_device 6348 7 snd_emu10k1_synth,snd_emux_synth,snd_emu10k1,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq, Live 0xf89c8000
ipw2200 134068 0 - Live 0xf8a23000
ohci1394 28848 0 - Live 0xf89f1000
sr_mod 12964 0 - Live 0xf89e2000
tifm_7xx1 5312 0 - Live 0xf89c5000
uhci_hcd 22092 0 - Live 0xf89d5000
ehci_hcd 29644 0 - Live 0xf89cc000
ac 4036 0 - Live 0xf899d000
battery 10180 0 - Live 0xf8828000
power_supply 6724 2 ac,battery, Live 0xf8994000
ieee80211 29832 1 ipw2200, Live 0xf89a4000
ieee80211_crypt 4480 2 ieee80211_crypt_ccmp,ieee80211, Live 0xf8997000
snd 43300 20 snd_emux_synth,snd_seq_virmidi,snd_emu10k1,snd_ac97_codec,snd_hwdep,snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device, Live 0xf88f3000
ieee1394 78196 2 sbp2,ohci1394, Live 0xf89ad000
e100 31372 0 - Live 0xf898b000
mii 4416 1 e100, Live 0xf88e6000
cdrom 33120 1 sr_mod, Live 0xf8981000
tifm_core 6868 1 tifm_7xx1, Live 0xf88e1000
yenta_socket 22924 1 - Live 0xf88ea000
rsrc_nonstatic 9024 1 yenta_socket, Live 0xf8878000
pcmcia_core 31888 2 yenta_socket,rsrc_nonstatic, Live 0xf8859000
processor 21936 3 acpi_cpufreq,thermal, Live 0xf886d000
sony_laptop 28688 0 - Live 0xf8864000
backlight 3460 1 sony_laptop, Live 0xf8837000
button 6032 0 - Live 0xf8854000
evdev 8576 8 - Live 0xf884e000
usbcore 125228 5 usbhid,hci_usb,uhci_hcd,ehci_hcd, Live 0xf88c1000
soundcore 5856 1 snd, Live 0xf884b000
snd_page_alloc 7496 3 snd_emu10k1,snd_hda_intel,snd_pcm, Live 0xf8848000
intel_agp 21268 1 - Live 0xf8841000
agpgart 26608 3 drm,intel_agp, Live 0xf8839000
rtc 6800 0 - Live 0xf882c000

cat /proc/ioports
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-006f : keyboard
0070-0077 : rtc
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : 0000:00:1f.1
  0170-0177 : libata
01f0-01f7 : 0000:00:1f.1
  01f0-01f7 : libata
0376-0376 : 0000:00:1f.1
  0376-0376 : libata
03c0-03df : vga+
03f6-03f6 : 0000:00:1f.1
  03f6-03f6 : libata
0cf8-0cff : PCI conf1
1000-107f : 0000:00:1f.0
  1000-1003 : ACPI PM1a_EVT_BLK
  1004-1005 : ACPI PM1a_CNT_BLK
  1008-100b : ACPI PM_TMR
  1010-1015 : ACPI CPU throttle
  1020-1020 : ACPI PM2_CNT_BLK
  1028-102f : ACPI GPE0_BLK
1080-109f : Sony Programable I/O Device
1180-11bf : 0000:00:1f.0
1800-1807 : 0000:00:02.0
1810-181f : 0000:00:1f.1
  1810-181f : libata
1820-183f : 0000:00:1d.0
  1820-183f : uhci_hcd
1840-185f : 0000:00:1d.1
  1840-185f : uhci_hcd
1860-187f : 0000:00:1d.2
  1860-187f : uhci_hcd
1880-189f : 0000:00:1d.3
  1880-189f : uhci_hcd
18a0-18bf : 0000:00:1f.3
2000-2fff : PCI Bus #06
  2000-203f : 0000:06:08.0
    2000-203f : e100
  2400-24ff : PCI CardBus #07
    2400-243f : 0000:07:00.0
      2400-243f : EMU10K1
  2800-28ff : PCI CardBus #07

cat /proc/iomem 
00000000-0009f7ff : System RAM
0009f800-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-5f68ffff : System RAM
  00100000-002d9149 : Kernel code
  002d914a-003790e3 : Kernel data
  003a5000-003d2283 : Kernel bss
5f690000-5f69cfff : ACPI Tables
5f69d000-5f6fffff : ACPI Non-volatile Storage
5f700000-5fffffff : reserved
68000000-6807ffff : 0000:00:02.1
6c000000-6fffffff : PCI CardBus #07
70000000-73ffffff : PCI CardBus #07
b0000000-b0003fff : 0000:00:1b.0
  b0000000-b0003fff : ICH HD audio
b0004000-b00043ff : 0000:00:1d.7
  b0004000-b00043ff : ehci_hcd
b0040000-b007ffff : 0000:00:02.0
b0080000-b00fffff : 0000:00:02.0
b0100000-b01fffff : PCI Bus #06
  b0100000-b0103fff : 0000:06:05.2
  b0104000-b0105fff : 0000:06:05.3
    b0104000-b0105fff : tifm_7xx1
  b0106000-b01067ff : 0000:06:05.2
    b0106000-b01067ff : ohci1394
  b0107000-b0107fff : 0000:06:08.0
    b0107000-b0107fff : e100
  b0108000-b0108fff : 0000:06:0b.0
    b0108000-b0108fff : ipw2200
  b0109000-b0109fff : 0000:06:05.0
    b0109000-b0109fff : yenta_socket
c0000000-cfffffff : 0000:00:02.0
d000c000-d000ffff : pnp 00:05
e0000000-f0005fff : reserved
  e0000000-efffffff : PCI MMCONFIG 0
f0008000-f000bfff : reserved
fed20000-fed8ffff : reserved
ff000000-ffffffff : reserved


Problem Description:
If Audigy 2 Notebook ZS (PCMCIA) is plugged in on boot with the 2.6.24-rc1 kernel I get a kernel error. Boot doesn't stop but sound doesn't work and I am unable to shutdown system since Alsa stopping hangs.
Works fine with same kernel configuration file and 2.6.23.

dmesg output:
Time: hpet clocksource has been installed.
usb 1-2.1: new high speed USB device using ehci_hcd and address 4
PCI: Enabling device 0000:07:00.0 (0000 -> 0001)
ACPI: PCI Interrupt 0000:07:00.0[A] -> GSI 21 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:07:00.0 to 64
Audigy2 value: Special config.
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
usb 1-2.1: configuration #1 chosen from 1 choice
hub 1-2.1:1.0: USB hub found
hub 1-2.1:1.0: 4 ports detected
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Clocksource tsc unstable (delta = -213528793 ns)
usb 1-2.2: new low speed USB device using ehci_hcd and address 5
BUG: unable to handle kernel paging request at virtual address 4283a12e
printing eip: f8b3ae90 *pde = 00000000 
Oops: 0000 [#1] PREEMPT 
Modules linked in: snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul hci_usb bluetooth snd_emu10k1 snd_ac97_codec ac97_bus snd_util_mem snd_hwdep snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq thermal snd_timer snd_seq_device ipw2200 ohci1394 sr_mod tifm_7xx1 uhci_hcd ehci_hcd ac battery power_supply ieee80211 ieee80211_crypt snd ieee1394 e100 mii cdrom tifm_core yenta_socket rsrc_nonstatic pcmcia_core processor sony_laptop backlight button evdev usbcore soundcore snd_page_alloc intel_agp agpgart rtc

Pid: 1181, comm: alsactl Not tainted (2.6.24-rc1-git11 #22)
EIP: 0060:[<f8b3ae90>] EFLAGS: 00010246 CPU: 0
EIP is at snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1]
EAX: 00000000 EBX: c2e54000 ECX: 00000286 EDX: 00000000
ESI: 3fcf303f EDI: 00000001 EBP: c2eb4640 ESP: c2f6bd9c
 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process alsactl (pid: 1181, ti=c2f6a000 task=c2cbca90 task.ti=c2f6a000)
Stack: 00000000 c2eb4688 c2e93440 f88f619f c2e93400 00000000 c2eb46a0 c2cba8c0 
       c21aaa00 c21aab4c c21aaa00 00000000 c21aaba0 c2e93400 f88f6b49 c2012940 
       c2f6be00 bfc40b30 c2cba8c0 c2d6b012 00000000 c2eb46a8 c21aab4c c2f6bf30 
Call Trace:
 [<f88f619f>] snd_ctl_elem_write+0x10f/0x140 [snd]
 [<f88f6b49>] snd_ctl_ioctl+0x289/0xab0 [snd]
 [<c015d0d7>] handle_mm_fault+0xe7/0x3f0
 [<f88f68c0>] snd_ctl_ioctl+0x0/0xab0 [snd]
 [<c017725b>] do_ioctl+0x2b/0x90
 [<c017731c>] vfs_ioctl+0x5c/0x290
 [<c0215080>] write_null+0x0/0x10
 [<c017758d>] sys_ioctl+0x3d/0x70
 [<c010415e>] sysenter_past_esp+0x5f/0x85
 [<c02d0000>] unix_autobind+0x0/0x1b0
 =======================
Code: 18 ed 85 f6 0f 85 98 00 00 00 83 c8 04 ef 51 9d 89 e0 25 00 e0 ff ff ff 48 14 8b 40 08 a8 04 0f 85 86 00 00 00 8b 93 ac 00 00 00 <0f> b6 8c 73 b0 00 00 00 0f b6 84 53 b0 00 00 00 39 c1 74 18 ba 
EIP: [<f8b3ae90>] snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1] SS:ESP 0068:c2f6bd9c


Steps to reproduce:
compile 2.6.24-rc1 kernel
plugin Audigy 2 ZS Notebook
boot
Comment 1 Takashi Iwai 2007-11-05 05:29:06 UTC
There are two patches fixing emu0404 support on ALSA HG tree after 2.6.24-rc1 merge.  I guess this might help.

Unfortunately perex/alsa.git tree isn't updated for them...
Comment 2 Takashi Iwai 2007-11-05 05:32:02 UTC
Created attachment 13397 [details]
Fix #1 for emu0404
Comment 3 Takashi Iwai 2007-11-05 05:32:25 UTC
Created attachment 13398 [details]
Fix #2 for emu0404
Comment 4 Takashi Iwai 2007-11-05 05:32:58 UTC
I extracted from HG tree.  Could you try the patches above?
Comment 5 unggnu 2007-11-05 07:17:29 UTC
Many thanks for your quick reply and patch. I have patched and compiled the Kernel but still have the same or a similar problem.

dmesg output:
Audigy2 value: Special config.
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
Writing to ADC failed!
BUG: unable to handle kernel paging request at virtual address 4275212e
printing eip: f8aabf30 *pde = 00000000 
Oops: 0000 [#1] PREEMPT 
Modules linked in: snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul snd_emu10k1 hci_usb snd_ac97_codec bluetooth ac97_bus snd_util_mem snd_hwdep snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device tifm_7xx1 ipw2200 snd sony_laptop backlight battery ac power_supply ohci1394 tifm_core uhci_hcd thermal ehci_hcd sr_mod ieee80211 ieee80211_crypt soundcore snd_page_alloc ieee1394 yenta_socket rsrc_nonstatic pcmcia_core e100 mii processor button cdrom evdev usbcore intel_agp agpgart rtc

Pid: 1134, comm: alsactl Not tainted (2.6.24-rc1-git11 #22)
EIP: 0060:[<f8aabf30>] EFLAGS: 00010246 CPU: 0
EIP is at snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1]
EAX: 00000000 EBX: c2d6c000 ECX: 00000286 EDX: 00000000
ESI: 3fcf303f EDI: 00000001 EBP: c2cd4540 ESP: c23ddd9c
 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process alsactl (pid: 1134, ti=c23dc000 task=c21af030 task.ti=c23dc000)
Stack: 00000000 c2cd4588 c2c4dc40 f89fa19f c2c4dc00 00000000 c2cd45a0 c2cfec80 
       c21de200 c21de34c c21de200 00000000 c21de3a0 c2c4dc00 f89fab49 c2012940 
       c23dde00 bf942040 c2cfec80 c2c7c012 00000000 c2cd45a8 c21de34c c23ddf30 
Call Trace:
 [<f89fa19f>] snd_ctl_elem_write+0x10f/0x140 [snd]
 [<f89fab49>] snd_ctl_ioctl+0x289/0xab0 [snd]
 [<c015d0d7>] handle_mm_fault+0xe7/0x3f0
 [<f89fa8c0>] snd_ctl_ioctl+0x0/0xab0 [snd]
 [<c017725b>] do_ioctl+0x2b/0x90
 [<c017731c>] vfs_ioctl+0x5c/0x290
 [<c0215080>] write_null+0x0/0x10
 [<c017758d>] sys_ioctl+0x3d/0x70
 [<c010415e>] sysenter_past_esp+0x5f/0x85
 [<c02d0000>] unix_autobind+0x0/0x1b0
 =======================
Code: 18 ed 85 f6 0f 85 98 00 00 00 83 c8 04 ef 51 9d 89 e0 25 00 e0 ff ff ff 48 14 8b 40 08 a8 04 0f 85 86 00 00 00 8b 93 ac 00 00 00 <0f> b6 8c 73 b0 00 00 00 0f b6 84 53 b0 00 00 00 39 c1 74 18 ba 
EIP: [<f8aabf30>] snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1] SS:ESP 0068:c23ddd9c

An interesting thing was that it was possible to remove the card and restart alsa afterwards. I think that doesn't work before but I am not sure.

dmesg output:
snd-emu10k1: Suspected sound card removal
pccard: card ejected from slot 0
Comment 6 Takashi Iwai 2007-11-05 07:28:14 UTC
Build with CONFIG_SND_DEBUG=y and CONFIG_SND_DEBUG_DETECT=y.  This will give you more verbose probe messages.
Comment 7 unggnu 2007-11-05 10:56:21 UTC
It doesn't seem to have changed much so I activated CONFIG_SND_VERBOSE_PRINTK which gives some more messages:

dmesg output after plugged in card:
pccard: CardBus card inserted into slot 0
PCI: Enabling device 0000:07:00.0 (0000 -> 0001)
ACPI: PCI Interrupt 0000:07:00.0[A] -> GSI 21 (level, low) -> IRQ 16
ALSA sound/pci/emu10k1/emu10k1_main.c:1697: vendor=0x1102, device=0x8, subsystem_vendor_id=0x20011102, subsystem_id=0x2001
ALSA sound/pci/emu10k1/emu10k1_main.c:1722: Sound card name=Audigy 2 ZS Notebook [SB0530]
PCI: Setting latency timer of device 0000:07:00.0 to 64
ALSA sound/pci/emu10k1/emu10k1_main.c:220: Audigy2 value: Special config.
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
ALSA sound/pci/emu10k1/io.c:222: Writing to ADC failed!
BUG: unable to handle kernel paging request at virtual address 49d6612e
printing eip: f8c80f00 *pde = 00000000 
Oops: 0000 [#1] PREEMPT 
Modules linked in: snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul snd_emu10k1 snd_ac97_codec ac97_bus snd_util_mem snd_hwdep ieee80211_crypt_ccmp aes_i586 aes_generic lrw blkcipher gf128mul cryptomgr crypto_algapi binfmt_misc rfcomm l2cap i915 drm acpi_cpufreq cpufreq_ondemand cpufreq_performance cpufreq_stats freq_table cpufreq_powersave cpufreq_conservative fan dm_crypt dm_mod sbp2 fuse hci_usb bluetooth snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device ehci_hcd uhci_hcd ipw2200 snd tifm_7xx1 ohci1394 thermal sr_mod ac battery power_supply sony_laptop backlight ieee80211 ieee80211_crypt soundcore yenta_socket rsrc_nonstatic pcmcia_core tifm_core ieee1394 e100 mii button processor cdrom evdev usbcore intel_agp agpgart snd_page_alloc rtc

Pid: 3478, comm: alsactl Not tainted (2.6.24-rc1-git11 #24)
EIP: 0060:[<f8c80f00>] EFLAGS: 00010246 CPU: 0
EIP is at snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1]
EAX: 00000000 EBX: ca380000 ECX: 00000282 EDX: 00000000
ESI: 3fcf303f EDI: 00000001 EBP: ca174d40 ESP: cacabd90
 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process alsactl (pid: 3478, ti=cacaa000 task=caca3a90 task.ti=cacaa000)
Stack: 00000000 ca174d88 cac9e840 f89efa0f cac9e800 ca06ed60 ca174da0 ca36d7c0 
       ca06ec00 ca06ed4c ca06ec00 00000000 ca06eda0 cac9e800 f89f04b9 cacabf30 
       c0172855 cacabe18 c20128c0 cacabe00 bf9cb0c0 ca36d7c0 c2d0f012 00000000 
Call Trace:
 [<f89efa0f>] snd_ctl_elem_write+0x10f/0x140 [snd]
 [<f89f04b9>] snd_ctl_ioctl+0x299/0xb70 [snd]
 [<c0172855>] do_lookup+0x65/0x190
 [<c015d0d7>] handle_mm_fault+0xe7/0x3f0
 [<f89f0220>] snd_ctl_ioctl+0x0/0xb70 [snd]
 [<c017725b>] do_ioctl+0x2b/0x90
 [<c017731c>] vfs_ioctl+0x5c/0x290
 [<c0215080>] write_null+0x0/0x10
 [<c017758d>] sys_ioctl+0x3d/0x70
 [<c010415e>] sysenter_past_esp+0x5f/0x85
 [<c02d0000>] unix_autobind+0x0/0x1b0
 =======================
Code: 18 ed 85 f6 0f 85 98 00 00 00 83 c8 04 ef 51 9d 89 e0 25 00 e0 ff ff ff 48 14 8b 40 08 a8 04 0f 85 86 00 00 00 8b 93 ac 00 00 00 <0f> b6 8c 73 b0 00 00 00 0f b6 84 53 b0 00 00 00 39 c1 74 18 ba 
EIP: [<f8c80f00>] snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1] SS:ESP 0068:cacabd90
Comment 8 James Courtier-Dutton 2007-11-08 14:16:09 UTC
I do not think that this is an ALSA problem.
I think this is a kernel related problem.
The ALSA driver expects udelay(10) to correctly delay a certain amount of time.
This is not happening, so I suspect a kernel clock issue.

Seeing messages like this:
Clocksource tsc unstable (delta = -213528793 ns)
seem to support this point of view.

Nothing has changed in ALSA that would cause this sort of problem.
You could verify this by installing alsa-driver 1.0.14 and then 1.0.15 and you will probably not see any change in this bug.
Comment 9 unggnu 2007-11-08 14:29:08 UTC
Created attachment 13472 [details]
.config Kernel configuration

I have added my kernel configuration.
Comment 10 James Courtier-Dutton 2007-11-10 10:00:20 UTC
Fix available in alsa-kernel hg repository, changeset 5521
It turns out that after plugging in the card, it gets power, but a delay of 200ms has to be added after power on, before the card can be initialised and configured.
Comment 11 unggnu 2007-11-11 09:30:34 UTC
Unfortunately it still happens with changeset 5521.

dmesg output from start:
PCI: Enabling device 0000:07:00.0 (0000 -> 0001)
ACPI: PCI Interrupt 0000:07:00.0[A] -> GSI 21 (level, low) -> IRQ 16
ALSA sound/pci/emu10k1/emu10k1_main.c:1673: vendor=0x1102, device=0x8, subsystem_vendor_id=0x20011102, subsystem_id=0x2001
ALSA sound/pci/emu10k1/emu10k1_main.c:1698: Sound card name=Audigy 2 ZS Notebook [SB0530]
PCI: Setting latency timer of device 0000:07:00.0 to 64
ALSA sound/pci/emu10k1/emu10k1_main.c:218: Audigy2 value: Special config.
BUG: unable to handle kernel paging request at virtual address 4288e12e
printing eip: f8ae8f90 *pde = 00000000 
Oops: 0000 [#1] PREEMPT 
Modules linked in: snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul snd_emu10k1 snd_ac97_codec ac97_bus snd_util_mem snd_hwdep snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event ipw2200 snd_seq sr_mod tifm_7xx1 ohci1394 thermal sony_laptop backlight battery ac power_supply ieee80211 ieee80211_crypt snd_timer snd_seq_device e100 mii cdrom tifm_core yenta_socket rsrc_nonstatic pcmcia_core ieee1394 button processor ehci_hcd uhci_hcd usbcore evdev snd soundcore snd_page_alloc rtc intel_agp agpgart

Pid: 1188, comm: alsactl Not tainted (2.6.24-rc2 #3)
EIP: 0060:[<f8ae8f90>] EFLAGS: 00010246 CPU: 0
EIP is at snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1]
EAX: 00000000 EBX: c2ea8000 ECX: 00000282 EDX: 00000000
ESI: 3fcf303f EDI: 00000001 EBP: c2e39440 ESP: c23cdd90
 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process alsactl (pid: 1188, ti=c23cc000 task=c2116a90 task.ti=c23cc000)
Stack: 00000000 c2e39488 c2c54c40 f8860a0f c2c54c00 c2391360 c2e394a0 c2e42f00 
       c2391200 c239134c c2391200 00000000 c23913a0 c2c54c00 f88614b9 c23cdf30 
       c01727d5 c23cde18 c20128c0 c23cde00 bfb63a60 c2e42f00 c2d0c012 00000000 
Call Trace:
 [<f8860a0f>] snd_ctl_elem_write+0x10f/0x140 [snd]
 [<f88614b9>] snd_ctl_ioctl+0x299/0xb70 [snd]
 [<c01727d5>] do_lookup+0x65/0x190
 [<c015d057>] handle_mm_fault+0xe7/0x3f0
 [<f8861220>] snd_ctl_ioctl+0x0/0xb70 [snd]
 [<c01771db>] do_ioctl+0x2b/0x90
 [<c017729c>] vfs_ioctl+0x5c/0x290
 [<c0215060>] write_null+0x0/0x10
 [<c017750d>] sys_ioctl+0x3d/0x70
 [<c010415e>] sysenter_past_esp+0x5f/0x85
 [<c02d0000>] xfrm_ealg_get_byname+0x0/0x20
 =======================
Code: 18 ed 85 f6 0f 85 98 00 00 00 83 c8 04 ef 51 9d 89 e0 25 00 e0 ff ff ff 48 14 8b 40 08 a8 04 0f 85 86 00 00 00 8b 93 ac 00 00 00 <0f> b6 8c 73 b0 00 00 00 0f b6 84 53 b0 00 00 00 39 c1 74 18 ba 
EIP: [<f8ae8f90>] snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1] SS:ESP 0068:c23cdd90
Comment 12 James Courtier-Dutton 2007-11-11 15:22:46 UTC
This appears to be a timing problem.
Can you please get the kernel to timestamp the dmesg messages.
Kernel Hacking -> Show timing information on printks
CONFIG_PRINTK=y
CONFIG_PRINTK_TIME=y
Comment 13 unggnu 2007-11-12 04:04:18 UTC
[   74.253549] pccard: CardBus card inserted into slot 0
[   74.328954] PCI: Enabling device 0000:07:00.0 (0000 -> 0001)
[   74.329768] ACPI: PCI Interrupt 0000:07:00.0[A] -> GSI 21 (level, low) -> IRQ 16
[   74.329794] ALSA sound/pci/emu10k1/emu10k1_main.c:1673: vendor=0x1102, device=0x8, subsystem_vendor_id=0x20011102, subsystem_id=0x2001
[   74.329807] ALSA sound/pci/emu10k1/emu10k1_main.c:1698: Sound card name=Audigy 2 ZS Notebook [SB0530]
[   74.329905] PCI: Setting latency timer of device 0000:07:00.0 to 64
[   74.343714] ALSA sound/pci/emu10k1/emu10k1_main.c:218: Audigy2 value: Special config.
[   74.672552] BUG: unable to handle kernel paging request at virtual address 4a27012e
[   74.672725] printing eip: f8c6ef90 *pde = 00000000 
[   74.672908] Oops: 0000 [#1] PREEMPT 
[   74.673083] Modules linked in: snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul snd_emu10k1 snd_ac97_codec ac97_bus snd_util_mem snd_hwdep binfmt_misc rfcomm l2cap i915 drm acpi_cpufreq cpufreq_ondemand cpufreq_performance cpufreq_stats freq_table cpufreq_powersave cpufreq_conservative fan usb_storage hci_usb bluetooth dm_crypt dm_mod sbp2 fuse usbhid snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device ehci_hcd uhci_hcd thermal ipw2200 ohci1394 sr_mod tifm_7xx1 sony_laptop backlight ac battery power_supply snd ieee80211 ieee80211_crypt ieee1394 button processor e100 mii cdrom tifm_core yenta_socket rsrc_nonstatic pcmcia_core evdev usbcore soundcore snd_page_alloc intel_agp agpgart rtc
[   74.677135] 
[   74.677212] Pid: 3044, comm: alsactl Not tainted (2.6.24-rc2 #4)
[   74.677302] EIP: 0060:[<f8c6ef90>] EFLAGS: 00010246 CPU: 0
[   74.677419] EIP is at snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1]
[   74.677533] EAX: 00000000 EBX: ca88a000 ECX: 00000282 EDX: 00000000
[   74.677623] ESI: 3fcf303f EDI: 00000001 EBP: c2d5f1c0 ESP: ca9b9d90
[   74.677713]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[   74.677802] Process alsactl (pid: 3044, ti=ca9b8000 task=ca8e1030 task.ti=ca9b8000)
[   74.677895] Stack: 00000000 c2d5f208 ca889840 f89c3a0f ca889800 c23f9d60 c2d5f220 ca8cca80 
[   74.678445]        c23f9c00 c23f9d4c c23f9c00 00000000 c23f9da0 ca889800 f89c44b9 ca9b9f30 
[   74.678993]        c01727d5 ca9b9e18 c2012940 ca9b9e00 bfcca3c0 ca8cca80 c2d43012 00000000 
[   74.679542] Call Trace:
[   74.679698]  [<f89c3a0f>] snd_ctl_elem_write+0x10f/0x140 [snd]
[   74.687831]  [<f89c44b9>] snd_ctl_ioctl+0x299/0xb70 [snd]
[   74.687989]  [<c01727d5>] do_lookup+0x65/0x190
[   74.688218]  [<c015d057>] handle_mm_fault+0xe7/0x3f0
[   74.688365]  [<f89c4220>] snd_ctl_ioctl+0x0/0xb70 [snd]
[   74.688518]  [<c01771db>] do_ioctl+0x2b/0x90
[   74.688658]  [<c017729c>] vfs_ioctl+0x5c/0x290
[   74.688791]  [<c0215060>] write_null+0x0/0x10
[   74.688932]  [<c017750d>] sys_ioctl+0x3d/0x70
[   74.689071]  [<c010415e>] sysenter_past_esp+0x5f/0x85
[   74.689217]  [<c02d0000>] xfrm_ealg_get_byname+0x0/0x20
[   74.689364]  =======================
[   74.689444] Code: 18 ed 85 f6 0f 85 98 00 00 00 83 c8 04 ef 51 9d 89 e0 25 00 e0 ff ff ff 48 14 8b 40 08 a8 04 0f 85 86 00 00 00 8b 93 ac 00 00 00 <0f> b6 8c 73 b0 00 00 00 0f b6 84 53 b0 00 00 00 39 c1 74 18 ba 
[   74.692737] EIP: [<f8c6ef90>] snd_audigy_i2c_capture_source_put+0x80/0x110 [snd_emu10k1] SS:ESP 0068:ca9b9d90
Comment 14 James Courtier-Dutton 2007-11-12 04:41:54 UTC
Created attachment 13510 [details]
Adds a simple printk line for diag purposes.

Please try to reproduce the problem with this patch.
Comment 15 unggnu 2007-11-12 05:07:10 UTC
[   77.762540] pccard: CardBus card inserted into slot 0
[   77.992841] PCI: Enabling device 0000:07:00.0 (0000 -> 0001)
[   77.993280] ACPI: PCI Interrupt 0000:07:00.0[A] -> GSI 21 (level, low) -> IRQ 16
[   77.993306] ALSA sound/pci/emu10k1/emu10k1_main.c:1673: vendor=0x1102, device=0x8, subsystem_vendor_id=0x20011102, subsystem_id=0x2001
[   77.993319] ALSA sound/pci/emu10k1/emu10k1_main.c:1698: Sound card name=Audigy 2 ZS Notebook [SB0530]
[   77.993416] PCI: Setting latency timer of device 0000:07:00.0 to 64
[   78.051026] ALSA sound/pci/emu10k1/emu10k1_main.c:218: Audigy2 value: Special config.
[   78.429618] ALSA sound/pci/emu10k1/emumixer.c:674: source_id=1070542911, i2c_capture_source=0
[   78.430867] BUG: unable to handle kernel paging request at virtual address 4a1f012e
[   78.431035] printing eip: f8c6efac *pde = 00000000 
[   78.431219] Oops: 0000 [#1] PREEMPT 
[   78.431395] Modules linked in: snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul snd_emu10k1 snd_ac97_codec ac97_bus snd_util_mem snd_hwdep binfmt_misc rfcomm l2cap i915 drm acpi_cpufreq cpufreq_ondemand cpufreq_performance cpufreq_stats freq_table cpufreq_powersave cpufreq_conservative fan dm_crypt dm_mod hci_usb bluetooth sbp2 fuse usbhid snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event ohci1394 sony_laptop backlight battery ac power_supply snd_seq thermal ipw2200 tifm_7xx1 sr_mod ehci_hcd uhci_hcd button ieee1394 snd_timer snd_seq_device ieee80211 ieee80211_crypt processor tifm_core yenta_socket rsrc_nonstatic pcmcia_core cdrom e100 mii evdev snd intel_agp agpgart rtc usbcore soundcore snd_page_alloc
[   78.446636] 
[   78.446715] Pid: 3008, comm: alsactl Not tainted (2.6.24-rc2 #4)
[   78.446805] EIP: 0060:[<f8c6efac>] EFLAGS: 00010246 CPU: 0
[   78.446920] EIP is at snd_audigy_i2c_capture_source_put+0x9c/0x130 [snd_emu10k1]
[   78.447034] EAX: 00000000 EBX: ca80a000 ECX: 00000282 EDX: 00000000
[   78.447124] ESI: 3fcf303f EDI: 00000001 EBP: ca78a740 ESP: ca855d7c
[   78.447214]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[   78.447302] Process alsactl (pid: 3008, ti=ca854000 task=ca93ea90 task.ti=ca854000)
[   78.447395] Stack: f8c7c40e 000002a2 f8c7ae9c 3fcf303f 00000000 00000000 ca78a788 ca852440 
[   78.447944]        f88d5a0f ca852400 c2ff3960 ca78a7a0 ca750480 c2ff3800 c2ff394c c2ff3800 
[   78.448491]        00000000 c2ff39a0 ca852400 f88d64b9 ca855f30 c01727d5 ca855e18 c20128c0 
[   78.449078] Call Trace:
[   78.449242]  [<f88d5a0f>] snd_ctl_elem_write+0x10f/0x140 [snd]
[   78.449410]  [<f88d64b9>] snd_ctl_ioctl+0x299/0xb70 [snd]
[   78.449564]  [<c01727d5>] do_lookup+0x65/0x190
[   78.449795]  [<c015d057>] handle_mm_fault+0xe7/0x3f0
[   78.449942]  [<f88d6220>] snd_ctl_ioctl+0x0/0xb70 [snd]
[   78.450095]  [<c01771db>] do_ioctl+0x2b/0x90
[   78.450236]  [<c017729c>] vfs_ioctl+0x5c/0x290
[   78.450371]  [<c0215060>] write_null+0x0/0x10
[   78.450514]  [<c017750d>] sys_ioctl+0x3d/0x70
[   78.450654]  [<c010415e>] sysenter_past_esp+0x5f/0x85
[   78.450800]  [<c02d0000>] xfrm_ealg_get_byname+0x0/0x20
[   78.450972]  =======================
[   78.451052] Code: 18 ed 85 f6 0f 85 9c 00 00 00 83 c8 04 ef 51 9d 89 e0 25 00 e0 ff ff ff 48 14 8b 40 08 a8 04 0f 85 8a 00 00 00 8b 93 ac 00 00 00 <0f> b6 8c 73 b0 00 00 00 0f b6 84 53 b0 00 00 00 39 c1 74 18 ba 
[   78.454370] EIP: [<f8c6efac>] snd_audigy_i2c_capture_source_put+0x9c/0x130 [snd_emu10k1] SS:ESP 0068:ca855d7c
Comment 16 James Courtier-Dutton 2007-11-12 05:15:43 UTC
Please attach a copy of your /etc/asound.state
Comment 17 unggnu 2007-11-12 06:30:05 UTC
This file doesn't exist at least with the Standard Ubuntu Gutsy Gibbon 7.10 Kernel.
Comment 18 James Courtier-Dutton 2007-11-12 06:58:00 UTC
Created attachment 13511 [details]
This patch (alsa hg#5530) adds mixer control parameter limit checks.

This should fix this bug. Please try.
Comment 19 James Courtier-Dutton 2007-11-12 07:02:59 UTC
Note: Try to find an "asound.state" on your PC somewhere before trying this patch, as this patch will over write the current bad one.
Maybe it is placed elsewhere.
Try
cd /etc/init.d
grep alsactl *
grep asound *

This might give you some pointers as to where it is.
Comment 20 unggnu 2007-11-12 07:12:49 UTC
Created attachment 13512 [details]
old asoundconf.state

Found asoundconf.state under /var/lib/alsa.
Comment 21 James Courtier-Dutton 2007-11-12 07:20:56 UTC
Thank you. You can try the patch now.
Comment 22 James Courtier-Dutton 2007-11-12 07:26:53 UTC
That asoundconf.state was trying to write 1070542911 to a control that only knows how to handle values 0 and 1, thus an overflow and the page fault.
This 1070542911 is a left over from alsa bug#3095
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3095
whereby that bad value is saved by alsactl into your asoundconf.state file.
So, although alsa bug#3095 was fixed, it still let the bad value back via alsactl restore.
The new patch catches the out of limit parameters and therefore prevents a page fault.
Comment 23 unggnu 2007-11-12 07:44:07 UTC
The latest patch fixes the problem. Many thanks! Great work!

[   74.394172] pccard: CardBus card inserted into slot 0
[   74.467857] PCI: Enabling device 0000:07:00.0 (0000 -> 0001)
[   74.468658] ACPI: PCI Interrupt 0000:07:00.0[A] -> GSI 21 (level, low) -> IRQ 16
[   74.468685] ALSA sound/pci/emu10k1/emu10k1_main.c:1673: vendor=0x1102, device=0x8, subsystem_vendor_id=0x20011102, subsystem_id=0x2001
[   74.468698] ALSA sound/pci/emu10k1/emu10k1_main.c:1698: Sound card name=Audigy 2 ZS Notebook [SB0530]
[   74.468792] PCI: Setting latency timer of device 0000:07:00.0 to 64
[   74.483855] ALSA sound/pci/emu10k1/emu10k1_main.c:218: Audigy2 value: Special config.
Comment 24 Rafael J. Wysocki 2007-12-01 13:14:48 UTC
Fixed by:

commit 74415a36767d99d3adf31b4a62e4e50725e6b66a
Author: James Courtier-Dutton <James@superbug.co.uk>
Date:   Mon Nov 12 14:55:19 2007 +0000

    [ALSA] emu10k1: Add mixer controls parameter checking.

http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=74415a36767d99d3adf31b4a62e4e50725e6b66a

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