diff options
author | David Henningsson <david.henningsson@canonical.com> | 2011-03-04 08:22:25 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-10 11:35:40 -0500 |
commit | 7e59e097c09b82760bb0fe08b0fa2b704d76c3f4 (patch) | |
tree | cdcac487a5ba3ba7178730302f1afcf8767a9f14 /sound/pci/hda/patch_realtek.c | |
parent | ebbeb3d6aa22433c218da6f29fd7b3ebc89b87ea (diff) |
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: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6f59bccb104c..24bbc47dcea2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5136,16 +5136,19 @@ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5136 | return err; | 5136 | return err; |
5137 | } else { | 5137 | } else { |
5138 | const char *name = pfx; | 5138 | const char *name = pfx; |
5139 | if (!name) | 5139 | int index = i; |
5140 | if (!name) { | ||
5140 | name = chname[i]; | 5141 | name = chname[i]; |
5142 | index = 0; | ||
5143 | } | ||
5141 | err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, | 5144 | err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, |
5142 | name, i, | 5145 | name, index, |
5143 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, | 5146 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, |
5144 | HDA_OUTPUT)); | 5147 | HDA_OUTPUT)); |
5145 | if (err < 0) | 5148 | if (err < 0) |
5146 | return err; | 5149 | return err; |
5147 | err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE, | 5150 | err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE, |
5148 | name, i, | 5151 | name, index, |
5149 | HDA_COMPOSE_AMP_VAL(nid, 3, 2, | 5152 | HDA_COMPOSE_AMP_VAL(nid, 3, 2, |
5150 | HDA_INPUT)); | 5153 | HDA_INPUT)); |
5151 | if (err < 0) | 5154 | if (err < 0) |