summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2009-05-01 04:00:41 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2009-05-01 04:00:41 +0000
commitdb8a0a4c3b689fe1ded0b8de2dc3979c5ae46b3a (patch)
treef2b829650674e0d89fc611a30c12cd532bd478cf /sys/dev/pci/azalia.c
parent55695b9939f23485bce2b8e3d7293299f5d16882 (diff)
initialize the mic ADC index before possibly setting it.
Diffstat (limited to 'sys/dev/pci/azalia.c')
-rw-r--r--sys/dev/pci/azalia.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index aa1f5724638..a31bc21133a 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.129 2009/05/01 03:40:01 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.130 2009/05/01 04:00:40 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1279,7 +1279,7 @@ azalia_codec_init(codec_t *this)
this->na_dacs = this->na_dacs_d = 0;
this->na_adcs = this->na_adcs_d = 0;
- this->speaker = this->spkr_dac = this->mic = -1;
+ this->speaker = this->spkr_dac = this->mic = this->mic_adc = -1;
this->nsense_pins = 0;
FOR_EACH_WIDGET(this, i) {
if (!this->w[i].enable)
@@ -1345,8 +1345,6 @@ azalia_codec_init(codec_t *this)
}
}
- this->mic_adc = -1;
-
/* make sure built-in mic is connected to an adc */
if (this->mic != -1 && this->mic_adc == -1) {
if (azalia_codec_select_micadc(this)) {