]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: hda - Fix empty DAC filling in patch_via.c
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Nov 2012 09:32:47 +0000 (10:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 20:14:08 +0000 (12:14 -0800)
commitcac9141d75777308d05f9876cfd2885fd98fafa2
tree562be84a3ff9d92bee0a6695eaa5e716acae5c8f
parentbe6a306b17a18f0e74fa553b77ea932be7f8211f
ALSA: hda - Fix empty DAC filling in patch_via.c

commit 5b3761954dac2d1393beef8210eb8cee81d16b8d upstream.

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
via_auto_fill_adc_nids().

Reported-by: Massimo Del Fedele <max@veneto.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_via.c