diff options
| -rw-r--r-- | sound/pci/hda/patch_via.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 72a2f60b087c..bf57fa6a4add 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
| @@ -1809,11 +1809,11 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec) | |||
| 1809 | { | 1809 | { |
| 1810 | struct via_spec *spec = codec->spec; | 1810 | struct via_spec *spec = codec->spec; |
| 1811 | const struct auto_pin_cfg *cfg = &spec->autocfg; | 1811 | const struct auto_pin_cfg *cfg = &spec->autocfg; |
| 1812 | int i, dac_num; | 1812 | int i; |
| 1813 | hda_nid_t nid; | 1813 | hda_nid_t nid; |
| 1814 | 1814 | ||
| 1815 | spec->multiout.num_dacs = 0; | ||
| 1815 | spec->multiout.dac_nids = spec->private_dac_nids; | 1816 | spec->multiout.dac_nids = spec->private_dac_nids; |
| 1816 | dac_num = 0; | ||
| 1817 | for (i = 0; i < cfg->line_outs; i++) { | 1817 | for (i = 0; i < cfg->line_outs; i++) { |
| 1818 | hda_nid_t dac = 0; | 1818 | hda_nid_t dac = 0; |
| 1819 | nid = cfg->line_out_pins[i]; | 1819 | nid = cfg->line_out_pins[i]; |
| @@ -1824,16 +1824,13 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec) | |||
| 1824 | if (!i && parse_output_path(codec, nid, dac, 1, | 1824 | if (!i && parse_output_path(codec, nid, dac, 1, |
| 1825 | &spec->out_mix_path)) | 1825 | &spec->out_mix_path)) |
| 1826 | dac = spec->out_mix_path.path[0]; | 1826 | dac = spec->out_mix_path.path[0]; |
| 1827 | if (dac) { | 1827 | if (dac) |
| 1828 | spec->private_dac_nids[i] = dac; | 1828 | spec->private_dac_nids[spec->multiout.num_dacs++] = dac; |
| 1829 | dac_num++; | ||
| 1830 | } | ||
| 1831 | } | 1829 | } |
| 1832 | if (!spec->out_path[0].depth && spec->out_mix_path.depth) { | 1830 | if (!spec->out_path[0].depth && spec->out_mix_path.depth) { |
| 1833 | spec->out_path[0] = spec->out_mix_path; | 1831 | spec->out_path[0] = spec->out_mix_path; |
| 1834 | spec->out_mix_path.depth = 0; | 1832 | spec->out_mix_path.depth = 0; |
| 1835 | } | 1833 | } |
| 1836 | spec->multiout.num_dacs = dac_num; | ||
| 1837 | return 0; | 1834 | return 0; |
| 1838 | } | 1835 | } |
| 1839 | 1836 | ||
