From: bui duc phuc <[email protected]>

The transmit and receive paths use the wrong DMA depth macros.
Use the macros corresponding to the DMA registers being configured.

Fixes: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs")
Signed-off-by: bui duc phuc <[email protected]>
---
 sound/soc/fsl/lpc3xxx-i2s.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/fsl/lpc3xxx-i2s.c b/sound/soc/fsl/lpc3xxx-i2s.c
index 75bd148c1432..67bbc69dc2d2 100644
--- a/sound/soc/fsl/lpc3xxx-i2s.c
+++ b/sound/soc/fsl/lpc3xxx-i2s.c
@@ -198,12 +198,12 @@ static int lpc3xxx_i2s_hw_params(struct snd_pcm_substream 
*substream,
 
        if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
                regmap_write(regs, LPC3XXX_REG_I2S_DMA1,
-                            LPC3XXX_I2S_DMA1_TX_EN | 
LPC3XXX_I2S_DMA0_TX_DEPTH(4));
+                            LPC3XXX_I2S_DMA1_TX_EN | 
LPC3XXX_I2S_DMA1_TX_DEPTH(4));
                regmap_write(regs, LPC3XXX_REG_I2S_TX_RATE, (clkx << 8) | clky);
                regmap_write(regs, LPC3XXX_REG_I2S_DAO, tmp);
        } else {
                regmap_write(regs, LPC3XXX_REG_I2S_DMA0,
-                            LPC3XXX_I2S_DMA0_RX_EN | 
LPC3XXX_I2S_DMA1_RX_DEPTH(4));
+                            LPC3XXX_I2S_DMA0_RX_EN | 
LPC3XXX_I2S_DMA0_RX_DEPTH(4));
                regmap_write(regs, LPC3XXX_REG_I2S_RX_RATE, (clkx << 8) | clky);
                regmap_write(regs, LPC3XXX_REG_I2S_DAI, tmp);
        }
-- 
2.43.0


Reply via email to