Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Jaroslav Kysela <perex@perex.cz>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	linux-sound@vger.kernel.org
Subject: [RFC][PATCH v4 0/2] ASoC: core: use Complete rebind cards by default for all users
Date: Wed, 22 Apr 2026 03:03:59 +0000	[thread overview]
Message-ID: <87eck7k868.wl-kuninori.morimoto.gx@renesas.com> (raw)


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


             reply	other threads:[~2026-04-22  3:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22  3:03 Kuninori Morimoto [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eck7k868.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox