linux/sound/soc/sh/rcar
Kuninori Morimoto 2ce1b21cb3
ASoC: rsnd: fixup DMAEngine API
commit d5bb69dc54 ("ASoC: sh: rcar: dma: : use proper DMAENGINE
API for termination") updated DMAEngine API _all() to _sync(),
but it should be _async().
_all() and _async() are almost same, the difference is only return
error code. _sync() will call dmaengine_synchronize() and will be
kernel panic.
This patch is needed for v5.15 or later.

[   27.293264] BUG: scheduling while atomic: irq/130-ec70000/131/0x00000003
[   27.300084] 2 locks held by irq/130-ec70000/131:
[   27.304743]  #0: ffff0004c274d908 (&group->lock){....}-{2:2}, at: _snd_pcm_stream_lock_irqsave+0x48/0x54
[   27.314344]  #1: ffff0004c1788c60 (&priv->lock#2){....}-{2:2}, at: rsnd_soc_dai_trigger+0x70/0x7bc
[   27.323409] irq event stamp: 206
[   27.326664] hardirqs last  enabled at (205): [<ffff80001082de50>] _raw_spin_unlock_irq+0x50/0xa0
[   27.335529] hardirqs last disabled at (206): [<ffff80001082d9e4>] _raw_spin_lock_irqsave+0xc4/0xd0
[   27.344564] softirqs last  enabled at (0): [<ffff800010037324>] copy_process+0x644/0x1b10
[   27.352819] softirqs last disabled at (0): [<0000000000000000>] 0x0
[   27.359142] CPU: 0 PID: 131 Comm: irq/130-ec70000 Not tainted 5.14.0-rc1+ #918
[   27.366429] Hardware name: Renesas H3ULCB Kingfisher board based on r8a77950 (DT)
[   27.373975] Call trace:
[   27.376442]  dump_backtrace+0x0/0x1b4
[   27.380141]  show_stack+0x24/0x30
[   27.383488]  dump_stack_lvl+0x8c/0xb8
[   27.387184]  dump_stack+0x18/0x34
[   27.390528]  __schedule_bug+0x8c/0x9c
[   27.394224]  __schedule+0x790/0x8dc
[   27.397746]  schedule+0x7c/0x110
[   27.401003]  synchronize_irq+0x94/0xd0
[   27.404786]  rcar_dmac_device_synchronize+0x20/0x2c
[   27.409710]  rsnd_dmaen_stop+0x50/0x64
[   27.413495]  rsnd_soc_dai_trigger+0x554/0x7bc
[   27.417890]  snd_soc_pcm_dai_trigger+0xe8/0x264

Cc: <stable@kernel.org>
Fixes: commit d5bb69dc54 ("ASoC: sh: rcar: dma: : use proper DMAENGINE API for termination")
Link: https://lore.kernel.org/r/TY2PR01MB3692889E1A7476C4322CC296D8AE9@TY2PR01MB3692.jpnprd01.prod.outlook.com
Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtmfz36o.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-12 21:25:19 +00:00
..
adg.c ASoC: rsnd: adg: clearly handle clock error / NULL case 2021-08-20 13:07:26 +01:00
cmd.c ASoC: rsnd: add debugfs support 2021-05-27 11:15:31 +01:00
core.c ASoC: rsnd: Fix an error handling path in 'rsnd_node_count()' 2021-10-29 18:55:25 +01:00
ctu.c ASoC: rsnd: add debugfs support 2021-05-27 11:15:31 +01:00
debugfs.c ASoC: rsnd: add debugfs support 2021-05-27 11:15:31 +01:00
dma.c ASoC: rsnd: fixup DMAEngine API 2021-11-12 21:25:19 +00:00
dvc.c ASoC: rsnd: tidyup rsnd_dma_request_channel() 2021-06-01 14:04:14 +01:00
gen.c ASoC: rsnd: add debugfs support 2021-05-27 11:15:31 +01:00
Makefile ASoC: rsnd: add debugfs support 2021-05-27 11:15:31 +01:00
mix.c ASoC: rsnd: add debugfs support 2021-05-27 11:15:31 +01:00
rsnd.h ASoC: rsnd: tidyup __rsnd_mod_xxx macro comments 2021-06-03 13:56:42 +01:00
src.c ASoC: rsnd: adjust disabled module 2021-06-01 14:04:15 +01:00
ssi.c ASoC: rsnd: make some arrays static const, makes object smaller 2021-08-02 12:14:05 +01:00
ssiu.c ASoC: rsnd: check for zero node count 2021-06-03 13:59:59 +01:00