Bug 114244 - ALSA snd-usb-audio oopsing and/or failing to take data
Summary: ALSA snd-usb-audio oopsing and/or failing to take data
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel   
(Show other bugs)
Version: rawhide
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-01-25 13:05 UTC by Andy Green
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-04-20 09:57:50 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Andy Green 2004-01-25 13:05:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115

Description of problem:
USB Alsa Audio seems to be flaky and broken recently.  I have two USB
audio devices (USB Soundblaster -- some kind of Audigy or something,
and a Logitech USB headset with mic) on this Dell Inspiron 5150
laptop, and both are causing oopses and error messages -- and failing
to play when they are the target of sound using Alsa.

Somebody else had similar troubles....


Here is the reply from an Alsa dev suggesting a very small patch


> try to define SND_USE_ASYNC_UNLINK at the beginning of
> sound/usb/usbaudio.c.  there was a problem on 2.4 kernel, so it's
> disabled as default, but it should be activated originally.

I tried this, which it made a small change - sometimes it would work
in mplayer until you moved around in the file - it did not make the
problem go away.

In 2.6.1 build 52 this line is still commented out.

I believe something is badly buggered either in Alsa or in the Kernel
with USB audio.

Version-Release number of selected component (if applicable):
kernel-2.6.1-1.52 (also present in recent 2.4+alsa?)

How reproducible:

Steps to Reproduce:
1. Plug in a USB audio device
2. Configure it for Alsa
3. Attempt to play stuff (eg, in mplayer)

Actual Results:  Here is what I see with the SND_USE_ASYNC_UNLINK
uncommented as suggested

Jan 25 08:03:44 fastcat kernel: Debug: sleeping function called from
invalid context at kernel/sched.c:1748
Jan 25 08:03:44 fastcat kernel: in_atomic():0, irqs_disabled():1
Jan 25 08:03:44 fastcat kernel: Call Trace:
Jan 25 08:03:44 fastcat kernel:  [<c0127241>] __might_sleep+0x91/0xb0
Jan 25 08:03:44 fastcat kernel:  [<c012537f>]
Jan 25 08:03:44 fastcat kernel:  [<c014f8e4>] file_read_actor+0xe4/0xf0
Jan 25 08:03:44 fastcat kernel:  [<f88e773d>]
hcd_unlink_urb+0x3fd/0x6f0 [usbcore]
Jan 25 08:03:44 fastcat kernel:  [<c01a100a>] update_atime+0x9a/0xe0
Jan 25 08:03:44 fastcat kernel:  [<f899ff70>]
snd_complete_urb+0x0/0xd0 [snd_usb_audio]
Jan 25 08:03:44 fastcat kernel:  [<f88e85fd>] usb_unlink_urb+0x3d/0x40
Jan 25 08:03:44 fastcat kernel:  [<f89a01cd>]
deactivate_urbs+0xad/0xb0 [snd_usb_audio]
Jan 25 08:03:44 fastcat kernel:  [<f89a0432>]
snd_usb_pcm_trigger+0x52/0x60 [snd_usb_audio]
Jan 25 08:03:44 fastcat kernel:  [<f89c5f75>]
snd_pcm_do_stop+0x25/0x30 [snd_pcm]
Jan 25 08:03:44 fastcat kernel:  [<f89c57c9>]
snd_pcm_action_single+0x39/0x70 [snd_pcm]
Jan 25 08:03:44 fastcat kernel:  [<f89c5990>]
snd_pcm_action+0x190/0x1a0 [snd_pcm]
Jan 25 08:03:44 fastcat kernel:  [<f89cc8cf>]
snd_pcm_update_hw_ptr+0x11f/0x1e0 [snd_pcm]
Jan 25 08:03:44 fastcat kernel:  [<f89c601f>] snd_pcm_stop+0x1f/0x30
Jan 25 08:03:44 fastcat kernel:  [<f89c7860>]
snd_pcm_playback_drop+0x1c0/0x3c0 [snd_pcm]
Jan 25 08:03:44 fastcat kernel:  [<f89ca9bc>]
snd_pcm_playback_ioctl1+0x6c/0x5f0 [snd_pcm]
Jan 25 08:03:44 fastcat kernel:  [<c017a967>] vfs_read+0x107/0x160
Jan 25 08:03:44 fastcat kernel:  [<c01946a5>] sys_ioctl+0xe5/0x260
Jan 25 08:03:44 fastcat kernel:  [<c010c72f>] syscall_call+0x7/0xb
Jan 25 08:03:44 fastcat kernel:
Jan 25 08:03:44 fastcat kernel: cannot submit datapipe for urb 0, err
= -22
Jan 25 08:04:25 fastcat last message repeated 8 times
Jan 25 08:04:29 fastcat last message repeated 3 times

Here is what I get playing video in mplayer on the normal 2.6.1-1.52
kernel... one second of video plays, then it holds the last frame (and
will exit with q to quit nicely, its not crashed)... here is what is
in /var/log/messages:

Jan 25 12:19:46 fastcat kernel: cannot submit datapipe for urb 0, err
= -38

Expected Results:  In previous 2.4 kernels audio would play great, the
last one I'm pretty sure was okay is 2.4 build 2097 I think.

Additional info:

Dell Inspiron 5150, 3GHz Intel
nVidia video driver
Creative USB Soundblaster model SB0300
Logitech USB headset with mic

Comment 1 Andy Green 2004-01-25 15:04:35 UTC
Playing back to Headset works reasonably well at the moment but
generates the Oopses as shown in the previous comment.

Playing back to the Audigy USB device just generates the -38 error in
/var/log/messages and no output at all.  This was working great on 2.4
kernel versions a few weeks ago.

Some additional data:

(Mozilla 1.6 doesn't seem to like the Create New Attachment POST
button :-/ )

[root@fastcat linux-2.6.1-1.52]# cat /proc/asound/cards
0 [Headset        ]: USB-Audio - Logitech USB Headset
                     Logitech Logitech USB Headset at usb-0000:00:1d.0-1
1 [NX             ]: USB-Audio - SB Audigy 2 NX
                     Creative Technology Ltd SB Audigy 2 NX at

[root@fastcat linux-2.6.1-1.52]# lsmod
Module                  Size  Used by
snd_usb_audio          63680  0
snd_rawmidi            28960  1 snd_usb_audio
snd_seq_device          8456  1 snd_rawmidi
snd_pcm               112136  1 snd_usb_audio
snd_timer              32516  1 snd_pcm
snd                    55396  5
soundcore              10848  1 snd
p8022                   2560  0
psnap                   4740  0
llc                     7444  2 p8022,psnap
evdev                   9728  1
wacom                  10624  0
nvidia               2075816  12
binfmt_misc            11144  1
md5                     4224  1
ipv6                  265856  10
autofs                 16768  0
ds                     14724  2
yenta_socket           17408  0
pcmcia_core            68320  2 ds,yenta_socket
ipt_REJECT              6528  1
ipt_state               1920  1
ip_conntrack           30768  1 ipt_state
iptable_filter          2816  1
ip_tables              17280  3 ipt_REJECT,ipt_state,iptable_filter
b44                    28804  0
sg                     36760  0
microcode               7328  0
sbp2                   28168  1
ide_cd                 41220  0
cdrom                  38812  1 ide_cd
ohci1394               42756  0
ieee1394              295472  2 sbp2,ohci1394
sd_mod                 17312  4
usb_storage            65728  1
scsi_mod              130744  4 sg,sbp2,sd_mod,usb_storage
snd_page_alloc         11780  1 snd_pcm
hid                    69184  0
ehci_hcd               28804  0
uhci_hcd               43536  0
usbcore               121948  8
thermal                13200  0
processor              14116  1 thermal
fan                     4108  0
button                  6168  0
battery                 9740  0
asus_acpi              10136  0
ac                      4876  0
ext3                  131496  4
jbd                    88088  1 ext3

Comment 2 Andy Green 2004-02-02 19:24:45 UTC
Got a reply from the Alsa mailing list from Takahi Iwai who seems to
be an important dev on Alsa:


> yes, it's a known bug in the old ALSA driver.
> already fixed in the recent code.

I'm going to go on and try to put a more recent Alsa into the Redhat
Kernel myself... could Redhat consider to update alsa in their 2.6
kernel for FC2???  (Or at least release-note that snd-usb-audio will
barf until it is fixed upstream?)

Comment 3 Warren Togami 2004-04-19 23:06:25 UTC
The best thing you can do to get this into the official FC2 kernel is
to convince LKML upstream to merge the fixes in the newer versions of

Comment 4 Andy Green 2004-04-20 09:57:14 UTC
Hi Warren - this was fixed upstream a couple of weeks afterwards. 
I still have another strange problem where my USB device will not 
work properly if it is left in during an FC2 powerup and boot.  It 
works fine if I pull it out before the boot, and plug it in 
afterwards.  What is strange is that it WILL NOT work if it was in 
during the boot, no matter cycling the device power, removing all 
ALSA modules and trying again, etc. 
Anyway I will take that up on the Alsa list, thanks for your reply. 

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