Commit 3f550e323242bea82d07dfd06e6ce3f723eef7bd
1 parent
5ebd3bbdcc
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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: Takashi Iwai <tiwai@suse.de>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
sound/pci/hda/hda_generic.c
... | ... | @@ -2650,8 +2650,8 @@ |
2650 | 2650 | if (in_jacks > 1) { |
2651 | 2651 | unsigned int vref_caps = get_vref_caps(codec, nid); |
2652 | 2652 | val = snd_hda_codec_get_pin_target(codec, nid); |
2653 | - val &= ~AC_PINCTL_VREFEN; | |
2654 | - val |= get_vref_idx(vref_caps, idx); | |
2653 | + val &= ~(AC_PINCTL_VREFEN | PIN_HP); | |
2654 | + val |= get_vref_idx(vref_caps, idx) | PIN_IN; | |
2655 | 2655 | } else |
2656 | 2656 | val = snd_hda_get_default_vref(codec, nid); |
2657 | 2657 | } |