NULL pointer dereference
Hi,
testing the latest cvs version to see if I can make the internal speaker working as in realtek's drivers (after having upgraded my kernel), I got it (and I get it as soon as I load the sound module):
hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
Unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: e0a52a74 *pde = 00000000 Oops: 0002 [#1] PREEMPT Modules linked in: snd_hda_intel snd_hda_codec snd_pcm snd_timer snd snd_page_alloc md5 ipv6 saa7134 soundcore joydev evdev parport_pc parport video_buf v4l2_common v4l1_compat i2c_core ir_common videodev unix CPU: 0 EIP: 0060:[<e0a52a74>] Not tainted VLI EFLAGS: 00010293 (2.6.12)
EIP is at alc880_auto_fill_dac_nids+0x44/0xc0 [snd_hda_codec]
eax: fffffffe ebx: dc05e348 ecx: 00000000 edx: 00000000
esi: dc05e200 edi: 00000000 ebp: d831f000 esp: d9647df8
ds: 007b es: 007b ss: 0068
Process modprobe (pid: 9025, threadinfo=d9646000 task=ded1caa0)
Stack: 00000000 00000000 00000000 00000000 dc05e200 dc05e348 00000006 e0a530a4
dc05e200 dc05e348 dc05e200 d831f000 e0a533c7 d831f000 e0a5e1e0 000000d0
00000f00 00000005 00000000 d831f000 e0a531b0 00000000 e0a4ead6 d831f000
Call Trace:
[<e0a530a4>] alc880_parse_auto_config+0x34/0x100 [snd_hda_codec]
[<e0a533c7>] patch_alc880+0x217/0x270 [snd_hda_codec]
[<e0a531b0>] patch_alc880+0x0/0x270 [snd_hda_codec]
[<e0a4ead6>] snd_hda_codec_new+0x1a6/0x230 [snd_hda_codec]
[<e09cf92f>] azx_codec_create+0xbf/0xd0 [snd_hda_intel]
[<e09cf140>] azx_send_cmd+0x0/0x80 [snd_hda_intel]
[<e09cf270>] azx_get_response+0x0/0x90 [snd_hda_intel]
[<c01d3ee8>] sprintf+0x28/0x30
[<e09d0753>] azx_probe+0xf3/0x1b0 [snd_hda_intel]
[<c01dd472>] pci_device_probe_static+0x52/0x70
[<c01dd4cc>] __pci_device_probe+0x3c/0x50
[<c01dd50c>] pci_device_probe+0x2c/0x50
[<c0224acf>] driver_probe_device+0x2f/0x80
[<c0224c1c>] driver_attach+0x5c/0xa0
[<c022518d>] bus_add_driver+0x9d/0xd0
[<c01dd650>] pci_device_shutdown+0x0/0x30
[<c01dd7be>] pci_register_driver+0x6e/0x90
[<e097b00f>] alsa_card_azx_init+0xf/0x11 [snd_hda_intel]
[<c0138928>] sys_init_module+0x148/0x1f0
[<c0103185>] syscall_call+0x7/0xb
Code: 8b 13 31 ff 39 d7 7d 52 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 90 0f b7 44 7b 04 8d 48 ec 66 83 f9 03 77 13 8b 56 3c 83 e8 16 <66> 89 04 7a c7 04 8c 01 00 00 00 8b 13 47 39 d7 7c da 31 ff 39
------------------------------------
My system is :
Linux version 2.6.12 (root@medion) (version gcc 3.3.5 (Debian 1:3.3.5-13)) #1 Mon Jun 20 10:23:36 CEST 2005
Hope this helps.
Fabien Devaux.
PS: realtek's drivers are ok with.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
At Mon, 20 Jun 2005 14:33:44 +0200,
Quoted 5 lines · fab
Hi,
testing the latest cvs version to see if I can make the internal speaker working as in realtek's drivers (after having upgraded my kernel), I got it (and I get it as soon as I load the sound module):
Looks like the new code I added for auto-probing is buggy. As a workaround, pass model=asus option unless it's fixed.
Takashi
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
At Mon, 20 Jun 2005 19:26:13 +0200,
Quoted 11 lines · 私 wrote:
At Mon, 20 Jun 2005 14:33:44 +0200,
Quoted 5 lines · fab
Hi,
testing the latest cvs version to see if I can make the internal speaker working as in realtek's drivers (after having upgraded my kernel), I got it (and I get it as soon as I load the sound module):Looks like the new code I added for auto-probing is buggy. As a workaround, pass model=asus option unless it's fixed.
... or try the patch below.
Takashi
Index: alsa-kernel/pci/hda/patch_realtek.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/hda/patch_realtek.c,v retrieving revision 1.21
pci/hda/patch_realtek.c +2 -0
@@ -119,6 +119,7 @@unsigned int num_kctl_alloc, num_kctl_used;snd_kcontrol_new_t *kctl_alloc;struct hda_input_mux private_imux; +hda_nid_t private_dac_nids[4 ]; };
@@ -1809,6 +1810,7 @@int i, j;memset (assigned,0 ,sizeof (assigned)); + spec->multiout.dac_nids = &spec->dac_nids_private;/* check the pins hardwired to audio widget */ for (i =0 ; i < cfg->line_outs; i++) {
Quoted 11 lines · Takashi Iwai
At Mon, 20 Jun 2005 19:26:13 +0200,
Quoted 9 lines · ?$B;d
At Mon, 20 Jun 2005 14:33:44 +0200,
Quoted 5 lines · fab
Hi,
testing the latest cvs version to see if I can make the internal speaker working as in realtek's drivers (after having upgraded my kernel), I got it (and I get it as soon as I load the sound module):
Quoted 4 lines
Quoted 2 lines
Looks like the new code I added for auto-probing is buggy. As a workaround, pass model=asus option unless it's fixed.
... or try the patch below.
Ok, after having applied the patch everything is weired, it works even worse than before :(
If I pass card=foo with "foo" being a quite old card type, I get less or more the same effect as before (badly working).
With a new "foo" (z71v, asus, etc...) or no param at all, I get something like:hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
Then, If I run "alsamixer" It fails:
alsamixer: function snd_mixer_load failed: Invalid argument
and the kernel prints:hda_codec: num_steps = 0 for NID=0x9
Hope this helps.
Fabien Devaux.
PS: it works like a charm in realtek's version, have you really applied all the changes ? should I pass a specific model= argument ?
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
At Mon, 20 Jun 2005 23:49:31 +0200,
Quoted 13 lines · fab
Quoted 11 lines · Takashi Iwai
At Mon, 20 Jun 2005 19:26:13 +0200,
Quoted 9 lines · ?$B;d
At Mon, 20 Jun 2005 14:33:44 +0200,
Quoted 5 lines · fab
Hi,
testing the latest cvs version to see if I can make the internal speaker working as in realtek's drivers (after having upgraded my kernel), I got it (and I get it as soon as I load the sound module):
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Looks like the new code I added for auto-probing is buggy. As a workaround, pass model=asus option unless it's fixed.
... or try the patch below.
Ok, after having applied the patch everything is weired, it works even worse than before :(
Might be. Without model parameter, the experimental auto-configuration will be selected.
Quoted 2 lines
If I pass card=foo with "foo" being a quite old card type, I get less or more the same effect as before (badly working).
You have to pass "model" parameter, not card.
Quoted 6 lines
With a new "foo" (z71v, asus, etc...) or no param at all, I get something like:
hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...Then, If I run "alsamixer" It fails:
alsamixer: functionsnd_mixer_loadfailed: Invalid argument
Is it CVS version? Might be safer to use alsa-lib/alsa-utils latest 1.0.9x release right now since the mixer stuff is being changed greatly.
Quoted 8 lines
and the kernel prints:
hda_codec:num_steps= 0 for NID=0x9Hope this helps.
Fabien Devaux.PS: it works like a charm in realtek's version, have you really applied all the changes ?
The source is there, you can check it by yourself :)
Quoted 1 line
should I pass a specific model= argument ?
The entry for your device seems just missing.
Give me the output of lspci -nv.
Takashi
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Tue, 21 Jun 2005 11:42:50 +0200,
Quoted 7 lines · fab
Quoted 7 lines
Quoted 3 lines
Ok, after having applied the patch everything is weired, it works even worse than before :(
Might be. Without model parameter, the experimental auto-configuration will be selected.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
If I pass card=foo with "foo" being a quite old card type, I get less or more the same effect as before (badly working).
You have to pass "model" parameter, not card.
I confused myself in the email (not on the shell), I passed the "model" param.
Hmm, strange. If a proper model string is passed, the error message below shouldn't appear...
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
With a new "foo" (z71v, asus, etc...) or no param at all, I get something like:
hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Then, If I run "alsamixer" It fails:
alsamixer: functionsnd_mixer_loadfailed: Invalid argumentIs it CVS version? Might be safer to use alsa-lib/alsa-utils latest 1.0.9x release right now since the mixer stuff is being changed greatly.
I use everything from 1.0.9x but the drivers which are CVS.
OK, then the problem is somewhere different...
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
should I pass a specific model= argument ?
The entry for your device seems just missing.
Give me the output of lspci -nv.Ok, take a look at the file joined.
Thanks, the pci id reveals it's a W810. So, the model is "w810". But this device should be selected automatically since it's already in the table.
Anyway, the below is the patch to fix w810 GPIO config, which was dropped accidentally. Apply this to the clean CVS alsa-kernel. This includes the last patch, too.
Please make sure that you have no model= option in /etc/modprobe.conf or /etc/modprobe.d/* or whatever, and try to load snd-hda-intel without model option again (i.e. using the default config).
Hope this helps.
Takashi
Index: alsa-kernel/pci/hda/patch_realtek.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/hda/patch_realtek.c,v retrieving revision 1.21
pci/hda/patch_realtek.c +5 -3
@@ -119,6 +119,7 @@unsigned int num_kctl_alloc, num_kctl_used;snd_kcontrol_new_t *kctl_alloc;struct hda_input_mux private_imux; +hda_nid_t private_dac_nids[4 ]; };
@@ -1656,7 +1657,8 @@ }, [ALC880_W810] = { .mixers = { alc880_w810_base_mixer }, - .init_verbs = { alc880_volume_init_verbs, alc880_pin_w810_init_verbs }, + .init_verbs = { alc880_volume_init_verbs, alc880_pin_w810_init_verbs, + alc880_gpio2_init_verbs }, .num_dacs = ARRAY_SIZE(alc880_w810_dac_nids), .dac_nids = alc880_w810_dac_nids, .dig_out_nid = ALC880_DIGOUT_NID,
@@ -1666,8 +1668,7 @@ }, [ALC880_Z71V] = { .mixers = { alc880_z71v_mixer }, - .init_verbs = { alc880_volume_init_verbs, alc880_pin_z71v_init_verbs, - alc880_gpio2_init_verbs }, + .init_verbs = { alc880_volume_init_verbs, alc880_pin_z71v_init_verbs }, .num_dacs = ARRAY_SIZE(alc880_z71v_dac_nids), .dac_nids = alc880_z71v_dac_nids, .dig_out_nid = ALC880_DIGOUT_NID,
@@ -1809,6 +1810,7 @@int i, j;memset (assigned,0 ,sizeof (assigned)); + spec->multiout.dac_nids = &spec->dac_nids_private;/* check the pins hardwired to audio widget */ for (i =0 ; i < cfg->line_outs; i++) {
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Tue, 21 Jun 2005 13:07:13 +0200,
Quoted 3 lines · fab
Your patch still contains the
private_dac_nids=>dac_nids_privatetypo...
Oh, yes.
Quoted 10 lines
My
/etc/modprobe.d/soundis :options snd device_mode=0666
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intelAt reboot (with the new drivers) I get:
ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1b.0 to 64hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
OK, found a bug. The patch is below.
Quoted 4 lines
A bit later:
hda_codec:num_steps= 0 for NID=0x8
When I type "alsamixer":hda_codec:num_steps= 0 for NID=0x9
Hmm, these messages are a bit more serious.
Basically this means that GET_AMP_CAPS requests return bogus values. Could you attach /proc/asound/card0/codec#* file for checking?
Takashi
Index: alsa-kernel/pci/hda/patch_realtek.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/hda/patch_realtek.c,v retrieving revision 1.21
retrieving revision 1.23
pci/hda/patch_realtek.c +7 -4
@@ -119,6 +119,7 @@unsigned int num_kctl_alloc, num_kctl_used;snd_kcontrol_new_t *kctl_alloc;struct hda_input_mux private_imux; +hda_nid_t private_dac_nids[4 ]; };
@@ -1549,7 +1550,8 @@ { .pci_subvendor = 0x1019, .pci_subdevice = 0xa880, .config = ALC880_5ST_DIG }, { .pci_subvendor = 0x1019, .pci_subdevice = 0xa884, .config = ALC880_5ST_DIG }, { .pci_subvendor = 0x1695, .pci_subdevice = 0x400d, .config = ALC880_5ST_DIG }, - { .pci_subvendor = 0x0000, .pci_subdevice = 0x8086, .config = ALC880_5ST_DIG }, + /* note subvendor = 0 below */ + /* { .pci_subvendor = 0x0000, .pci_subdevice = 0x8086, .config = ALC880_5ST_DIG }, */ { .modelname = "w810", .config = ALC880_W810 }, { .pci_subvendor = 0x161f, .pci_subdevice = 0x203d, .config = ALC880_W810 },
@@ -1656,7 +1658,8 @@ }, [ALC880_W810] = { .mixers = { alc880_w810_base_mixer }, - .init_verbs = { alc880_volume_init_verbs, alc880_pin_w810_init_verbs }, + .init_verbs = { alc880_volume_init_verbs, alc880_pin_w810_init_verbs, + alc880_gpio2_init_verbs }, .num_dacs = ARRAY_SIZE(alc880_w810_dac_nids), .dac_nids = alc880_w810_dac_nids, .dig_out_nid = ALC880_DIGOUT_NID,
@@ -1666,8 +1669,7 @@ }, [ALC880_Z71V] = { .mixers = { alc880_z71v_mixer }, - .init_verbs = { alc880_volume_init_verbs, alc880_pin_z71v_init_verbs, - alc880_gpio2_init_verbs }, + .init_verbs = { alc880_volume_init_verbs, alc880_pin_z71v_init_verbs }, .num_dacs = ARRAY_SIZE(alc880_z71v_dac_nids), .dac_nids = alc880_z71v_dac_nids, .dig_out_nid = ALC880_DIGOUT_NID,
@@ -1809,6 +1811,7 @@int i, j;memset (assigned,0 ,sizeof (assigned)); + spec->multiout.dac_nids = spec->private_dac_nids;/* check the pins hardwired to audio widget */ for (i =0 ; i < cfg->line_outs; i++) {