* [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-04 7:09 ` Nicolin Chen
0 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2014-04-04 7:09 UTC (permalink / raw)
To: broonie, Li.Xiubo; +Cc: linux-kernel, linuxppc-dev, alsa-devel, timur
The BCP bit in TCR4/RCR4 register rules as followings:
0 Bit clock is active high with drive outputs on rising edge
and sample inputs on falling edge.
1 Bit clock is active low with drive outputs on falling edge
and sample inputs on rising edge.
For all formats currently supported in the fsl_sai driver, they're exactly
sending data on the falling edge and sampling on the rising edge.
However, the driver clears this BCP bit for all of them which results click
noise when working with SGTL5000 and big noise with WM8962.
Thus this patch corrects the BCP settings for all the formats here to fix
the nosie issue.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
---
sound/soc/fsl/fsl_sai.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 99051c7..9bbebea 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -180,7 +180,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* that is, together with the last bit of the previous
* data word.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 |= FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP;
break;
case SND_SOC_DAIFMT_LEFT_J:
@@ -188,7 +188,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* Frame high, one word length for frame sync,
* frame sync asserts with the first bit of the frame.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
break;
case SND_SOC_DAIFMT_DSP_A:
@@ -198,7 +198,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* that is, together with the last bit of the previous
* data word.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~FSL_SAI_CR4_FSP;
val_cr4 |= FSL_SAI_CR4_FSE;
sai->is_dsp_mode = true;
@@ -208,7 +208,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* Frame high, one bit for frame sync,
* frame sync asserts with the first bit of the frame.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
sai->is_dsp_mode = true;
break;
--
1.8.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-04 7:09 ` Nicolin Chen
0 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2014-04-04 7:09 UTC (permalink / raw)
To: broonie, Li.Xiubo; +Cc: alsa-devel, linuxppc-dev, linux-kernel, timur
The BCP bit in TCR4/RCR4 register rules as followings:
0 Bit clock is active high with drive outputs on rising edge
and sample inputs on falling edge.
1 Bit clock is active low with drive outputs on falling edge
and sample inputs on rising edge.
For all formats currently supported in the fsl_sai driver, they're exactly
sending data on the falling edge and sampling on the rising edge.
However, the driver clears this BCP bit for all of them which results click
noise when working with SGTL5000 and big noise with WM8962.
Thus this patch corrects the BCP settings for all the formats here to fix
the nosie issue.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
---
sound/soc/fsl/fsl_sai.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 99051c7..9bbebea 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -180,7 +180,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* that is, together with the last bit of the previous
* data word.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 |= FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP;
break;
case SND_SOC_DAIFMT_LEFT_J:
@@ -188,7 +188,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* Frame high, one word length for frame sync,
* frame sync asserts with the first bit of the frame.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
break;
case SND_SOC_DAIFMT_DSP_A:
@@ -198,7 +198,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* that is, together with the last bit of the previous
* data word.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~FSL_SAI_CR4_FSP;
val_cr4 |= FSL_SAI_CR4_FSE;
sai->is_dsp_mode = true;
@@ -208,7 +208,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* Frame high, one bit for frame sync,
* frame sync asserts with the first bit of the frame.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
sai->is_dsp_mode = true;
break;
--
1.8.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-04 7:09 ` Nicolin Chen
0 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2014-04-04 7:09 UTC (permalink / raw)
To: broonie, Li.Xiubo; +Cc: linux-kernel, linuxppc-dev, alsa-devel, timur
The BCP bit in TCR4/RCR4 register rules as followings:
0 Bit clock is active high with drive outputs on rising edge
and sample inputs on falling edge.
1 Bit clock is active low with drive outputs on falling edge
and sample inputs on rising edge.
For all formats currently supported in the fsl_sai driver, they're exactly
sending data on the falling edge and sampling on the rising edge.
However, the driver clears this BCP bit for all of them which results click
noise when working with SGTL5000 and big noise with WM8962.
Thus this patch corrects the BCP settings for all the formats here to fix
the nosie issue.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
---
sound/soc/fsl/fsl_sai.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 99051c7..9bbebea 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -180,7 +180,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* that is, together with the last bit of the previous
* data word.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 |= FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP;
break;
case SND_SOC_DAIFMT_LEFT_J:
@@ -188,7 +188,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* Frame high, one word length for frame sync,
* frame sync asserts with the first bit of the frame.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
break;
case SND_SOC_DAIFMT_DSP_A:
@@ -198,7 +198,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* that is, together with the last bit of the previous
* data word.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~FSL_SAI_CR4_FSP;
val_cr4 |= FSL_SAI_CR4_FSE;
sai->is_dsp_mode = true;
@@ -208,7 +208,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
* Frame high, one bit for frame sync,
* frame sync asserts with the first bit of the frame.
*/
- val_cr2 &= ~FSL_SAI_CR2_BCP;
+ val_cr2 |= FSL_SAI_CR2_BCP;
val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
sai->is_dsp_mode = true;
break;
--
1.8.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
2014-04-04 7:09 ` Nicolin Chen
(?)
@ 2014-04-04 7:37 ` Li.Xiubo
-1 siblings, 0 replies; 17+ messages in thread
From: Li.Xiubo @ 2014-04-04 7:37 UTC (permalink / raw)
To: guangyu.chen@freescale.com, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, timur@tabi.org
> Subject: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
>
> The BCP bit in TCR4/RCR4 register rules as followings:
> 0 Bit clock is active high with drive outputs on rising edge
> and sample inputs on falling edge.
> 1 Bit clock is active low with drive outputs on falling edge
> and sample inputs on rising edge.
>
> For all formats currently supported in the fsl_sai driver, they're exactly
> sending data on the falling edge and sampling on the rising edge.
>
> However, the driver clears this BCP bit for all of them which results click
> noise when working with SGTL5000 and big noise with WM8962.
>
> Thus this patch corrects the BCP settings for all the formats here to fix
> the nosie issue.
>
> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
> ---
Good catch.
Acked-by: Xiubo Li <Li.Xiubo@freescale.com>
Thanks,
--
BRs,
Xiubo
> sound/soc/fsl/fsl_sai.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 99051c7..9bbebea 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -180,7 +180,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * that is, together with the last bit of the previous
> * data word.
> */
> - val_cr2 &= ~FSL_SAI_CR2_BCP;
> + val_cr2 |= FSL_SAI_CR2_BCP;
> val_cr4 |= FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP;
> break;
> case SND_SOC_DAIFMT_LEFT_J:
> @@ -188,7 +188,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * Frame high, one word length for frame sync,
> * frame sync asserts with the first bit of the frame.
> */
> - val_cr2 &= ~FSL_SAI_CR2_BCP;
> + val_cr2 |= FSL_SAI_CR2_BCP;
> val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> break;
> case SND_SOC_DAIFMT_DSP_A:
> @@ -198,7 +198,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * that is, together with the last bit of the previous
> * data word.
> */
> - val_cr2 &= ~FSL_SAI_CR2_BCP;
> + val_cr2 |= FSL_SAI_CR2_BCP;
> val_cr4 &= ~FSL_SAI_CR4_FSP;
> val_cr4 |= FSL_SAI_CR4_FSE;
> sai->is_dsp_mode = true;
> @@ -208,7 +208,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * Frame high, one bit for frame sync,
> * frame sync asserts with the first bit of the frame.
> */
> - val_cr2 &= ~FSL_SAI_CR2_BCP;
> + val_cr2 |= FSL_SAI_CR2_BCP;
> val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> sai->is_dsp_mode = true;
> break;
> --
> 1.8.4
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-04 7:37 ` Li.Xiubo
0 siblings, 0 replies; 17+ messages in thread
From: Li.Xiubo @ 2014-04-04 7:37 UTC (permalink / raw)
To: guangyu.chen@freescale.com, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, timur@tabi.org
> Subject: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
>=20
> The BCP bit in TCR4/RCR4 register rules as followings:
> 0 Bit clock is active high with drive outputs on rising edge
> and sample inputs on falling edge.
> 1 Bit clock is active low with drive outputs on falling edge
> and sample inputs on rising edge.
>=20
> For all formats currently supported in the fsl_sai driver, they're exactl=
y
> sending data on the falling edge and sampling on the rising edge.
>=20
> However, the driver clears this BCP bit for all of them which results cli=
ck
> noise when working with SGTL5000 and big noise with WM8962.
>=20
> Thus this patch corrects the BCP settings for all the formats here to fix
> the nosie issue.
>=20
> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
> ---
Good catch.
Acked-by: Xiubo Li <Li.Xiubo@freescale.com>
Thanks,
--
BRs,
Xiubo
> sound/soc/fsl/fsl_sai.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>=20
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 99051c7..9bbebea 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -180,7 +180,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * that is, together with the last bit of the previous
> * data word.
> */
> - val_cr2 &=3D ~FSL_SAI_CR2_BCP;
> + val_cr2 |=3D FSL_SAI_CR2_BCP;
> val_cr4 |=3D FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP;
> break;
> case SND_SOC_DAIFMT_LEFT_J:
> @@ -188,7 +188,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * Frame high, one word length for frame sync,
> * frame sync asserts with the first bit of the frame.
> */
> - val_cr2 &=3D ~FSL_SAI_CR2_BCP;
> + val_cr2 |=3D FSL_SAI_CR2_BCP;
> val_cr4 &=3D ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> break;
> case SND_SOC_DAIFMT_DSP_A:
> @@ -198,7 +198,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * that is, together with the last bit of the previous
> * data word.
> */
> - val_cr2 &=3D ~FSL_SAI_CR2_BCP;
> + val_cr2 |=3D FSL_SAI_CR2_BCP;
> val_cr4 &=3D ~FSL_SAI_CR4_FSP;
> val_cr4 |=3D FSL_SAI_CR4_FSE;
> sai->is_dsp_mode =3D true;
> @@ -208,7 +208,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * Frame high, one bit for frame sync,
> * frame sync asserts with the first bit of the frame.
> */
> - val_cr2 &=3D ~FSL_SAI_CR2_BCP;
> + val_cr2 |=3D FSL_SAI_CR2_BCP;
> val_cr4 &=3D ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> sai->is_dsp_mode =3D true;
> break;
> --
> 1.8.4
>=20
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-04 7:37 ` Li.Xiubo
0 siblings, 0 replies; 17+ messages in thread
From: Li.Xiubo @ 2014-04-04 7:37 UTC (permalink / raw)
To: guangyu.chen@freescale.com, broonie@kernel.org
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
alsa-devel@alsa-project.org, timur@tabi.org
> Subject: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
>
> The BCP bit in TCR4/RCR4 register rules as followings:
> 0 Bit clock is active high with drive outputs on rising edge
> and sample inputs on falling edge.
> 1 Bit clock is active low with drive outputs on falling edge
> and sample inputs on rising edge.
>
> For all formats currently supported in the fsl_sai driver, they're exactly
> sending data on the falling edge and sampling on the rising edge.
>
> However, the driver clears this BCP bit for all of them which results click
> noise when working with SGTL5000 and big noise with WM8962.
>
> Thus this patch corrects the BCP settings for all the formats here to fix
> the nosie issue.
>
> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
> ---
Good catch.
Acked-by: Xiubo Li <Li.Xiubo@freescale.com>
Thanks,
--
BRs,
Xiubo
> sound/soc/fsl/fsl_sai.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 99051c7..9bbebea 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -180,7 +180,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * that is, together with the last bit of the previous
> * data word.
> */
> - val_cr2 &= ~FSL_SAI_CR2_BCP;
> + val_cr2 |= FSL_SAI_CR2_BCP;
> val_cr4 |= FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP;
> break;
> case SND_SOC_DAIFMT_LEFT_J:
> @@ -188,7 +188,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * Frame high, one word length for frame sync,
> * frame sync asserts with the first bit of the frame.
> */
> - val_cr2 &= ~FSL_SAI_CR2_BCP;
> + val_cr2 |= FSL_SAI_CR2_BCP;
> val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> break;
> case SND_SOC_DAIFMT_DSP_A:
> @@ -198,7 +198,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * that is, together with the last bit of the previous
> * data word.
> */
> - val_cr2 &= ~FSL_SAI_CR2_BCP;
> + val_cr2 |= FSL_SAI_CR2_BCP;
> val_cr4 &= ~FSL_SAI_CR4_FSP;
> val_cr4 |= FSL_SAI_CR4_FSE;
> sai->is_dsp_mode = true;
> @@ -208,7 +208,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> * Frame high, one bit for frame sync,
> * frame sync asserts with the first bit of the frame.
> */
> - val_cr2 &= ~FSL_SAI_CR2_BCP;
> + val_cr2 |= FSL_SAI_CR2_BCP;
> val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> sai->is_dsp_mode = true;
> break;
> --
> 1.8.4
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
2014-04-04 7:37 ` Li.Xiubo
@ 2014-04-04 7:44 ` Nicolin Chen
-1 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2014-04-04 7:44 UTC (permalink / raw)
To: Xiubo Li-B47053
Cc: broonie@kernel.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, alsa-devel@alsa-project.org,
timur@tabi.org
Hi Xiubo,
On Fri, Apr 04, 2014 at 03:37:00PM +0800, Xiubo Li-B47053 wrote:
>
> > Subject: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
> >
> > The BCP bit in TCR4/RCR4 register rules as followings:
> > 0 Bit clock is active high with drive outputs on rising edge
> > and sample inputs on falling edge.
> > 1 Bit clock is active low with drive outputs on falling edge
> > and sample inputs on rising edge.
> >
> > For all formats currently supported in the fsl_sai driver, they're exactly
> > sending data on the falling edge and sampling on the rising edge.
> >
> > However, the driver clears this BCP bit for all of them which results click
> > noise when working with SGTL5000 and big noise with WM8962.
> >
> > Thus this patch corrects the BCP settings for all the formats here to fix
> > the nosie issue.
> >
> > Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
> > ---
>
> Good catch.
>
> Acked-by: Xiubo Li <Li.Xiubo@freescale.com>
>
> Thanks,
Is that possible for you to test those two clock patches for fsl_sai?
I think most of us are waiting for your reply to it. And I'd really
like to move on to append clock dividing code into the driver so both
of vybrid and imx can easily enable the DAI master mode.
Thank you,
Nicolin
> --
>
> BRs,
> Xiubo
>
>
> > sound/soc/fsl/fsl_sai.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> > index 99051c7..9bbebea 100644
> > --- a/sound/soc/fsl/fsl_sai.c
> > +++ b/sound/soc/fsl/fsl_sai.c
> > @@ -180,7 +180,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > *cpu_dai,
> > * that is, together with the last bit of the previous
> > * data word.
> > */
> > - val_cr2 &= ~FSL_SAI_CR2_BCP;
> > + val_cr2 |= FSL_SAI_CR2_BCP;
> > val_cr4 |= FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP;
> > break;
> > case SND_SOC_DAIFMT_LEFT_J:
> > @@ -188,7 +188,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > *cpu_dai,
> > * Frame high, one word length for frame sync,
> > * frame sync asserts with the first bit of the frame.
> > */
> > - val_cr2 &= ~FSL_SAI_CR2_BCP;
> > + val_cr2 |= FSL_SAI_CR2_BCP;
> > val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> > break;
> > case SND_SOC_DAIFMT_DSP_A:
> > @@ -198,7 +198,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > *cpu_dai,
> > * that is, together with the last bit of the previous
> > * data word.
> > */
> > - val_cr2 &= ~FSL_SAI_CR2_BCP;
> > + val_cr2 |= FSL_SAI_CR2_BCP;
> > val_cr4 &= ~FSL_SAI_CR4_FSP;
> > val_cr4 |= FSL_SAI_CR4_FSE;
> > sai->is_dsp_mode = true;
> > @@ -208,7 +208,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > *cpu_dai,
> > * Frame high, one bit for frame sync,
> > * frame sync asserts with the first bit of the frame.
> > */
> > - val_cr2 &= ~FSL_SAI_CR2_BCP;
> > + val_cr2 |= FSL_SAI_CR2_BCP;
> > val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> > sai->is_dsp_mode = true;
> > break;
> > --
> > 1.8.4
> >
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-04 7:44 ` Nicolin Chen
0 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2014-04-04 7:44 UTC (permalink / raw)
To: Xiubo Li-B47053
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
timur@tabi.org
Hi Xiubo,
On Fri, Apr 04, 2014 at 03:37:00PM +0800, Xiubo Li-B47053 wrote:
>
> > Subject: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
> >
> > The BCP bit in TCR4/RCR4 register rules as followings:
> > 0 Bit clock is active high with drive outputs on rising edge
> > and sample inputs on falling edge.
> > 1 Bit clock is active low with drive outputs on falling edge
> > and sample inputs on rising edge.
> >
> > For all formats currently supported in the fsl_sai driver, they're exactly
> > sending data on the falling edge and sampling on the rising edge.
> >
> > However, the driver clears this BCP bit for all of them which results click
> > noise when working with SGTL5000 and big noise with WM8962.
> >
> > Thus this patch corrects the BCP settings for all the formats here to fix
> > the nosie issue.
> >
> > Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
> > ---
>
> Good catch.
>
> Acked-by: Xiubo Li <Li.Xiubo@freescale.com>
>
> Thanks,
Is that possible for you to test those two clock patches for fsl_sai?
I think most of us are waiting for your reply to it. And I'd really
like to move on to append clock dividing code into the driver so both
of vybrid and imx can easily enable the DAI master mode.
Thank you,
Nicolin
> --
>
> BRs,
> Xiubo
>
>
> > sound/soc/fsl/fsl_sai.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> > index 99051c7..9bbebea 100644
> > --- a/sound/soc/fsl/fsl_sai.c
> > +++ b/sound/soc/fsl/fsl_sai.c
> > @@ -180,7 +180,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > *cpu_dai,
> > * that is, together with the last bit of the previous
> > * data word.
> > */
> > - val_cr2 &= ~FSL_SAI_CR2_BCP;
> > + val_cr2 |= FSL_SAI_CR2_BCP;
> > val_cr4 |= FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP;
> > break;
> > case SND_SOC_DAIFMT_LEFT_J:
> > @@ -188,7 +188,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > *cpu_dai,
> > * Frame high, one word length for frame sync,
> > * frame sync asserts with the first bit of the frame.
> > */
> > - val_cr2 &= ~FSL_SAI_CR2_BCP;
> > + val_cr2 |= FSL_SAI_CR2_BCP;
> > val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> > break;
> > case SND_SOC_DAIFMT_DSP_A:
> > @@ -198,7 +198,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > *cpu_dai,
> > * that is, together with the last bit of the previous
> > * data word.
> > */
> > - val_cr2 &= ~FSL_SAI_CR2_BCP;
> > + val_cr2 |= FSL_SAI_CR2_BCP;
> > val_cr4 &= ~FSL_SAI_CR4_FSP;
> > val_cr4 |= FSL_SAI_CR4_FSE;
> > sai->is_dsp_mode = true;
> > @@ -208,7 +208,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > *cpu_dai,
> > * Frame high, one bit for frame sync,
> > * frame sync asserts with the first bit of the frame.
> > */
> > - val_cr2 &= ~FSL_SAI_CR2_BCP;
> > + val_cr2 |= FSL_SAI_CR2_BCP;
> > val_cr4 &= ~(FSL_SAI_CR4_FSE | FSL_SAI_CR4_FSP);
> > sai->is_dsp_mode = true;
> > break;
> > --
> > 1.8.4
> >
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
2014-04-04 7:44 ` Nicolin Chen
@ 2014-04-04 8:54 ` Li.Xiubo
-1 siblings, 0 replies; 17+ messages in thread
From: Li.Xiubo @ 2014-04-04 8:54 UTC (permalink / raw)
To: guangyu.chen@freescale.com
Cc: broonie@kernel.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, alsa-devel@alsa-project.org,
timur@tabi.org
>
> Is that possible for you to test those two clock patches for fsl_sai?
>
> I think most of us are waiting for your reply to it. And I'd really
> like to move on to append clock dividing code into the driver so both
> of vybrid and imx can easily enable the DAI master mode.
>
Certainly, I will test them later.
Thanks,
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-04 8:54 ` Li.Xiubo
0 siblings, 0 replies; 17+ messages in thread
From: Li.Xiubo @ 2014-04-04 8:54 UTC (permalink / raw)
To: guangyu.chen@freescale.com
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
timur@tabi.org
>=20
> Is that possible for you to test those two clock patches for fsl_sai?
>=20
> I think most of us are waiting for your reply to it. And I'd really
> like to move on to append clock dividing code into the driver so both
> of vybrid and imx can easily enable the DAI master mode.
>=20
Certainly, I will test them later.
Thanks,
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
2014-04-04 7:09 ` Nicolin Chen
@ 2014-04-04 10:05 ` Mark Brown
-1 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2014-04-04 10:05 UTC (permalink / raw)
To: Nicolin Chen; +Cc: Li.Xiubo, linux-kernel, linuxppc-dev, alsa-devel, timur
[-- Attachment #1: Type: text/plain, Size: 348 bytes --]
On Fri, Apr 04, 2014 at 03:09:47PM +0800, Nicolin Chen wrote:
> The BCP bit in TCR4/RCR4 register rules as followings:
> 0 Bit clock is active high with drive outputs on rising edge
> and sample inputs on falling edge.
> 1 Bit clock is active low with drive outputs on falling edge
> and sample inputs on rising edge.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-04 10:05 ` Mark Brown
0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2014-04-04 10:05 UTC (permalink / raw)
To: Nicolin Chen; +Cc: alsa-devel, Li.Xiubo, linuxppc-dev, linux-kernel, timur
[-- Attachment #1: Type: text/plain, Size: 348 bytes --]
On Fri, Apr 04, 2014 at 03:09:47PM +0800, Nicolin Chen wrote:
> The BCP bit in TCR4/RCR4 register rules as followings:
> 0 Bit clock is active high with drive outputs on rising edge
> and sample inputs on falling edge.
> 1 Bit clock is active low with drive outputs on falling edge
> and sample inputs on rising edge.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
2014-04-04 10:05 ` Mark Brown
(?)
@ 2014-04-08 11:07 ` Nicolin Chen
-1 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2014-04-08 11:07 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, linuxppc-dev, alsa-devel
On Fri, Apr 04, 2014 at 11:05:32AM +0100, Mark Brown wrote:
> On Fri, Apr 04, 2014 at 03:09:47PM +0800, Nicolin Chen wrote:
> > The BCP bit in TCR4/RCR4 register rules as followings:
> > 0 Bit clock is active high with drive outputs on rising edge
> > and sample inputs on falling edge.
> > 1 Bit clock is active low with drive outputs on falling edge
> > and sample inputs on rising edge.
>
> Applied, thanks.
Sir, I can't find this patch on any of the remote branches: for-next,
topic/fsl-sai and fix/fsl-sai. Where could I find it?
Thank you,
Nicolin
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-08 11:07 ` Nicolin Chen
0 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2014-04-08 11:07 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, linuxppc-dev, linux-kernel
On Fri, Apr 04, 2014 at 11:05:32AM +0100, Mark Brown wrote:
> On Fri, Apr 04, 2014 at 03:09:47PM +0800, Nicolin Chen wrote:
> > The BCP bit in TCR4/RCR4 register rules as followings:
> > 0 Bit clock is active high with drive outputs on rising edge
> > and sample inputs on falling edge.
> > 1 Bit clock is active low with drive outputs on falling edge
> > and sample inputs on rising edge.
>
> Applied, thanks.
Sir, I can't find this patch on any of the remote branches: for-next,
topic/fsl-sai and fix/fsl-sai. Where could I find it?
Thank you,
Nicolin
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-08 11:07 ` Nicolin Chen
0 siblings, 0 replies; 17+ messages in thread
From: Nicolin Chen @ 2014-04-08 11:07 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, linuxppc-dev, alsa-devel
On Fri, Apr 04, 2014 at 11:05:32AM +0100, Mark Brown wrote:
> On Fri, Apr 04, 2014 at 03:09:47PM +0800, Nicolin Chen wrote:
> > The BCP bit in TCR4/RCR4 register rules as followings:
> > 0 Bit clock is active high with drive outputs on rising edge
> > and sample inputs on falling edge.
> > 1 Bit clock is active low with drive outputs on falling edge
> > and sample inputs on rising edge.
>
> Applied, thanks.
Sir, I can't find this patch on any of the remote branches: for-next,
topic/fsl-sai and fix/fsl-sai. Where could I find it?
Thank you,
Nicolin
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
2014-04-08 11:07 ` Nicolin Chen
@ 2014-04-08 11:50 ` Mark Brown
-1 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2014-04-08 11:50 UTC (permalink / raw)
To: Nicolin Chen; +Cc: linux-kernel, linuxppc-dev, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 216 bytes --]
On Tue, Apr 08, 2014 at 07:07:40PM +0800, Nicolin Chen wrote:
> Sir, I can't find this patch on any of the remote branches: for-next,
> topic/fsl-sai and fix/fsl-sai. Where could I find it?
It's in the fix branch.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations
@ 2014-04-08 11:50 ` Mark Brown
0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2014-04-08 11:50 UTC (permalink / raw)
To: Nicolin Chen; +Cc: alsa-devel, linuxppc-dev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 216 bytes --]
On Tue, Apr 08, 2014 at 07:07:40PM +0800, Nicolin Chen wrote:
> Sir, I can't find this patch on any of the remote branches: for-next,
> topic/fsl-sai and fix/fsl-sai. Where could I find it?
It's in the fix branch.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2014-04-08 11:51 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-04 7:09 [PATCH] ASoC: fsl_sai: Fix Bit Clock Polarity configurations Nicolin Chen
2014-04-04 7:09 ` Nicolin Chen
2014-04-04 7:09 ` Nicolin Chen
2014-04-04 7:37 ` Li.Xiubo
2014-04-04 7:37 ` Li.Xiubo
2014-04-04 7:37 ` Li.Xiubo
2014-04-04 7:44 ` Nicolin Chen
2014-04-04 7:44 ` Nicolin Chen
2014-04-04 8:54 ` Li.Xiubo
2014-04-04 8:54 ` Li.Xiubo
2014-04-04 10:05 ` Mark Brown
2014-04-04 10:05 ` Mark Brown
2014-04-08 11:07 ` Nicolin Chen
2014-04-08 11:07 ` Nicolin Chen
2014-04-08 11:07 ` Nicolin Chen
2014-04-08 11:50 ` Mark Brown
2014-04-08 11:50 ` Mark Brown
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.