From 5a9b61904301349a23c798bf7479d0580fe08bc8 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 25 Aug 2004 19:15:41 +0200 Subject: [PATCH] ALSA CVS update AC97 Codec Core Added jack sense switches for AD1885 'Headphone Jack Sense' and 'Line Jack Sense' switches are added for AD1885. This will enable the h/w swich between the headphone and the internal speaker on some laptops. Signed-off-by: Takashi Iwai --- sound/pci/ac97/ac97_patch.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 3455888cc0213..1ad062a19e44d 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -905,6 +905,8 @@ static const snd_kcontrol_new_t snd_ac97_controls_ad1885[] = { /* AC97_SINGLE("Digital Audio Mode", AC97_AD_MISC, 12, 1, 0), */ /* seems problematic */ AC97_SINGLE("Low Power Mixer", AC97_AD_MISC, 14, 1, 0), AC97_SINGLE("Zero Fill DAC", AC97_AD_MISC, 15, 1, 0), + AC97_SINGLE("Headphone Jack Sense", AC97_AD_JACK_SPDIF, 9, 1, 1), /* inverted */ + AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 8, 1, 1), /* inverted */ }; static int patch_ad1885_specific(ac97_t * ac97) @@ -922,16 +924,10 @@ static struct snd_ac97_build_ops patch_ad1885_build_ops = { int patch_ad1885(ac97_t * ac97) { - unsigned short jack; - patch_ad1881(ac97); /* This is required to deal with the Intel D815EEAL2 */ /* i.e. Line out is actually headphone out from codec */ - /* turn off jack sense bits D8 & D9 */ - jack = snd_ac97_read(ac97, AC97_AD_JACK_SPDIF); - snd_ac97_write_cache(ac97, AC97_AD_JACK_SPDIF, jack | 0x0300); - /* set default */ snd_ac97_write_cache(ac97, AC97_AD_MISC, 0x0404); -- 2.53.0