diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-05-17 11:17:57 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 04:11:07 -0400 |
commit | e5b3f45f5d442b57dd07dd4f914f7e6cf4d183f1 (patch) | |
tree | 52e790c9b78419565a4ab7143e8be51647b2efdb /sound/pci/ac97 | |
parent | 604cf499256af85703bd4858da56e777ec71714d (diff) |
[ALSA] Fix Mic/CLFE sharing on AD1985
AC97 Codec
Fixed Mic/CLFE jack sharing on AD1985 codec.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97')
-rw-r--r-- | sound/pci/ac97/ac97_patch.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index bcb1a20d75dc..5520f5d97490 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -1526,13 +1526,8 @@ static const snd_kcontrol_new_t snd_ac97_ad1888_controls[] = { | |||
1526 | .get = snd_ac97_ad1888_downmix_get, | 1526 | .get = snd_ac97_ad1888_downmix_get, |
1527 | .put = snd_ac97_ad1888_downmix_put | 1527 | .put = snd_ac97_ad1888_downmix_put |
1528 | }, | 1528 | }, |
1529 | #if 0 | ||
1530 | AC97_SINGLE("Surround Jack as Input", AC97_AD_MISC, 12, 1, 0), | ||
1531 | AC97_SINGLE("Center/LFE Jack as Input", AC97_AD_MISC, 11, 1, 0), | ||
1532 | #else | ||
1533 | AC97_SURROUND_JACK_MODE_CTL, | 1529 | AC97_SURROUND_JACK_MODE_CTL, |
1534 | AC97_CHANNEL_MODE_CTL, | 1530 | AC97_CHANNEL_MODE_CTL, |
1535 | #endif | ||
1536 | }; | 1531 | }; |
1537 | 1532 | ||
1538 | static int patch_ad1888_specific(ac97_t *ac97) | 1533 | static int patch_ad1888_specific(ac97_t *ac97) |
@@ -1601,6 +1596,18 @@ static const snd_kcontrol_new_t snd_ac97_ad1985_controls[] = { | |||
1601 | AC97_SINGLE("Exchange Center/LFE", AC97_AD_SERIAL_CFG, 3, 1, 0) | 1596 | AC97_SINGLE("Exchange Center/LFE", AC97_AD_SERIAL_CFG, 3, 1, 0) |
1602 | }; | 1597 | }; |
1603 | 1598 | ||
1599 | static void ad1985_update_jacks(ac97_t *ac97) | ||
1600 | { | ||
1601 | /* shared Line-In */ | ||
1602 | snd_ac97_update_bits(ac97, AC97_AD_MISC, 1 << 12, | ||
1603 | is_shared_linein(ac97) ? 0 : 1 << 12); | ||
1604 | /* shared Mic */ | ||
1605 | snd_ac97_update_bits(ac97, AC97_AD_MISC, 1 << 11, | ||
1606 | is_shared_micin(ac97) ? 0 : 1 << 11); | ||
1607 | snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 9 << 11, | ||
1608 | is_shared_micin(ac97) ? 0 : 9 << 11); | ||
1609 | } | ||
1610 | |||
1604 | static int patch_ad1985_specific(ac97_t *ac97) | 1611 | static int patch_ad1985_specific(ac97_t *ac97) |
1605 | { | 1612 | { |
1606 | int err; | 1613 | int err; |
@@ -1616,7 +1623,7 @@ static struct snd_ac97_build_ops patch_ad1985_build_ops = { | |||
1616 | #ifdef CONFIG_PM | 1623 | #ifdef CONFIG_PM |
1617 | .resume = ad18xx_resume, | 1624 | .resume = ad18xx_resume, |
1618 | #endif | 1625 | #endif |
1619 | .update_jacks = ad1888_update_jacks, | 1626 | .update_jacks = ad1985_update_jacks, |
1620 | }; | 1627 | }; |
1621 | 1628 | ||
1622 | int patch_ad1985(ac97_t * ac97) | 1629 | int patch_ad1985(ac97_t * ac97) |