From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vinod Koul Subject: Re: [PATCH v2] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform Date: Thu, 17 Aug 2017 08:49:56 +0530 Message-ID: <20170817031954.GT3053@localhost> References: <1502880595-26583-1-git-send-email-naveen.m@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by alsa0.perex.cz (Postfix) with ESMTP id 6EEE3266BF6 for ; Thu, 17 Aug 2017 05:16:43 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1502880595-26583-1-git-send-email-naveen.m@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Naveen M Cc: alsa-devel@alsa-project.org, Shruthi Sudhakar , tiwai@suse.de, liam.r.girdwood@linux.intel.com, Harsha Priya N , broonie@kernel.org, pierre-louis.bossart@intel.com List-Id: alsa-devel@alsa-project.org On Wed, Aug 16, 2017 at 04:19:55PM +0530, Naveen M wrote: > From: Harsha Priya N > > 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. Acked-By: Vinod Koul > Signed-off-by: Harsha Priya > Signed-off-by: Shruthi Sudhakar > Signed-off-by: Naveen M > > diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c > index f9ba977..29b50e4 100644 > --- a/sound/soc/intel/boards/kbl_rt5663_max98927.c > +++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c > @@ -312,11 +312,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); > > -- > 1.9.1 > -- ~Vinod