* [PATCH] Disable SPDIF in on ASUS W1000 motherboard as it does not have an spdif in.
@ 2005-01-03 15:43 James Courtier-Dutton
2005-01-03 16:23 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: James Courtier-Dutton @ 2005-01-03 15:43 UTC (permalink / raw)
To: alsa-devel
[-- 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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Disable SPDIF in on ASUS W1000 motherboard as it does not have an spdif in.
2005-01-03 15:43 [PATCH] Disable SPDIF in on ASUS W1000 motherboard as it does not have an spdif in James Courtier-Dutton
@ 2005-01-03 16:23 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2005-01-03 16:23 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
At Mon, 03 Jan 2005 15:43:51 +0000,
James Courtier-Dutton wrote:
>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-03 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-03 15:43 [PATCH] Disable SPDIF in on ASUS W1000 motherboard as it does not have an spdif in James Courtier-Dutton
2005-01-03 16:23 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.