Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c554946 authored by Andres Salomon's avatar Andres Salomon Committed by Linus Torvalds
Browse files

ALSA: cs5535audio: free OLPC quirks from reliance on MGEODE_LX cpu optimization



Previously, OLPC support for the mic extensions was only enabled in the
ALSA driver if CONFIG_OLPC and CONFIG_MGEODE_LX were both set.  This was
because the old geode GPIO code was written in a manner that assumed
CONFIG_MGEODE_LX.  With the new cs553x-gpio driver, this is no longer the
case; as such, we can drop the requirement on CONFIG_MGEODE_LX and instead
include a requirement on GPIOLIB.

We use the generic GPIO API rather than the cs553x-specific API.

Signed-off-by: default avatarAndres Salomon <dilinger@collabora.co.uk>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1ea3fa7b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2024,6 +2024,7 @@ config GEODE_MFGPT_TIMER

config OLPC
	bool "One Laptop Per Child support"
	select GPIOLIB
	default n
	---help---
	  Add support for detecting the unique features of the OLPC
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ extern int olpc_ec_mask_unset(uint8_t bits);

/* GPIO assignments */

#define OLPC_GPIO_MIC_AC	geode_gpio(1)
#define OLPC_GPIO_MIC_AC	1
#define OLPC_GPIO_DCON_IRQ	geode_gpio(7)
#define OLPC_GPIO_THRM_ALRM	geode_gpio(10)
#define OLPC_GPIO_SMB_CLK	geode_gpio(14)
+0 −2
Original line number Diff line number Diff line
@@ -4,9 +4,7 @@

snd-cs5535audio-y := cs5535audio.o cs5535audio_pcm.o
snd-cs5535audio-$(CONFIG_PM) += cs5535audio_pm.o
ifdef CONFIG_MGEODE_LX
snd-cs5535audio-$(CONFIG_OLPC) += cs5535audio_olpc.o
endif

# Toplevel Module Dependency
obj-$(CONFIG_SND_CS5535AUDIO) += snd-cs5535audio.o
+1 −0
Original line number Diff line number Diff line
@@ -389,6 +389,7 @@ probefail_out:

static void __devexit snd_cs5535audio_remove(struct pci_dev *pci)
{
	olpc_quirks_cleanup();
	snd_card_free(pci_get_drvdata(pci));
	pci_set_drvdata(pci, NULL);
}
+3 −1
Original line number Diff line number Diff line
@@ -99,10 +99,11 @@ int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state);
int snd_cs5535audio_resume(struct pci_dev *pci);
#endif

#if defined(CONFIG_OLPC) && defined(CONFIG_MGEODE_LX)
#ifdef CONFIG_OLPC
void __devinit olpc_prequirks(struct snd_card *card,
		struct snd_ac97_template *ac97);
int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97);
void __devexit olpc_quirks_cleanup(void);
void olpc_analog_input(struct snd_ac97 *ac97, int on);
void olpc_mic_bias(struct snd_ac97 *ac97, int on);

@@ -128,6 +129,7 @@ static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
{
	return 0;
}
static inline void olpc_quirks_cleanup(void) { }
static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { }
static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { }
static inline void olpc_capture_open(struct snd_ac97 *ac97) { }
Loading