Skip to contentSkip to conversation

Disable SPDIF in on ASUS W1000 motherboard as it does not have an spdif in.

PATCH In review James Courtier-Dutton 2 participants 2 messages Jan 3, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Disable SPDIF in on ASUS W1000 motherboard as it does not have an spdif in.

Here is a motherboard specific patch to fix sound output on the ASUS W1000 laptop.

Index: alsa-driver/alsa-kernel/include/ac97_codec.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/ac97_codec.h,v retrieving revision 1.61

alsa-kernel/include/ac97_codec.h +1 -0
diff -u -r1.61 ac97_codec.h
@@ -555,6 +555,7 @@
 	AC97_TUNE_ALC_JACK,	/* for Realtek, enable JACK detection */
 	AC97_TUNE_INV_EAPD,	/* inverted EAPD implementation */
 	AC97_TUNE_MUTE_LED,	/* EAPD bit works as mute LED */
+	AC97_TUNE_NO_SPDIF_IN,	/* NO SPDIF IN */
 };
 
 struct ac97_quirk {

Index: alsa-driver/alsa-kernel/pci/intel8x0.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v retrieving revision 1.186

alsa-kernel/pci/intel8x0.c +6 -0
diff -u -r1.186 intel8x0.c
@@ -1798,6 +1798,12 @@
 	},
  	{
 		.vendor = 0x1043,
+		.device = 0x1843,
+		.name = "ASUS W1000/CMI9739",
+		.type = AC97_TUNE_NO_SPDIF_IN
+	},
+ 	{
+		.vendor = 0x1043,
 		.device = 0x80f3,
 		.name = "ASUS ICH5/AD1985",
 		.type = AC97_TUNE_AD_SHARING

Index: alsa-driver/alsa-kernel/pci/ac97/ac97_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v retrieving revision 1.163

alsa-kernel/pci/ac97/ac97_codec.c +11 -0
diff -u -r1.163 ac97_codec.c
@@ -2460,6 +2460,16 @@
 	return 0;
 }
 
+static int tune_no_spdif_in(ac97_t *ac97)
+{
+	/* disable spdif in */
+	snd_ac97_write_cache(ac97, AC97_CM9739_SPDIF_CTRL,
+		snd_ac97_read(ac97, AC97_CM9739_SPDIF_CTRL) & ~0x01);
+	snd_ac97_write_cache(ac97, AC97_CM9739_MULTI_CHAN,
+		snd_ac97_read(ac97, AC97_CM9739_MULTI_CHAN) | (1 << 14));
+	return 0;
+}
+
 struct quirk_table {
 	const char *name;
 	int (*func)(ac97_t *);
@@ -2474,6 +2484,7 @@
 	{ "alc_jack", tune_alc_jack },
 	{ "inv_eapd", tune_inv_eapd },
 	{ "mute_led", tune_mute_led },
+	{ "no_spdif_in", tune_no_spdif_in },
 };
 
 /* apply the quirk with the given type */
#1 lore raw

At Mon, 03 Jan 2005 15:43:51 +0000,

Quoted 3 lines · James Courtier-Dutton

Here is a motherboard specific patch to fix sound output on the ASUS W1000 laptop.

Maybe it's easier to add an if() (or switch()) in patch_cmi9739() instead of adding a new quirk in this case?

If we add a quirk, it should be as generic as possible. (ALC_JACK was... a failure in youth ;)
or, at least the quirk code should check the correct codec.

Takashi

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt