aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs5535audio/cs5535audio_pcm.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-11-06 16:53:03 -0500
committerTakashi Iwai <tiwai@suse.de>2008-12-10 11:14:45 -0500
commitbf1e5278354856ac0260d338961560e720147681 (patch)
tree30bdedbee576613e54f7b9f3ff7167effa7149d8 /sound/pci/cs5535audio/cs5535audio_pcm.c
parente463ae1d13ffe4943bb31f47cc6f24415e55a59a (diff)
ALSA: cs5535audio: rename V_REFOUT control to MIC Bias
This drops the AD1888 V_REFOUT control, and replaces it with a MIC Bias Enable control. It also moves the MIC bias enabling into a separate function. Signed-off-by: Andres Salomon <dilinger@debian.org>
Diffstat (limited to 'sound/pci/cs5535audio/cs5535audio_pcm.c')
-rw-r--r--sound/pci/cs5535audio/cs5535audio_pcm.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c
index fa2a6b1b81a6..0f48a871f17b 100644
--- a/sound/pci/cs5535audio/cs5535audio_pcm.c
+++ b/sound/pci/cs5535audio/cs5535audio_pcm.c
@@ -363,27 +363,14 @@ static int snd_cs5535audio_capture_open(struct snd_pcm_substream *substream)
363 if ((err = snd_pcm_hw_constraint_integer(runtime, 363 if ((err = snd_pcm_hw_constraint_integer(runtime,
364 SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 364 SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
365 return err; 365 return err;
366 366 olpc_capture_open(cs5535au->ac97);
367#ifdef CONFIG_OLPC
368 /* Enable the V_ref bias only while recording. */
369 err = snd_ac97_update_bits(cs5535au->ac97, AC97_AD_MISC,
370 1 << AC97_AD_VREFD_SHIFT, 0);
371 if (err < 0)
372 snd_printk(KERN_ERR "Error updating AD_MISC %d\n", err);
373#endif
374 return 0; 367 return 0;
375} 368}
376 369
377static int snd_cs5535audio_capture_close(struct snd_pcm_substream *substream) 370static int snd_cs5535audio_capture_close(struct snd_pcm_substream *substream)
378{ 371{
379 int err;
380 struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream); 372 struct cs5535audio *cs5535au = snd_pcm_substream_chip(substream);
381 373 olpc_capture_close(cs5535au->ac97);
382#ifdef CONFIG_OLPC
383 /* Disable V_ref bias. */
384 err = snd_ac97_update_bits(cs5535au->ac97, AC97_AD_MISC,
385 1 << AC97_AD_VREFD_SHIFT, 1 << AC97_AD_VREFD_SHIFT);
386#endif
387 return 0; 374 return 0;
388} 375}
389 376