Hi,

Amarendra Godbole writes:

> mixerctl output has some duplicate entries (duplicated names, but
> different values), which leaves me confused. Here is the output:

I see... this happens when an item has both input and output
levels that can be adjusted.

Could you try this diff please?  It should give you something
more like:

outputs.line=124,124
inputs.line=85,85

Thanks!


Index: azalia.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/azalia.c,v
retrieving revision 1.45
diff -u -p -r1.45 azalia.c
--- azalia.c    25 Nov 2007 18:13:40 -0000      1.45
+++ azalia.c    13 Dec 2007 18:37:58 -0000
@@ -1609,13 +1609,24 @@ azalia_widget_label_widgets(codec_t *cod
                w = &codec->w[i];
                if (w->type == COP_AWTYPE_PIN_COMPLEX) {
                        pins[w->d.pin.device]++;
-                       if (pins[w->d.pin.device] > 1)
-                               snprintf(w->name, sizeof(w->name), "%s%d",
-                                   pin_devices[w->d.pin.device],
-                                   pins[w->d.pin.device]);
-                       else
-                               snprintf(w->name, sizeof(w->name), "%s",
-                                   pin_devices[w->d.pin.device]);
+                       if (w->d.pin.device == CORB_CD_LINEIN) {
+                               pins[CORB_CD_LINEOUT]++;
+                               if (pins[CORB_CD_LINEOUT] > 1)
+                                       snprintf(w->name, sizeof(w->name), 
"%s%d",
+                                           pin_devices[CORB_CD_LINEOUT],
+                                           pins[CORB_CD_LINEOUT]);
+                               else
+                                       snprintf(w->name, sizeof(w->name), "%s",
+                                           pin_devices[CORB_CD_LINEOUT]);
+                       } else {
+                               if (pins[w->d.pin.device] > 1)
+                                       snprintf(w->name, sizeof(w->name), 
"%s%d",
+                                           pin_devices[w->d.pin.device],
+                                           pins[w->d.pin.device]);
+                               else
+                                       snprintf(w->name, sizeof(w->name), "%s",
+                                           pin_devices[w->d.pin.device]);
+                       }
                } else {
                        types[w->type]++;
                        if (types[w->type] > 1)
Index: azalia_codec.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.45
diff -u -p -r1.45 azalia_codec.c
--- azalia_codec.c      6 Dec 2007 19:58:48 -0000       1.45
+++ azalia_codec.c      13 Dec 2007 18:37:33 -0000
@@ -529,9 +529,7 @@ azalia_generic_mixer_init(codec_t *this)
                                snprintf(d->label.name, sizeof(d->label.name),
                                    "%s.mute", w->name);
                                d->type = AUDIO_MIXER_ENUM;
-                               if (w->type == COP_AWTYPE_PIN_COMPLEX)
-                                       d->mixer_class = AZ_CLASS_OUTPUT;
-                               else if (w->type == COP_AWTYPE_AUDIO_INPUT)
+                               if (w->type == COP_AWTYPE_AUDIO_INPUT)
                                        d->mixer_class = AZ_CLASS_RECORD;
                                else
                                        d->mixer_class = AZ_CLASS_INPUT;
@@ -553,9 +551,7 @@ azalia_generic_mixer_init(codec_t *this)
                                            "%s.%s.mute", w->name,
                                            this->w[w->connections[j]].name);
                                        d->type = AUDIO_MIXER_ENUM;
-                                       if (w->type == COP_AWTYPE_PIN_COMPLEX)
-                                               d->mixer_class = 
AZ_CLASS_OUTPUT;
-                                       else if (w->type == 
COP_AWTYPE_AUDIO_INPUT)
+                                       if (w->type == COP_AWTYPE_AUDIO_INPUT)
                                                d->mixer_class = 
AZ_CLASS_RECORD;
                                        else
                                                d->mixer_class = AZ_CLASS_INPUT;
@@ -581,9 +577,7 @@ azalia_generic_mixer_init(codec_t *this)
                                snprintf(d->label.name, sizeof(d->label.name),
                                    "%s", w->name);
                                d->type = AUDIO_MIXER_VALUE;
-                               if (w->type == COP_AWTYPE_PIN_COMPLEX)
-                                       d->mixer_class = AZ_CLASS_OUTPUT;
-                               else if (w->type == COP_AWTYPE_AUDIO_INPUT)
+                               if (w->type == COP_AWTYPE_AUDIO_INPUT)
                                        d->mixer_class = AZ_CLASS_RECORD;
                                else
                                        d->mixer_class = AZ_CLASS_INPUT;
@@ -608,9 +602,7 @@ azalia_generic_mixer_init(codec_t *this)
                                            "%s.%s", w->name,
                                            this->w[w->connections[j]].name);
                                        d->type = AUDIO_MIXER_VALUE;
-                                       if (w->type == COP_AWTYPE_PIN_COMPLEX)
-                                               d->mixer_class = 
AZ_CLASS_OUTPUT;
-                                       else if (w->type == 
COP_AWTYPE_AUDIO_INPUT)
+                                       if (w->type == COP_AWTYPE_AUDIO_INPUT)
                                                d->mixer_class = 
AZ_CLASS_RECORD;
                                        else
                                                d->mixer_class = AZ_CLASS_INPUT;

Reply via email to