diff mbox series

[v2,2/3] ASoC: fsl_sai: Fix xMR setting in synchronous mode

Message ID 20190913192807.8423-3-daniel.baluta@nxp.com
State New
Headers show
Series Several SAI fixes | expand

Commit Message

Daniel Baluta Sept. 13, 2019, 7:28 p.m. UTC
From: Shengjiu Wang <shengjiu.wang@nxp.com>


When Tx is synchronous with receiver the RMR should not be changed.
When Rx is synchronous with transmitter the TMR should not be changed.

Cc: NXP Linux Team <linux-imx@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>

---
Changes since v1:
* new patch

 sound/soc/fsl/fsl_sai.c | 4 ----
 1 file changed, 4 deletions(-)

-- 
2.17.1

Comments

Nicolin Chen Sept. 16, 2019, 11:02 p.m. UTC | #1
On Fri, Sep 13, 2019 at 10:28:06PM +0300, Daniel Baluta wrote:
> From: Shengjiu Wang <shengjiu.wang@nxp.com>

> 

> When Tx is synchronous with receiver the RMR should not be changed.

> When Rx is synchronous with transmitter the TMR should not be changed.


Would you please explain why and what bug this patch fixes?
We might want to Cc stable kernel too if it's a useful fix.

Thank you.
 
> Cc: NXP Linux Team <linux-imx@nxp.com>

> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>

> ---

> Changes since v1:

> * new patch

> 

>  sound/soc/fsl/fsl_sai.c | 4 ----

>  1 file changed, 4 deletions(-)

> 

> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c

> index b517e4bc1b87..6598a1ae0a2d 100644

> --- a/sound/soc/fsl/fsl_sai.c

> +++ b/sound/soc/fsl/fsl_sai.c

> @@ -482,8 +482,6 @@ static int fsl_sai_hw_params(struct snd_pcm_substream *substream,

>  			regmap_update_bits(sai->regmap, FSL_SAI_TCR5(ofs),

>  				FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK |

>  				FSL_SAI_CR5_FBT_MASK, val_cr5);

> -			regmap_write(sai->regmap, FSL_SAI_TMR,

> -				~0UL - ((1 << channels) - 1));

>  		} else if (!sai->synchronous[RX] && sai->synchronous[TX] && tx) {

>  			regmap_update_bits(sai->regmap, FSL_SAI_RCR4(ofs),

>  				FSL_SAI_CR4_SYWD_MASK | FSL_SAI_CR4_FRSZ_MASK,

> @@ -491,8 +489,6 @@ static int fsl_sai_hw_params(struct snd_pcm_substream *substream,

>  			regmap_update_bits(sai->regmap, FSL_SAI_RCR5(ofs),

>  				FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK |

>  				FSL_SAI_CR5_FBT_MASK, val_cr5);

> -			regmap_write(sai->regmap, FSL_SAI_RMR,

> -				~0UL - ((1 << channels) - 1));

>  		}

>  	}

>  

> -- 

> 2.17.1

>
diff mbox series

Patch

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index b517e4bc1b87..6598a1ae0a2d 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -482,8 +482,6 @@  static int fsl_sai_hw_params(struct snd_pcm_substream *substream,
 			regmap_update_bits(sai->regmap, FSL_SAI_TCR5(ofs),
 				FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK |
 				FSL_SAI_CR5_FBT_MASK, val_cr5);
-			regmap_write(sai->regmap, FSL_SAI_TMR,
-				~0UL - ((1 << channels) - 1));
 		} else if (!sai->synchronous[RX] && sai->synchronous[TX] && tx) {
 			regmap_update_bits(sai->regmap, FSL_SAI_RCR4(ofs),
 				FSL_SAI_CR4_SYWD_MASK | FSL_SAI_CR4_FRSZ_MASK,
@@ -491,8 +489,6 @@  static int fsl_sai_hw_params(struct snd_pcm_substream *substream,
 			regmap_update_bits(sai->regmap, FSL_SAI_RCR5(ofs),
 				FSL_SAI_CR5_WNW_MASK | FSL_SAI_CR5_W0W_MASK |
 				FSL_SAI_CR5_FBT_MASK, val_cr5);
-			regmap_write(sai->regmap, FSL_SAI_RMR,
-				~0UL - ((1 << channels) - 1));
 		}
 	}