aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs5535audio/cs5535audio_olpc.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-11-06 16:44:08 -0500
committerTakashi Iwai <tiwai@suse.de>2008-12-10 11:14:40 -0500
commit3556d18465c6e67c7a8f436428b95671add02f57 (patch)
treed7ab24c23a9fb2c9ad99588e4bf29683de60c943 /sound/pci/cs5535audio/cs5535audio_olpc.c
parentc8974be5465b87414fa542cf9cca1a1ba21b8d60 (diff)
ALSA: cs5535audio: invert EAPD for OLPC (newer than B3)
Fix an audible pop described in <http://dev.laptop.org/ticket/977>. Originally based upon fixes by Mitch Bradley and Chris Ball. Signed-off-by: Andres Salomon <dilinger@debian.org>
Diffstat (limited to 'sound/pci/cs5535audio/cs5535audio_olpc.c')
-rw-r--r--sound/pci/cs5535audio/cs5535audio_olpc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio_olpc.c b/sound/pci/cs5535audio/cs5535audio_olpc.c
index 9073fb353f0..ff7b68ba617 100644
--- a/sound/pci/cs5535audio/cs5535audio_olpc.c
+++ b/sound/pci/cs5535audio/cs5535audio_olpc.c
@@ -103,6 +103,17 @@ static struct snd_kcontrol_new snd_cs5535audio_controls __devinitdata =
103 .private_value = 0 103 .private_value = 0
104}; 104};
105 105
106void __devinit olpc_prequirks(struct snd_card *card,
107 struct snd_ac97_template *ac97)
108{
109 if (!machine_is_olpc())
110 return;
111
112 /* invert EAPD if on an OLPC B3 or higher */
113 if (olpc_board_at_least(olpc_board_pre(0xb3)))
114 ac97->scaps |= AC97_SCAP_INV_EAPD;
115}
116
106int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97) 117int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
107{ 118{
108 if (!machine_is_olpc()) 119 if (!machine_is_olpc())