Commit c4394f5b authored by Lydia Wang's avatar Lydia Wang Committed by Takashi Iwai

ALSA: hda - Fix issue that front can't output sound for VT1718S

For VT1718S, Mixer 9 doesn't expose the connection to DAC 0. So when
building up a 'PCM Playback' amplifier control, it will fail since
getting DAC 0 index of Mixer 9 returned -1. So I added a dac_mixer_idx
to indicated the actual index of DAC 0 to Mixer 9. Following is the
patch and next mail is another.
Signed-off-by: default avatarLydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e5e14681
......@@ -130,6 +130,7 @@ struct via_spec {
hda_nid_t hp_dac_nid;
bool hp_indep_shared; /* indep HP-DAC is shared with side ch */
int num_active_streams;
int dac_mixer_idx;
struct nid_path out_path[4];
struct nid_path hp_path;
......@@ -1810,6 +1811,8 @@ static int via_auto_create_multi_out_ctls(struct hda_codec *codec)
idx = get_connection_index(codec, spec->aa_mix_nid,
spec->multiout.dac_nids[0]);
if (idx < 0 && spec->dac_mixer_idx)
idx = spec->dac_mixer_idx;
if (idx >= 0) {
/* add control to mixer */
err = via_add_control(spec, VIA_CTL_WIDGET_VOL,
......@@ -2959,6 +2962,7 @@ static int patch_vt1718S(struct hda_codec *codec)
spec->aa_mix_nid = 0x21;
override_mic_boost(codec, 0x2b, 0, 3, 40);
override_mic_boost(codec, 0x29, 0, 3, 40);
spec->dac_mixer_idx = 5;
/* automatic parse from the BIOS config */
err = via_parse_auto_config(codec);
......
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