diff options
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 07360996caaa..9c3d7ac08068 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -2079,12 +2079,21 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec, struct auto_pin_cfg *c | |||
2079 | cfg->hp_pins[cfg->hp_outs] = nid; | 2079 | cfg->hp_pins[cfg->hp_outs] = nid; |
2080 | cfg->hp_outs++; | 2080 | cfg->hp_outs++; |
2081 | break; | 2081 | break; |
2082 | case AC_JACK_MIC_IN: | 2082 | case AC_JACK_MIC_IN: { |
2083 | if (loc == AC_JACK_LOC_FRONT) | 2083 | int preferred, alt; |
2084 | cfg->input_pins[AUTO_PIN_FRONT_MIC] = nid; | 2084 | if (loc == AC_JACK_LOC_FRONT) { |
2085 | else | 2085 | preferred = AUTO_PIN_FRONT_MIC; |
2086 | cfg->input_pins[AUTO_PIN_MIC] = nid; | 2086 | alt = AUTO_PIN_MIC; |
2087 | } else { | ||
2088 | preferred = AUTO_PIN_MIC; | ||
2089 | alt = AUTO_PIN_FRONT_MIC; | ||
2090 | } | ||
2091 | if (!cfg->input_pins[preferred]) | ||
2092 | cfg->input_pins[preferred] = nid; | ||
2093 | else if (!cfg->input_pins[alt]) | ||
2094 | cfg->input_pins[alt] = nid; | ||
2087 | break; | 2095 | break; |
2096 | } | ||
2088 | case AC_JACK_LINE_IN: | 2097 | case AC_JACK_LINE_IN: |
2089 | if (loc == AC_JACK_LOC_FRONT) | 2098 | if (loc == AC_JACK_LOC_FRONT) |
2090 | cfg->input_pins[AUTO_PIN_FRONT_LINE] = nid; | 2099 | cfg->input_pins[AUTO_PIN_FRONT_LINE] = nid; |