diff options
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 28f95d14ba6a..5d582de91c19 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -16008,9 +16008,12 @@ static int alc861_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
16008 | return err; | 16008 | return err; |
16009 | } else { | 16009 | } else { |
16010 | const char *name = pfx; | 16010 | const char *name = pfx; |
16011 | if (!name) | 16011 | int index = i; |
16012 | if (!name) { | ||
16012 | name = chname[i]; | 16013 | name = chname[i]; |
16013 | err = __alc861_create_out_sw(codec, name, nid, i, 3); | 16014 | index = 0; |
16015 | } | ||
16016 | err = __alc861_create_out_sw(codec, name, nid, index, 3); | ||
16014 | if (err < 0) | 16017 | if (err < 0) |
16015 | return err; | 16018 | return err; |
16016 | } | 16019 | } |
@@ -17161,16 +17164,19 @@ static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
17161 | return err; | 17164 | return err; |
17162 | } else { | 17165 | } else { |
17163 | const char *name = pfx; | 17166 | const char *name = pfx; |
17164 | if (!name) | 17167 | int index = i; |
17168 | if (!name) { | ||
17165 | name = chname[i]; | 17169 | name = chname[i]; |
17170 | index = 0; | ||
17171 | } | ||
17166 | err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, | 17172 | err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, |
17167 | name, i, | 17173 | name, index, |
17168 | HDA_COMPOSE_AMP_VAL(nid_v, 3, 0, | 17174 | HDA_COMPOSE_AMP_VAL(nid_v, 3, 0, |
17169 | HDA_OUTPUT)); | 17175 | HDA_OUTPUT)); |
17170 | if (err < 0) | 17176 | if (err < 0) |
17171 | return err; | 17177 | return err; |
17172 | err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE, | 17178 | err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE, |
17173 | name, i, | 17179 | name, index, |
17174 | HDA_COMPOSE_AMP_VAL(nid_s, 3, 2, | 17180 | HDA_COMPOSE_AMP_VAL(nid_s, 3, 2, |
17175 | HDA_INPUT)); | 17181 | HDA_INPUT)); |
17176 | if (err < 0) | 17182 | if (err < 0) |
@@ -19219,12 +19225,15 @@ static int alc662_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
19219 | return err; | 19225 | return err; |
19220 | } else { | 19226 | } else { |
19221 | const char *name = pfx; | 19227 | const char *name = pfx; |
19222 | if (!name) | 19228 | int index = i; |
19229 | if (!name) { | ||
19223 | name = chname[i]; | 19230 | name = chname[i]; |
19224 | err = __alc662_add_vol_ctl(spec, name, nid, i, 3); | 19231 | index = 0; |
19232 | } | ||
19233 | err = __alc662_add_vol_ctl(spec, name, nid, index, 3); | ||
19225 | if (err < 0) | 19234 | if (err < 0) |
19226 | return err; | 19235 | return err; |
19227 | err = __alc662_add_sw_ctl(spec, name, mix, i, 3); | 19236 | err = __alc662_add_sw_ctl(spec, name, mix, index, 3); |
19228 | if (err < 0) | 19237 | if (err < 0) |
19229 | return err; | 19238 | return err; |
19230 | } | 19239 | } |