From 93c9d8ae0b25ab7845b26813da1a326d2b1fea43 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 11 Mar 2013 09:48:43 +0100 Subject: ALSA: hda - Don't re-initialize shared hp/mic pinctl When a headphone pin is set up as a shared hp/mic pin, we rather want to keep it as a headphone primarily as default, but the driver overrides it always as a mic pin, just because the input controls are created after outputs. Add a check of pin NID and skip the re-initialization of pinctl for such a shared hp/mic pin. Reported-by: Jonathan Woithe Signed-off-by: Takashi Iwai diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index fb232c1..aae6b10 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -2967,7 +2967,8 @@ static int create_input_ctls(struct hda_codec *codec) val = PIN_IN; if (cfg->inputs[i].type == AUTO_PIN_MIC) val |= snd_hda_get_default_vref(codec, pin); - set_pin_target(codec, pin, val, false); + if (pin != spec->hp_mic_pin) + set_pin_target(codec, pin, val, false); if (mixer) { if (is_reachable_path(codec, pin, mixer)) { -- cgit v0.10.2