diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-02-21 06:35:27 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-02-21 06:36:37 -0500 |
commit | 689cabf6d07c82003310c221f719130f3a4f29c7 (patch) | |
tree | 2f101a88f284670553aa7538d1d7f4ca0bd0967d /sound/pci | |
parent | c96f0bf4adc0663a69cdb0e2b73d33e6be312d1c (diff) |
ALSA: hda/realtek - Fix the possible conflicts of Bass Speaker name
When the multi-io is added to the two speaker output configuration,
the parser would try to add yet another "Bass Speaker" control since
it checks only cfg->line_outs. Add a workaround for it by simply
passing the channel name in the case of multi-io outputs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-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 3cedb26f9cf5..e5c04593d360 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3613,14 +3613,17 @@ static int alc_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
3613 | dac = spec->multiout.dac_nids[i]; | 3613 | dac = spec->multiout.dac_nids[i]; |
3614 | if (!dac) | 3614 | if (!dac) |
3615 | continue; | 3615 | continue; |
3616 | if (i >= cfg->line_outs) | 3616 | if (i >= cfg->line_outs) { |
3617 | pin = spec->multi_io[i - 1].pin; | 3617 | pin = spec->multi_io[i - 1].pin; |
3618 | else | 3618 | index = 0; |
3619 | name = channel_name[i]; | ||
3620 | } else { | ||
3619 | pin = cfg->line_out_pins[i]; | 3621 | pin = cfg->line_out_pins[i]; |
3622 | name = alc_get_line_out_pfx(spec, i, true, &index); | ||
3623 | } | ||
3620 | 3624 | ||
3621 | sw = alc_look_for_out_mute_nid(codec, pin, dac); | 3625 | sw = alc_look_for_out_mute_nid(codec, pin, dac); |
3622 | vol = alc_look_for_out_vol_nid(codec, pin, dac); | 3626 | vol = alc_look_for_out_vol_nid(codec, pin, dac); |
3623 | name = alc_get_line_out_pfx(spec, i, true, &index); | ||
3624 | if (!name || !strcmp(name, "CLFE")) { | 3627 | if (!name || !strcmp(name, "CLFE")) { |
3625 | /* Center/LFE */ | 3628 | /* Center/LFE */ |
3626 | err = alc_auto_add_vol_ctl(codec, "Center", 0, vol, 1); | 3629 | err = alc_auto_add_vol_ctl(codec, "Center", 0, vol, 1); |