Subject: kern/15441: uaudio mixer devices are not recognized by ossaudio(3)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <svs@ropnet.ru>
List: netbsd-bugs
Date: 01/31/2002 13:47:55
>Number: 15441
>Category: kern
>Synopsis: uaudio mixer devices are not recognized by ossaudio(3)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 31 02:49:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Sergey Svishchev
>Release: 1.5ZA
>Organization:
>Environment:
System: NetBSD masked 1.5ZA NetBSD 1.5ZA (masked) #25: Wed Jan 30 08:17:25 MSK 2002 svs@masked:/home/svs/build/sys/masked i386
Architecture: i386
Machine: i386
>Description:
Mixer device labels generated by uaudio(4) are unlike those generated by
other audio drivers. ossaudio compatibility code in kernel (and libossaudio)
thus returns empty device masks (SOUND_MIXER_DEVMASK, SOUND_MIXER_RECMASK).
>How-To-Repeat:
Try to adjust volume of uaudio device (Altec Lansing ADA70) output from
RealPlayer, or from libossaudio-using app (wmsmixer). Lose.
>Fix:
RCS file: /cvsroot/basesrc/lib/libossaudio/ossaudio.c,v
--- ossaudio.c 2001/12/24 00:10:46 1.16
+++ ossaudio.c 2002/01/29 23:45:46
@@ -567,9 +567,15 @@
break;
switch(mi.type) {
case AUDIO_MIXER_VALUE:
- for(dp = devs; dp->name; dp++)
- if (strcmp(dp->name, mi.label.name) == 0)
+ for(dp = devs; dp->name; dp++) {
+ if (strcmp(dp->name, mi.label.name) == 0)
break;
+ if (strncmp(mi.label.name, "fea", 3) == 0) { /* uaudio(4) mixer */
+ char *r = strrchr(mi.label.name, '-');
+ if (r && (strcmp(++r, dp->name) == 0))
+ break;
+ }
+ }
if (dp->code >= 0) {
di->devmap[dp->code] = i;
di->rdevmap[i] = dp->code;
RCS file: /cvsroot/syssrc/sys/compat/ossaudio/ossaudio.c,v
--- ossaudio.c 2001/12/24 00:10:49 1.39
+++ ossaudio.c 2002/01/30 04:37:38
@@ -661,9 +661,15 @@
break;
switch(mi.type) {
case AUDIO_MIXER_VALUE:
- for(dp = devs; dp->name; dp++)
- if (strcmp(dp->name, mi.label.name) == 0)
+ for(dp = devs; dp->name; dp++) {
+ if (strcmp(dp->name, mi.label.name) == 0)
break;
+ if (strncmp(mi.label.name, "fea", 3) == 0) { /* uaudio(4) mixer */
+ char *r = strrchr(mi.label.name, '-');
+ if (r && (strcmp(++r, dp->name) == 0))
+ break;
+ }
+ }
if (dp->code >= 0) {
di->devmap[dp->code] = i;
di->rdevmap[i] = dp->code;
>Release-Note:
>Audit-Trail:
>Unformatted: