ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform
Subsystems (3)
PATCH 1/1 ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform
From: Harsha Priya N <[email protected]>
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.
sound/soc/intel/boards/kbl_rt5663_max98927.c +5 -3
@@ -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);
Signature · 1 line
1.9.1
On Wed, Aug 16, 2017 at 03:55:59PM +0530, Naveen M wrote:
Missed Version tagging, shall repost. Thanks
Quoted 41 lines
From: Harsha Priya N <[email protected]>
Patch fixes cracking noise in rt5663 headphones for kbl platform by calling
rt5663_sel_asrc_clk_src()forRT5663_AD_STEREO_FILTERto 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 bothRT5663_AD_STEREO_FILTERandRT5663_DA_STEREO_FILTERfilters which fixes the crackling sound.Signed-off-by Harsha Priya <[email protected]>Signed-off-by Shruthi Sudhakar <[email protected]>Signed-off-by Naveen M <[email protected]>sound/soc/intel/boards/kbl_rt5663_max98927.c +5
-3@@ -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);Signature · 1 line
1.9.1
On Wed, Aug 16, 2017 at 03:55:59PM +0530, Naveen M wrote:
Missed Version tagging, shall repost. Thanks
Quoted 41 lines
From: Harsha Priya N <[email protected]>
Patch fixes cracking noise in rt5663 headphones for kbl platform by calling
rt5663_sel_asrc_clk_src()forRT5663_AD_STEREO_FILTERto 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 bothRT5663_AD_STEREO_FILTERandRT5663_DA_STEREO_FILTERfilters which fixes the crackling sound.Signed-off-by Harsha Priya <[email protected]>Signed-off-by Shruthi Sudhakar <[email protected]>Signed-off-by Naveen M <[email protected]>sound/soc/intel/boards/kbl_rt5663_max98927.c +5
-3@@ -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);Signature · 1 line
1.9.1
Signature · 4 lines
_______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel