linux/sound/soc/sh
Kuninori Morimoto b43b8ae87c
ASoC: rsnd: protect mod->status
Renesas Sound uses many modules (SSI/SSIU/SRC/CTU/MIX/DVC/DMA),
and supports complex connections/path.
Thus each modules needs to save its status to correctly control it.
This status is updated when by .trigger, and .hw_params/.hw_free.

Renesas Sound is protecting modules by using lock when .trigger,
but it was not enough to protecting each modules "status" if it was
used from many paths.

1) .hw_params/.hw_free update status
2) another doesn't update status, but overwrites by same value

This patch do
1) protects .hw_params/.hw_free by lock
2) do nothing if no status update

Without this patch, protected mod->status (= .trigger) might be
overwrote by non protected mod->status (= .hw_params / .hw_free),
and in such case, CTU/MIX/DVC/SSIU/SSI which are used from
many paths might get damage.

If above issue happens, Renesas Sound will be hung (= silence)
and never be recoverd.
I could reproduce this issue by continue playing very short sound
with loop very long term (3-4 hours) through 2 inputs (= MIXer).

For updating rsnd_status_update(), this patch removes rsnd_dai_call()
debug message. Because we already have debugfs support, and is not
good match to new code.

Reported-by: Linh Phung T. Y <linh.phung.jy@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <87wnrklwyh.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:31 +01:00
..
rcar ASoC: rsnd: protect mod->status 2021-05-27 11:15:31 +01:00
dma-sh7760.c ASoC: sh: dma-sh7760: remove unused variable 2021-03-10 13:06:59 +00:00
fsi.c ASoC: sh: use asoc_substream_to_rtd() 2020-07-23 19:07:25 +01:00
hac.c ASoC: soc-core: remove bus_control 2020-01-21 17:07:08 +00:00
Kconfig ASoC: sh: depend on COMMON_CLK to fix compile tests 2020-11-23 20:39:47 +00:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
migor.c ASoC: sh: use asoc_substream_to_rtd() 2020-07-23 19:07:25 +01:00
sh7760-ac97.c ASoC: sh: sh7760-ac97: use modern dai_link style 2019-06-06 21:37:35 +01:00
siu_dai.c ASoC: siu: convert to SPDX identifiers 2018-06-18 12:16:42 +01:00
siu_pcm.c ASoC: sh: siu_pcm: remove unused variable 2021-03-10 13:07:04 +00:00
siu.h ASoC: siu: Fix build error by a wrong const prefix 2021-01-27 12:35:18 +00:00
ssi.c ASoC: ssi: don't use discriminatory terms for debug log 2020-07-14 16:38:24 +01:00