From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>,
Maciej Strozek <mstrozek@opensource.cirrus.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Takashi Iwai <tiwai@suse.com>,
Faiz Nabi Kuchay <fkuchay@oss.qualcomm.com>,
Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>,
patches@opensource.cirrus.com, linux-sound@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Subject: [PATCH v2 01/11] ASoC: SDCA: allow building without ACPI
Date: Mon, 7 Sep 2026 09:37:15 +0100 [thread overview]
Message-ID: <20260907083727.733705-2-srinivas.kandagatla@oss.qualcomm.com> (raw)
In-Reply-To: <20260907083727.733705-1-srinivas.kandagatla@oss.qualcomm.com>
The SDCA class driver is useful on non-ACPI platforms where the
topology is supplied statically via sdca_class_hw_ops.get_function_data.
Drop 'depends on ACPI' from SND_SOC_SDCA and guard the
ACPI-parsing implementations in sdca_device.c and sdca_functions.c
with IS_ENABLED(CONFIG_ACPI), providing empty stubs when ACPI is off.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
include/sound/sdca.h | 23 ++++++++++++++++++-----
sound/soc/sdca/Kconfig | 6 ++++--
sound/soc/sdca/sdca_device.c | 4 ++++
sound/soc/sdca/sdca_functions.c | 2 ++
4 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/include/sound/sdca.h b/include/sound/sdca.h
index 2bdf4e333e04..db2672b3aae2 100644
--- a/include/sound/sdca.h
+++ b/include/sound/sdca.h
@@ -60,20 +60,16 @@ enum sdca_quirk {
SDCA_QUIRKS_SKIP_FUNC_TYPE_PATCHING,
};
-#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_SOC_SDCA)
+#if IS_ENABLED(CONFIG_SND_SOC_SDCA)
-void sdca_lookup_functions(struct sdw_slave *slave);
void sdca_lookup_swft(struct sdw_slave *slave);
-void sdca_lookup_interface_revision(struct sdw_slave *slave);
bool sdca_device_quirk_match(struct sdw_slave *slave, enum sdca_quirk quirk);
int sdca_dev_register_functions(struct sdw_slave *slave);
void sdca_dev_unregister_functions(struct sdw_slave *slave);
#else
-static inline void sdca_lookup_functions(struct sdw_slave *slave) {}
static inline void sdca_lookup_swft(struct sdw_slave *slave) {}
-static inline void sdca_lookup_interface_revision(struct sdw_slave *slave) {}
static inline bool sdca_device_quirk_match(struct sdw_slave *slave, enum sdca_quirk quirk)
{
return false;
@@ -88,4 +84,21 @@ static inline void sdca_dev_unregister_functions(struct sdw_slave *slave) {}
#endif
+/*
+ * Called from the SoundWire bus during peripheral enumeration; gated on
+ * ACPI to avoid a soundwire_bus <-> snd_soc_sdca module cycle on DT builds
+ * (where the bodies are stubs anyway).
+ */
+#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_SOC_SDCA)
+
+void sdca_lookup_functions(struct sdw_slave *slave);
+void sdca_lookup_interface_revision(struct sdw_slave *slave);
+
+#else
+
+static inline void sdca_lookup_functions(struct sdw_slave *slave) {}
+static inline void sdca_lookup_interface_revision(struct sdw_slave *slave) {}
+
+#endif
+
#endif
diff --git a/sound/soc/sdca/Kconfig b/sound/soc/sdca/Kconfig
index 4c0dcb9ff3b9..72c02943c49e 100644
--- a/sound/soc/sdca/Kconfig
+++ b/sound/soc/sdca/Kconfig
@@ -3,11 +3,13 @@ menu "SoundWire (SDCA)"
config SND_SOC_SDCA
tristate "SDCA core support"
- depends on ACPI
select AUXILIARY_BUS
help
This option enables support for the MIPI SoundWire Device
- Class for Audio (SDCA).
+ Class for Audio (SDCA). The ACPI/DisCo topology parser is
+ only built when CONFIG_ACPI is enabled; on non-ACPI platforms
+ (e.g. ARM/DT) codec drivers supply the SDCA function data
+ via sdca_class_hw_ops.populate_function.
config SND_SOC_SDCA_HID
bool "SDCA HID support"
diff --git a/sound/soc/sdca/sdca_device.c b/sound/soc/sdca/sdca_device.c
index 4bcd8d1fdff8..3f302bfa5457 100644
--- a/sound/soc/sdca/sdca_device.c
+++ b/sound/soc/sdca/sdca_device.c
@@ -15,6 +15,7 @@
#include <sound/sdca.h>
#include <sound/sdca_function.h>
+#if IS_ENABLED(CONFIG_ACPI)
void sdca_lookup_interface_revision(struct sdw_slave *slave)
{
struct fwnode_handle *fwnode = slave->dev.fwnode;
@@ -45,6 +46,9 @@ void sdca_lookup_swft(struct sdw_slave *slave)
devm_add_action_or_reset(&slave->dev, devm_acpi_table_put,
slave->sdca_data.swft);
}
+#else
+void sdca_lookup_swft(struct sdw_slave *slave) { }
+#endif
EXPORT_SYMBOL_NS(sdca_lookup_swft, "SND_SOC_SDCA");
static bool sdca_device_quirk_rt712_vb(struct sdw_slave *slave)
diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
index e01d91eb3cc8..47dedb62c24c 100644
--- a/sound/soc/sdca/sdca_functions.c
+++ b/sound/soc/sdca/sdca_functions.c
@@ -25,6 +25,7 @@
*/
#define SDCA_PROPERTY_LENGTH 64
+#if IS_ENABLED(CONFIG_ACPI)
static int patch_sdca_function_type(u32 interface_revision, u32 *function_type)
{
/*
@@ -199,6 +200,7 @@ void sdca_lookup_functions(struct sdw_slave *slave)
acpi_dev_for_each_child(adev, find_sdca_function, &slave->sdca_data);
}
EXPORT_SYMBOL_NS(sdca_lookup_functions, "SND_SOC_SDCA");
+#endif
struct raw_init_write {
__le32 addr;
--
2.53.0
next prev parent reply other threads:[~2026-09-07 8:38 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 8:37 [PATCH v2 00/11] ASoC: SDCA: enable on DT platforms and add Qualcomm WCD9378 (Tambora) codec Srinivas Kandagatla
2026-09-07 8:37 ` Srinivas Kandagatla [this message]
2026-09-07 8:54 ` [PATCH v2 01/11] ASoC: SDCA: allow building without ACPI Richard Fitzgerald
2026-09-07 9:09 ` Takashi Iwai
2026-09-07 8:37 ` [PATCH v2 02/11] ASoC: SDCA: export PM helpers keyed on sdca_class_drv Srinivas Kandagatla
2026-09-08 16:22 ` Charles Keepax
2026-09-08 17:49 ` Srinivas Kandagatla
2026-09-07 8:37 ` [PATCH v2 03/11] ASoC: SDCA: expose class SoundWire probe/remove/read_prop as library Srinivas Kandagatla
2026-09-07 11:31 ` Pierre-Louis Bossart
2026-09-07 13:29 ` Srinivas Kandagatla
2026-09-07 8:37 ` [PATCH v2 04/11] ASoC: SDCA: add hw_ops with hw_init hook Srinivas Kandagatla
2026-09-07 11:29 ` Pierre-Louis Bossart
2026-09-07 13:33 ` Srinivas Kandagatla
2026-09-07 8:37 ` [PATCH v2 05/11] ASoC: SDCA: add populate_function hw_op for DT function data Srinivas Kandagatla
2026-09-07 11:28 ` Pierre-Louis Bossart
2026-09-07 13:16 ` Charles Keepax
2026-09-08 16:25 ` Charles Keepax
2026-09-08 18:00 ` Srinivas Kandagatla
2026-09-09 8:34 ` Charles Keepax
2026-09-07 8:37 ` [PATCH v2 06/11] ASoC: SDCA: class_function: xlate sound-dai cell by entity index Srinivas Kandagatla
2026-09-07 8:37 ` [PATCH v2 07/11] ASoC: SDCA: register SDCA_FUNCTION_TYPE_SIMPLE_JACK in class function driver Srinivas Kandagatla
2026-09-07 11:32 ` Pierre-Louis Bossart
2026-09-07 8:37 ` [PATCH v2 08/11] ASoC: SDCA: make find_sdca_control_reset() return void Srinivas Kandagatla
2026-09-07 11:32 ` Pierre-Louis Bossart
2026-09-07 13:03 ` Charles Keepax
2026-09-07 13:16 ` Srinivas Kandagatla
2026-09-07 8:37 ` [PATCH v2 09/11] ASoC: SDCA: add sdca_apply_default_control_classifiers() helper Srinivas Kandagatla
2026-09-07 8:37 ` [PATCH v2 10/11] dt-bindings: sound: qcom: add Tambora WCD9378 SDCA codec Srinivas Kandagatla
2026-09-07 8:37 ` [PATCH v2 11/11] ASoC: codecs: add Qualcomm Tambora (WCD9378) " Srinivas Kandagatla
2026-09-07 11:32 ` Pierre-Louis Bossart
2026-09-07 13:03 ` Srinivas Kandagatla
2026-09-07 19:47 ` Pierre-Louis Bossart
2026-09-07 21:26 ` Mark Brown
2026-09-07 22:37 ` Srinivas Kandagatla
2026-09-08 8:49 ` Charles Keepax
2026-09-08 9:09 ` Srinivas Kandagatla
2026-09-08 10:37 ` Richard Fitzgerald
2026-09-08 12:31 ` Srinivas Kandagatla
2026-09-08 13:20 ` Charles Keepax
2026-09-08 13:34 ` Srinivas Kandagatla
2026-09-08 14:22 ` Pierre-Louis Bossart
2026-09-08 15:33 ` Charles Keepax
2026-09-08 15:34 ` Srinivas Kandagatla
2026-09-08 15:58 ` Uwe Kleine-König
2026-09-08 16:20 ` Charles Keepax
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=20260907083727.733705-2-srinivas.kandagatla@oss.qualcomm.com \
--to=srinivas.kandagatla@oss.qualcomm.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fkuchay@oss.qualcomm.com \
--cc=jorijnvdgraaf@catcrafts.net \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mstrozek@opensource.cirrus.com \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=robh@kernel.org \
--cc=tiwai@suse.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
all inboxes | Powered by JetHome®