public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting
@ 2014-02-10  6:47 Xiubo Li
  2014-02-10  7:50 ` Nicolin Chen
  2014-02-10 13:40 ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Xiubo Li @ 2014-02-10  6:47 UTC (permalink / raw)
  To: broonie, lgirdwood, Guangyu.Chen
  Cc: perex, tiwai, alsa-devel, linux-kernel, Xiubo Li

Cc: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
 sound/soc/fsl/fsl_esai.c | 4 ++--
 sound/soc/fsl/fsl_esai.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index d0c72ed..c84026c 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -326,7 +326,7 @@ static int fsl_esai_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask,
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_TSMA,
 			   ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(tx_mask));
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_TSMB,
-			   ESAI_xSMA_xS_MASK, ESAI_xSMB_xS(tx_mask));
+			   ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(tx_mask));
 
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR,
 			   ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(slots));
@@ -334,7 +334,7 @@ static int fsl_esai_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask,
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_RSMA,
 			   ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(rx_mask));
 	regmap_update_bits(esai_priv->regmap, REG_ESAI_RSMB,
-			   ESAI_xSMA_xS_MASK, ESAI_xSMB_xS(rx_mask));
+			   ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(rx_mask));
 
 	esai_priv->slot_width = slot_width;
 
diff --git a/sound/soc/fsl/fsl_esai.h b/sound/soc/fsl/fsl_esai.h
index 9c9f957..75e1403 100644
--- a/sound/soc/fsl/fsl_esai.h
+++ b/sound/soc/fsl/fsl_esai.h
@@ -322,7 +322,7 @@
 #define ESAI_xSMB_xS_SHIFT	0
 #define ESAI_xSMB_xS_WIDTH	16
 #define ESAI_xSMB_xS_MASK	(((1 << ESAI_xSMB_xS_WIDTH) - 1) << ESAI_xSMB_xS_SHIFT)
-#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) & ESAI_xSMA_xS_MASK)
+#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) & ESAI_xSMB_xS_MASK)
 
 /* Port C Direction Register -- REG_ESAI_PRRC 0xF8 */
 #define ESAI_PRRC_PDC_SHIFT	0
-- 
1.8.4



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

* Re: [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting
  2014-02-10  6:47 [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting Xiubo Li
@ 2014-02-10  7:50 ` Nicolin Chen
  2014-02-10  8:18   ` Li.Xiubo
  2014-02-10  8:24   ` Li.Xiubo
  2014-02-10 13:40 ` Mark Brown
  1 sibling, 2 replies; 6+ messages in thread
From: Nicolin Chen @ 2014-02-10  7:50 UTC (permalink / raw)
  To: Xiubo Li; +Cc: broonie, lgirdwood, perex, tiwai, alsa-devel, linux-kernel

On Mon, Feb 10, 2014 at 02:47:17PM +0800, Xiubo Li wrote:
> Cc: Nicolin Chen <Guangyu.Chen@freescale.com>
> Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
> ---
>  sound/soc/fsl/fsl_esai.c | 4 ++--
>  sound/soc/fsl/fsl_esai.h | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
> index d0c72ed..c84026c 100644
> --- a/sound/soc/fsl/fsl_esai.c
> +++ b/sound/soc/fsl/fsl_esai.c
> @@ -326,7 +326,7 @@ static int fsl_esai_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask,
>  	regmap_update_bits(esai_priv->regmap, REG_ESAI_TSMA,
>  			   ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(tx_mask));
>  	regmap_update_bits(esai_priv->regmap, REG_ESAI_TSMB,
> -			   ESAI_xSMA_xS_MASK, ESAI_xSMB_xS(tx_mask));
> +			   ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(tx_mask));
>  
>  	regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR,
>  			   ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(slots));
> @@ -334,7 +334,7 @@ static int fsl_esai_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask,
>  	regmap_update_bits(esai_priv->regmap, REG_ESAI_RSMA,
>  			   ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(rx_mask));
>  	regmap_update_bits(esai_priv->regmap, REG_ESAI_RSMB,
> -			   ESAI_xSMA_xS_MASK, ESAI_xSMB_xS(rx_mask));
> +			   ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(rx_mask));
>  
>  	esai_priv->slot_width = slot_width;
>  
> diff --git a/sound/soc/fsl/fsl_esai.h b/sound/soc/fsl/fsl_esai.h
> index 9c9f957..75e1403 100644
> --- a/sound/soc/fsl/fsl_esai.h
> +++ b/sound/soc/fsl/fsl_esai.h
> @@ -322,7 +322,7 @@
>  #define ESAI_xSMB_xS_SHIFT	0
>  #define ESAI_xSMB_xS_WIDTH	16
>  #define ESAI_xSMB_xS_MASK	(((1 << ESAI_xSMB_xS_WIDTH) - 1) << ESAI_xSMB_xS_SHIFT)
> -#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) & ESAI_xSMA_xS_MASK)
> +#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) & ESAI_xSMB_xS_MASK)

It should use ESAI_xSMB_xS_WIDTH.

Otherwise, it looks fine. Thank you.

Acked-by: Nicolin Chen <Guangyu.Chen@freescale.com>

---
>  
>  /* Port C Direction Register -- REG_ESAI_PRRC 0xF8 */
>  #define ESAI_PRRC_PDC_SHIFT	0
> -- 
> 1.8.4
> 
> 



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

* Re: [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting
  2014-02-10  8:24   ` Li.Xiubo
@ 2014-02-10  8:15     ` Nicolin Chen
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolin Chen @ 2014-02-10  8:15 UTC (permalink / raw)
  To: Xiubo Li-B47053
  Cc: broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	tiwai@suse.de, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org

On Mon, Feb 10, 2014 at 04:24:43PM +0800, Xiubo Li-B47053 wrote:
> Sorry, my misunderstanding about your comment.
> 
> Please ignore the last mail.
> 
> I will send v2 of this patch.

No, you don't need to.

Just rechecked it with RM. Your patch is correct.

I forgot I used A's WIDTH intentionally at the first place.

TSMA-> [15:0]
TSMB-> [31:16] -> higher 16bits.

Thus its shift should be corresponding to A's WIDTH.

The patch is fine. Acked.

Thank you.

> > > > diff --git a/sound/soc/fsl/fsl_esai.h b/sound/soc/fsl/fsl_esai.h
> > > > index 9c9f957..75e1403 100644
> > > > --- a/sound/soc/fsl/fsl_esai.h
> > > > +++ b/sound/soc/fsl/fsl_esai.h
> > > > @@ -322,7 +322,7 @@
> > > >  #define ESAI_xSMB_xS_SHIFT	0
> > > >  #define ESAI_xSMB_xS_WIDTH	16
> > > >  #define ESAI_xSMB_xS_MASK	(((1 << ESAI_xSMB_xS_WIDTH) - 1) <<
> > > ESAI_xSMB_xS_SHIFT)
> > > > -#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) &
> > > ESAI_xSMA_xS_MASK)
> > > > +#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) &
> > > ESAI_xSMB_xS_MASK)
> > >
> > > It should use ESAI_xSMB_xS_WIDTH.
> > >
> > 
> > Well, the ESAI_xSMB_xS_WIDTH is 0x0010(16), and ESAI_xSMB_xS_MASK will
> > be 0xFFFF.
> > 
> > 
> > 
> > Thanks,
> > 
> > --
> > Best Regards,
> > Xiubo



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

* RE: [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting
  2014-02-10  7:50 ` Nicolin Chen
@ 2014-02-10  8:18   ` Li.Xiubo
  2014-02-10  8:24   ` Li.Xiubo
  1 sibling, 0 replies; 6+ messages in thread
From: Li.Xiubo @ 2014-02-10  8:18 UTC (permalink / raw)
  To: guangyu.chen@freescale.com
  Cc: broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	tiwai@suse.de, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org


> > diff --git a/sound/soc/fsl/fsl_esai.h b/sound/soc/fsl/fsl_esai.h
> > index 9c9f957..75e1403 100644
> > --- a/sound/soc/fsl/fsl_esai.h
> > +++ b/sound/soc/fsl/fsl_esai.h
> > @@ -322,7 +322,7 @@
> >  #define ESAI_xSMB_xS_SHIFT	0
> >  #define ESAI_xSMB_xS_WIDTH	16
> >  #define ESAI_xSMB_xS_MASK	(((1 << ESAI_xSMB_xS_WIDTH) - 1) <<
> ESAI_xSMB_xS_SHIFT)
> > -#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) &
> ESAI_xSMA_xS_MASK)
> > +#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) &
> ESAI_xSMB_xS_MASK)
> 
> It should use ESAI_xSMB_xS_WIDTH.
>

Well, the ESAI_xSMB_xS_WIDTH is 0x0010(16), and ESAI_xSMB_xS_MASK will
be 0xFFFF.



Thanks,

--
Best Regards,
Xiubo

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

* RE: [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting
  2014-02-10  7:50 ` Nicolin Chen
  2014-02-10  8:18   ` Li.Xiubo
@ 2014-02-10  8:24   ` Li.Xiubo
  2014-02-10  8:15     ` Nicolin Chen
  1 sibling, 1 reply; 6+ messages in thread
From: Li.Xiubo @ 2014-02-10  8:24 UTC (permalink / raw)
  To: Li.Xiubo@freescale.com, guangyu.chen@freescale.com
  Cc: broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	tiwai@suse.de, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org

Sorry, my misunderstanding about your comment.

Please ignore the last mail.

I will send v2 of this patch.

Thanks very much.

> > > diff --git a/sound/soc/fsl/fsl_esai.h b/sound/soc/fsl/fsl_esai.h
> > > index 9c9f957..75e1403 100644
> > > --- a/sound/soc/fsl/fsl_esai.h
> > > +++ b/sound/soc/fsl/fsl_esai.h
> > > @@ -322,7 +322,7 @@
> > >  #define ESAI_xSMB_xS_SHIFT	0
> > >  #define ESAI_xSMB_xS_WIDTH	16
> > >  #define ESAI_xSMB_xS_MASK	(((1 << ESAI_xSMB_xS_WIDTH) - 1) <<
> > ESAI_xSMB_xS_SHIFT)
> > > -#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) &
> > ESAI_xSMA_xS_MASK)
> > > +#define ESAI_xSMB_xS(v)		(((v) >> ESAI_xSMA_xS_WIDTH) &
> > ESAI_xSMB_xS_MASK)
> >
> > It should use ESAI_xSMB_xS_WIDTH.
> >
> 
> Well, the ESAI_xSMB_xS_WIDTH is 0x0010(16), and ESAI_xSMB_xS_MASK will
> be 0xFFFF.
> 
> 
> 
> Thanks,
> 
> --
> Best Regards,
> Xiubo

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

* Re: [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting
  2014-02-10  6:47 [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting Xiubo Li
  2014-02-10  7:50 ` Nicolin Chen
@ 2014-02-10 13:40 ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2014-02-10 13:40 UTC (permalink / raw)
  To: Xiubo Li; +Cc: lgirdwood, Guangyu.Chen, perex, tiwai, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

On Mon, Feb 10, 2014 at 02:47:17PM +0800, Xiubo Li wrote:
> Cc: Nicolin Chen <Guangyu.Chen@freescale.com>
> Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2014-02-10 13:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10  6:47 [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting Xiubo Li
2014-02-10  7:50 ` Nicolin Chen
2014-02-10  8:18   ` Li.Xiubo
2014-02-10  8:24   ` Li.Xiubo
2014-02-10  8:15     ` Nicolin Chen
2014-02-10 13:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox