ALSA: cs5535audio: OLPC analog input support
Subsystems (2)
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.
Signed-off-by Jaya Kumar <[email protected]>
Signed-off-by Andres Salomon <[email protected]>
--- 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
@@ -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
@@ -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
@@ -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
At Thu, 6 Nov 2008 16:43:34 -0500,
Quoted 7 lines · Andres Salomon
From: Jaya Kumar <[email protected]>
This is a 2nd cut at adding support for OLPC analog input.
Signed-off-by Jaya Kumar <[email protected]>Signed-off-by Andres Salomon <[email protected]>
OK, I applied all patches right now (with slight fixes of coding styles). If any other fix is necessary, create it based on sound-2.6.git tree.
thanks,
Takashi