Linux Sound subsystem development
 help / color / mirror / Atom feed
* [RFC][PATCH v4 0/2] ASoC: core: use Complete rebind cards by default for all users
@ 2026-04-22  3:03 Kuninori Morimoto
  2026-04-22  3:04 ` [RFC][PATCH v4 1/2] ASoC: topology: make sure to call snd_soc_remove_pcm_runtime() Kuninori Morimoto
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2026-04-22  3:03 UTC (permalink / raw)
  To: Jaroslav Kysela, Liam Girdwood, Mark Brown, Takashi Iwai,
	Cezary Rojewski, linux-sound


Hi Mark, Cezary

Topology is using (A), but its paired (B) might not be called.
Because of it, it will be hungup, because soc_cleanup_card_resources()
will access to devm_kzalloc():ed link (= rtd->link) which was already
lost in that timing.
    
	(A) snd_soc_add_pcm_runtimes()
	(B) snd_soc_remove_pcm_runtime()
    
To solve this issue, it uses devres_alloc() and call (B) in topology.

But I can't test it. It needs Acked-by / Tested-by from Cezary.
I added [RFC]

v3 -> v4
	- call topology snd_soc_remove_pcm_runtime()
	- rebind() function will handle all cards by itself.

v2 -> v3
	- separate bind/unbind/rebind and unbind list handling
	- tidyup git-log and Subject

v1 -> v2
	- tidyup handling of client_mutex


Kuninori Morimoto (2):
  ASoC: topology: make sure to call snd_soc_remove_pcm_runtime()
  ASoC: core: use Complete rebind cards by default for all users

 include/sound/soc.h      |  6 ++--
 sound/soc/soc-card.c     |  4 +--
 sound/soc/soc-core.c     | 67 ++++++++++------------------------------
 sound/soc/soc-devres.c   |  7 -----
 sound/soc/soc-topology.c | 55 +++++++++++++++++++++++++++++----
 5 files changed, 71 insertions(+), 68 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-28 16:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22  3:03 [RFC][PATCH v4 0/2] ASoC: core: use Complete rebind cards by default for all users Kuninori Morimoto
2026-04-22  3:04 ` [RFC][PATCH v4 1/2] ASoC: topology: make sure to call snd_soc_remove_pcm_runtime() Kuninori Morimoto
2026-04-22  3:04 ` [RFC][PATCH v4 2/2] ASoC: core: use Complete rebind cards by default for all users Kuninori Morimoto
2026-04-26 14:53 ` [RFC][PATCH v4 0/2] " Cezary Rojewski
2026-04-26 23:18   ` Kuninori Morimoto
2026-04-28 16:22     ` Cezary Rojewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox