From: "Alvin Šipraga" <alvin.sipraga@analog.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Mark Brown <broonie@kernel.org>, linux-sound@vger.kernel.org
Subject: Re: [PATCH v2 08/27] ASoC: soc-generic-dmaengine-pcm: use snd_soc_component_unregister()
Date: Thu, 12 Nov 2026 13:59:17 +0100 [thread overview]
Message-ID: <avW4HRj07s32svNx@analog.com> (raw)
In-Reply-To: <87o6bu28ko.wl-kuninori.morimoto.gx@renesas.com>
On Thu, Nov 12, 2026 at 12:32:23AM +0000, Kuninori Morimoto wrote:
> Current snd_dmaengine_pcm_unregister() (X) is using
> snd_soc_unregister_component_by_driver() (Y) to unregister component.
>
> (X) void snd_dmaengine_pcm_unregister(...)
> {
> (Z) component = snd_soc_lookup_component(...);
> ...
> (p) pcm = snd_soc_component_to_priv(component);
>
> (Y) snd_soc_unregister_component_by_driver(...);
> (p) dmaengine_pcm_release_chan(pcm);
> (p) kfree(pcm);
> }
>
> But it try to unregister all components from dev (a).
>
> (Y) void snd_soc_unregister_component(...)
> {
> ...
> while (1) {
> (Z) component = snd_soc_lookup_component_nolocked(...);
> ...
> (a) snd_soc_component_unregister(component);
> }
> }
>
> snd_dmaengine_pcm_unregister() (X) need to care/free pcm which is connected
> to component (= p). Both (X) and (Y) are using lookup_component (Z).
> So (X) can handle first component/pcm (p), but can't handle 2nd or more
> component/pcm eventhough (X) was called multiple times, because (Y)
> unregister all components. Let's call snd_soc_component_unregister() (a)
> instead of snd_soc_unregister_component_by_driver() (Y) in (X), and
> unregister target component only, not all.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/r/sashiko-outbox-206296@kernel.org
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> sound/soc/soc-generic-dmaengine-pcm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
next prev parent reply other threads:[~2026-11-12 12:59 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 0:30 [PATCH v2 00/27] ASoC: add new Component functions Kuninori Morimoto
2026-11-12 0:30 ` [PATCH v2 01/27] ASoC: soc-generic-dmaengine-pcm: move devm_snd_dmaengine_pcm_register() Kuninori Morimoto
2026-11-12 0:30 ` [PATCH v2 02/27] ASoC: soc-component: rename snd_soc_component_{init/exit}_regmap() to snd_soc_component_regmap_{init/exit}() Kuninori Morimoto
2026-11-12 12:57 ` Alvin Šipraga
2026-11-12 0:31 ` [PATCH v2 04/27] ASoC: soc-component: rename snd_soc_component_regmap_cache_sync() Kuninori Morimoto
2026-11-12 12:58 ` Alvin Šipraga
2026-11-12 0:31 ` [PATCH v2 05/27] ASoC: soc-component: align snd_soc_component_{regmap/regcache}_xxx() functions Kuninori Morimoto
2026-11-12 12:58 ` Alvin Šipraga
2026-11-12 0:31 ` [PATCH v2 06/27] ASoC: soc-core: move snd_soc_del_component_unlocked() Kuninori Morimoto
2026-11-12 12:58 ` Alvin Šipraga
2026-11-12 0:32 ` [PATCH v2 07/27] ASoC: soc-core: add missing snd_soc_component_unregister() Kuninori Morimoto
2026-11-12 12:59 ` Alvin Šipraga
2026-11-12 0:32 ` [PATCH v2 08/27] ASoC: soc-generic-dmaengine-pcm: use snd_soc_component_unregister() Kuninori Morimoto
2026-11-12 12:59 ` Alvin Šipraga [this message]
2026-11-12 13:53 ` Alvin Šipraga
2026-11-12 0:32 ` [PATCH v2 09/27] ASoC: soc-devres: use snd_soc_component_unregister() for devm_snd_soc_register_component() Kuninori Morimoto
2026-11-12 1:45 ` sashiko-bot
2026-11-12 3:20 ` Kuninori Morimoto
2026-11-12 0:32 ` [PATCH v2 10/27] ASoC: soc-core: remove snd_soc_unregister_component_by_driver() Kuninori Morimoto
2026-11-12 0:32 ` [PATCH v2 11/27] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c Kuninori Morimoto
2026-11-12 0:32 ` [PATCH v2 12/27] ASoC: soc-component: move devm_snd_soc_component_register() Kuninori Morimoto
2026-11-12 0:32 ` [PATCH v2 13/27] ASoC: soc-component: move snd_soc_of_xlate_dai_name() to soc-component.c Kuninori Morimoto
2026-11-12 0:32 ` [PATCH v2 14/27] ASoC: soc-component: add snd_soc_component_name_prefix() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 15/27] ASoC: soc-component: add snd_soc_component_to_dev() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 16/27] ASoC: soc-component: add snd_soc_component_to_driver() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 17/27] ASoC: soc-component: add snd_soc_component_to_card() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 18/27] ASoC: soc-component: add snd_soc_component_to_debugfs_root() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 19/27] ASoC: soc-component: add snd_soc_component_to_regmap() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 20/27] ASoC: soc-component: add snd_soc_component_regcache_mark_dirty() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 21/27] ASoC: soc-component: add snd_soc_component_regcache_cache_only() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 22/27] ASoC: soc-component: add snd_soc_component_regcache_cache_bypass() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 23/27] ASoC: soc-component: add snd_soc_component_regmap_multi_reg_write_bypassed() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 24/27] ASoC: soc-component: add snd_soc_component_num_dai() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 25/27] ASoC: soc-component: add snd_soc_component_connect_dai() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 26/27] ASoC: soc-component: add snd_soc_component_active_update() Kuninori Morimoto
2026-11-12 0:33 ` [PATCH v2 27/27] ASoC: soc-component: add snd_soc_component_device_link_{add/del}() Kuninori Morimoto
[not found] ` <87v76228mp.wl-kuninori.morimoto.gx@renesas.com>
2026-11-12 12:57 ` [PATCH v2 03/27] ASoC: soc-component: rename snd_soc_component_regmap_val_bytes() Alvin Šipraga
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=avW4HRj07s32svNx@analog.com \
--to=alvin.sipraga@analog.com \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-sound@vger.kernel.org \
/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