diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 336d14eb72af..06c0c12d4fec 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1054,8 +1054,20 @@ static bool alc_rebuild_imux_for_auto_mic(struct hda_codec *codec) | |||
1054 | spec->imux_pins[2] = spec->dock_mic_pin; | 1054 | spec->imux_pins[2] = spec->dock_mic_pin; |
1055 | for (i = 0; i < 3; i++) { | 1055 | for (i = 0; i < 3; i++) { |
1056 | strcpy(imux->items[i].label, texts[i]); | 1056 | strcpy(imux->items[i].label, texts[i]); |
1057 | if (spec->imux_pins[i]) | 1057 | if (spec->imux_pins[i]) { |
1058 | hda_nid_t pin = spec->imux_pins[i]; | ||
1059 | int c; | ||
1060 | for (c = 0; c < spec->num_adc_nids; c++) { | ||
1061 | hda_nid_t cap = spec->capsrc_nids ? | ||
1062 | spec->capsrc_nids[c] : spec->adc_nids[c]; | ||
1063 | int idx = get_connection_index(codec, cap, pin); | ||
1064 | if (idx >= 0) { | ||
1065 | imux->items[i].index = idx; | ||
1066 | break; | ||
1067 | } | ||
1068 | } | ||
1058 | imux->num_items = i + 1; | 1069 | imux->num_items = i + 1; |
1070 | } | ||
1059 | } | 1071 | } |
1060 | spec->num_mux_defs = 1; | 1072 | spec->num_mux_defs = 1; |
1061 | spec->input_mux = imux; | 1073 | spec->input_mux = imux; |