ASoC: stm32: i2s: skip useless write in slave mode

Dummy write in capture master mode is used to gate
bus clocks. This write is useless in slave mode
as the clocks are not managed by slave.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Olivier Moysan 2019-02-26 14:51:10 +01:00 committed by Mark Brown
parent 3005decf4f
commit 7b6b0049e2
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 2 additions and 2 deletions

View File

@ -623,8 +623,8 @@ static int stm32_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
} else {
ier = I2S_IER_OVRIE;
if (i2s->refcount == 1)
/* dummy write to trigger capture */
if (STM32_I2S_IS_MASTER(i2s) && i2s->refcount == 1)
/* dummy write to gate bus clocks */
regmap_write(i2s->regmap,
STM32_I2S_TXDR_REG, 0);
}