linux_dsm_epyc7002/sound/soc/rockchip
John Keeping c66234cfed
ASoC: rockchip: i2s: fix playback after runtime resume
When restoring registers during runtime resume, we must not write to
I2S_TXDR which is the transmit FIFO as this queues up a sample to be
output and pushes all of the output channels down by one.

This can be demonstrated with the speaker-test utility:

	for i in a b c; do speaker-test -c 2 -s 1; done

which should play a test through the left speaker three times but if the
I2S hardware starts runtime suspended the first sample will be played
through the right speaker.

Fix this by marking I2S_TXDR as volatile (which also requires marking it
as readble, even though it technically isn't).  This seems to be the
most robust fix, the alternative of giving I2S_TXDR a default value is
more fragile since it does not prevent regcache writing to the register
in all circumstances.

While here, also fix the configuration of I2S_RXDR and I2S_FIFOLR; these
are not writable so they do not suffer from the same problem as I2S_TXDR
but reading from I2S_RXDR does suffer from a similar problem.

Fixes: f0447f6cbb ("ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle", 2016-09-07)
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2018-01-08 16:06:05 +00:00
..
Kconfig ASoC: rockchip: Add support for DMIC codec 2017-08-29 20:12:01 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rk3288_hdmi_analog.c ASoC: rockchip: Remove unnecessary function call 2017-08-21 17:13:20 +01:00
rk3399_gru_sound.c ASoC: rockchip: Allocate enough memory so we don't overflow routes 2017-10-04 11:30:17 +01:00
rockchip_i2s.c ASoC: rockchip: i2s: fix playback after runtime resume 2018-01-08 16:06:05 +00:00
rockchip_i2s.h ASoC: rockchip: i2s: add other configurable formats 2017-06-13 21:47:40 +01:00
rockchip_max98090.c ASoC: rockchip: constify snd_soc_ops structures 2016-10-24 18:33:17 +01:00
rockchip_pdm.c ASoC: rockchip: constify snd_soc_dai_ops structures 2017-08-15 18:11:10 +01:00
rockchip_pdm.h ASoC: rockchip: add support for pdm controller 2017-06-13 19:09:34 +01:00
rockchip_rt5645.c ASoC: rockchip: constify snd_soc_ops structures 2016-10-24 18:33:17 +01:00
rockchip_spdif.c ASoC: rockchip: add bindings for spdif controller 2017-06-13 21:47:36 +01:00
rockchip_spdif.h Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/es8328', 'asoc/fix/fsl-sai', 'asoc/fix/rockchip', 'asoc/fix/sgtl5000' and 'asoc/fix/wm8974' into asoc-linus 2015-12-23 00:23:27 +00:00