Commit 3f550e32 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Allow to change I/O direction in hp/mic jack mode ctl

The previous commits added the capability to change the pin control of
hp/mic shared jack, but it actually didn't work as expected when the
value is changed from the output to the input, since I forgot to reset
the pin I/O bit in that case.  This patch fixes the problem.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5ebd3bbd
...@@ -2650,8 +2650,8 @@ static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol, ...@@ -2650,8 +2650,8 @@ static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol,
if (in_jacks > 1) { if (in_jacks > 1) {
unsigned int vref_caps = get_vref_caps(codec, nid); unsigned int vref_caps = get_vref_caps(codec, nid);
val = snd_hda_codec_get_pin_target(codec, nid); val = snd_hda_codec_get_pin_target(codec, nid);
val &= ~AC_PINCTL_VREFEN; val &= ~(AC_PINCTL_VREFEN | PIN_HP);
val |= get_vref_idx(vref_caps, idx); val |= get_vref_idx(vref_caps, idx) | PIN_IN;
} else } else
val = snd_hda_get_default_vref(codec, nid); val = snd_hda_get_default_vref(codec, nid);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment