ASoC: atmel-i2s: Fix usage of capture and playback at the same time
authorCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
Fri, 18 Jun 2021 15:07:41 +0000 (18:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:48 +0000 (16:56 +0200)
commite30e636447fd6d08908777818dfbc4fcbcd3f66a
tree7517f95e148ffb05cf72c4af46d9f53c52f9d32d
parentaf497961abef0e787a867476cd9c03d5b8c552db
ASoC: atmel-i2s: Fix usage of capture and playback at the same time

[ Upstream commit 3b7961a326f8a7e03f54a19f02fedae8d488b80f ]

For both capture and playback streams to work at the same time, only the
needed values from a register need to be updated. Also, clocks should be
enabled only when the first stream is started and stopped when there is no
running stream.

Fixes: b543e467d1a9 ("ASoC: atmel-i2s: add driver for the new Atmel I2S controller")
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20210618150741.401739-2-codrin.ciubotariu@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/atmel/atmel-i2s.c