NetBSD Problem Report #55856
From buhrow@nfbcal.org Fri Dec 11 00:47:43 2020
Return-Path: <buhrow@nfbcal.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 0FAC71A9217
for <gnats-bugs@www.NetBSD.org>; Fri, 11 Dec 2020 00:47:43 +0000 (UTC)
Message-Id: <202012110047.0BB0leIO026788@nfbcal.org>
Date: Thu, 10 Dec 2020 16:47:40 -0800 (PST)
From: buhrow@nfbcal.org
Reply-To: buhrow@nfbcal.org
To: gnats-bugs@www.NetBSD.org
Subject: uaudio gets device timeout on C-Media USB sound device
X-Send-Pr-Version: 3.95
>Number: 55856
>Category: kern
>Synopsis: uaudio(4) device timeout on C-Media USB sound card
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 11 00:50:00 +0000 2020
>Last-Modified: Sun Apr 18 19:50:00 +0000 2021
>Originator: Brian Buhrow
>Release: NetBSD 9.1_stable
>Organization:
NFB of California
>Environment:
System:
NetBSD mirkwood.nfbcal.org 9.1_STABLE NetBSD 9.1_STABLE (MIRKWOOD) #12: Thu Dec 10 16:02:52 PST 2020 buhrow@loth-9.nfbcal.org:/usr/local/netbsd/src-90/sys/arch/amd64/compile/MIRKWOOD amd64
Architecture: x86_64
Machine: amd64
>Description:
When trying to play audio through the uaudio device, I get the following
error messages from the kernel. In addition, the audio does not play and
the player, mpg123 in this case, gets write failures.
Kernel messages look like:
[ 425.807534] uaudio0 at uhub1 port 1 configuration 1 interface 0
[ 425.807534] uaudio0: C-Media Electronics Inc. (0xd8c) C-Media USB Headphone Set (0x0c), rev 1.10/1.00, addr 3
[ 425.807534] uaudio0: audio rev 1.00
[ 425.807534] audio1 at uaudio0: playback, capture, full duplex, independent
[ 425.807534] audio1: slinear_le:16 2ch 48000Hz, blk 11520 bytes (60ms) for playback
[ 425.807534] audio1: slinear_le:16 1ch 48000Hz, blk 5760 bytes (60ms) for recording
[ 425.807534] spkr2 at audio1: PC Speaker (synthesized)
[ 425.807534] wsbell2 at spkr2 mux 1
[ 425.807534] uhidev0 at uhub1 port 1 configuration 1 interface 3
[ 425.807534] uhidev0: C-Media Electronics Inc. (0xd8c) C-Media USB Headphone Set (0x0c), rev 1.10/1.00, addr 3, iclass 3/0
[ 425.807534] uhid0 at uhidev0: input=4, output=4, feature=0
[ 637.647534] audio1: trigger_output failed with 5
[ 640.657534] audio1: device timeout
[ 643.657534] audio1: device timeout
>How-To-Repeat:
Plug in one of these USB devices to a NetBSD-9.1 system and try to
send audio, using mpg123, mplayer, or something, through its association
audio device.
It's worth noting this device works perfectly under NetBSD-3, NetBSD-4,
NetBSD-5 and FreeBSD-12. So, I think this is probably a regression from
the new audio subsystem that went in for NetBSD-9.x. I've tried plugging
into different USB ports on the system, with the same result.
>Fix:
>Audit-Trail:
From: Brian Buhrow <buhrow@nfbcal.org>
To: gnats-bugs@netbsd.org
Cc: buhrow@nfbcal.org
Subject: Re: kern/55856: uaudio gets device timeout on C-Media USB sound device
Date: Thu, 10 Dec 2020 17:01:10 -0800
hello. This appears to be a larger problem with USB audio as I just
tried playing audio with a different USB audio device. this one
demonstrates the same errors as the C-Media device. It probes as follows:
[ 2628.427533] uaudio0 at uhub1 port 7 configuration 1 interface 0
[ 2628.427533] uaudio0: Burr-Brown from TI (0x8bb) USB Audio CODEC (0x2902), rev 1.10/1.00, addr 4
[ 2628.427533] uaudio0: audio rev 1.00
[ 2628.427533] audio1 at uaudio0: playback, capture, full duplex, independent
[ 2628.427533] audio1: slinear_le:16 2ch 48000Hz, blk 11520 bytes (60ms) for playback
[ 2628.427533] audio1: slinear_le:16 2ch 11025Hz, blk 2640 bytes (59.8ms) for recording
[ 2628.427533] spkr2 at audio1: PC Speaker (synthesized)
[ 2628.427533] wsbell2 at spkr2 mux 1
[ 2628.427533] uhidev0 at uhub1 port 7 configuration 1 interface 3
[ 2628.427533] uhidev0: Burr-Brown from TI (0x8bb) USB Audio CODEC (0x2902), rev 1.10/1.00, addr 4, iclass 3/0
[ 2628.427533] uhid0 at uhidev0: input=1, output=0, feature=0
[ 2710.207532] audio1: trigger_output failed with 5
[ 2713.207533] audio1: device timeout
[ 2716.207533] audio1: device timeout
From: Brian Buhrow <buhrow@nfbcal.org>
To: gnats-bugs@netbsd.org
Cc: buhrow@nfbcal.org
Subject: Re: kern/55856: uaudio gets device timeout on C-Media USB sound device
Date: Tue, 12 Jan 2021 10:06:27 -0800
hello. Here's some more data on this issue. The problem appears to be specific to the
xhci(4) driver. Specifically, if I boot an older machine with NetBSD-9.1 with an uchi(4) USB
chip in it, the uaudio driver works fine with the C-Media USB audio device. Of course, it's
also an I386 machine, not an amd64 machine but I hope that isn't the difference that
demonstrates the problem.
So, I will now investigate potential issues with the xhci(4) driver.
-thanks
-Brian
From: scole_mail <scole_mail@gmx.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Subject: Re: kern/55856: uaudio gets device timeout on C-Media USB
sound device
Date: Wed, 14 Apr 2021 18:54:19 -0700
Any updates or ideas on this one?
I'm running into the same problem I guess. My >10 year old system died
recently and trying to use a C-Media usb device with a relatively new
motherboard and get the same symptoms:
[ 4.614518] uaudio0 at uhub4 port 2 configuration 1 interface 0
[ 4.614518] uaudio0: C-Media Electronics Inc. (0xd8c) USB Audio Device (0x14), rev 1.10/1.00, addr 2
[ 4.674540] uaudio0: audio rev 1.00
[ 4.674540] audio1 at uaudio0: playback, capture, full duplex, independent
[ 4.674540] audio1: slinear_le:16 2ch 48000Hz, blk 11520 bytes (60ms) for playback
[ 4.674540] audio1: slinear_le:16 1ch 48000Hz, blk 6000 bytes (62.5ms) for recording
[ 4.674540] spkr2 at audio1: PC Speaker (synthesized)
[ 4.674540] wsbell at spkr2 not configured
[ 4.674540] uhidev0 at uhub4 port 2 configuration 1 interface 3
[ 4.674540] uhidev0: C-Media Electronics Inc. (0xd8c) USB Audio Device (0x14), rev 1.10/1.00, addr 2, iclass 3/0
[ 4.724559] uhid0 at uhidev0: input=4, output=4, feature=0
It has an xhci as well:
> dmesg |grep xhci
[ 1.050812] xhci0 at pci1 dev 0 function 0: vendor 1022 product 43d5 (rev. 0x01)
[ 1.050812] xhci0: interrupting at msi0 vec 0
[ 1.050812] xhci0: xHCI version 1.10
[ 1.050812] usb0 at xhci0: USB revision 3.1
[ 1.050812] usb1 at xhci0: USB revision 2.0
[ 1.050812] xhci1 at pci9 dev 0 function 3: vendor 1022 product 149c (rev. 0x00)
[ 1.050812] xhci1: interrupting at msix5 vec 0
[ 1.050812] xhci1: xHCI version 1.10
[ 1.050812] usb2 at xhci1: USB revision 3.1
[ 1.050812] usb3 at xhci1: USB revision 2.0
and the same error with mplayer or any audio:
[ 7262.1922556] audio1(uaudio0): trigger_output failed: errno=5
From: sc.dying@gmail.com
To: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, buhrow@nfbcal.org
Cc:
Subject: Re: kern/55856: uaudio gets device timeout on C-Media USB sound
device
Date: Sun, 18 Apr 2021 12:38:46 +0000
On 2021/01/12 18:10, Brian Buhrow wrote:
> The following reply was made to PR kern/55856; it has been noted by GNATS.
>
> From: Brian Buhrow <buhrow@nfbcal.org>
> To: gnats-bugs@netbsd.org
> Cc: buhrow@nfbcal.org
> Subject: Re: kern/55856: uaudio gets device timeout on C-Media USB sound device
> Date: Tue, 12 Jan 2021 10:06:27 -0800
>
> hello. Here's some more data on this issue. The problem appears to be specific to the
> xhci(4) driver. Specifically, if I boot an older machine with NetBSD-9.1 with an uchi(4) USB
> chip in it, the uaudio driver works fine with the C-Media USB audio device. Of course, it's
> also an I386 machine, not an amd64 machine but I hope that isn't the difference that
> demonstrates the problem.
> So, I will now investigate potential issues with the xhci(4) driver.
> -thanks
> -Brian
AFAIK xhci(4) on NetBSD-9 does not support isochronous transfer
used in such as uaudio and uvideo.
From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/55856: uaudio gets device timeout on C-Media USB sound
device
Date: Sun, 18 Apr 2021 19:48:17 +0000
-current has xhci isoc support.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.