From: Gary Zhang Date: Mon, 23 Apr 2012 06:53:38 +0000 (+0800) Subject: ENGR00180297 WM8962: stereo record on AMIC X-Git-Tag: v3.0.35-fsl~1157 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=341d4da365caf614763597b324034b3fac9f8325;p=karo-tx-linux.git ENGR00180297 WM8962: stereo record on AMIC Implement stereo recording feature on analog mic Signed-off-by: Gary Zhang --- 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; }