From 3556d18465c6e67c7a8f436428b95671add02f57 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Thu, 6 Nov 2008 16:44:08 -0500 Subject: ALSA: cs5535audio: invert EAPD for OLPC (newer than B3) Fix an audible pop described in . Originally based upon fixes by Mitch Bradley and Chris Ball. Signed-off-by: Andres Salomon --- sound/pci/cs5535audio/cs5535audio_olpc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sound/pci/cs5535audio/cs5535audio_olpc.c') 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 = .private_value = 0 }; +void __devinit olpc_prequirks(struct snd_card *card, + struct snd_ac97_template *ac97) +{ + if (!machine_is_olpc()) + return; + + /* invert EAPD if on an OLPC B3 or higher */ + if (olpc_board_at_least(olpc_board_pre(0xb3))) + ac97->scaps |= AC97_SCAP_INV_EAPD; +} + int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97) { if (!machine_is_olpc()) -- cgit v1.2.3