Subject: kern/13457: Unable to control CD In volume on a AZT 2320-based sound card using wss(4) driver
To: None <gnats-bugs@gnats.netbsd.org>
From: None <svs@ropnet.ru>
List: netbsd-bugs
Date: 07/13/2001 07:00:56
>Number: 13457
>Category: kern
>Synopsis: Unable to control CD In volume on a AZT 2320-based sound card using wss(4) driver
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jul 13 06:58:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Sergey Svishchev
>Release: 1.5
>Organization:
>Environment:
>Description:
While there are 'inputs.cd.mute' and 'inputs.cd' knobs in mixerctl's
output, they actually control Line In, not CD In, on this card. I've
not tested other cards that wss(4) drives.
>How-To-Repeat:
Install a:
wss0 at isapnp0 port 0x220/16,0x388/8,0x534/4 irq 5 drq 1,3
wss0: AZT2320 PnP SOUND DEVICE AUDIO: CS4231 or AD1845
and connect analog output of your CD-ROM drive to CD In connector
of that card. Try to mute CD audio. Lose.
>Fix:
diff -ru sys/dev/isa/wss.c sys.svs/dev/isa/wss.c
--- sys/dev/isa/wss.c Thu Feb 18 20:27:39 1999
+++ sys.svs/dev/isa/wss.c Wed Jul 4 03:32:50 2001
@@ -182,6 +182,8 @@
static ad1848_devmap_t mappings[] = {
{ WSS_MIC_IN_LVL, AD1848_KIND_LVL, AD1848_AUX2_CHANNEL },
{ WSS_LINE_IN_LVL, AD1848_KIND_LVL, AD1848_AUX1_CHANNEL },
+ { WSS_CD_IN_LVL, AD1848_KIND_LVL, AD1848_LINE_CHANNEL },
+ { WSS_CD_IN_MUTE, AD1848_KIND_MUTE, AD1848_LINE_CHANNEL },
{ WSS_DAC_LVL, AD1848_KIND_LVL, AD1848_DAC_CHANNEL },
{ WSS_MONITOR_LVL, AD1848_KIND_LVL, AD1848_MONO_CHANNEL },
{ WSS_MIC_IN_MUTE, AD1848_KIND_MUTE, AD1848_AUX2_CHANNEL },
@@ -232,11 +235,21 @@
strcpy(dip->un.v.units.name, AudioNvolume);
break;
- case WSS_LINE_IN_LVL: /* line/CD */
+ case WSS_LINE_IN_LVL: /* line */
dip->type = AUDIO_MIXER_VALUE;
dip->mixer_class = WSS_INPUT_CLASS;
dip->prev = AUDIO_MIXER_LAST;
dip->next = WSS_LINE_IN_MUTE;
+ strcpy(dip->label.name, AudioNline);
+ dip->un.v.num_channels = 2;
+ strcpy(dip->un.v.units.name, AudioNvolume);
+ break;
+
+ case WSS_CD_IN_LVL: /* CD */
+ dip->type = AUDIO_MIXER_VALUE;
+ dip->mixer_class = WSS_INPUT_CLASS;
+ dip->prev = AUDIO_MIXER_LAST;
+ dip->next = WSS_CD_IN_MUTE;
strcpy(dip->label.name, AudioNcd);
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
@@ -307,6 +320,13 @@
dip->next = AUDIO_MIXER_LAST;
goto mute;
+ case WSS_CD_IN_MUTE:
+ dip->mixer_class = WSS_INPUT_CLASS;
+ dip->type = AUDIO_MIXER_ENUM;
+ dip->prev = WSS_CD_IN_LVL;
+ dip->next = AUDIO_MIXER_LAST;
+ goto mute;
+
case WSS_DAC_MUTE:
dip->mixer_class = WSS_INPUT_CLASS;
dip->type = AUDIO_MIXER_ENUM;
@@ -334,13 +353,15 @@
dip->prev = WSS_REC_LVL;
dip->next = AUDIO_MIXER_LAST;
strcpy(dip->label.name, AudioNsource);
- dip->un.e.num_mem = 3;
+ dip->un.e.num_mem = 4;
strcpy(dip->un.e.member[0].label.name, AudioNmicrophone);
dip->un.e.member[0].ord = WSS_MIC_IN_LVL;
- strcpy(dip->un.e.member[1].label.name, AudioNcd);
+ strcpy(dip->un.e.member[1].label.name, AudioNline);
dip->un.e.member[1].ord = WSS_LINE_IN_LVL;
strcpy(dip->un.e.member[2].label.name, AudioNdac);
dip->un.e.member[2].ord = WSS_DAC_LVL;
+ strcpy(dip->un.e.member[3].label.name, AudioNcd);
+ dip->un.e.member[3].ord = WSS_CD_IN_LVL;
break;
default:
diff -ru sys/dev/isa/wssvar.h sys.svs/dev/isa/wssvar.h
--- sys/dev/isa/wssvar.h Sun Aug 15 01:19:29 1999
+++ sys.svs/dev/isa/wssvar.h Wed Jul 4 03:16:01 2001
@@ -40,20 +40,22 @@
*/
#define WSS_MIC_IN_LVL 0
#define WSS_LINE_IN_LVL 1
-#define WSS_DAC_LVL 2
-#define WSS_REC_LVL 3
-#define WSS_MONITOR_LVL 4
-#define WSS_MIC_IN_MUTE 5
-#define WSS_LINE_IN_MUTE 6
-#define WSS_DAC_MUTE 7
-#define WSS_MONITOR_MUTE 8
-
-#define WSS_RECORD_SOURCE 9
+#define WSS_CD_IN_LVL 2
+#define WSS_DAC_LVL 3
+#define WSS_REC_LVL 4
+#define WSS_MONITOR_LVL 5
+#define WSS_MIC_IN_MUTE 6
+#define WSS_LINE_IN_MUTE 7
+#define WSS_CD_IN_MUTE 8
+#define WSS_DAC_MUTE 9
+#define WSS_MONITOR_MUTE 10
+
+#define WSS_RECORD_SOURCE 11
/* Classes */
-#define WSS_INPUT_CLASS 10
-#define WSS_RECORD_CLASS 11
-#define WSS_MONITOR_CLASS 12
+#define WSS_INPUT_CLASS 12
+#define WSS_RECORD_CLASS 13
+#define WSS_MONITOR_CLASS 14
struct wss_softc {
struct ad1848_isa_softc sc_ad1848;
>Release-Note:
>Audit-Trail:
>Unformatted: