summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorGary Zhang <b13634@freescale.com>2012-05-22 11:03:41 +0800
committerGary Zhang <b13634@freescale.com>2012-05-22 11:10:36 +0800
commit937395f569c120f52cc0043af5fbbfd89f662c7d (patch)
treee982974cdda2e073d4cad234dc581eae0e0bf702 /sound
parent27e23a88af3c345d3a0dd355f2a51a514f7b8f2c (diff)
ENGR00209739-5 WM8962: check DMIC status
if there are no amic_detect pin, by checking DMIC pin status to get to know which mic is used Signed-off-by: Gary Zhang <b13634@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-wm8962.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/imx/imx-wm8962.c b/sound/soc/imx/imx-wm8962.c
index 354aae434055..aa3122f6d765 100644
--- a/sound/soc/imx/imx-wm8962.c
+++ b/sound/soc/imx/imx-wm8962.c
@@ -262,7 +262,7 @@ static void amic_detect_handler(struct work_struct *work)
if (priv->amic_status == 0)
snprintf(buf, 32, "STATE=%d", 2);
- else
+ else
snprintf(buf, 32, "STATE=%d", 0);
envp[0] = "NAME=amic";
@@ -369,7 +369,8 @@ static int imx_wm8962_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_nc_pin(&codec->dapm, "DMIC");
else
snd_soc_dapm_enable_pin(&codec->dapm, "DMIC");
- }
+ } else if (!snd_soc_dapm_get_pin_status(&codec->dapm, "DMICDAT"))
+ snd_soc_dapm_nc_pin(&codec->dapm, "DMIC");
return 0;
}