From: Bard Liao Date: Tue, 28 Apr 2015 03:27:39 +0000 (+0800) Subject: ASoC: rt5677: fixed wrong DMIC ref clock X-Git-Tag: v3.18.14~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36bcc94a440275cac127cff94e4abeb1658297df;p=thirdparty%2Fkernel%2Fstable.git ASoC: rt5677: fixed wrong DMIC ref clock [ Upstream commit 60a8d62b8497c23eb3d48149af7e55dac2dd83a2 ] 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 Signed-off-by: Sasha Levin --- diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 16aa4d99a7130..691237a3ab520 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -644,7 +644,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, { struct snd_soc_codec *codec = w->codec; 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");