From: Takashi Iwai tiwai@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 via_auto_fill_adc_nids().
Reported-by: Massimo Del Fedele max@veneto.com Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai tiwai@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) &spec->out_mix_path)) dac = spec->out_mix_path.path[0]; if (dac) { - spec->private_dac_nids[i] = dac; + spec->private_dac_nids[dac_num] = dac; dac_num++; } }