Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-04 Thread Nicolin Chen
On Tue, Aug 04, 2020 at 03:53:51PM +0800, Shengjiu Wang wrote: > > > /* Check if the opposite FRDE is also disabled */ > > > regmap_read(sai->regmap, FSL_SAI_xCSR(!tx, ofs), &xcsr); > > > + if (sai->synchronous[tx] && !sai->synchronous[!tx] && > > > !

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-04 Thread Shengjiu Wang
On Tue, Aug 4, 2020 at 3:04 PM Nicolin Chen wrote: > > On Tue, Aug 04, 2020 at 12:22:53PM +0800, Shengjiu Wang wrote: > > > > > Btw, do we need similar change for TRIGGER_STOP? > > > > > > This is a good question. It is better to do change for STOP, > > > but I am afraid that there is no much test

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-04 Thread Nicolin Chen
On Tue, Aug 04, 2020 at 12:03:46AM -0700, Nicolin Chen wrote: > On Tue, Aug 04, 2020 at 12:22:53PM +0800, Shengjiu Wang wrote: > > > > > Btw, do we need similar change for TRIGGER_STOP? > > > > > > This is a good question. It is better to do change for STOP, > > > but I am afraid that there is no

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-04 Thread Nicolin Chen
On Tue, Aug 04, 2020 at 12:22:53PM +0800, Shengjiu Wang wrote: > > > Btw, do we need similar change for TRIGGER_STOP? > > > > This is a good question. It is better to do change for STOP, > > but I am afraid that there is no much test to guarantee the result. > Maybe we can do this change for STOP

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-03 Thread Shengjiu Wang
On Tue, Aug 4, 2020 at 11:23 AM Shengjiu Wang wrote: > > On Tue, Aug 4, 2020 at 11:00 AM Nicolin Chen wrote: > > > > On Tue, Aug 04, 2020 at 10:35:12AM +0800, Shengjiu Wang wrote: > > > On Tue, Aug 4, 2020 at 10:11 AM Nicolin Chen > > > wrote: > > > > > > > > On Tue, Aug 04, 2020 at 09:39:44AM

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-03 Thread Shengjiu Wang
On Tue, Aug 4, 2020 at 11:00 AM Nicolin Chen wrote: > > On Tue, Aug 04, 2020 at 10:35:12AM +0800, Shengjiu Wang wrote: > > On Tue, Aug 4, 2020 at 10:11 AM Nicolin Chen wrote: > > > > > > On Tue, Aug 04, 2020 at 09:39:44AM +0800, Shengjiu Wang wrote: > > > > On Tue, Aug 4, 2020 at 5:57 AM Nicolin

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-03 Thread Nicolin Chen
On Tue, Aug 04, 2020 at 10:35:12AM +0800, Shengjiu Wang wrote: > On Tue, Aug 4, 2020 at 10:11 AM Nicolin Chen wrote: > > > > On Tue, Aug 04, 2020 at 09:39:44AM +0800, Shengjiu Wang wrote: > > > On Tue, Aug 4, 2020 at 5:57 AM Nicolin Chen > > > wrote: > > > > > > > > On Mon, Aug 03, 2020 at 04:04

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-03 Thread Shengjiu Wang
On Tue, Aug 4, 2020 at 10:11 AM Nicolin Chen wrote: > > On Tue, Aug 04, 2020 at 09:39:44AM +0800, Shengjiu Wang wrote: > > On Tue, Aug 4, 2020 at 5:57 AM Nicolin Chen wrote: > > > > > > On Mon, Aug 03, 2020 at 04:04:23PM +0800, Shengjiu Wang wrote: > > > > > > > > > clock generation. The TCSR.TE

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-03 Thread Nicolin Chen
On Tue, Aug 04, 2020 at 09:39:44AM +0800, Shengjiu Wang wrote: > On Tue, Aug 4, 2020 at 5:57 AM Nicolin Chen wrote: > > > > On Mon, Aug 03, 2020 at 04:04:23PM +0800, Shengjiu Wang wrote: > > > > > > > clock generation. The TCSR.TE is no need to enabled when only RX > > > > > is enabled. > > > > >

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-03 Thread Shengjiu Wang
On Tue, Aug 4, 2020 at 5:57 AM Nicolin Chen wrote: > > On Mon, Aug 03, 2020 at 04:04:23PM +0800, Shengjiu Wang wrote: > > > > > clock generation. The TCSR.TE is no need to enabled when only RX > > > > is enabled. > > > > > > You are correct if there's only RX running without TX joining. > > > Howe

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-03 Thread Nicolin Chen
On Mon, Aug 03, 2020 at 04:04:23PM +0800, Shengjiu Wang wrote: > > > clock generation. The TCSR.TE is no need to enabled when only RX > > > is enabled. > > > > You are correct if there's only RX running without TX joining. > > However, that's something we can't guarantee. Then we'd enable > > TE a

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-03 Thread Shengjiu Wang
On Mon, Aug 3, 2020 at 1:42 PM Nicolin Chen wrote: > > On Mon, Aug 03, 2020 at 11:17:54AM +0800, Shengjiu Wang wrote: > > TX synchronous with RX: The RMR is no need to be changed when > > Tx is enabled, the other configuration in hw_params() is enough for > > Probably you should explain why RMR ca

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-02 Thread Nicolin Chen
On Mon, Aug 03, 2020 at 11:17:54AM +0800, Shengjiu Wang wrote: > TX synchronous with RX: The RMR is no need to be changed when > Tx is enabled, the other configuration in hw_params() is enough for Probably you should explain why RMR can be removed, like what it really does so as to make it clear t

[PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-02 Thread Shengjiu Wang
TX synchronous with RX: The RMR is no need to be changed when Tx is enabled, the other configuration in hw_params() is enough for clock generation. The TCSR.TE is no need to enabled when only RX is enabled. RX synchronous with TX: The TMR is no need to be changed when Rx is enabled, the other conf