NetBSD Problem Report #18986
Received: (qmail 22610 invoked by uid 605); 9 Nov 2002 05:58:25 -0000
Message-Id: <20021109055824.60FED11124@narn.netbsd.org>
Date: Fri, 8 Nov 2002 21:58:24 -0800 (PST)
From: oshimaya@sc.starcat.ne.jp
Sender: gnats-bugs-owner@netbsd.org
Reply-To: oshimaya@sc.starcat.ne.jp
To: gnats-bugs@gnats.netbsd.org
Subject: cannot record with my usb audio
X-Send-Pr-Version: www-1.0
>Number: 18986
>Category: kern
>Synopsis: cannot record with my usb audio
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: jdolecek
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 09 05:59:01 +0000 2002
>Closed-Date: Thu Apr 17 16:44:34 +0000 2003
>Last-Modified: Thu Apr 17 16:45:00 +0000 2003
>Originator: Yasushi Oshima
>Release: NetBSD 1.6K
>Organization:
>Environment:
NetBSD muscat 1.6K NetBSD 1.6K (MUSCAT) #71: Sat Nov 9 00:29:26 JST 2002 oshima@muscat:/usr/src/sys/arch/i386/compile/MUSCAT i386
>Description:
I have a USB speaker which has a microphone input connecter.
Its name is TRSPK-SMS
( http://www.torica.com/products/torica-original/slimspk/ ;
this page is written by Japanese ),
It uses Avance Logic ALU100 Controler chip.
and it supports only 48kHz sampling rate.
It works fine with audioplay(1), but it doesn't work with audiorecord(1).
The dmesg said when attach this :
uaudio0 at uhub0 port 1 configuration 1 interface 0: Avance Logic Inc USB Audio Multimidia, rev 1.10/1.01, addr 2
uaudio0: ignored input endpoint of type adaptive
uaudio0: ignored input endpoint of type adaptive
uaudio0: ignored input endpoint of type adaptive
uaudio0: ignored input endpoint of type adaptive
uaudio0: audio rev 1.00
audio1 at uaudio0: full duplex, independent
uhidev0 at uhub0 port 1 configuration 1 interface 3
uhidev0: Avance Logic Inc USB Audio Multimidia, rev 1.10/1.01, addr 2, iclass 3/0
uhid0 at uhidev0: input=5, output=0, feature=0
The result of usbdevs -v :
# usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA Technologie(0x1106), rev 1.00
port 1 addr 2: full speed, self powered, config 1, USB Audio Multimidia(0x0100), Avance Logic Inc(0x0680), rev 1.01
port 2 powered
And when using audiorecord(1) :
% audiorecord -d /dev/sound1 -c 1 -P 16 -s 48000 -e slinear rec.data
audiorecord: failed to open /dev/sound1: Permission denied
I added UQ_AU_INP_ASYNC flag into sys/dev/usb/usb_quirks.c, then
the ignore message disappeared.
However, audiorecord still says:
% audiorecord -d /dev/sound1 -c 1 -P 16 -s 48000 -e slinear rec.data
audiorecord: failed to open /dev/sound1: Invalid argument
>How-To-Repeat:
attach the this device to usb port
and execute audiorecord(1).
% audiorecord -d /dev/sound1 -c 1 -P 16 -s 48000 -e slinear rec.data
>Fix:
I changed uaudio_match_alt_sub() in uaudio.c.
In the case of single-rate only device, I think UA_SAMP_LO(a1d)
and UA_SAMP_HI(a1d) have the same value, Original code does not
match in this case.
Note: It works on uhci only.
Index: uaudio.c
===================================================================
RCS file: /export/cvsroot/syssrc/sys/dev/usb/uaudio.c,v
retrieving revision 1.61
diff -u -r1.61 uaudio.c
--- uaudio.c 2002/10/06 10:01:08 1.61
+++ uaudio.c 2002/11/09 03:45:29
@@ -2253,7 +2253,7 @@
if (a1d->bSamFreqType == UA_SAMP_CONTNUOUS) {
DPRINTFN(2,("uaudio_match_alt_sub: cont %d-%d\n",
UA_SAMP_LO(a1d), UA_SAMP_HI(a1d)));
- if (UA_SAMP_LO(a1d) < rate && rate < UA_SAMP_HI(a1d))
+ if (UA_SAMP_LO(a1d) <= rate && rate <= UA_SAMP_HI(a1d))
return i;
} else {
for (j = 0; j < a1d->bSamFreqType; j++) {
Now audiorecord works fine, the audiofile made from audiorecord is
playable with audioplay well.
For support this device,
Note:
It includes fix typo (ADVANCELOGIC -> AVANCELOGIC),
I don't know whether the name of this product (AVANCELOGIC_USBAUDIO)
is good.
Index: usbdevs
===================================================================
RCS file: /export/cvsroot/syssrc/sys/dev/usb/usbdevs,v
retrieving revision 1.280
diff -u -r1.280 usbdevs
--- usbdevs 2002/11/05 12:13:40 1.280
+++ usbdevs 2002/11/08 12:14:13
@@ -214,7 +214,7 @@
vendor ACARD 0x0678 ACARD Technology
vendor PROLIFIC 0x067b Prolific Technology
vendor SIEMENS 0x067c Siemens
-vendor ADVANCELOGIC 0x0680 Avance Logic
+vendor AVANCELOGIC 0x0680 Avance Logic
vendor HAGIWARA 0x0693 Hagiwara Sys-Com
vendor MINOLTA 0x0686 Minolta
vendor CTX 0x0698 Chuntex
@@ -480,6 +480,9 @@
/* Audio-Technica products */
product AUDIOTECHNICA ATCHA4USB 0x0009 ATC-HA4USB USB headphone
+
+/* Avance Logic products */
+product AVANCELOGIC USBAUDIO 0x0100 USB Audio Speaker
/* Avision products */
product AVISION 1200U 0x0268 1200U scanner
Index: usb_quirks.c
===================================================================
RCS file: /export/cvsroot/syssrc/sys/dev/usb/usb_quirks.c,v
retrieving revision 1.41
diff -u -r1.41 usb_quirks.c
--- usb_quirks.c 2002/08/26 21:34:28 1.41
+++ usb_quirks.c 2002/11/08 12:20:13
@@ -84,6 +84,8 @@
{ USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1, 0x009, { UQ_AU_NO_FRAC }},
{ USB_VENDOR_SILICONPORTALS, USB_PRODUCT_SILICONPORTALS_YAPPHONE,
0x100, { UQ_AU_INP_ASYNC }},
+ { USB_VENDOR_AVANCELOGIC, USB_PRODUCT_AVANCELOGIC_USBAUDIO,
+ 0x101, { UQ_AU_INP_ASYNC }},
{ USB_VENDOR_NEODIO, USB_PRODUCT_NEODIO_ND5010, 0x100, { UQ_NO_STRINGS }},
/* XXX These should have a revision number, but I don't know what they are. */
{ USB_VENDOR_HP, USB_PRODUCT_HP_895C, ANY, { UQ_BROKEN_BIDIR }},
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->jdolecek
Responsible-Changed-By: jdolecek
Responsible-Changed-When: Thu Apr 17 16:28:10 UTC 2003
Responsible-Changed-Why:
I'll look on this.
From: Jaromir Dolecek <jdolecek@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/18986 CVS commit: src/sys/dev/usb
Date: Thu, 17 Apr 2003 16:38:03 +0000 (UTC)
Module Name: src
Committed By: jdolecek
Date: Thu Apr 17 16:38:02 UTC 2003
Modified Files:
src/sys/dev/usb: uaudio.c
Log Message:
uaudio_match_alt_sub(): fix the rate check in UA_SAMP_CONTNUOUS case
to match if UA_SAMP_LO() == UA_SAMP_HI() == rate
problem reported and fix provided in PR kern/18986 by Yasushi Oshima
To generate a diff of this commit:
cvs rdiff -r1.65 -r1.66 src/sys/dev/usb/uaudio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jaromir Dolecek <jdolecek@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/18986 CVS commit: src/sys/dev/usb
Date: Thu, 17 Apr 2003 16:41:02 +0000 (UTC)
Module Name: src
Committed By: jdolecek
Date: Thu Apr 17 16:41:01 UTC 2003
Modified Files:
src/sys/dev/usb: usbdevs
Log Message:
fix handle for Avance Logic (AVANCELOGIC, not ADVANCELOGIC), and add
id for their USB Audio Speaker
provided in PR kern/18986 by Yasushi Oshima
To generate a diff of this commit:
cvs rdiff -r1.312 -r1.313 src/sys/dev/usb/usbdevs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Jaromir Dolecek <jdolecek@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/18986 CVS commit: src/sys/dev/usb
Date: Thu, 17 Apr 2003 16:41:50 +0000 (UTC)
Module Name: src
Committed By: jdolecek
Date: Thu Apr 17 16:41:49 UTC 2003
Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h
Log Message:
regen:
fix handle for Avance Logic (AVANCELOGIC, not ADVANCELOGIC), and add
id for their USB Audio Speaker
provided in PR kern/18986 by Yasushi Oshima
To generate a diff of this commit:
cvs rdiff -r1.317 -r1.318 src/sys/dev/usb/usbdevs.h
cvs rdiff -r1.318 -r1.319 src/sys/dev/usb/usbdevs_data.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: jdolecek
State-Changed-When: Thu Apr 17 16:44:00 UTC 2003
State-Changed-Why:
Your fixes applied. Thanks a lot.
From: Jaromir Dolecek <jdolecek@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/18986 CVS commit: src/sys/dev/usb
Date: Thu, 17 Apr 2003 16:43:45 +0000 (UTC)
Module Name: src
Committed By: jdolecek
Date: Thu Apr 17 16:43:45 UTC 2003
Modified Files:
src/sys/dev/usb: usb_quirks.c
Log Message:
add quirk for Avance Logic USB Audio
provided in PR kern/18986 by Yasushi Oshima
To generate a diff of this commit:
cvs rdiff -r1.42 -r1.43 src/sys/dev/usb/usb_quirks.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.