From: Bard Liao Date: Tue, 28 Apr 2015 03:27:39 +0000 (+0800) Subject: ASoC: rt5677: fixed wrong DMIC ref clock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60a8d62b8497c23eb3d48149af7e55dac2dd83a2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: rt5677: fixed wrong DMIC ref clock DMIC clock source is not from codec system clock directly. it is generated from the division of system clock. And it should be 256 * sample rate of AIF1. Signed-off-by: Bard Liao Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index c6d4e8fa8bd3..84d162d91ff6 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -904,7 +904,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, { struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); - int idx = rl6231_calc_dmic_clk(rt5677->sysclk); + int idx = rl6231_calc_dmic_clk(rt5677->lrck[RT5677_AIF1] << 8); if (idx < 0) dev_err(codec->dev, "Failed to set DMIC clock\n");