summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorRandy Cushman <rcushman_linux@earthlink.net>2007-03-09 11:32:22 +0100
committerJaroslav Kysela <perex@suse.cz>2007-03-14 08:24:16 +0100
commitc26a8de23a4417f556250c4c099b048b26c430be (patch)
tree2d19384cf5b510df3cec62c343a3be01ec518baf /sound
parent1fc273b88e59092466b6503e46d9227976254e10 (diff)
downloadop-kernel-dev-c26a8de23a4417f556250c4c099b048b26c430be.zip
op-kernel-dev-c26a8de23a4417f556250c4c099b048b26c430be.tar.gz
[ALSA] ac97 - fix AD shared shared jack control logic
This patch fixes the control logic for shared Microphone in/Center+LFE out and Line in/Surround out jacks for Analog Devices AD1888, AD1980 and AD1985 AC '97 CODECs. Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/ac97/ac97_patch.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 37fabf7..b188a4d 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1962,9 +1962,11 @@ static int snd_ac97_ad1888_downmix_put(struct snd_kcontrol *kcontrol, struct snd
static void ad1888_update_jacks(struct snd_ac97 *ac97)
{
unsigned short val = 0;
- if (! is_shared_linein(ac97))
+ /* clear LODIS if shared jack is to be used for Surround out */
+ if (is_shared_linein(ac97))
val |= (1 << 12);
- if (! is_shared_micin(ac97))
+ /* clear CLDIS if shared jack is to be used for C/LFE out */
+ if (is_shared_micin(ac97))
val |= (1 << 11);
/* shared Line-In */
snd_ac97_update_bits(ac97, AC97_AD_MISC, (1 << 11) | (1 << 12), val);
@@ -2136,8 +2138,9 @@ static const struct snd_kcontrol_new snd_ac97_ad1985_controls[] = {
static void ad1985_update_jacks(struct snd_ac97 *ac97)
{
ad1888_update_jacks(ac97);
+ /* clear OMS if shared jack is to be used for C/LFE out */
snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 1 << 9,
- is_shared_micin(ac97) ? 0 : 1 << 9);
+ is_shared_micin(ac97) ? 1 << 9 : 0);
}
static int patch_ad1985_specific(struct snd_ac97 *ac97)
@@ -2418,9 +2421,9 @@ static void ad1986_update_jacks(struct snd_ac97 *ac97)
unsigned short ser_val;
/* disable SURROUND and CENTER/LFE if not surround mode */
- if (! is_surround_on(ac97))
+ if (!is_surround_on(ac97))
misc_val |= AC97_AD1986_SODIS;
- if (! is_clfe_on(ac97))
+ if (!is_clfe_on(ac97))
misc_val |= AC97_AD1986_CLDIS;
/* select line input (default=LINE_IN, SURROUND or MIC_1/2) */
OpenPOWER on IntegriCloud