diff options
author | Adrian Wilkins <adrian.wilkins@nhs.net> | 2011-05-19 22:52:38 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-20 09:01:28 +0200 |
commit | 5a2d227fdc7a02ed1b4cebba391d8fb9ad57caaf (patch) | |
tree | cdc6321b42e80355b66a7855978bcec2fe54d0a8 /sound/pci/hda/patch_analog.c | |
parent | ALSA: hda - Enable Realtek ALC269 codec input layer beep (diff) | |
download | linux-5a2d227fdc7a02ed1b4cebba391d8fb9ad57caaf.tar.xz linux-5a2d227fdc7a02ed1b4cebba391d8fb9ad57caaf.zip |
ALSA: hda - Fix input-src parse in patch_analog.c
Compare pin type enum to the pin type and not the array index.
Fixes bug#0005368.
Signed-off-by: Adrian Wilkins <adrian.wilkins@nhs.net>
Cc: <stable@kernel.org> (2.6.37 and later)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 981c631624d9..f1b3875c57df 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -3070,6 +3070,7 @@ static void ad1988_auto_init_analog_input(struct hda_codec *codec) for (i = 0; i < cfg->num_inputs; i++) { hda_nid_t nid = cfg->inputs[i].pin; + int type = cfg->inputs[i].type; switch (nid) { case 0x15: /* port-C */ snd_hda_codec_write(codec, 0x33, 0, AC_VERB_SET_CONNECT_SEL, 0x0); @@ -3079,7 +3080,7 @@ static void ad1988_auto_init_analog_input(struct hda_codec *codec) break; } snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, - i == AUTO_PIN_MIC ? PIN_VREF80 : PIN_IN); + type == AUTO_PIN_MIC ? PIN_VREF80 : PIN_IN); if (nid != AD1988_PIN_CD_NID) snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |