All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording
@ 2017-07-28  0:41 Harsha Priya
  2017-07-28  0:41 ` [PATCH v3 1/3] ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform Harsha Priya
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Harsha Priya @ 2017-07-28  0:41 UTC (permalink / raw)
  To: tiwai, vinod.koul, broonie, alsa-devel; +Cc: 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

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(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/3] ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform
  2017-07-28  0:41 [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Harsha Priya
@ 2017-07-28  0:41 ` Harsha Priya
  2017-07-28  0:41 ` [PATCH v3 2/3] ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 " Harsha Priya
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Harsha Priya @ 2017-07-28  0:41 UTC (permalink / raw)
  To: tiwai, vinod.koul, broonie, alsa-devel; +Cc: Harsha Priya

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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/3] ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform
  2017-07-28  0:41 [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Harsha Priya
  2017-07-28  0:41 ` [PATCH v3 1/3] ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform Harsha Priya
@ 2017-07-28  0:41 ` Harsha Priya
  2017-07-28  0:41 ` [PATCH v3 3/3] ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform Harsha Priya
  2017-07-28  3:21 ` [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Vinod Koul
  3 siblings, 0 replies; 5+ messages in thread
From: Harsha Priya @ 2017-07-28  0:41 UTC (permalink / raw)
  To: tiwai, vinod.koul, broonie, alsa-devel; +Cc: 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.

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;
 			}
 		}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 3/3] ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform
  2017-07-28  0:41 [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Harsha Priya
  2017-07-28  0:41 ` [PATCH v3 1/3] ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform Harsha Priya
  2017-07-28  0:41 ` [PATCH v3 2/3] ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 " Harsha Priya
@ 2017-07-28  0:41 ` Harsha Priya
  2017-07-28  3:21 ` [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Vinod Koul
  3 siblings, 0 replies; 5+ messages in thread
From: Harsha Priya @ 2017-07-28  0:41 UTC (permalink / raw)
  To: tiwai, vinod.koul, broonie, alsa-devel; +Cc: Harsha Priya

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;
 			}
 		}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording
  2017-07-28  0:41 [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Harsha Priya
                   ` (2 preceding siblings ...)
  2017-07-28  0:41 ` [PATCH v3 3/3] ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform Harsha Priya
@ 2017-07-28  3:21 ` Vinod Koul
  3 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2017-07-28  3:21 UTC (permalink / raw)
  To: Harsha Priya; +Cc: tiwai, alsa-devel, broonie

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.
> 
> 1. Fix cracking noise in rt5663 headphones
> 
> 2. Fix pop noise of dmic recording 
> 
> 3. Enable 4 slot IV feedback for maxim amps

Acked-By: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-28  3:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28  0:41 [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Harsha Priya
2017-07-28  0:41 ` [PATCH v3 1/3] ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform Harsha Priya
2017-07-28  0:41 ` [PATCH v3 2/3] ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 " Harsha Priya
2017-07-28  0:41 ` [PATCH v3 3/3] ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform Harsha Priya
2017-07-28  3:21 ` [PATCH v3 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.