[PATCH 2/3] [UBUNTU:sound/pci/hda] Fix noisy stereo output on AD1986A 3stack model

crimsun at fungus.sh.nu crimsun at fungus.sh.nu
Thu Mar 30 22:19:59 UTC 2006


Subject: [PATCH 2/3] [UBUNTU:sound/pci/hda] Fix noisy stereo output on AD1986A 3stack model

UpstreamStatus: Added in upstream pci/hda/patch_analog.c r1.22

This patch from Takashi Iwai fixes noisy stereo output on the AD1986A
3stack.

Signed-off-by: Daniel T Chen <crimsun at ubuntu.com>

---

 sound/pci/hda/patch_analog.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

f0c2367bc57b41b92dd8e1cd8b770dd40818f344
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 6432753..96fcb86 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -42,6 +42,7 @@ struct ad198x_spec {
 					 * dig_out_nid and hp_nid are optional
 					 */
 	unsigned int cur_eapd;
+	unsigned int need_dac_fix;
 
 	/* capture */
 	unsigned int num_adc_nids;
@@ -834,10 +835,14 @@ static int patch_ad1986a(struct hda_code
 	case AD1986A_3STACK:
 		spec->num_mixers = 2;
 		spec->mixers[1] = ad1986a_3st_mixers;
-		spec->num_init_verbs = 2;
+		spec->num_init_verbs = 3;
 		spec->init_verbs[1] = ad1986a_3st_init_verbs;
+		spec->init_verbs[2] = ad1986a_ch2_init;
 		spec->channel_mode = ad1986a_modes;
 		spec->num_channel_mode = ARRAY_SIZE(ad1986a_modes);
+		spec->need_dac_fix = 1;
+		spec->multiout.max_channels = 2;
+		spec->multiout.num_dacs = 1;
 		break;
 	case AD1986A_LAPTOP:
 		spec->mixers[0] = ad1986a_laptop_mixers;
@@ -1551,6 +1556,8 @@ static int ad198x_ch_mode_put(snd_kcontr
 {
 	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
 	struct ad198x_spec *spec = codec->spec;
+	if (spec->need_dac_fix)
+		spec->multiout.num_dacs = spec->multiout.max_channels / 2;
 	return snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode,
 				   spec->num_channel_mode, &spec->multiout.max_channels);
 }
-- 
1.1.3


-- 
Daniel T. Chen            crimsun at ubuntu.com
GPG key:   www.sh.nu/~crimsun/pubkey.gpg.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20060330/0fcdd826/attachment.sig>


More information about the kernel-team mailing list