diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_via.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 8f59e0b5d477..b289abf0db55 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -1716,18 +1716,21 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec) | |||
1716 | { | 1716 | { |
1717 | struct via_spec *spec = codec->spec; | 1717 | struct via_spec *spec = codec->spec; |
1718 | const struct auto_pin_cfg *cfg = &spec->autocfg; | 1718 | const struct auto_pin_cfg *cfg = &spec->autocfg; |
1719 | int i; | 1719 | int i, dac_num; |
1720 | hda_nid_t nid; | 1720 | hda_nid_t nid; |
1721 | 1721 | ||
1722 | spec->multiout.dac_nids = spec->private_dac_nids; | 1722 | spec->multiout.dac_nids = spec->private_dac_nids; |
1723 | spec->multiout.num_dacs = cfg->line_outs; | 1723 | dac_num = 0; |
1724 | for (i = 0; i < cfg->line_outs; i++) { | 1724 | for (i = 0; i < cfg->line_outs; i++) { |
1725 | nid = cfg->line_out_pins[i]; | 1725 | nid = cfg->line_out_pins[i]; |
1726 | if (!nid) | 1726 | if (!nid) |
1727 | continue; | 1727 | continue; |
1728 | if (parse_output_path(codec, nid, 0, &spec->out_path[i])) | 1728 | if (parse_output_path(codec, nid, 0, &spec->out_path[i])) { |
1729 | spec->private_dac_nids[i] = spec->out_path[i].path[0]; | 1729 | spec->private_dac_nids[i] = spec->out_path[i].path[0]; |
1730 | dac_num++; | ||
1731 | } | ||
1730 | } | 1732 | } |
1733 | spec->multiout.num_dacs = dac_num; | ||
1731 | return 0; | 1734 | return 0; |
1732 | } | 1735 | } |
1733 | 1736 | ||
@@ -1838,6 +1841,10 @@ static int via_auto_create_multi_out_ctls(struct hda_codec *codec) | |||
1838 | if (err < 0) | 1841 | if (err < 0) |
1839 | return err; | 1842 | return err; |
1840 | 1843 | ||
1844 | if (spec->multiout.num_dacs < 3) { | ||
1845 | spec->smart51_nums = 0; | ||
1846 | cfg->line_outs = old_line_outs; | ||
1847 | } | ||
1841 | for (i = 0; i < cfg->line_outs; i++) { | 1848 | for (i = 0; i < cfg->line_outs; i++) { |
1842 | hda_nid_t pin, dac; | 1849 | hda_nid_t pin, dac; |
1843 | pin = cfg->line_out_pins[i]; | 1850 | pin = cfg->line_out_pins[i]; |
@@ -3383,6 +3390,7 @@ static int patch_vt2002P(struct hda_codec *codec) | |||
3383 | return -ENOMEM; | 3390 | return -ENOMEM; |
3384 | 3391 | ||
3385 | spec->aa_mix_nid = 0x21; | 3392 | spec->aa_mix_nid = 0x21; |
3393 | spec->dac_mixer_idx = 3; | ||
3386 | override_mic_boost(codec, 0x2b, 0, 3, 40); | 3394 | override_mic_boost(codec, 0x2b, 0, 3, 40); |
3387 | override_mic_boost(codec, 0x29, 0, 3, 40); | 3395 | override_mic_boost(codec, 0x29, 0, 3, 40); |
3388 | 3396 | ||