diff mbox

[2/7] ASoC: atmel_ssc_dai: Fix TCMR settings in I2S slave mode

Message ID 20180130110810.GC18123@lenoch (mailing list archive)
State New, archived
Headers show

Commit Message

Ladislav Michl Jan. 30, 2018, 11:08 a.m. UTC
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 sound/soc/atmel/atmel_ssc_dai.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandre Belloni Feb. 27, 2018, 5:09 p.m. UTC | #1
This one needs a proper git message because it is not obvious what this
is fixing.

Also, this doesn't exactly fix salve mode. Instead it is enabled
synchronous mode. Maybe we need a new DT property to handle sychronous
RX/TX. Probably something like what is done here:

https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/sound/fsl-sai.txt#L39

But our default would be asynchronous.


On 30/01/2018 at 12:08:10 +0100, Ladislav Michl wrote:
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>  sound/soc/atmel/atmel_ssc_dai.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
> index a1e2c5682dcd..8e145487cb18 100644
> --- a/sound/soc/atmel/atmel_ssc_dai.c
> +++ b/sound/soc/atmel/atmel_ssc_dai.c
> @@ -647,7 +647,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
>  
>  		tcmr =	  SSC_BF(TCMR_PERIOD, 0)
>  			| SSC_BF(TCMR_STTDLY, START_DELAY)
> -			| SSC_BF(TCMR_START, SSC_START_FALLING_RF)
> +			| SSC_BF(TCMR_START, SSC_START_TX_RX)
>  			| SSC_BF(TCMR_CKI, SSC_CKI_FALLING)
>  			| SSC_BF(TCMR_CKO, SSC_CKO_NONE)
>  			| SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ?
> -- 
> 2.15.1
>
Ladislav Michl Feb. 27, 2018, 6:50 p.m. UTC | #2
On Tue, Feb 27, 2018 at 06:09:21PM +0100, Alexandre Belloni wrote:
> This one needs a proper git message because it is not obvious what this
> is fixing.

And is also incomplete, as all synchronous slave modes need fixing :)

> Also, this doesn't exactly fix salve mode. Instead it is enabled
> synchronous mode. Maybe we need a new DT property to handle sychronous
> RX/TX. Probably something like what is done here:
> 
> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/sound/fsl-sai.txt#L39

Thank you for usefull pointer, will send v2.

> But our default would be asynchronous.
>
> On 30/01/2018 at 12:08:10 +0100, Ladislav Michl wrote:
> > Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> > ---
> >  sound/soc/atmel/atmel_ssc_dai.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
> > index a1e2c5682dcd..8e145487cb18 100644
> > --- a/sound/soc/atmel/atmel_ssc_dai.c
> > +++ b/sound/soc/atmel/atmel_ssc_dai.c
> > @@ -647,7 +647,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
> >  
> >  		tcmr =	  SSC_BF(TCMR_PERIOD, 0)
> >  			| SSC_BF(TCMR_STTDLY, START_DELAY)
> > -			| SSC_BF(TCMR_START, SSC_START_FALLING_RF)
> > +			| SSC_BF(TCMR_START, SSC_START_TX_RX)
> >  			| SSC_BF(TCMR_CKI, SSC_CKI_FALLING)
> >  			| SSC_BF(TCMR_CKO, SSC_CKO_NONE)
> >  			| SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ?
> > -- 
> > 2.15.1
> > 
> 
> -- 
> Alexandre Belloni, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com
diff mbox

Patch

diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index a1e2c5682dcd..8e145487cb18 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -647,7 +647,7 @@  static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
 
 		tcmr =	  SSC_BF(TCMR_PERIOD, 0)
 			| SSC_BF(TCMR_STTDLY, START_DELAY)
-			| SSC_BF(TCMR_START, SSC_START_FALLING_RF)
+			| SSC_BF(TCMR_START, SSC_START_TX_RX)
 			| SSC_BF(TCMR_CKI, SSC_CKI_FALLING)
 			| SSC_BF(TCMR_CKO, SSC_CKO_NONE)
 			| SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ?