diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8ae30ccf537a..9c2c19c8b059 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4947,6 +4947,7 @@ static int alc_auto_create_input_ctls(struct hda_codec *codec, | |||
4947 | 4947 | ||
4948 | for (i = 0; i < cfg->num_inputs; i++) { | 4948 | for (i = 0; i < cfg->num_inputs; i++) { |
4949 | hda_nid_t pin; | 4949 | hda_nid_t pin; |
4950 | const char *label; | ||
4950 | 4951 | ||
4951 | pin = cfg->inputs[i].pin; | 4952 | pin = cfg->inputs[i].pin; |
4952 | if (!alc_is_input_pin(codec, pin)) | 4953 | if (!alc_is_input_pin(codec, pin)) |
@@ -4957,12 +4958,13 @@ static int alc_auto_create_input_ctls(struct hda_codec *codec, | |||
4957 | type_idx++; | 4958 | type_idx++; |
4958 | else | 4959 | else |
4959 | type_idx = 0; | 4960 | type_idx = 0; |
4961 | label = hda_get_autocfg_input_label(codec, cfg, i); | ||
4960 | if (mixer) { | 4962 | if (mixer) { |
4961 | idx = get_connection_index(codec, mixer, pin); | 4963 | idx = get_connection_index(codec, mixer, pin); |
4962 | if (idx >= 0) { | 4964 | if (idx >= 0) { |
4963 | err = new_analog_input(spec, pin, | 4965 | err = new_analog_input(spec, pin, |
4964 | auto_pin_cfg_labels[type], | 4966 | label, type_idx, |
4965 | type_idx, idx, mixer); | 4967 | idx, mixer); |
4966 | if (err < 0) | 4968 | if (err < 0) |
4967 | return err; | 4969 | return err; |
4968 | } | 4970 | } |
@@ -4973,12 +4975,8 @@ static int alc_auto_create_input_ctls(struct hda_codec *codec, | |||
4973 | idx = get_connection_index(codec, cap1, pin); | 4975 | idx = get_connection_index(codec, cap1, pin); |
4974 | if (idx < 0 && cap2) | 4976 | if (idx < 0 && cap2) |
4975 | idx = get_connection_index(codec, cap2, pin); | 4977 | idx = get_connection_index(codec, cap2, pin); |
4976 | if (idx >= 0) { | 4978 | if (idx >= 0) |
4977 | snd_hda_get_input_pin_label(cfg, i, | 4979 | snd_hda_add_imux_item(imux, label, idx, NULL); |
4978 | imux->items[imux->num_items].label); | ||
4979 | imux->items[imux->num_items].index = idx; | ||
4980 | imux->num_items++; | ||
4981 | } | ||
4982 | } | 4980 | } |
4983 | return 0; | 4981 | return 0; |
4984 | } | 4982 | } |
@@ -10626,9 +10624,9 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec) | |||
10626 | break; | 10624 | break; |
10627 | nid = cfg->inputs[i].pin; | 10625 | nid = cfg->inputs[i].pin; |
10628 | if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) { | 10626 | if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) { |
10629 | char pinname[32], label[32]; | 10627 | char label[32]; |
10630 | snd_hda_get_input_pin_label(cfg, i, pinname); | 10628 | snprintf(label, sizeof(label), "%s Boost", |
10631 | snprintf(label, sizeof(label), "%s Boost", pinname); | 10629 | hda_get_autocfg_input_label(codec, cfg, i)); |
10632 | err = add_control(spec, ALC_CTL_WIDGET_VOL, label, 0, | 10630 | err = add_control(spec, ALC_CTL_WIDGET_VOL, label, 0, |
10633 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); | 10631 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); |
10634 | if (err < 0) | 10632 | if (err < 0) |