[40/78] ALSA: HDA: Fixup unnecessary volume control index on Realtek ALC88x

From: Greg KH
Date: Mon Mar 21 2011 - 19:27:16 EST


2.6.38-stable review patch. If anyone has any objections, please let us know.

------------------

From: David Henningsson <david.henningsson@xxxxxxxxxxxxx>

commit 7e59e097c09b82760bb0fe08b0fa2b704d76c3f4 upstream.

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@xxxxxxxxx>
Signed-off-by: David Henningsson <david.henningsson@xxxxxxxxxxxxx>
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
sound/pci/hda/patch_realtek.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5207,16 +5207,19 @@ static int alc880_auto_create_multi_out_
return err;
} else {
const char *name = pfx;
- if (!name)
+ int index = i;
+ if (!name) {
name = chname[i];
+ index = 0;
+ }
err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL,
- name, i,
+ name, index,
HDA_COMPOSE_AMP_VAL(nid, 3, 0,
HDA_OUTPUT));
if (err < 0)
return err;
err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE,
- name, i,
+ name, index,
HDA_COMPOSE_AMP_VAL(nid, 3, 2,
HDA_INPUT));
if (err < 0)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/