diff options
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 66bae7664193..7a298ac662e3 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 | ||
83 | struct cs5535audio { | 84 | struct 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 | ||
96 | int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state); | 98 | int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state); |
97 | int snd_cs5535audio_resume(struct pci_dev *pci); | 99 | int snd_cs5535audio_resume(struct pci_dev *pci); |
100 | #endif | ||
101 | |||
102 | #if defined(CONFIG_OLPC) && defined(CONFIG_MGEODE_LX) | ||
103 | void __devinit olpc_prequirks(struct snd_card *card, | ||
104 | struct snd_ac97_template *ac97); | ||
105 | int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97); | ||
106 | void olpc_analog_input(struct snd_ac97 *ac97, int on); | ||
107 | void olpc_mic_bias(struct snd_ac97 *ac97, int on); | ||
108 | |||
109 | static 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 | |||
117 | static 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 | ||
125 | static inline void olpc_prequirks(struct snd_card *card, | ||
126 | struct snd_ac97_template *ac97) { } | ||
127 | static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97) | ||
128 | { | ||
129 | return 0; | ||
130 | } | ||
131 | static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { } | ||
132 | static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { } | ||
133 | static inline void olpc_capture_open(struct snd_ac97 *ac97) { } | ||
134 | static inline void olpc_capture_close(struct snd_ac97 *ac97) { } | ||
135 | #endif | ||
136 | |||
98 | int __devinit snd_cs5535audio_pcm(struct cs5535audio *cs5535audio); | 137 | int __devinit snd_cs5535audio_pcm(struct cs5535audio *cs5535audio); |
99 | 138 | ||
100 | #endif /* __SOUND_CS5535AUDIO_H */ | 139 | #endif /* __SOUND_CS5535AUDIO_H */ |