* [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform
@ 2017-08-11 5:00 Naveen M
2017-08-16 4:58 ` Vinod Koul
2017-08-17 17:13 ` Applied "ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform" to the asoc tree Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Naveen M @ 2017-08-11 5:00 UTC (permalink / raw)
To: alsa-devel
Cc: Shruthi Sudhakar, vinod.koul, liam.r.girdwood, tiwai, broonie,
naveen.m, Harsha Priya N, pierre-louis.bossart
From: Harsha Priya N <harshapriya.n@intel.com>
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 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 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.
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Shruthi Sudhakar <shruthi.sudhakar@intel.com>
Signed-off-by: Naveen M <naveen.m@intel.com>
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index f9ba977..29b50e4 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -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);
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform
2017-08-11 5:00 [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform Naveen M
@ 2017-08-16 4:58 ` Vinod Koul
2017-08-17 17:13 ` Applied "ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform" to the asoc tree Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2017-08-16 4:58 UTC (permalink / raw)
To: Naveen M
Cc: alsa-devel, Shruthi Sudhakar, tiwai, liam.r.girdwood,
Harsha Priya N, broonie, pierre-louis.bossart
On Fri, Aug 11, 2017 at 10:30:46AM +0530, Naveen M wrote:
> From: Harsha Priya N <harshapriya.n@intel.com>
>
> 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 LRCK. For RT5663 ASRC
> should be enabled to support special i2s clock format like Intel's
^^^^^^
daouble space
it is not special, it is pcm format with 100fs
> 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.
>
> Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
> Signed-off-by: Shruthi Sudhakar <shruthi.sudhakar@intel.com>
> Signed-off-by: Naveen M <naveen.m@intel.com>
>
> diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
> index f9ba977..29b50e4 100644
> --- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
> +++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
> @@ -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);
>
> --
> 1.9.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform
@ 2017-08-16 10:25 Naveen M
2017-08-16 10:47 ` Naveen M
0 siblings, 1 reply; 5+ messages in thread
From: Naveen M @ 2017-08-16 10:25 UTC (permalink / raw)
To: alsa-devel
Cc: Shruthi Sudhakar, vinod.koul, liam.r.girdwood, tiwai, broonie,
naveen.m, Harsha Priya N, pierre-louis.bossart
From: Harsha Priya N <harshapriya.n@intel.com>
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.
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Shruthi Sudhakar <shruthi.sudhakar@intel.com>
Signed-off-by: Naveen M <naveen.m@intel.com>
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index f9ba977..29b50e4 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -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);
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform
2017-08-16 10:25 [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform Naveen M
@ 2017-08-16 10:47 ` Naveen M
0 siblings, 0 replies; 5+ messages in thread
From: Naveen M @ 2017-08-16 10:47 UTC (permalink / raw)
To: alsa-devel
Cc: Shruthi Sudhakar, vinod.koul, liam.r.girdwood, tiwai, broonie,
Harsha Priya N, pierre-louis.bossart
On Wed, Aug 16, 2017 at 03:55:59PM +0530, Naveen M wrote:
Missed Version tagging, shall repost. Thanks
> From: Harsha Priya N <harshapriya.n@intel.com>
>
> 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.
>
> Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
> Signed-off-by: Shruthi Sudhakar <shruthi.sudhakar@intel.com>
> Signed-off-by: Naveen M <naveen.m@intel.com>
>
> diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
> index f9ba977..29b50e4 100644
> --- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
> +++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
> @@ -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);
>
> --
> 1.9.1
>
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Applied "ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform" to the asoc tree
2017-08-11 5:00 [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform Naveen M
2017-08-16 4:58 ` Vinod Koul
@ 2017-08-17 17:13 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2017-08-17 17:13 UTC (permalink / raw)
Cc: alsa-devel, Shruthi Sudhakar, Harsha Priya, liam.r.girdwood,
vinod.koul, broonie, tiwai, naveen.m, pierre-louis.bossart
The patch
ASoC: Intel: kbl: 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 d46b1828406f74bc2d9ffe15e9a7b76ddbffbf7f Mon Sep 17 00:00:00 2001
From: Harsha Priya N <harshapriya.n@intel.com>
Date: Wed, 16 Aug 2017 16:19:55 +0530
Subject: [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake
platform
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.
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Shruthi Sudhakar <shruthi.sudhakar@intel.com>
Signed-off-by: Naveen M <naveen.m@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/boards/kbl_rt5663_max98927.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index 8bdd6131c6ad..c1442147d138 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -356,11 +356,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);
--
2.13.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-17 17:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-11 5:00 [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform Naveen M
2017-08-16 4:58 ` Vinod Koul
2017-08-17 17:13 ` Applied "ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform" to the asoc tree Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2017-08-16 10:25 [PATCH] ASoC: Intel: kbl: Enabling ASRC for RT5663 codec on kabylake platform Naveen M
2017-08-16 10:47 ` Naveen M
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).