Bug 11643

Summary: ALSA sound/core/pcm_native.c:1947: BUG? (err >= 0)
Product: Drivers Reporter: sangu (sangu.gnome)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED CODE_FIX    
Severity: normal CC: rjw, tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27-0.352.rc7.git1.fc10 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: alsa-info.txt

Description sangu 2008-09-24 16:51:52 UTC
Latest working kernel version:
2.6.27-rc7
Earliest failing kernel version:
2.6.27-rc7.git1

Distribution:
Fedora Rawhide

Hardware Environment:
$ cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe020000 irq 21
 1 [Live           ]: EMU10K1 - SBLive! Platinum [CT4760P]
                      SBLive! Platinum [CT4760P] (rev.7, serial:0x80401102) at 0xcc00, irq 17


Software Environment:
pulseaudio-0.9.12-6.fc10.i386
alsa-lib-1.0.18-6.rc3.fc10.i386
alsa-utils-1.0.18-3.rc3.fc10.i386

Problem Description:
When pulseaudio checks hda-intel, kernel oops.

$ dmesg
[skip]
ALSA sound/pci/hda/hda_intel.c:1404: azx_pcm_prepare: bufsize=0x10000, format=0x4011
ALSA sound/pci/hda/hda_codec.c:716: hda_codec_setup_stream: NID=0x6, stream=0x5, channel=0, format=0x4011
ALSA sound/pci/hda/hda_codec.c:716: hda_codec_setup_stream: NID=0x2, stream=0x5, channel=0, format=0x4011
ALSA sound/pci/hda/hda_codec.c:716: hda_codec_setup_stream: NID=0x5, stream=0x5, channel=0, format=0x4011
ALSA sound/pci/hda/hda_codec.c:716: hda_codec_setup_stream: NID=0x3, stream=0x5, channel=0, format=0x4011
ALSA sound/pci/hda/hda_intel.c:1404: azx_pcm_prepare: bufsize=0x10000, format=0x4011
ALSA sound/pci/hda/hda_codec.c:716: hda_codec_setup_stream: NID=0x6, stream=0x5, channel=0, format=0x4011
ALSA sound/pci/hda/hda_codec.c:716: hda_codec_setup_stream: NID=0x2, stream=0x5, channel=0, format=0x4011
ALSA sound/pci/hda/hda_codec.c:716: hda_codec_setup_stream: NID=0x5, stream=0x5, channel=0, format=0x4011
ALSA sound/pci/hda/hda_codec.c:716: hda_codec_setup_stream: NID=0x3, stream=0x5, channel=0, format=0x4011
hda_codec: num_steps = 0 for NID=0x8 (ctl = Capture Volume)
ALSA sound/core/pcm_native.c:1947: BUG? (err >= 0)
Pid: 3419, comm: pulseaudio Tainted: P          2.6.27-0.352.rc7.git1.fc10.i686 #1
 [<f88f2326>] snd_pcm_hw_constraints_complete+0xba/0x271 [snd_pcm]
 [<f88f2540>] snd_pcm_open_substream+0x63/0x9c [snd_pcm]
 [<f88f2622>] snd_pcm_open+0xa9/0x192 [snd_pcm]
 [<c0427d4d>] ? default_wake_function+0x0/0xd
 [<f88a319f>] ? snd_lookup_minor_data+0x44/0x4b [snd]
 [<f88f2736>] snd_pcm_capture_open+0x2b/0x2e [snd_pcm]
 [<f88a34ef>] snd_open+0xcc/0x129 [snd]
 [<c04a082c>] chrdev_open+0x12e/0x145
 [<c049ca7b>] __dentry_open+0x15e/0x256
 [<c049cc04>] nameidata_to_filp+0x24/0x38
 [<c04a06fe>] ? chrdev_open+0x0/0x145
 [<c04a6ea2>] do_filp_open+0x32b/0x62b
 [<c05390dd>] ? _raw_spin_unlock+0x74/0x78
 [<c06e5017>] ? _spin_unlock+0x22/0x25
 [<c049c83a>] do_sys_open+0x47/0xbc
 [<c049c8fb>] sys_open+0x23/0x2b
 [<c0404d0a>] syscall_call+0x7/0xb
 =======================
ALSA sound/core/pcm_native.c:2053: snd_pcm_hw_constraints_complete failed
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x8
ALSA sound/core/pcm_native.c:1947: BUG? (err >= 0)
Pid: 3419, comm: pulseaudio Tainted: P          2.6.27-0.352.rc7.git1.fc10.i686 #1
 [<f88f2326>] snd_pcm_hw_constraints_complete+0xba/0x271 [snd_pcm]
 [<f88f2540>] snd_pcm_open_substream+0x63/0x9c [snd_pcm]
 [<f88f2622>] snd_pcm_open+0xa9/0x192 [snd_pcm]
 [<c0427d4d>] ? default_wake_function+0x0/0xd
 [<f88a319f>] ? snd_lookup_minor_data+0x44/0x4b [snd]
 [<f88f2736>] snd_pcm_capture_open+0x2b/0x2e [snd_pcm]
 [<f88a34ef>] snd_open+0xcc/0x129 [snd]
 [<c04a082c>] chrdev_open+0x12e/0x145
 [<c049ca7b>] __dentry_open+0x15e/0x256
 [<c049cc04>] nameidata_to_filp+0x24/0x38
 [<c04a06fe>] ? chrdev_open+0x0/0x145
 [<c04a6ea2>] do_filp_open+0x32b/0x62b
 [<c05390dd>] ? _raw_spin_unlock+0x74/0x78
 [<c06e5017>] ? _spin_unlock+0x22/0x25
 [<c049c83a>] do_sys_open+0x47/0xbc
 [<c049c8fb>] sys_open+0x23/0x2b
 [<c0404d0a>] syscall_call+0x7/0xb
 =======================
ALSA sound/core/pcm_native.c:2053: snd_pcm_hw_constraints_complete failed
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x8
ALSA sound/core/pcm_native.c:1947: BUG? (err >= 0)
Pid: 3419, comm: pulseaudio Tainted: P          2.6.27-0.352.rc7.git1.fc10.i686 #1
 [<f88f2326>] snd_pcm_hw_constraints_complete+0xba/0x271 [snd_pcm]
 [<f88f2540>] snd_pcm_open_substream+0x63/0x9c [snd_pcm]
 [<f88f2622>] snd_pcm_open+0xa9/0x192 [snd_pcm]
 [<c0427d4d>] ? default_wake_function+0x0/0xd
 [<f88a319f>] ? snd_lookup_minor_data+0x44/0x4b [snd]
 [<f88f2736>] snd_pcm_capture_open+0x2b/0x2e [snd_pcm]
 [<f88a34ef>] snd_open+0xcc/0x129 [snd]
 [<c04a082c>] chrdev_open+0x12e/0x145
 [<c049ca7b>] __dentry_open+0x15e/0x256
 [<c049cc04>] nameidata_to_filp+0x24/0x38
 [<c04a06fe>] ? chrdev_open+0x0/0x145
 [<c04a6ea2>] do_filp_open+0x32b/0x62b
 [<c05390dd>] ? _raw_spin_unlock+0x74/0x78
 [<c06e5017>] ? _spin_unlock+0x22/0x25
 [<c049c83a>] do_sys_open+0x47/0xbc
 [<c049c8fb>] sys_open+0x23/0x2b
 [<c0404d0a>] syscall_call+0x7/0xb
 =======================
ALSA sound/core/pcm_native.c:2053: snd_pcm_hw_constraints_complete failed
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x8
ALSA sound/core/pcm_native.c:1947: BUG? (err >= 0)
Pid: 3419, comm: pulseaudio Tainted: P          2.6.27-0.352.rc7.git1.fc10.i686 #1
 [<f88f2326>] snd_pcm_hw_constraints_complete+0xba/0x271 [snd_pcm]
 [<f88f2540>] snd_pcm_open_substream+0x63/0x9c [snd_pcm]
 [<f88f2622>] snd_pcm_open+0xa9/0x192 [snd_pcm]
 [<c0427d4d>] ? default_wake_function+0x0/0xd
 [<f88a319f>] ? snd_lookup_minor_data+0x44/0x4b [snd]
 [<f88f2736>] snd_pcm_capture_open+0x2b/0x2e [snd_pcm]
 [<f88a34ef>] snd_open+0xcc/0x129 [snd]
 [<c04a082c>] chrdev_open+0x12e/0x145
 [<c049ca7b>] __dentry_open+0x15e/0x256
 [<c049cc04>] nameidata_to_filp+0x24/0x38
 [<c04a06fe>] ? chrdev_open+0x0/0x145
 [<c04a6ea2>] do_filp_open+0x32b/0x62b
 [<c05390dd>] ? _raw_spin_unlock+0x74/0x78
 [<c06e5017>] ? _spin_unlock+0x22/0x25
 [<c049c83a>] do_sys_open+0x47/0xbc
 [<c049c8fb>] sys_open+0x23/0x2b
 [<c0404d0a>] syscall_call+0x7/0xb
 =======================
ALSA sound/core/pcm_native.c:2053: snd_pcm_hw_constraints_complete failed
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x8
ALSA sound/core/pcm_native.c:1947: BUG? (err >= 0)
Pid: 3419, comm: pulseaudio Tainted: P          2.6.27-0.352.rc7.git1.fc10.i686 #1
 [<f88f2326>] snd_pcm_hw_constraints_complete+0xba/0x271 [snd_pcm]
 [<f88f2540>] snd_pcm_open_substream+0x63/0x9c [snd_pcm]
 [<f88f2622>] snd_pcm_open+0xa9/0x192 [snd_pcm]
 [<c0427d4d>] ? default_wake_function+0x0/0xd
 [<f88a319f>] ? snd_lookup_minor_data+0x44/0x4b [snd]
 [<f88f2736>] snd_pcm_capture_open+0x2b/0x2e [snd_pcm]
 [<f88a34ef>] snd_open+0xcc/0x129 [snd]
 [<c04a082c>] chrdev_open+0x12e/0x145
 [<c049ca7b>] __dentry_open+0x15e/0x256
 [<c049cc04>] nameidata_to_filp+0x24/0x38
 [<c04a06fe>] ? chrdev_open+0x0/0x145
 [<c04a6ea2>] do_filp_open+0x32b/0x62b
 [<c05390dd>] ? _raw_spin_unlock+0x74/0x78
 [<c06e5017>] ? _spin_unlock+0x22/0x25
 [<c049c83a>] do_sys_open+0x47/0xbc
 [<c049c8fb>] sys_open+0x23/0x2b
 [<c0404d0a>] syscall_call+0x7/0xb
 =======================
ALSA sound/core/pcm_native.c:2053: snd_pcm_hw_constraints_complete failed
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x8
ALSA sound/core/pcm_native.c:1947: BUG? (err >= 0)
Pid: 3419, comm: pulseaudio Tainted: P          2.6.27-0.352.rc7.git1.fc10.i686 #1
 [<f88f2326>] snd_pcm_hw_constraints_complete+0xba/0x271 [snd_pcm]
 [<f88f2540>] snd_pcm_open_substream+0x63/0x9c [snd_pcm]
 [<f88f2622>] snd_pcm_open+0xa9/0x192 [snd_pcm]
 [<c0427d4d>] ? default_wake_function+0x0/0xd
 [<f88a319f>] ? snd_lookup_minor_data+0x44/0x4b [snd]
 [<f88f2736>] snd_pcm_capture_open+0x2b/0x2e [snd_pcm]
 [<f88a34ef>] snd_open+0xcc/0x129 [snd]
 [<c04a082c>] chrdev_open+0x12e/0x145
 [<c049ca7b>] __dentry_open+0x15e/0x256
 [<c049cc04>] nameidata_to_filp+0x24/0x38
 [<c04a06fe>] ? chrdev_open+0x0/0x145
 [<c04a6ea2>] do_filp_open+0x32b/0x62b
 [<c05390dd>] ? _raw_spin_unlock+0x74/0x78
 [<c06e5017>] ? _spin_unlock+0x22/0x25
 [<c049c83a>] do_sys_open+0x47/0xbc
 [<c049c8fb>] sys_open+0x23/0x2b
 [<c0404d0a>] syscall_call+0x7/0xb
 =======================
ALSA sound/core/pcm_native.c:2053: snd_pcm_hw_constraints_complete failed
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x8
ALSA sound/core/pcm_native.c:1947: BUG? (err >= 0)
Pid: 3419, comm: pulseaudio Tainted: P          2.6.27-0.352.rc7.git1.fc10.i686 #1
 [<f88f2326>] snd_pcm_hw_constraints_complete+0xba/0x271 [snd_pcm]
 [<f88f2540>] snd_pcm_open_substream+0x63/0x9c [snd_pcm]
 [<f88f2622>] snd_pcm_open+0xa9/0x192 [snd_pcm]
 [<c0427d4d>] ? default_wake_function+0x0/0xd
 [<f88a319f>] ? snd_lookup_minor_data+0x44/0x4b [snd]
 [<f88f2736>] snd_pcm_capture_open+0x2b/0x2e [snd_pcm]
 [<f88a34ef>] snd_open+0xcc/0x129 [snd]
 [<c04a082c>] chrdev_open+0x12e/0x145
 [<c049ca7b>] __dentry_open+0x15e/0x256
 [<c049cc04>] nameidata_to_filp+0x24/0x38
 [<c04a06fe>] ? chrdev_open+0x0/0x145
 [<c04a6ea2>] do_filp_open+0x32b/0x62b
 [<c05390dd>] ? _raw_spin_unlock+0x74/0x78
 [<c06e5017>] ? _spin_unlock+0x22/0x25
 [<c049c83a>] do_sys_open+0x47/0xbc
 [<c049c8fb>] sys_open+0x23/0x2b
 [<c0404d0a>] syscall_call+0x7/0xb
 =======================
ALSA sound/core/pcm_native.c:2053: snd_pcm_hw_constraints_complete failed
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x8
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x2
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x5
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x3
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x6
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x2
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x5
ALSA sound/pci/hda/hda_codec.c:728: hda_codec_cleanup_stream: NID=0x3
hda_codec: num_steps = 0 for NID=0x8 (ctl = Capture Volume)
hda_codec: num_steps = 0 for NID=0x8 (ctl = Capture Volume)

See Also : https://bugzilla.redhat.com/show_bug.cgi?id=463589
Comment 1 Takashi Iwai 2008-09-24 23:31:46 UTC
First off, don't worry - It's no Oops but just a stack trace.

Looking through the kernel messages, it seems that the widget 0x08 is problematic.
Could you run alsa-info.sh with --no-upload option and attach the generated file?  The script is found in
    http://www.alsa-project.org/alsa-info.sh
Comment 2 sangu 2008-09-25 00:19:06 UTC
Created attachment 18024 [details]
alsa-info.txt
Comment 3 Takashi Iwai 2008-09-26 02:09:55 UTC
alsa-info output looks OK at a quick glance, so it's likely an unstable communication with a codec chip.

Does sound-2.6.git tree (master branch) work?  Pull from
    git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git master

BTW, there is no change since 2.6.27-rc7.  So, it cannot be a regression since 2.6.27-rc7.
Comment 4 sangu 2008-09-27 21:22:04 UTC
(In reply to comment #3)
> alsa-info output looks OK at a quick glance, so it's likely an unstable
> communication with a codec chip.
> 
> Does sound-2.6.git tree (master branch) work?  Pull from
>     git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git master
> 
> BTW, there is no change since 2.6.27-rc7.  So, it cannot be a regression
> since
> 2.6.27-rc7.
> 

hmm, this issue is random< after buying mobo with this sound chip (HDA-Intel - HDA NVidia) at Sep, 2008).
Sometimes, this sound chip (HDA-Intel - HDA NVidia) works well, maybe.
Sometimes, this sound chip (HDA-Intel - HDA NVidia) fail to be loaded( https://bugzilla.redhat.com/show_bug.cgi?id=463037 ).
Sometimes, this sound chip (HDA-Intel - HDA NVidia) has < this bug 11643 >.
Comment 5 Takashi Iwai 2008-10-05 02:18:10 UTC
Did you try the latest sound git tree above?
Comment 6 Rafael J. Wysocki 2008-10-05 03:54:59 UTC
On Sunday, 5 of October 2008, Takashi Iwai wrote:
> At Sat,  4 Oct 2008 19:32:55 +0200 (CEST),
> Rafael J. Wysocki wrote:
> > 
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=11643
> > Subject             : ALSA sound/core/pcm_native.c:1947: BUG? (err &gt;= 0)
> > Submitter   : sangu <sangu.gnome@gmail.com>
> > Date                : 2008-09-24 16:51 (11 days old)
> 
> This is unlikely a 2.6.27 regression.
> It's a bug to be fixed, though.
Comment 7 sangu 2008-12-15 17:56:48 UTC
After installing kernel-2.6.27-44, HDA_Intel always works well.

in kernel package changelog
* Mon Dec 08 2008 Chuck Ebbert <cebbert@redhat.com> 2.6.27.7-139
- ALSA 1.0.18a