rpms/kernel/F-7 linux-2.6-snd-ad1988-fix-spdif-output.patch, 1.2, 1.3 kernel-2.6.spec, 1.3387, 1.3388

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Tue Nov 27 19:17:42 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25453

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-snd-ad1988-fix-spdif-output.patch 
Log Message:
* Tue Nov 27 2007 Chuck Ebbert <cebbert at redhat.com>
- Fix SPDIF audio on AD1988 codec (#253777)


linux-2.6-snd-ad1988-fix-spdif-output.patch:

Index: linux-2.6-snd-ad1988-fix-spdif-output.patch
===================================================================
RCS file: linux-2.6-snd-ad1988-fix-spdif-output.patch
diff -N linux-2.6-snd-ad1988-fix-spdif-output.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-snd-ad1988-fix-spdif-output.patch	27 Nov 2007 19:17:39 -0000	1.3
@@ -0,0 +1,95 @@
+
+# HG changeset patch
+# User tiwai
+# Date 1185293045 -7200
+# Node ID 43059389c583efdc0be086ec6cc4634a4ee45011
+# Parent 2250b8a4b66aa13e306bf253388a2d38b342eafa
+hda-codec - Fix AD1988 SPDIF output
+
+The SPDIF output on AD1988 had some problems due to the wrongly routed
+analog loopback to SPDIF.  This patch fixes the implementation of
+"IEC958 Playback Source" mixer to handle the amp bits of mixer widget
+0x1d correctly.
+
+Patch-level: ASAP
+
+--- a/sound/pci/hda/patch_analog.c	Tue Jul 24 12:49:39 2007 +0200
++++ b/sound/pci/hda/patch_analog.c	Tue Jul 24 18:04:05 2007 +0200
+@@ -1889,16 +1889,19 @@ static int ad1988_spdif_playback_source_
+ 	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+ 	unsigned int sel;
+ 
+-	sel = snd_hda_codec_read(codec, 0x02, 0, AC_VERB_GET_CONNECT_SEL, 0);
+-	if (sel > 0) {
++	sel = snd_hda_codec_read(codec, 0x1d, 0, AC_VERB_GET_AMP_GAIN_MUTE,
++				 AC_AMP_GET_INPUT);
++	if (!(sel & 0x80))
++		ucontrol->value.enumerated.item[0] = 0;
++	else {
+ 		sel = snd_hda_codec_read(codec, 0x0b, 0,
+ 					 AC_VERB_GET_CONNECT_SEL, 0);
+ 		if (sel < 3)
+ 			sel++;
+ 		else
+ 			sel = 0;
++		ucontrol->value.enumerated.item[0] = sel;
+ 	}
+-	ucontrol->value.enumerated.item[0] = sel;
+ 	return 0;
+ }
+ 
+@@ -1910,17 +1913,32 @@ static int ad1988_spdif_playback_source_
+ 	int change;
+ 
+ 	val = ucontrol->value.enumerated.item[0];
+-	sel = snd_hda_codec_read(codec, 0x02, 0, AC_VERB_GET_CONNECT_SEL, 0);
+ 	if (!val) {
+-		change = sel != 0;
+-		if (change || codec->in_resume)
+-			snd_hda_codec_write(codec, 0x02, 0,
+-					    AC_VERB_SET_CONNECT_SEL, 0);
++		sel = snd_hda_codec_read(codec, 0x1d, 0,
++					 AC_VERB_GET_AMP_GAIN_MUTE,
++					 AC_AMP_GET_INPUT);
++		change = sel & 0x80;
++		if (change || codec->in_resume) {
++			snd_hda_codec_write(codec, 0x1d, 0,
++					    AC_VERB_SET_AMP_GAIN_MUTE,
++					    AMP_IN_UNMUTE(0));
++			snd_hda_codec_write(codec, 0x1d, 0,
++					    AC_VERB_SET_AMP_GAIN_MUTE,
++					    AMP_IN_MUTE(1));
++		}
+ 	} else {
+-		change = sel == 0;
+-		if (change || codec->in_resume)
+-			snd_hda_codec_write(codec, 0x02, 0,
+-					    AC_VERB_SET_CONNECT_SEL, 1);
++		sel = snd_hda_codec_read(codec, 0x1d, 0,
++					 AC_VERB_GET_AMP_GAIN_MUTE,
++					 AC_AMP_GET_INPUT | 0x01);
++		change = sel & 0x80;
++		if (change || codec->in_resume) {
++			snd_hda_codec_write(codec, 0x1d, 0,
++					    AC_VERB_SET_AMP_GAIN_MUTE,
++					    AMP_IN_MUTE(0));
++			snd_hda_codec_write(codec, 0x1d, 0,
++					    AC_VERB_SET_AMP_GAIN_MUTE,
++					    AMP_IN_UNMUTE(1));
++		}
+ 		sel = snd_hda_codec_read(codec, 0x0b, 0,
+ 					 AC_VERB_GET_CONNECT_SEL, 0) + 1;
+ 		change |= sel != val;
+@@ -2039,10 +2057,9 @@ static struct hda_verb ad1988_spdif_init
+ 	{0x02, AC_VERB_SET_CONNECT_SEL, 0x0}, /* PCM */
+ 	{0x0b, AC_VERB_SET_CONNECT_SEL, 0x0}, /* ADC1 */
+ 	{0x1d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+-	{0x1d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
++	{0x1d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
+ 	/* SPDIF out pin */
+ 	{0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE | 0x27}, /* 0dB */
+-	{0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x17}, /* 0dB */
+ 
+ 	{ }
+ };
+


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3387
retrieving revision 1.3388
diff -u -r1.3387 -r1.3388
--- kernel-2.6.spec	26 Nov 2007 19:02:02 -0000	1.3387
+++ kernel-2.6.spec	27 Nov 2007 19:17:39 -0000	1.3388
@@ -616,6 +616,8 @@
 Patch719: linux-2.6-netdev-e1000e-10.patch
 Patch730: linux-2.6-net-e100-disable-polling.patch
 
+Patch740: linux-2.6-snd-ad1988-fix-spdif-output.patch
+
 Patch750: linux-2.6-firewire-multi-lun.patch
 Patch751: linux-2.6-firewire-lockdep.patch
 Patch752: linux-2.6-firewire-ohci-1.0-iso-receive.patch
@@ -2252,6 +2254,9 @@
 %endif
 
 %changelog
+* Tue Nov 27 2007 Chuck Ebbert <cebbert at redhat.com>
+- Fix SPDIF audio on AD1988 codec (#253777)
+
 * Mon Nov 26 2007 Kyle McMartin <kmcmartin at redhat.com>
 - Linux 2.6.23.9
 




More information about the fedora-extras-commits mailing list