summaryrefslogtreecommitdiff
path: root/sound/soc/intel
diff options
context:
space:
mode:
authorHarsha Priya N <harshapriya.n@intel.com>2017-08-16 16:19:55 +0530
committerMark Brown <broonie@kernel.org>2017-08-17 18:05:04 +0100
commitd46b1828406f74bc2d9ffe15e9a7b76ddbffbf7f (patch)
tree843224832d620a0c3cab96daaddf8385f59cfce1 /sound/soc/intel
parent8df397ff0e281d5324d4b7a7e9fa56c4188e0a66 (diff)
downloadlinux-exynos-d46b1828406f74bc2d9ffe15e9a7b76ddbffbf7f.tar.gz
linux-exynos-d46b1828406f74bc2d9ffe15e9a7b76ddbffbf7f.tar.bz2
linux-exynos-d46b1828406f74bc2d9ffe15e9a7b76ddbffbf7f.zip
ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform
Patch fixes cracking noise in rt5663 headphones for kbl platform by calling rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER to set ASRC. The ASRC function is for asynchronous MCLK and LRCLK. For RT5663 ASRC should be enabled to support pcm format with 100fs. ASRC function will track i2s clock and generate corresponding system clock for codec. Calling this func helps select clock source for both RT5663_AD_STEREO_FILTER and RT5663_DA_STEREO_FILTER filters which fixes the crackling sound. Signed-off-by: Harsha Priya <harshapriya.n@intel.com> Signed-off-by: Shruthi Sudhakar <shruthi.sudhakar@intel.com> Signed-off-by: Naveen M <naveen.m@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r--sound/soc/intel/boards/kbl_rt5663_max98927.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index 8bdd6131c6ad..c1442147d138 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -356,11 +356,13 @@ static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *codec_dai = rtd->codec_dai;
int ret;
- ret = snd_soc_dai_set_sysclk(codec_dai,
- RT5663_SCLK_S_MCLK, 24576000, SND_SOC_CLOCK_IN);
/* use ASRC for internal clocks, as PLL rate isn't multiple of BCLK */
- rt5663_sel_asrc_clk_src(codec_dai->codec, RT5663_DA_STEREO_FILTER, 1);
+ rt5663_sel_asrc_clk_src(codec_dai->codec,
+ RT5663_DA_STEREO_FILTER | RT5663_AD_STEREO_FILTER,
+ RT5663_CLK_SEL_I2S1_ASRC);
+ ret = snd_soc_dai_set_sysclk(codec_dai,
+ RT5663_SCLK_S_MCLK, 24576000, SND_SOC_CLOCK_IN);
if (ret < 0)
dev_err(rtd->dev, "snd_soc_dai_set_sysclk err = %d\n", ret);