ALSA: hda - Fix missing capture mixer for ALC861/660 codecs
[safe/jmp/linux-2.6] / sound / pci / cs5535audio / cs5535audio.h
index 31ecb33..51966d7 100644 (file)
@@ -103,6 +103,25 @@ int snd_cs5535audio_resume(struct pci_dev *pci);
 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 __devexit olpc_quirks_cleanup(void);
+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) { }
@@ -110,6 +129,11 @@ static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
 {
        return 0;
 }
+static inline void olpc_quirks_cleanup(void) { }
+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);