summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-11-30 21:58:44 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-11-30 21:58:44 +0000
commit5ac69d7130ba640f3b993316a8037c9a10ca210a (patch)
treeda48f1811eb6e40b4be3857b35d53e837df9fbe7 /sys
parenteb5558333e48a817c06f181c275592da4c0a8203 (diff)
only put a control in the record class if it is the sole input to
an ADC.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/azalia_codec.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c
index c1561c9ae88..da6a33d77c1 100644
--- a/sys/dev/pci/azalia_codec.c
+++ b/sys/dev/pci/azalia_codec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia_codec.c,v 1.77 2008/11/30 04:01:53 jakemsr Exp $ */
+/* $OpenBSD: azalia_codec.c,v 1.78 2008/11/30 21:58:43 jakemsr Exp $ */
/* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */
/*-
@@ -525,7 +525,9 @@ azalia_generic_mixer_init(codec_t *this)
if (!w->enable)
continue;
- /* usable adcs - connections should be in AZ_CLASS_RECORD */
+ /* Widgets that are the sole input to an ADC should be in
+ * AZ_CLASS_RECORD.
+ */
if (w->type == COP_AWTYPE_AUDIO_INPUT &&
this->adcs.ngroups > 0) {
const convgroupset_t *group;
@@ -537,16 +539,17 @@ azalia_generic_mixer_init(codec_t *this)
break;
if (j < group->groups[group->cur].nconv)
k = w->nconnections;
- for (j = 0; j < k && naconns < 32; j++) {
+ if (k == 1) {
k = azalia_nid_to_index(this,
- w->connections[j]);
- if (k == -1)
- continue;
- for (l = 0; l < naconns; l++)
- if (aconns[l] == this->w[k].nid)
- break;
- if (l == naconns)
- aconns[naconns++] = this->w[k].nid;
+ w->connections[0]);
+ if (k != -1) {
+ for (l = 0; l < naconns; l++)
+ if (aconns[l] == this->w[k].nid)
+ break;
+ if (l == naconns)
+ aconns[naconns++] =
+ this->w[k].nid;
+ }
}
}