diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-12-25 11:40:28 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-12-25 11:40:28 +0100 |
commit | 313769d9edb1bbd59d2e94f5069950eecfe6fa44 (patch) | |
tree | c83c381ed3a6d77ff10129a43023026c7618c427 /sound/pci/cs5535audio/cs5535audio.h | |
parent | 8afabfa74bbe81ac496e66f7f0ed8943dff5fdb5 (diff) | |
parent | f144b7f6679d9833bd3b94b91e452592b6d0e502 (diff) |
Merge branch 'topic/cs5535audio' into to-push
Diffstat (limited to 'sound/pci/cs5535audio/cs5535audio.h')
-rw-r--r-- | sound/pci/cs5535audio/cs5535audio.h | 39 |
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 { 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 */ |