Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.co.uk>
To: alsa-devel@lists.sourceforge.net
Subject: [PATCH] Disable SPDIF in on ASUS W1000 motherboard as it does not have an spdif in.
Date: Mon, 03 Jan 2005 15:43:51 +0000	[thread overview]
Message-ID: <41D96837.5030707@superbug.co.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 84 bytes --]

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

[-- Attachment #2: disable-spdif-in.diff.txt --]
[-- Type: text/plain, Size: 2296 bytes --]

Index: alsa-driver/alsa-kernel/include/ac97_codec.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/ac97_codec.h,v
retrieving revision 1.61
diff -u -r1.61 ac97_codec.h
--- alsa-driver/alsa-kernel/include/ac97_codec.h	27 Dec 2004 14:36:39 -0000	1.61
+++ alsa-driver/alsa-kernel/include/ac97_codec.h	3 Jan 2005 15:25:05 -0000
@@ -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
diff -u -r1.186 intel8x0.c
--- alsa-driver/alsa-kernel/pci/intel8x0.c	27 Dec 2004 14:36:39 -0000	1.186
+++ alsa-driver/alsa-kernel/pci/intel8x0.c	3 Jan 2005 15:25:06 -0000
@@ -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
diff -u -r1.163 ac97_codec.c
--- alsa-driver/alsa-kernel/pci/ac97/ac97_codec.c	3 Jan 2005 12:05:21 -0000	1.163
+++ alsa-driver/alsa-kernel/pci/ac97/ac97_codec.c	3 Jan 2005 15:25:07 -0000
@@ -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 */

             reply	other threads:[~2005-01-03 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-03 15:43 James Courtier-Dutton [this message]
2005-01-03 16:23 ` [PATCH] Disable SPDIF in on ASUS W1000 motherboard as it does not have an spdif in Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41D96837.5030707@superbug.co.uk \
    --to=james@superbug.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox