[alsa-devel] [PATCH 1/3] ALSA: hda - Fix empty DAC filling in patch_via.c

tiwai at suse.de tiwai at suse.de
Wed Nov 7 12:52:18 CET 2012

From: Takashi Iwai <tiwai at suse.de>

In via_auto_fill_adc_nids(), the parser tries to fill dac_nids[] at
the point of the current line-out (i).  When no valid path is found
for this output, this results in dac = 0, thus it creates a hole in
dac_nids[].  This confuses is_empty_dac() and trims the detected DAC
in later reference.

This patch fixes the bug by appending DAC properly to dac_nids[] in

Reported-by: Massimo Del Fedele <max at veneto.com>
Cc: <stable at vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
 sound/pci/hda/patch_via.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 72a2f60..1c1367b 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -1825,7 +1825,7 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec)
 			dac = spec->out_mix_path.path[0];
 		if (dac) {
-			spec->private_dac_nids[i] = dac;
+			spec->private_dac_nids[dac_num] = dac;

More information about the Alsa-devel mailing list