From 976a2e2b2c73aa656955c8b4dba3d0ab8f064b31 Mon Sep 17 00:00:00 2001 From: Axel Castaneda Gonzalez Date: Sun, 22 Apr 2012 23:05:36 -0500 Subject: ASoC: sdp4430: Use internal clock for DMic legacy Configure DMic Legacy DAI to use OMAP_DMIC_SYSCLK_MUX_CLKS as FCLK. When using OMAP_DMIC_SYSCLK_PAD_CLKS (provided by TWL6040) as an external FCLK, ABE_ICLK2 gets gated just before the start of the information exchange between DMic and the host, which causes the DMic FIFO to get full before data gets consumed. Using OMAP_DMIC_SYSCLK_MUX_CLKS prevents this behavior. Change-Id: Iccda2327a5379e200f877b46c9497060c10668a8 Signed-off-by: Axel Castaneda Gonzalez --- sound/soc/omap/sdp4430.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'sound/soc/omap') diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c index 02fe2db..de4ac69 100755 --- a/sound/soc/omap/sdp4430.c +++ b/sound/soc/omap/sdp4430.c @@ -285,13 +285,25 @@ static int sdp4430_dmic_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai = rtd->cpu_dai; int ret = 0; - ret = snd_soc_dai_set_sysclk(cpu_dai, OMAP_DMIC_SYSCLK_PAD_CLKS, - 19200000, SND_SOC_CLOCK_IN); + if (!rtd->dai_link->no_pcm) + ret = snd_soc_dai_set_sysclk(cpu_dai, + OMAP_DMIC_SYSCLK_SYNC_MUX_CLKS, 24000000, + SND_SOC_CLOCK_IN); + else + ret = snd_soc_dai_set_sysclk(cpu_dai, + OMAP_DMIC_SYSCLK_PAD_CLKS, 19200000, + SND_SOC_CLOCK_IN); + if (ret < 0) { printk(KERN_ERR "can't set DMIC cpu system clock\n"); return ret; } - ret = snd_soc_dai_set_clkdiv(cpu_dai, OMAP_DMIC_CLKDIV, 8); + + if (!rtd->dai_link->no_pcm) + ret = snd_soc_dai_set_clkdiv(cpu_dai, OMAP_DMIC_CLKDIV, 10); + else + ret = snd_soc_dai_set_clkdiv(cpu_dai, OMAP_DMIC_CLKDIV, 8); + if (ret < 0) { printk(KERN_ERR "can't set DMIC cpu clock divider\n"); return ret; -- cgit v1.1