summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-12-22 01:32:40 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-12-22 01:32:40 +0000
commitcf96ebc5261702e72ef273d48d5a711034a0736a (patch)
tree0894dfa86600feca68c474a0b7493f39537b52cc /sys/dev/pci
parent79231127eb60780c0686d10b9477e859392ca146 (diff)
special case after general case. it's better to be named after
a converter than a selector.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/azalia.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 35d43fe1d67..531aa83df31 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.85 2008/12/22 00:03:08 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.86 2008/12/22 01:32:39 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1901,23 +1901,24 @@ azalia_widget_label_widgets(codec_t *codec)
if (codec->w[i].type != COP_AWTYPE_AUDIO_MIXER &&
codec->w[i].type != COP_AWTYPE_AUDIO_SELECTOR)
continue;
- /* Special case. A selector with outamp capabilities
- * and is connected to a single widget that has no
- * inamp capabilities. This widget serves only to act
- * as the input amp for the widget it is connected to.
- */
- j = -1;
- if (codec->w[i].type == COP_AWTYPE_AUDIO_SELECTOR &&
- (codec->w[i].widgetcap & COP_AWCAP_OUTAMP) &&
- codec->w[i].nconnections == 1) {
- j = codec->w[i].connections[0];
- if (!(codec->w[j].widgetcap & COP_AWCAP_INAMP))
- codec->w[i].mixer_class = AZ_CLASS_INPUT;
- else
- j = -1;
+ j = azalia_widget_sole_conn(codec, i);
+ if (j == -1) {
+ /* Special case. A selector with outamp capabilities
+ * and is connected to a single widget that has no
+ * inamp capabilities. This widget serves only to act
+ * as the input amp for the widget it is connected to.
+ */
+ if (codec->w[i].type == COP_AWTYPE_AUDIO_SELECTOR &&
+ (codec->w[i].widgetcap & COP_AWCAP_OUTAMP) &&
+ codec->w[i].nconnections == 1) {
+ j = codec->w[i].connections[0];
+ if (!(codec->w[j].widgetcap & COP_AWCAP_INAMP))
+ codec->w[i].mixer_class =
+ AZ_CLASS_INPUT;
+ else
+ j = -1;
+ }
}
- if (j == -1)
- j = azalia_widget_sole_conn(codec, i);
if (j >= 0) {
snprintf(codec->w[i].name, sizeof(codec->w[i].name),
"%s", codec->w[j].name);