diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-03-27 05:52:22 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-31 10:58:57 -0500 |
commit | 2125cad29100f88670a483a2291ffdbeae0cd5fc (patch) | |
tree | 622343815fc2f21fa96bda35d5576b2a7d0c8551 /sound/pci/hda/patch_analog.c | |
parent | 505cb341ef39c0e75e074d49988a044b66fd4f99 (diff) |
[ALSA] hda-codec - Fix noisy output wtih AD1986A 3stack model
Fixed the noisy output wtih AD1986A 3stack model using 2 channels.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 32401bd8c229..2bfe37e8543c 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -44,6 +44,7 @@ struct ad198x_spec { | |||
44 | * dig_out_nid and hp_nid are optional | 44 | * dig_out_nid and hp_nid are optional |
45 | */ | 45 | */ |
46 | unsigned int cur_eapd; | 46 | unsigned int cur_eapd; |
47 | unsigned int need_dac_fix; | ||
47 | 48 | ||
48 | /* capture */ | 49 | /* capture */ |
49 | unsigned int num_adc_nids; | 50 | unsigned int num_adc_nids; |
@@ -836,10 +837,14 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
836 | case AD1986A_3STACK: | 837 | case AD1986A_3STACK: |
837 | spec->num_mixers = 2; | 838 | spec->num_mixers = 2; |
838 | spec->mixers[1] = ad1986a_3st_mixers; | 839 | spec->mixers[1] = ad1986a_3st_mixers; |
839 | spec->num_init_verbs = 2; | 840 | spec->num_init_verbs = 3; |
840 | spec->init_verbs[1] = ad1986a_3st_init_verbs; | 841 | spec->init_verbs[1] = ad1986a_3st_init_verbs; |
842 | spec->init_verbs[2] = ad1986a_ch2_init; | ||
841 | spec->channel_mode = ad1986a_modes; | 843 | spec->channel_mode = ad1986a_modes; |
842 | spec->num_channel_mode = ARRAY_SIZE(ad1986a_modes); | 844 | spec->num_channel_mode = ARRAY_SIZE(ad1986a_modes); |
845 | spec->need_dac_fix = 1; | ||
846 | spec->multiout.max_channels = 2; | ||
847 | spec->multiout.num_dacs = 1; | ||
843 | break; | 848 | break; |
844 | case AD1986A_LAPTOP: | 849 | case AD1986A_LAPTOP: |
845 | spec->mixers[0] = ad1986a_laptop_mixers; | 850 | spec->mixers[0] = ad1986a_laptop_mixers; |
@@ -1555,6 +1560,8 @@ static int ad198x_ch_mode_put(struct snd_kcontrol *kcontrol, | |||
1555 | { | 1560 | { |
1556 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 1561 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
1557 | struct ad198x_spec *spec = codec->spec; | 1562 | struct ad198x_spec *spec = codec->spec; |
1563 | if (spec->need_dac_fix) | ||
1564 | spec->multiout.num_dacs = spec->multiout.max_channels / 2; | ||
1558 | return snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode, | 1565 | return snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode, |
1559 | spec->num_channel_mode, &spec->multiout.max_channels); | 1566 | spec->num_channel_mode, &spec->multiout.max_channels); |
1560 | } | 1567 | } |