Skip to contentSkip to conversation

ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording

PATCH In review Harsha Priya 2 participants 5 messages Jul 28, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v3 cover 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(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH v3 1/3 ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform

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.

---
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +3 -1
index 3fe4a08..cfde894 100644
@@ -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);
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 2/3 ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform

In reply to Harsha Priya

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.

---
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +2 -11
index cfde894..cfd89ca 100644
@@ -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;
 			}
 		}
Signature · 1 line
1.9.1
#3 lore raw

PATCH v3 3/3 ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform

In reply to Harsha Priya

This patch enables 4 slot IV feedback for max98927 speaker amp codec.

---
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +11 -4
index cfd89ca..a675ae5 100644
@@ -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;
 			}
 		}
Signature · 1 line
1.9.1
Acked-by on the v3 series
#4 lore raw
In reply to Harsha Priya
Quoted 9 lines · Harsha Priya

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

Signature · 1 line
~Vinod