diff options
| author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2025-08-28 02:21:57 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-08-28 11:08:27 +0200 |
| commit | d092b70d7b54321ff481226fe6bc2a6aaa91519f (patch) | |
| tree | 8930863179dac8f413a9d024c3cf5ae9ec9edea0 /sound | |
| parent | d3593ac41aaf31db9d6d28cacd584330c769a4a6 (diff) | |
ASoC: renesas: msiof: cleanup status clear method
Current MSIOF driver clear status 1) after starting HW, and 2) clear all
status. But it should be 1') before starting HW, 2') clear necessary
status only. Cleanup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-ID: <87ecswuqwr.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/renesas/rcar/msiof.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/renesas/rcar/msiof.c b/sound/soc/renesas/rcar/msiof.c index 56bf64e55ba3..90ca3357392e 100644 --- a/sound/soc/renesas/rcar/msiof.c +++ b/sound/soc/renesas/rcar/msiof.c @@ -37,7 +37,6 @@ /* SISTR */ #define SISTR_ERR_TX (SISTR_TFSERR | SISTR_TFOVF | SISTR_TFUDF) #define SISTR_ERR_RX (SISTR_RFSERR | SISTR_RFOVF | SISTR_RFUDF) -#define SISTR_ERR (SISTR_ERR_TX | SISTR_ERR_RX) /* * The data on memory in 24bit case is located at <right> side @@ -80,7 +79,6 @@ struct msiof_priv { #define msiof_is_play(substream) ((substream)->stream == SNDRV_PCM_STREAM_PLAYBACK) #define msiof_read(priv, reg) ioread32((priv)->base + reg) #define msiof_write(priv, reg, val) iowrite32(val, (priv)->base + reg) -#define msiof_status_clear(priv) msiof_write(priv, SISTR, SISTR_ERR) static int msiof_update(struct msiof_priv *priv, u32 reg, u32 mask, u32 val) { @@ -174,6 +172,13 @@ static int msiof_hw_start(struct snd_soc_component *component, val = SIIER_RDREQE | SIIER_RDMAE | SISTR_ERR_RX; msiof_update(priv, SIIER, val, val); + /* clear status */ + if (is_play) + val = SISTR_ERR_TX; + else + val = SISTR_ERR_RX; + msiof_update(priv, SISTR, val, val); + /* SICTR */ if (is_play) val = SICTR_TXE | SICTR_TEDG; @@ -181,8 +186,6 @@ static int msiof_hw_start(struct snd_soc_component *component, val = SICTR_RXE | SICTR_REDG; msiof_update_and_wait(priv, SICTR, val, val, val); - msiof_status_clear(priv); - /* Start DMAC */ snd_dmaengine_pcm_trigger(substream, cmd); @@ -439,7 +442,7 @@ static irqreturn_t msiof_interrupt(int irq, void *data) spin_lock(&priv->lock); sistr = msiof_read(priv, SISTR); - msiof_status_clear(priv); + msiof_write(priv, SISTR, SISTR_ERR_TX | SISTR_ERR_RX); spin_unlock(&priv->lock); |
