aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs5535audio/cs5535audio.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/cs5535audio/cs5535audio.h')
-rw-r--r--sound/pci/cs5535audio/cs5535audio.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio.h b/sound/pci/cs5535audio/cs5535audio.h
index 66bae766419..7a298ac662e 100644
--- a/sound/pci/cs5535audio/cs5535audio.h
+++ b/sound/pci/cs5535audio/cs5535audio.h
@@ -78,6 +78,7 @@ struct cs5535audio_dma {
78 unsigned int buf_addr, buf_bytes; 78 unsigned int buf_addr, buf_bytes;
79 unsigned int period_bytes, periods; 79 unsigned int period_bytes, periods;
80 u32 saved_prd; 80 u32 saved_prd;
81 int pcm_open_flag;
81}; 82};
82 83
83struct cs5535audio { 84struct cs5535audio {
@@ -93,8 +94,46 @@ struct cs5535audio {
93 struct cs5535audio_dma dmas[NUM_CS5535AUDIO_DMAS]; 94 struct cs5535audio_dma dmas[NUM_CS5535AUDIO_DMAS];
94}; 95};
95 96
97#ifdef CONFIG_PM
96int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state); 98int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state);
97int snd_cs5535audio_resume(struct pci_dev *pci); 99int snd_cs5535audio_resume(struct pci_dev *pci);
100#endif
101
102#if defined(CONFIG_OLPC) && defined(CONFIG_MGEODE_LX)
103void __devinit olpc_prequirks(struct snd_card *card,
104 struct snd_ac97_template *ac97);
105int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97);
106void olpc_analog_input(struct snd_ac97 *ac97, int on);
107void olpc_mic_bias(struct snd_ac97 *ac97, int on);
108
109static inline void olpc_capture_open(struct snd_ac97 *ac97)
110{
111 /* default to Analog Input off */
112 olpc_analog_input(ac97, 0);
113 /* enable MIC Bias for recording */
114 olpc_mic_bias(ac97, 1);
115}
116
117static inline void olpc_capture_close(struct snd_ac97 *ac97)
118{
119 /* disable Analog Input */
120 olpc_analog_input(ac97, 0);
121 /* disable the MIC Bias (so the recording LED turns off) */
122 olpc_mic_bias(ac97, 0);
123}
124#else
125static inline void olpc_prequirks(struct snd_card *card,
126 struct snd_ac97_template *ac97) { }
127static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
128{
129 return 0;
130}
131static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { }
132static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { }
133static inline void olpc_capture_open(struct snd_ac97 *ac97) { }
134static inline void olpc_capture_close(struct snd_ac97 *ac97) { }
135#endif
136
98int __devinit snd_cs5535audio_pcm(struct cs5535audio *cs5535audio); 137int __devinit snd_cs5535audio_pcm(struct cs5535audio *cs5535audio);
99 138
100#endif /* __SOUND_CS5535AUDIO_H */ 139#endif /* __SOUND_CS5535AUDIO_H */