From: Laurentiu Mihalcea <laurentiumihalcea111@gmail.com>
To: Mark Brown <broonie@kernel.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org
Subject: [PATCH RFC 1/3] ASoC: re-introduce disable_route_checks flag for OF routes
Date: Thu, 15 May 2025 11:31:26 -0400 [thread overview]
Message-ID: <20250515153128.147457-2-laurentiumihalcea111@gmail.com> (raw)
In-Reply-To: <20250515153128.147457-1-laurentiumihalcea111@gmail.com>
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The "disable_route_checks" flag was previously removed via commit
dd2395162c07 ("ASoC: remove disable_route_checks") as it wasn't being
used anywhere.
Re-introduce an OF-specific variant of the flag: "disable_of_route_checks"
as this will be used by audio-graph-card2.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
include/sound/soc.h | 1 +
sound/soc/soc-core.c | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 1fffef311c41..e76da038557d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1077,6 +1077,7 @@ struct snd_soc_card {
unsigned int instantiated:1;
unsigned int topology_shortname_created:1;
unsigned int fully_routed:1;
+ unsigned int disable_of_route_checks:1;
unsigned int probed:1;
unsigned int component_chaining:1;
struct device *devres_dev;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 67bebc339148..b14a52d6f550 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2245,8 +2245,16 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
card->num_of_dapm_routes);
- if (ret < 0)
- goto probe_end;
+ if (ret < 0) {
+ if (card->disable_of_route_checks) {
+ ret = 0;
+ dev_info(card->dev,
+ "%s: disable_of_route_checks set, ignoring errors on add_routes\n",
+ __func__);
+ } else {
+ goto probe_end;
+ }
+ }
/* try to set some sane longname if DMI is available */
snd_soc_set_dmi_name(card);
--
2.34.1
next prev parent reply other threads:[~2025-05-15 15:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 15:31 [PATCH RFC 0/3] ASoC: audio-graph-card2: support explicitly disabled links Laurentiu Mihalcea
2025-05-15 15:31 ` Laurentiu Mihalcea [this message]
2025-05-16 1:22 ` [PATCH RFC 1/3] ASoC: re-introduce disable_route_checks flag for OF routes Kuninori Morimoto
2025-05-16 10:13 ` Mihalcea Laurentiu
2025-05-15 15:31 ` [PATCH RFC 2/3] ASoC: audio-graph-card2: support explicitly disabled links Laurentiu Mihalcea
2025-05-16 1:36 ` Kuninori Morimoto
2025-05-16 12:50 ` Mihalcea Laurentiu
2025-05-19 1:15 ` Kuninori Morimoto
2025-05-19 9:30 ` Mihalcea Laurentiu
2025-05-20 0:38 ` Kuninori Morimoto
2025-05-21 12:15 ` Mihalcea Laurentiu
2025-05-22 1:19 ` Kuninori Morimoto
2025-05-15 15:31 ` [PATCH RFC 3/3] ASoC: generic: add more sample DTSIs for audio-graph-card2 Laurentiu Mihalcea
2025-05-16 1:59 ` Kuninori Morimoto
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=20250515153128.147457-2-laurentiumihalcea111@gmail.com \
--to=laurentiumihalcea111@gmail.com \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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