]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/cs5535audio/cs5535audio.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
[linux-2.6-omap-h63xx.git] / sound / pci / cs5535audio / cs5535audio.h
index 66bae7664193115c9c365a96d34e88175679965a..7a298ac662e322e768cec22c5d3e7cadbe4fe3d9 100644 (file)
@@ -78,6 +78,7 @@ struct cs5535audio_dma {
        unsigned int buf_addr, buf_bytes;
        unsigned int period_bytes, periods;
        u32 saved_prd;
+       int pcm_open_flag;
 };
 
 struct cs5535audio {
@@ -93,8 +94,46 @@ struct cs5535audio {
        struct cs5535audio_dma dmas[NUM_CS5535AUDIO_DMAS];
 };
 
+#ifdef CONFIG_PM
 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)
+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 olpc_analog_input(struct snd_ac97 *ac97, int on);
+void olpc_mic_bias(struct snd_ac97 *ac97, int on);
+
+static inline void olpc_capture_open(struct snd_ac97 *ac97)
+{
+       /* default to Analog Input off */
+       olpc_analog_input(ac97, 0);
+       /* enable MIC Bias for recording */
+       olpc_mic_bias(ac97, 1);
+}
+
+static inline void olpc_capture_close(struct snd_ac97 *ac97)
+{
+       /* disable Analog Input */
+       olpc_analog_input(ac97, 0);
+       /* disable the MIC Bias (so the recording LED turns off) */
+       olpc_mic_bias(ac97, 0);
+}
+#else
+static inline void olpc_prequirks(struct snd_card *card,
+               struct snd_ac97_template *ac97) { }
+static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
+{
+       return 0;
+}
+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) { }
+static inline void olpc_capture_close(struct snd_ac97 *ac97) { }
+#endif
+
 int __devinit snd_cs5535audio_pcm(struct cs5535audio *cs5535audio);
 
 #endif /* __SOUND_CS5535AUDIO_H */