All of lore.kernel.org
 help / color / mirror / Atom feed
* [v2 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording
@ 2017-07-26 20:47 Harsha Priya
  2017-07-26 20:47 ` [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform Harsha Priya
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Harsha Priya @ 2017-07-26 20:47 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] 11+ messages in thread

* [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform
  2017-07-26 20:47 [v2 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Harsha Priya
@ 2017-07-26 20:47 ` Harsha Priya
  2017-07-27  2:40   ` Vinod Koul
  2017-07-28 12:43   ` Applied "ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform" to the asoc tree Mark Brown
  2017-07-26 20:47 ` [v2 2/3] ASoC: Intel: Fix pop noise of dmic recording in kabylake platform using rt5514 Harsha Priya
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Harsha Priya @ 2017-07-26 20:47 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 the rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER as well.

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] 11+ messages in thread

* [v2 2/3] ASoC: Intel: Fix pop noise of dmic recording in kabylake platform using rt5514
  2017-07-26 20:47 [v2 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Harsha Priya
  2017-07-26 20:47 ` [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform Harsha Priya
@ 2017-07-26 20:47 ` Harsha Priya
  2017-07-27  2:42   ` Vinod Koul
  2017-07-28 12:43   ` Applied "ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform" to the asoc tree Mark Brown
  2017-07-26 20:47 ` [v2 3/3] ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform Harsha Priya
  2017-07-27  2:38 ` [v2 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Vinod Koul
  3 siblings, 2 replies; 11+ messages in thread
From: Harsha Priya @ 2017-07-26 20:47 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] 11+ messages in thread

* [v2 3/3] ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform
  2017-07-26 20:47 [v2 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Harsha Priya
  2017-07-26 20:47 ` [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform Harsha Priya
  2017-07-26 20:47 ` [v2 2/3] ASoC: Intel: Fix pop noise of dmic recording in kabylake platform using rt5514 Harsha Priya
@ 2017-07-26 20:47 ` Harsha Priya
  2017-07-28 12:43   ` Applied "ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform" to the asoc tree Mark Brown
  2017-07-27  2:38 ` [v2 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Vinod Koul
  3 siblings, 1 reply; 11+ messages in thread
From: Harsha Priya @ 2017-07-26 20:47 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] 11+ messages in thread

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

On Wed, Jul 26, 2017 at 01:47:42PM -0700, Harsha Priya wrote:

what happened to [PATCH .. in the title. I think you used
--subject-prefix=v2 insteadof --subject-prefix="PATCH v2"

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

-- 
~Vinod

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

* Re: [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform
  2017-07-26 20:47 ` [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform Harsha Priya
@ 2017-07-27  2:40   ` Vinod Koul
  2017-07-28  0:42     ` N, Harshapriya
  2017-07-28 12:43   ` Applied "ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform" to the asoc tree Mark Brown
  1 sibling, 1 reply; 11+ messages in thread
From: Vinod Koul @ 2017-07-27  2:40 UTC (permalink / raw)
  To: Harsha Priya; +Cc: tiwai, alsa-devel, broonie

On Wed, Jul 26, 2017 at 01:47:43PM -0700, Harsha Priya wrote:
> This patch fixes the cracking noise in rt5663 headphones for kabylake platform
> by calling the rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER as well.

and it sets 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
	   ^^^^
double space

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

-- 
~Vinod

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

* Re: [v2 2/3] ASoC: Intel: Fix pop noise of dmic recording in kabylake platform using rt5514
  2017-07-26 20:47 ` [v2 2/3] ASoC: Intel: Fix pop noise of dmic recording in kabylake platform using rt5514 Harsha Priya
@ 2017-07-27  2:42   ` Vinod Koul
  2017-07-28 12:43   ` Applied "ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform" to the asoc tree Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Vinod Koul @ 2017-07-27  2:42 UTC (permalink / raw)
  To: Harsha Priya; +Cc: tiwai, alsa-devel, broonie

On Wed, Jul 26, 2017 at 01:47:44PM -0700, Harsha Priya wrote:
> 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.

Please consider changing patch title to document the change you did so:

"ASoC: Intel: use MCLK instead of BLCK as the sysclock"

describes this patch rather than current one..

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

-- 
~Vinod

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

* Re: [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform
  2017-07-27  2:40   ` Vinod Koul
@ 2017-07-28  0:42     ` N, Harshapriya
  0 siblings, 0 replies; 11+ messages in thread
From: N, Harshapriya @ 2017-07-28  0:42 UTC (permalink / raw)
  To: Koul, Vinod; +Cc: tiwai, alsa-devel, broonie



> -----Original Message-----
> From: Koul, Vinod
> Sent: Wednesday, July 26, 2017 7:41 PM
> To: N, Harshapriya <harshapriya.n@intel.com>
> Cc: tiwai@suse.de; broonie@kernel.org; alsa-devel@alsa-project.org
> Subject: Re: [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for
> kabylake platform
> 
> On Wed, Jul 26, 2017 at 01:47:43PM -0700, Harsha Priya wrote:
> > This patch fixes the cracking noise in rt5663 headphones for kabylake
> > platform by calling the rt5663_sel_asrc_clk_src() for
> RT5663_AD_STEREO_FILTER as well.
> 
> and it sets ASRC..?
Yes. I changed the commit message in my next patch series.
> 
> >
> > 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
> 	   ^^^^
> double space
> 
> > 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
> >
> 
> --
> ~Vinod

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

* Applied "ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform" to the asoc tree
  2017-07-26 20:47 ` [v2 3/3] ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform Harsha Priya
@ 2017-07-28 12:43   ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2017-07-28 12:43 UTC (permalink / raw)
  Cc: Harsha Priya, tiwai, alsa-devel, broonie, vinod.koul

The patch

   ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From cc4db0e257d6a5d5ae2e2f042ac8d261caaf08fc Mon Sep 17 00:00:00 2001
From: Harsha Priya N <harshapriya.n@intel.com>
Date: Thu, 27 Jul 2017 17:41:27 -0700
Subject: [PATCH] ASoC: Intel: Enabling 4 slot IV feedback for max98927 on
 Kabylake platform

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

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 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 3fe4a0807095..74bbc008c965 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -365,11 +365,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;
 			}
 		}
-- 
2.13.2

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

* Applied "ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform" to the asoc tree
  2017-07-26 20:47 ` [v2 2/3] ASoC: Intel: Fix pop noise of dmic recording in kabylake platform using rt5514 Harsha Priya
  2017-07-27  2:42   ` Vinod Koul
@ 2017-07-28 12:43   ` Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2017-07-28 12:43 UTC (permalink / raw)
  Cc: Harsha Priya, tiwai, alsa-devel, broonie, vinod.koul

The patch

   ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 6512dd4dcf640412637ece8a412e83c3a0046d2f Mon Sep 17 00:00:00 2001
From: Harsha Priya N <harshapriya.n@intel.com>
Date: Thu, 27 Jul 2017 17:41:26 -0700
Subject: [PATCH] ASoC: Intel: Use MCLK instead of BLCK as the sysclock for
 RT5514 codec on kabylake platform

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>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 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 cfde894d250f..cfd89ca6a18d 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;
 			}
 		}
-- 
2.13.2

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

* Applied "ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform" to the asoc tree
  2017-07-26 20:47 ` [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform Harsha Priya
  2017-07-27  2:40   ` Vinod Koul
@ 2017-07-28 12:43   ` Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2017-07-28 12:43 UTC (permalink / raw)
  Cc: Harsha Priya, tiwai, alsa-devel, broonie, vinod.koul

The patch

   ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 349d63c33a34e39b205cf116d2406e096a029f8b Mon Sep 17 00:00:00 2001
From: Harsha Priya N <harshapriya.n@intel.com>
Date: Thu, 27 Jul 2017 17:41:25 -0700
Subject: [PATCH] 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.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 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 3fe4a0807095..cfde894d250f 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);
-- 
2.13.2

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

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-26 20:47 [v2 0/3] ASoC: Intel: Fixes in Kabylake machine driver for clear playback and recording Harsha Priya
2017-07-26 20:47 ` [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform Harsha Priya
2017-07-27  2:40   ` Vinod Koul
2017-07-28  0:42     ` N, Harshapriya
2017-07-28 12:43   ` Applied "ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform" to the asoc tree Mark Brown
2017-07-26 20:47 ` [v2 2/3] ASoC: Intel: Fix pop noise of dmic recording in kabylake platform using rt5514 Harsha Priya
2017-07-27  2:42   ` Vinod Koul
2017-07-28 12:43   ` Applied "ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform" to the asoc tree Mark Brown
2017-07-26 20:47 ` [v2 3/3] ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform Harsha Priya
2017-07-28 12:43   ` Applied "ASoC: Intel: Enabling 4 slot IV feedback for max98927 on Kabylake platform" to the asoc tree Mark Brown
2017-07-27  2:38 ` [v2 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.