Commit 7e59e097 authored by David Henningsson's avatar David Henningsson Committed by Takashi Iwai

ALSA: HDA: Fixup unnecessary volume control index on Realtek ALC88x

Without this change, a volume control named "Surround" or "Side" would
get an unnecessary index, causing it to be ignored by the vmaster and
PulseAudio.
Tested-by: default avatarBartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ebbeb3d6
...@@ -5136,16 +5136,19 @@ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, ...@@ -5136,16 +5136,19 @@ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec,
return err; return err;
} else { } else {
const char *name = pfx; const char *name = pfx;
if (!name) int index = i;
if (!name) {
name = chname[i]; name = chname[i];
index = 0;
}
err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL,
name, i, name, index,
HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_COMPOSE_AMP_VAL(nid, 3, 0,
HDA_OUTPUT)); HDA_OUTPUT));
if (err < 0) if (err < 0)
return err; return err;
err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE, err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE,
name, i, name, index,
HDA_COMPOSE_AMP_VAL(nid, 3, 2, HDA_COMPOSE_AMP_VAL(nid, 3, 2,
HDA_INPUT)); HDA_INPUT));
if (err < 0) if (err < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment