aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2011-03-23 03:35:07 -0400
committerTakashi Iwai <tiwai@suse.de>2011-03-23 04:22:02 -0400
commit5a8826463c19b0d1a2fc60b2adac0ec318047844 (patch)
tree413c2369d166805aa5906d713fdd462bf9f58ce6
parentee3c35c0827de02de414d08b2ddcbb910c2263ab (diff)
ALSA: HDA: Realtek: Avoid unnecessary volume control index on Surround/Side
Similar to commit 7e59e097c09b82760bb0fe08b0fa2b704d76c3f4, this patch avoids unnecessary volume control indices for more Realtek auto-parsers, e g the ALC66x family, on the "Surround" and "Side" controls. These indices cause these volume controls to be ignored by PulseAudio and vmaster and should be removed whenever possible. Cc: stable@kernel.org Reported-by: Jan Losinski <losinski@wh2.tu-dresden.de> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c25
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 }