Skip to contentSkip to conversation

ALSA: cs5535audio: OLPC analog input support

PATCH In review Andres Salomon 2 participants 2 messages Nov 6, 2008 – Nov 10, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/14 ALSA: cs5535audio: OLPC analog input support

From: Jaya Kumar <[email protected]>

This is a 2nd cut at adding support for OLPC analog input.

---
 sound/pci/cs5535audio/Makefile           |    4 +
 sound/pci/cs5535audio/cs5535audio.c      |    6 ++
 sound/pci/cs5535audio/cs5535audio.h      |    9 +++
 sound/pci/cs5535audio/cs5535audio_olpc.c |  113 ++++++++++++++++++++++++++++++
 4 files changed, 132 insertions(+), 0 deletions(-)
 create mode 100644 sound/pci/cs5535audio/cs5535audio_olpc.c
sound/pci/cs5535audio/Makefile +4 -0
index bb3d57e..3e41fd3 100644
@@ -5,5 +5,9 @@
 snd-cs5535audio-y := cs5535audio.o cs5535audio_pcm.o
 snd-cs5535audio-$(CONFIG_PM) += cs5535audio_pm.o
 
+ifdef CONFIG_OLPC
+snd-cs5535audio-objs += cs5535audio_olpc.o
+endif
+
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_CS5535AUDIO) += snd-cs5535audio.o
sound/pci/cs5535audio/cs5535audio.c +6 -0
index 6c886ed..cddfa54 100644
@@ -171,6 +171,12 @@ static int __devinit snd_cs5535audio_mixer(struct cs5535audio *cs5535au)
 
 	snd_ac97_tune_hardware(cs5535au->ac97, ac97_quirks, ac97_quirk);
 
+	/* olpc_quirks is dummied out if not olpc */
+	if (( err = olpc_quirks(card, cs5535au->ac97)) < 0) {
+		snd_printk(KERN_ERR "olpc quirks failed\n");
+		return err;
+	}
+
 	return 0;
 }
 
sound/pci/cs5535audio/cs5535audio.h +9 -0
index 1aa1e2b..c67e62f 100644
@@ -92,6 +92,9 @@ struct cs5535audio {
 	struct snd_pcm_substream *playback_substream;
 	struct snd_pcm_substream *capture_substream;
 	struct cs5535audio_dma dmas[NUM_CS5535AUDIO_DMAS];
+#ifdef CONFIG_OLPC
+	int ec_analog_input_mode;
+#endif
 };
 
 #ifdef CONFIG_PM
@@ -99,6 +102,12 @@ int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state);
 int snd_cs5535audio_resume(struct pci_dev *pci);
 #endif
 
+#ifdef CONFIG_OLPC
+int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97);
+#else
+#define olpc_quirks(arg,arg2) (0)
+#endif
+
 int __devinit snd_cs5535audio_pcm(struct cs5535audio *cs5535audio);
 
 #endif /* __SOUND_CS5535AUDIO_H */
sound/pci/cs5535audio/cs5535audio_olpc.c new file +113 -0

113 lines not on this page · raw message

Signature · 1 line
1.5.6.5