Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams

2014-04-01 Thread Mark Brown
On Tue, Apr 01, 2014 at 11:17:07AM +0800, Nicolin Chen wrote:
 We only enable one side interrupt for each stream since over/underrun
 on the opposite stream would be resulted from what we previously did,
 enabling TERE but remaining FRDE disabled, even though the xrun on the
 opposite direction will not break the current stream.

This still doesn't apply against fsl-sai (nor for-next).


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams

2014-04-01 Thread Nicolin Chen
On Tue, Apr 01, 2014 at 01:07:15PM +0100, Mark Brown wrote:
 On Tue, Apr 01, 2014 at 11:17:07AM +0800, Nicolin Chen wrote:
  We only enable one side interrupt for each stream since over/underrun
  on the opposite stream would be resulted from what we previously did,
  enabling TERE but remaining FRDE disabled, even though the xrun on the
  opposite direction will not break the current stream.
 
 This still doesn't apply against fsl-sai (nor for-next).

Sir, I just rebased my for-next branch again and found that it's missing
two applied patches: ASoC: fsl_sai: Add isr to deal with error flag and
ASoC: fsl_sai: Improve fsl_sai_isr(), so that's why this PATCH-2 could
not be applied against it as it needs the macro that's included in the
patch ASoC: fsl_sai: Add isr to deal with error flag.

What should I do now?

Thank you,
Nicolin

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams

2014-04-01 Thread Mark Brown
On Tue, Apr 01, 2014 at 09:21:57PM +0800, Nicolin Chen wrote:

 Sir, I just rebased my for-next branch again and found that it's missing
 two applied patches: ASoC: fsl_sai: Add isr to deal with error flag and
 ASoC: fsl_sai: Improve fsl_sai_isr(), so that's why this PATCH-2 could
 not be applied against it as it needs the macro that's included in the
 patch ASoC: fsl_sai: Add isr to deal with error flag.

Ah, those dropped out of -next due to the merge window.  I've applied
your new patch now.


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams

2014-04-01 Thread Nicolin Chen
On Tue, Apr 01, 2014 at 05:42:54PM +0100, Mark Brown wrote:
 On Tue, Apr 01, 2014 at 09:21:57PM +0800, Nicolin Chen wrote:
 
  Sir, I just rebased my for-next branch again and found that it's missing
  two applied patches: ASoC: fsl_sai: Add isr to deal with error flag and
  ASoC: fsl_sai: Improve fsl_sai_isr(), so that's why this PATCH-2 could
  not be applied against it as it needs the macro that's included in the
  patch ASoC: fsl_sai: Add isr to deal with error flag.
 
 Ah, those dropped out of -next due to the merge window.  I've applied
 your new patch now.

I can find them on the fsl-sai topic now. Thank you.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

RE: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams

2014-03-31 Thread dongsheng.w...@freescale.com


 -Original Message-
 From: Linuxppc-dev [mailto:linuxppc-dev-
 bounces+b40534=freescale@lists.ozlabs.org] On Behalf Of Nicolin Chen
 Sent: Tuesday, April 01, 2014 11:17 AM
 To: broo...@kernel.org
 Cc: alsa-de...@alsa-project.org; Xiubo Li-B47053; 
 linuxppc-dev@lists.ozlabs.org;
 linux-ker...@vger.kernel.org; ti...@tabi.org
 Subject: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx
 and Rx streams
 
 We only enable one side interrupt for each stream since over/underrun
 on the opposite stream would be resulted from what we previously did,
 enabling TERE but remaining FRDE disabled, even though the xrun on the
 opposite direction will not break the current stream.
 
 Signed-off-by: Nicolin Chen guangyu.c...@freescale.com
 Acked-by: Xiubo Li li.xi...@freescale.com
 ---
  sound/soc/fsl/fsl_sai.c | 8 ++--
  sound/soc/fsl/fsl_sai.h | 1 +
  2 files changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
 index bdfd497..d64c33f 100644
 --- a/sound/soc/fsl/fsl_sai.c
 +++ b/sound/soc/fsl/fsl_sai.c
 @@ -397,4 +397,6 @@ static int fsl_sai_trigger(struct snd_pcm_substream
 *substream, int cmd,
 
   regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
 +FSL_SAI_CSR_xIE_MASK, FSL_SAI_FLAGS);
 + regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
  FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE);
   break;
 @@ -404,4 +406,6 @@ static int fsl_sai_trigger(struct snd_pcm_substream
 *substream, int cmd,
   regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
  FSL_SAI_CSR_FRDE, 0);
 + regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
 +FSL_SAI_CSR_xIE_MASK, 0);
 
   if (!(tcsr  FSL_SAI_CSR_FRDE || rcsr  FSL_SAI_CSR_FRDE)) {
 @@ -464,6 +468,6 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
   struct fsl_sai *sai = dev_get_drvdata(cpu_dai-dev);
 
 - regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x, 
 FSL_SAI_FLAGS);
 - regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x, 
 FSL_SAI_FLAGS);
 + regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x, 0x0);
 + regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x, 0x0);

Why are you remove this macro? Don't use magic number.

Regards,
-Dongsheng
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams

2014-03-31 Thread Nicolin Chen
On Tue, Apr 01, 2014 at 11:25:02AM +0800, Wang Dongsheng-B40534 wrote:
  Subject: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for 
  Tx
  and Rx streams
  
  We only enable one side interrupt for each stream since over/underrun
  on the opposite stream would be resulted from what we previously did,
  enabling TERE but remaining FRDE disabled, even though the xrun on the
  opposite direction will not break the current stream.
  
  Signed-off-by: Nicolin Chen guangyu.c...@freescale.com
  Acked-by: Xiubo Li li.xi...@freescale.com
  ---
   sound/soc/fsl/fsl_sai.c | 8 ++--
   sound/soc/fsl/fsl_sai.h | 1 +
   2 files changed, 7 insertions(+), 2 deletions(-)
  
  diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
  index bdfd497..d64c33f 100644
  --- a/sound/soc/fsl/fsl_sai.c
  +++ b/sound/soc/fsl/fsl_sai.c
  @@ -397,4 +397,6 @@ static int fsl_sai_trigger(struct snd_pcm_substream
  *substream, int cmd,
  
  regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
  +  FSL_SAI_CSR_xIE_MASK, FSL_SAI_FLAGS);
  +   regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
 FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE);
  break;
  @@ -404,4 +406,6 @@ static int fsl_sai_trigger(struct snd_pcm_substream
  *substream, int cmd,
  regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
 FSL_SAI_CSR_FRDE, 0);
  +   regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
  +  FSL_SAI_CSR_xIE_MASK, 0);
  
  if (!(tcsr  FSL_SAI_CSR_FRDE || rcsr  FSL_SAI_CSR_FRDE)) {
  @@ -464,6 +468,6 @@ static int fsl_sai_dai_probe(struct snd_soc_dai 
  *cpu_dai)
  struct fsl_sai *sai = dev_get_drvdata(cpu_dai-dev);
  
  -   regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x, 
  FSL_SAI_FLAGS);
  -   regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x, 
  FSL_SAI_FLAGS);
  +   regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x, 0x0);
  +   regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x, 0x0);
 
 Why are you remove this macro? Don't use magic number.

It's pretty clear that the so-called magic number is to clear the settings
in the registers for driver init as what this driver did at the first place
-- no offense but I don't think you would ask this if you check the git-log
of the driver.

Thank you,
Nicolin Chen

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

RE: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams

2014-03-31 Thread dongsheng.w...@freescale.com


 -Original Message-
 From: Nicolin Chen [mailto:guangyu.c...@freescale.com]
 Sent: Tuesday, April 01, 2014 11:14 AM
 To: Wang Dongsheng-B40534
 Cc: broo...@kernel.org; alsa-de...@alsa-project.org; Xiubo Li-B47053; 
 linuxppc-
 d...@lists.ozlabs.org; linux-ker...@vger.kernel.org; ti...@tabi.org
 Subject: Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts 
 for
 Tx and Rx streams
 
 On Tue, Apr 01, 2014 at 11:25:02AM +0800, Wang Dongsheng-B40534 wrote:
   Subject: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts 
   for
 Tx
   and Rx streams
  
   We only enable one side interrupt for each stream since over/underrun
   on the opposite stream would be resulted from what we previously did,
   enabling TERE but remaining FRDE disabled, even though the xrun on the
   opposite direction will not break the current stream.
  
   Signed-off-by: Nicolin Chen guangyu.c...@freescale.com
   Acked-by: Xiubo Li li.xi...@freescale.com
   ---
sound/soc/fsl/fsl_sai.c | 8 ++--
sound/soc/fsl/fsl_sai.h | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
  
   diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
   index bdfd497..d64c33f 100644
   --- a/sound/soc/fsl/fsl_sai.c
   +++ b/sound/soc/fsl/fsl_sai.c
   @@ -397,4 +397,6 @@ static int fsl_sai_trigger(struct snd_pcm_substream
   *substream, int cmd,
  
 regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
   +FSL_SAI_CSR_xIE_MASK, FSL_SAI_FLAGS);
   + regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE);
 break;
   @@ -404,4 +406,6 @@ static int fsl_sai_trigger(struct snd_pcm_substream
   *substream, int cmd,
 regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
FSL_SAI_CSR_FRDE, 0);
   + regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
   +FSL_SAI_CSR_xIE_MASK, 0);
  
 if (!(tcsr  FSL_SAI_CSR_FRDE || rcsr  FSL_SAI_CSR_FRDE)) {
   @@ -464,6 +468,6 @@ static int fsl_sai_dai_probe(struct snd_soc_dai 
   *cpu_dai)
 struct fsl_sai *sai = dev_get_drvdata(cpu_dai-dev);
  
   - regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x, 
   FSL_SAI_FLAGS);
   - regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x, 
   FSL_SAI_FLAGS);
   + regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x, 0x0);
   + regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x, 0x0);
 
  Why are you remove this macro? Don't use magic number.
 
 It's pretty clear that the so-called magic number is to clear the settings
 in the registers for driver init as what this driver did at the first place
 -- no offense but I don't think you would ask this if you check the git-log
 of the driver.
 
~FSL_SAI_MASK is better than 0x0. And you also replace 0x.

Regards,
-Dongsheng

 Thank you,
 Nicolin Chen

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams

2014-03-31 Thread Nicolin Chen
On Tue, Apr 01, 2014 at 11:48:16AM +0800, Wang Dongsheng-B40534 wrote:
 
 
  -Original Message-
  From: Nicolin Chen [mailto:guangyu.c...@freescale.com]
  Sent: Tuesday, April 01, 2014 11:14 AM
  To: Wang Dongsheng-B40534
  Cc: broo...@kernel.org; alsa-de...@alsa-project.org; Xiubo Li-B47053; 
  linuxppc-
  d...@lists.ozlabs.org; linux-ker...@vger.kernel.org; ti...@tabi.org
  Subject: Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts 
  for
  Tx and Rx streams
  
  On Tue, Apr 01, 2014 at 11:25:02AM +0800, Wang Dongsheng-B40534 wrote:
Subject: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts 
for
  Tx
and Rx streams
   
We only enable one side interrupt for each stream since over/underrun
on the opposite stream would be resulted from what we previously did,
enabling TERE but remaining FRDE disabled, even though the xrun on the
opposite direction will not break the current stream.
   
Signed-off-by: Nicolin Chen guangyu.c...@freescale.com
Acked-by: Xiubo Li li.xi...@freescale.com
---
 sound/soc/fsl/fsl_sai.c | 8 ++--
 sound/soc/fsl/fsl_sai.h | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)
   
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index bdfd497..d64c33f 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -397,4 +397,6 @@ static int fsl_sai_trigger(struct snd_pcm_substream
*substream, int cmd,
   
regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
+  FSL_SAI_CSR_xIE_MASK, FSL_SAI_FLAGS);
+   regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
   FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE);
break;
@@ -404,4 +406,6 @@ static int fsl_sai_trigger(struct snd_pcm_substream
*substream, int cmd,
regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
   FSL_SAI_CSR_FRDE, 0);
+   regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
+  FSL_SAI_CSR_xIE_MASK, 0);
   
if (!(tcsr  FSL_SAI_CSR_FRDE || rcsr  
FSL_SAI_CSR_FRDE)) {
@@ -464,6 +468,6 @@ static int fsl_sai_dai_probe(struct snd_soc_dai 
*cpu_dai)
struct fsl_sai *sai = dev_get_drvdata(cpu_dai-dev);
   
-   regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x, 
FSL_SAI_FLAGS);
-   regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x, 
FSL_SAI_FLAGS);
+   regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x, 0x0);
+   regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x, 0x0);
  
   Why are you remove this macro? Don't use magic number.
  
  It's pretty clear that the so-called magic number is to clear the settings
  in the registers for driver init as what this driver did at the first place
  -- no offense but I don't think you would ask this if you check the git-log
  of the driver.
  
 ~FSL_SAI_MASK is better than 0x0. And you also replace 0x.

I would later send a patch to reset SAI for a true init instead of these lines
but not within this patch as it's focusing on the interrupts enabling.

So please don't grasp the mask here. Just let me continue.

Thank you,
Nicolin Chen

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

RE: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams

2014-03-31 Thread dongsheng.w...@freescale.com


 -Original Message-
 From: Nicolin Chen [mailto:guangyu.c...@freescale.com]
 Sent: Tuesday, April 01, 2014 11:38 AM
 To: Wang Dongsheng-B40534
 Cc: broo...@kernel.org; alsa-de...@alsa-project.org; Xiubo Li-B47053; 
 linuxppc-
 d...@lists.ozlabs.org; linux-ker...@vger.kernel.org; ti...@tabi.org
 Subject: Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable interrupts 
 for
 Tx and Rx streams
 
 On Tue, Apr 01, 2014 at 11:48:16AM +0800, Wang Dongsheng-B40534 wrote:
 
 
   -Original Message-
   From: Nicolin Chen [mailto:guangyu.c...@freescale.com]
   Sent: Tuesday, April 01, 2014 11:14 AM
   To: Wang Dongsheng-B40534
   Cc: broo...@kernel.org; alsa-de...@alsa-project.org; Xiubo Li-B47053;
 linuxppc-
   d...@lists.ozlabs.org; linux-ker...@vger.kernel.org; ti...@tabi.org
   Subject: Re: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable 
   interrupts
 for
   Tx and Rx streams
  
   On Tue, Apr 01, 2014 at 11:25:02AM +0800, Wang Dongsheng-B40534 wrote:
 Subject: [PATCH bisect 2/2] ASoC: fsl_sai: Separately enable 
 interrupts
 for
   Tx
 and Rx streams

 We only enable one side interrupt for each stream since over/underrun
 on the opposite stream would be resulted from what we previously did,
 enabling TERE but remaining FRDE disabled, even though the xrun on the
 opposite direction will not break the current stream.

 Signed-off-by: Nicolin Chen guangyu.c...@freescale.com
 Acked-by: Xiubo Li li.xi...@freescale.com
 ---
  sound/soc/fsl/fsl_sai.c | 8 ++--
  sound/soc/fsl/fsl_sai.h | 1 +
  2 files changed, 7 insertions(+), 2 deletions(-)

 diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
 index bdfd497..d64c33f 100644
 --- a/sound/soc/fsl/fsl_sai.c
 +++ b/sound/soc/fsl/fsl_sai.c
 @@ -397,4 +397,6 @@ static int fsl_sai_trigger(struct 
 snd_pcm_substream
 *substream, int cmd,

   regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
 +FSL_SAI_CSR_xIE_MASK, FSL_SAI_FLAGS);
 + regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
  FSL_SAI_CSR_FRDE, FSL_SAI_CSR_FRDE);
   break;
 @@ -404,4 +406,6 @@ static int fsl_sai_trigger(struct 
 snd_pcm_substream
 *substream, int cmd,
   regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
  FSL_SAI_CSR_FRDE, 0);
 + regmap_update_bits(sai-regmap, FSL_SAI_xCSR(tx),
 +FSL_SAI_CSR_xIE_MASK, 0);

   if (!(tcsr  FSL_SAI_CSR_FRDE || rcsr  
 FSL_SAI_CSR_FRDE)) {
 @@ -464,6 +468,6 @@ static int fsl_sai_dai_probe(struct snd_soc_dai
 *cpu_dai)
   struct fsl_sai *sai = dev_get_drvdata(cpu_dai-dev);

 - regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x,
 FSL_SAI_FLAGS);
 - regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x,
 FSL_SAI_FLAGS);
 + regmap_update_bits(sai-regmap, FSL_SAI_TCSR, 0x, 0x0);
 + regmap_update_bits(sai-regmap, FSL_SAI_RCSR, 0x, 0x0);
   
Why are you remove this macro? Don't use magic number.
  
   It's pretty clear that the so-called magic number is to clear the settings
   in the registers for driver init as what this driver did at the first 
   place
   -- no offense but I don't think you would ask this if you check the 
   git-log
   of the driver.
  
  ~FSL_SAI_MASK is better than 0x0. And you also replace 0x.
 
 I would later send a patch to reset SAI for a true init instead of these lines
 but not within this patch as it's focusing on the interrupts enabling.
 
 So please don't grasp the mask here. Just let me continue.
 

:), fine.

Regards,
-Dongsheng

 Thank you,
 Nicolin Chen

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev