Subject: kern/34821: [PATCH] Audio drivers should use 'record.master' to control record gain
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <svs+pr@grep.ru>
List: netbsd-bugs
Date: 10/14/2006 21:45:02
>Number: 34821
>Category: kern
>Synopsis: [PATCH] Audio drivers use obsolete record gain control
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Oct 14 21:45:02 +0000 2006
>Originator: svs+pr@grep.ru
>Release: NetBSD 3.0.1_STABLE
>Organization:
>Environment:
>Description:
Back in 2003, fredb@ rototilled mixer subsystem (see
http://mail-index.netbsd.org/tech-kern/2003/02/11/0010.html) and planned to
'switch all the hardware drivers to "record.master"'. Maybe it's time to do
it at last.
>How-To-Repeat:
>Fix:
--- sys/arch/amiga/dev/toccata.c 11 Dec 2005 12:16:28 -0000 1.11
+++ sys/arch/amiga/dev/toccata.c 9 Jul 2006 14:50:55 -0000
@@ -728,7 +728,7 @@
dip->mixer_class = TOCCATA_INPUT_CLASS;
dip->prev = AUDIO_MIXER_LAST;
dip->next = TOCCATA_RECORD_SOURCE;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
--- sys/arch/macppc/dev/awacs.c 11 Dec 2005 12:18:03 -0000 1.24
+++ sys/arch/macppc/dev/awacs.c 9 Jul 2006 14:51:20 -0000
@@ -749,7 +749,7 @@
case AWACS_VOL_INPUT:
dip->mixer_class = AWACS_RECORD_CLASS;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->type = AUDIO_MIXER_VALUE;
dip->prev = dip->next = AUDIO_MIXER_LAST;
dip->un.v.num_channels = 2;
--- sys/arch/macppc/dev/snapper.c 24 Sep 2006 03:47:09 -0000 1.13
+++ sys/arch/macppc/dev/snapper.c 8 Oct 2006 20:55:12 -0000
@@ -1017,7 +1017,7 @@
case SNAPPER_VOL_INPUT:
dip->mixer_class = SNAPPER_RECORD_CLASS;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->type = AUDIO_MIXER_VALUE;
dip->prev = dip->next = AUDIO_MIXER_LAST;
dip->un.v.num_channels = 2;
--- sys/arch/prep/isa/paud_isa.c 11 Dec 2005 12:18:47 -0000 1.10
+++ sys/arch/prep/isa/paud_isa.c 9 Jul 2006 14:52:59 -0000
@@ -259,7 +259,7 @@
dip->mixer_class = PAUD_RECORD_CLASS;
dip->prev = AUDIO_MIXER_LAST;
dip->next = PAUD_RECORD_SOURCE;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
--- sys/dev/ic/ac97.c 2 Sep 2006 17:02:57 -0000 1.84
+++ sys/dev/ic/ac97.c 24 Sep 2006 08:55:06 -0000
@@ -306,7 +306,7 @@
AC97_REG_RECORD_SELECT, 0x0000, 3, 0, 0, 0, 0, 0, 0, 0, 0,
},
/* Record Gain */
- { AudioCrecord, AudioNvolume, NULL,
+ { AudioCrecord, AudioNmaster, NULL,
AUDIO_MIXER_VALUE, WRAP(ac97_volume_stereo),
AC97_REG_RECORD_GAIN, 0x8000, 4, 0, 1, 1, 0, 0, 0, 0, 0,
},
--- sys/dev/ic/cs4231.c 11 Dec 2005 12:21:26 -0000 1.18
+++ sys/dev/ic/cs4231.c 14 Oct 2006 20:18:12 -0000
@@ -558,7 +558,7 @@
dip->next = CSAUDIO_RECORD_SOURCE;
strcpy(dip->label.name, AudioNrecord);
dip->un.v.num_channels = 2;
- strcpy(dip->un.v.units.name, AudioNvolume);
+ strcpy(dip->un.v.units.name, AudioNmaster);
break;
case CSAUDIO_RECORD_SOURCE:
--- sys/dev/ic/interwave.c 8 Mar 2006 23:46:24 -0000 1.28
+++ sys/dev/ic/interwave.c 9 Jul 2006 14:53:33 -0000
@@ -1442,7 +1442,7 @@
dip->mixer_class = IW_RECORD_CLASS;
dip->prev = AUDIO_MIXER_LAST;
dip->next = AUDIO_MIXER_LAST;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
--- sys/dev/isa/ess.c 4 Oct 2006 15:48:47 -0000 1.71
+++ sys/dev/isa/ess.c 8 Oct 2006 20:57:24 -0000
@@ -1982,7 +1982,7 @@
case ESS_RECORD_VOL:
dip->mixer_class = ESS_RECORD_CLASS;
dip->next = dip->prev = AUDIO_MIXER_LAST;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->type = AUDIO_MIXER_VALUE;
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
--- sys/dev/isa/gus.c 30 Aug 2006 02:10:38 -0000 1.94
+++ sys/dev/isa/gus.c 24 Sep 2006 08:55:20 -0000
@@ -3798,7 +3798,7 @@
dip->mixer_class = GUSMAX_RECORD_CLASS;
dip->prev = AUDIO_MIXER_LAST;
dip->next = GUSMAX_RECORD_SOURCE;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
--- sys/dev/isa/wss.c 3 Sep 2006 21:42:55 -0000 1.65
+++ sys/dev/isa/wss.c 24 Sep 2006 08:55:22 -0000
@@ -254,7 +254,7 @@
dip->mixer_class = WSS_RECORD_CLASS;
dip->prev = AUDIO_MIXER_LAST;
dip->next = WSS_RECORD_SOURCE;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
--- sys/dev/isa/ym.c 24 Sep 2006 03:53:09 -0000 1.29
+++ sys/dev/isa/ym.c 8 Oct 2006 20:57:26 -0000
@@ -916,7 +916,7 @@
dip->type = AUDIO_MIXER_VALUE;
dip->mixer_class = YM_RECORD_CLASS;
dip->next = YM_RECORD_SOURCE;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->un.v.num_channels = 2;
dip->un.v.delta = 1 << (8 - 4 /* valid bits */);
strcpy(dip->un.v.units.name, AudioNvolume);
--- sys/dev/pci/eso.c 30 Aug 2006 01:14:24 -0000 1.43
+++ sys/dev/pci/eso.c 24 Sep 2006 08:55:32 -0000
@@ -1365,7 +1365,7 @@
case ESO_RECORD_VOL:
dip->mixer_class = ESO_RECORD_CLASS;
dip->next = dip->prev = AUDIO_MIXER_LAST;
- strcpy(dip->label.name, AudioNrecord);
+ strcpy(dip->label.name, AudioNmaster);
dip->type = AUDIO_MIXER_VALUE;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
--- sys/dev/pci/sv.c 3 Sep 2006 06:26:27 -0000 1.33
+++ sys/dev/pci/sv.c 24 Sep 2006 08:55:37 -0000
@@ -1059,7 +1059,7 @@
dip->mixer_class = SV_RECORD_CLASS;
dip->prev = SV_RECORD_SOURCE;
dip->next = AUDIO_MIXER_LAST;
- strcpy(dip->label.name, "gain");
+ strcpy(dip->label.name, AudioNmaster);
dip->type = AUDIO_MIXER_VALUE;
dip->un.v.num_channels = 1;
strcpy(dip->un.v.units.name, AudioNvolume);
--- sys/dev/audio.c 24 Sep 2006 03:53:08 -0000 1.210
+++ sys/dev/audio.c 14 Oct 2006 20:09:55 -0000
@@ -425,7 +425,7 @@
sc->sc_inports.master = mi.index;
record_master_found = 1;
}
-#if 1 /* Deprecated. Use AudioNmaster. */
+#if 0 /* Deprecated. Use AudioNmaster. */
if (strcmp(mi.label.name, AudioNrecord) == 0) {
sc->sc_inports.master = mi.index;
record_master_found = 1;
>Unformatted: