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>
if (priv->amic_status == 0)
snprintf(buf, 32, "STATE=%d", 2);
- else
+ else
snprintf(buf, 32, "STATE=%d", 0);
envp[0] = "NAME=amic";
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;
}