[alsa-devel] [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording
This patch series includes fixes for clean playback and recording in kabylake machine driver. It fixes the below issues in the corresponding patches and the details of each fix is provided in the patch's commit message.
1. Fix cracking noise in rt5663 headphones
2. Fix pop noise of dmic recording
3. Enable 4 slot IV feedback for maxim amps
Harsha Priya (3): ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform ASoC: Intel: Fix pop noise of dmic recording in kabylake platform using rt5514 ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform
.../soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-)
This patch fixes the cracking noise in rt5663 headphones for kabylake platform by calling rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER to set ASRC.
The ASRC function is for asynchronous MCLK and LRCK. For RT5663 ASRC should be enabled to support special i2s clock format like Intel's 100fs. ASRC function will track i2s clock and generate a corresponding system clock for codec. Calling this function helps select the 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 --- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c index 3fe4a08..cfde894 100644 --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c @@ -319,7 +319,9 @@ static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream, int ret;
/* 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);
This patch fixes the pop noise in dmic recording using rt5514 on kabylake platform. This patch enables the rt5514 to use MCLK instead of BLCK as the sysclock which fixes the pop noise.
Signed-off-by: Harsha Priya harshapriya.n@intel.com --- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c index cfde894..cfd89ca 100644 --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c @@ -351,19 +351,10 @@ static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream, return ret; }
- ret = snd_soc_dai_set_pll(codec_dai, 0, - RT5514_PLL1_S_BCLK, RT5514_AIF1_BCLK_FREQ, - RT5514_AIF1_SYSCLK_FREQ); - if (ret < 0) { - dev_err(rtd->dev, "set bclk err: %d\n", ret); - return ret; - } - ret = snd_soc_dai_set_sysclk(codec_dai, - RT5514_SCLK_S_PLL1, RT5514_AIF1_SYSCLK_FREQ, - SND_SOC_CLOCK_IN); + RT5514_SCLK_S_MCLK, 24576000, SND_SOC_CLOCK_IN); if (ret < 0) { - dev_err(rtd->dev, "set sclk err: %d\n", ret); + dev_err(rtd->dev, "set sysclk err: %d\n", ret); return ret; } }
This patch enables 4 slot IV feedback for max98927 speaker amp codec.
Signed-off-by: Harsha Priya harshapriya.n@intel.com --- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c index cfd89ca..a675ae5 100644 --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c @@ -358,11 +358,18 @@ static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream, return ret; } } - if (!strcmp(codec_dai->component->name, MAXIM_DEV0_NAME) || - !strcmp(codec_dai->component->name, MAXIM_DEV1_NAME)) { - ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xF0, 3, 8, 16); + if (!strcmp(codec_dai->component->name, MAXIM_DEV0_NAME)) { + ret = snd_soc_dai_set_tdm_slot(codec_dai, 0x30, 3, 8, 16); if (ret < 0) { - dev_err(rtd->dev, "set TDM slot err:%d\n", ret); + dev_err(rtd->dev, "DEV0 TDM slot err:%d\n", ret); + return ret; + } + } + + if (!strcmp(codec_dai->component->name, MAXIM_DEV1_NAME)) { + ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xC0, 3, 8, 16); + if (ret < 0) { + dev_err(rtd->dev, "DEV1 TDM slot err:%d\n", ret); return ret; } }
On Thu, Jul 27, 2017 at 05:41:24PM -0700, Harsha Priya wrote:
This patch series includes fixes for clean playback and recording in kabylake machine driver. It fixes the below issues in the corresponding patches and the details of each fix is provided in the patch's commit message.
Fix cracking noise in rt5663 headphones
Fix pop noise of dmic recording
Enable 4 slot IV feedback for maxim amps
Acked-By: Vinod Koul vinod.koul@intel.com
participants (2)
-
Harsha Priya
-
Vinod Koul