From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: hda - Fix Master volume info for VIA
Patch-mainline: Never
References: bnc#813922

The widget NID referred by vmaster TLV was wrongly assumed to be the
DAC in patch_via.a although it can be another in the output path.
Pass the right NID taken from the primary output path instead.

This patch is needed only for 3.8 and older, thus no upstreaming.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/patch_via.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -1495,7 +1495,7 @@ static int via_build_controls(struct hda
 	/* if we have no master control, let's create it */
 	if (!snd_hda_find_mixer_ctl(codec, "Master Playback Volume")) {
 		unsigned int vmaster_tlv[4];
-		snd_hda_set_vmaster_tlv(codec, spec->multiout.dac_nids[0],
+		snd_hda_set_vmaster_tlv(codec, spec->out_path[0].vol_ctl,
 					HDA_OUTPUT, vmaster_tlv);
 		err = snd_hda_add_vmaster(codec, "Master Playback Volume",
 					  vmaster_tlv, via_slave_pfxs,
