Skip to content

Commit

Permalink
ALSA: hda - Don't re-initialize shared hp/mic pinctl
Browse files Browse the repository at this point in the history
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 <jwoithe@just42.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Mar 11, 2013
1 parent d570216 commit 93c9d8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 93c9d8a

Please sign in to comment.