From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To: lgirdwood@gmail.com, broonie@kernel.org
Cc: linux-sound@vger.kernel.org, kai.vehmanen@linux.intel.com,
ranjani.sridharan@linux.intel.com,
yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.dev
Subject: [PATCH 1/4] ASoC: topology: Do not call snd_soc_remove_pcm_runtime() for ignored links
Date: Thu, 19 Jun 2025 11:42:19 +0300 [thread overview]
Message-ID: <20250619084222.559-2-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20250619084222.559-1-peter.ujfalusi@linux.intel.com>
If a link has been ignored then it is not even added.
The snd_soc_get_pcm_runtime() will return NULL as the runtime will does
not exist.
We can just skip this step to avoid performing a lookup to do nothing.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
sound/soc/soc-topology.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 7b0b8531bb32..44b60324eaa2 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -429,8 +429,11 @@ static void soc_tplg_remove_link(struct snd_soc_component *comp,
dobj->unload(comp, dobj);
list_del(&dobj->list);
- snd_soc_remove_pcm_runtime(comp->card,
- snd_soc_get_pcm_runtime(comp->card, link));
+
+ /* Ignored links do not need to be removed, they are not added */
+ if (!link->ignore)
+ snd_soc_remove_pcm_runtime(comp->card,
+ snd_soc_get_pcm_runtime(comp->card, link));
}
/* unload dai link */
--
2.49.0
next prev parent reply other threads:[~2025-06-19 8:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 8:42 [PATCH 0/4] ASoC: core/topology/Intel: Peter Ujfalusi
2025-06-19 8:42 ` Peter Ujfalusi [this message]
2025-06-19 8:42 ` [PATCH 2/4] ASoC: core: Check for rtd == NULL in snd_soc_remove_pcm_runtime() Peter Ujfalusi
2025-06-19 8:42 ` [PATCH 3/4] ASoC: Intel: skl_hda_dsp_generic: Implement add_dai_link to filter HDMI PCMs Peter Ujfalusi
2025-06-19 8:42 ` [PATCH 4/4] ASoC: Intel: sof_sdw: " Peter Ujfalusi
2025-06-20 11:32 ` [PATCH 0/4] ASoC: core/topology/Intel: Mark Brown
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=20250619084222.559-2-peter.ujfalusi@linux.intel.com \
--to=peter.ujfalusi@linux.intel.com \
--cc=broonie@kernel.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=pierre-louis.bossart@linux.dev \
--cc=ranjani.sridharan@linux.intel.com \
--cc=yung-chuan.liao@linux.intel.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