summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Zhang <b13634@freescale.com>2012-04-23 14:53:38 +0800
committerFrank Li <Frank.Li@freescale.com>2012-04-24 09:37:26 +0800
commitd602fc1b9692a2daf1e2503d392cbc8d00d595d8 (patch)
tree35da8834873d34db7ec3f84a40e490765c02407d
parentd47e74ee8ff69a6a9298cff814658b27634cd1c9 (diff)
ENGR00180297 WM8962: stereo record on AMIC
Implement stereo recording feature on analog mic Signed-off-by: Gary Zhang <b13634@freescale.com>
-rw-r--r--sound/soc/codecs/wm8962.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 824a6fa8f487..ccf8883a7866 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3206,6 +3206,14 @@ static int wm8962_hw_params(struct snd_pcm_substream *substream,
wm8962_configure_bclk(codec);
+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
+ if (snd_soc_dapm_get_pin_status(&codec->dapm, "DMIC"))
+ snd_soc_update_bits(codec, WM8962_THREED1, WM8962_ADC_MONOMIX_MASK, 0);
+ else
+ snd_soc_update_bits(codec, WM8962_THREED1,
+ WM8962_ADC_MONOMIX_MASK, WM8962_ADC_MONOMIX);
+ }
+
return 0;
}