]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: intel/sdw_utils: move cirrus soundwire codec helper functions
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Thu, 1 Aug 2024 09:14:34 +0000 (14:44 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 1 Aug 2024 11:44:08 +0000 (12:44 +0100)
To make it generic, move Cirrus Soundwire codec helper functions to
common place holder so that it can be used by other platform machine
driver.

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801091446.10457-20-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc_sdw_utils.h
sound/soc/intel/boards/Makefile
sound/soc/intel/boards/sof_sdw_common.h
sound/soc/sdw_utils/Makefile
sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c [moved from sound/soc/intel/boards/bridge_cs35l56.c with 73% similarity]
sound/soc/sdw_utils/soc_sdw_cs42l42.c [moved from sound/soc/intel/boards/sof_sdw_cs42l42.c with 88% similarity]
sound/soc/sdw_utils/soc_sdw_cs42l43.c [moved from sound/soc/intel/boards/sof_sdw_cs42l43.c with 85% similarity]
sound/soc/sdw_utils/soc_sdw_cs_amp.c [moved from sound/soc/intel/boards/sof_sdw_cs_amp.c with 80% similarity]

index 450542eb3ea0aa1eb7d4d1304f6ec82f783ff8c4..d5dd887b9d151207c02d82eac0c0d64c86aff942 100644 (file)
 #define SOC_SDW_MAX_NO_PROPS           2
 #define SOC_SDW_JACK_JDSRC(quirk)      ((quirk) & GENMASK(3, 0))
 
+/* If a CODEC has an optional speaker output, this quirk will enable it */
+#define SOC_SDW_CODEC_SPKR                     BIT(15)
+/*
+ * If the CODEC has additional devices attached directly to it.
+ *
+ * For the cs42l43:
+ *   - 0 - No speaker output
+ *   - SOC_SDW_CODEC_SPKR - CODEC internal speaker
+ *   - SOC_SDW_SIDECAR_AMPS - 2x Sidecar amplifiers + CODEC internal speaker
+ *   - SOC_SDW_CODEC_SPKR | SOF_SIDECAR_AMPS - Not currently supported
+ */
+#define SOC_SDW_SIDECAR_AMPS           BIT(16)
+
 struct asoc_sdw_codec_info;
 
 struct asoc_sdw_dai_info {
@@ -109,6 +122,28 @@ int asoc_sdw_rt_amp_init(struct snd_soc_card *card,
                         bool playback);
 int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link);
 
+/* CS42L43 support */
+int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card,
+                             struct snd_soc_dai_link *dai_links,
+                             struct asoc_sdw_codec_info *info,
+                             bool playback);
+
+/* CS AMP support */
+int asoc_sdw_bridge_cs35l56_count_sidecar(struct snd_soc_card *card,
+                                         int *num_dais, int *num_devs);
+int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card,
+                                       struct snd_soc_dai_link **dai_links,
+                                       struct snd_soc_codec_conf **codec_conf);
+int asoc_sdw_bridge_cs35l56_spk_init(struct snd_soc_card *card,
+                                    struct snd_soc_dai_link *dai_links,
+                                    struct asoc_sdw_codec_info *info,
+                                    bool playback);
+
+int asoc_sdw_cs_amp_init(struct snd_soc_card *card,
+                        struct snd_soc_dai_link *dai_links,
+                        struct asoc_sdw_codec_info *info,
+                        bool playback);
+
 /* dai_link init callbacks */
 int asoc_sdw_rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
@@ -118,5 +153,10 @@ int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai
 int asoc_sdw_rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 int asoc_sdw_rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 int asoc_sdw_rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 
 #endif
index 70c56bdc180c315c42c40e9be026028d8b2d3b08..1ee903e1224998e7213fab8b9f5a1c1c522c82b4 100644 (file)
@@ -36,9 +36,6 @@ snd-soc-ehl-rt5660-y := ehl_rt5660.o
 snd-soc-sof-ssp-amp-y := sof_ssp_amp.o
 snd-soc-sof-sdw-y += sof_sdw.o                         \
                        sof_sdw_maxim.o                 \
-                       bridge_cs35l56.o                        \
-                       sof_sdw_cs42l42.o sof_sdw_cs42l43.o     \
-                       sof_sdw_cs_amp.o                        \
                        sof_sdw_hdmi.o
 obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o
 obj-$(CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH) += snd-soc-sof_cs42l42.o
index 7f856c6018aae291b7ef3b02aca36a9a36f94188..b95daa32e343f75e0ffe0d9ecc08a7b8fe5b278a 100644 (file)
@@ -52,18 +52,6 @@ enum {
 #define SOF_SSP_GET_PORT(quirk)        (((quirk) >> 7) & GENMASK(5, 0))
 /* Deprecated and no longer supported by the code */
 #define SOC_SDW_NO_AGGREGATION         BIT(14)
-/* If a CODEC has an optional speaker output, this quirk will enable it */
-#define SOC_SDW_CODEC_SPKR             BIT(15)
-/*
- * If the CODEC has additional devices attached directly to it.
- *
- * For the cs42l43:
- *   - 0 - No speaker output
- *   - SOC_SDW_CODEC_SPKR - CODEC internal speaker
- *   - SOC_SDW_SIDECAR_AMPS - 2x Sidecar amplifiers + CODEC internal speaker
- *   - SOC_SDW_CODEC_SPKR | SOC_SDW_SIDECAR_AMPS - Not currently supported
- */
-#define SOC_SDW_SIDECAR_AMPS           BIT(16)
 
 /* BT audio offload: reserve 3 bits for future */
 #define SOF_BT_OFFLOAD_SSP_SHIFT       15
@@ -95,35 +83,8 @@ int asoc_sdw_maxim_init(struct snd_soc_card *card,
                        struct asoc_sdw_codec_info *info,
                        bool playback);
 
-/* CS42L43 support */
-int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card,
-                             struct snd_soc_dai_link *dai_links,
-                             struct asoc_sdw_codec_info *info,
-                             bool playback);
-
-/* CS AMP support */
-int asoc_sdw_bridge_cs35l56_count_sidecar(struct snd_soc_card *card,
-                                         int *num_dais, int *num_devs);
-int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card,
-                                       struct snd_soc_dai_link **dai_links,
-                                       struct snd_soc_codec_conf **codec_conf);
-int asoc_sdw_bridge_cs35l56_spk_init(struct snd_soc_card *card,
-                                    struct snd_soc_dai_link *dai_links,
-                                    struct asoc_sdw_codec_info *info,
-                                    bool playback);
-
-int asoc_sdw_cs_amp_init(struct snd_soc_card *card,
-                        struct snd_soc_dai_link *dai_links,
-                        struct asoc_sdw_codec_info *info,
-                        bool playback);
-
 /* dai_link init callbacks */
 
-int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
-int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
-int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
-int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
-int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 
 #endif
index 7851af9b85936df5fdded8f9bc26840a635c1e37..c15b08f3ab0b479af8c1513c71ed64e448b5b6ee 100644 (file)
@@ -3,5 +3,8 @@ snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \
                       soc_sdw_rt700.o soc_sdw_rt711.o                  \
                       soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o        \
                       soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o   \
-                      soc_sdw_rt_amp.o
+                      soc_sdw_rt_amp.o                                 \
+                      soc_sdw_bridge_cs35l56.o                         \
+                      soc_sdw_cs42l42.o soc_sdw_cs42l43.o              \
+                      soc_sdw_cs_amp.o
 obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
similarity index 73%
rename from sound/soc/intel/boards/bridge_cs35l56.c
rename to sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c
index 55e5cfbb2f145a2e07d0b7407dd53bfd19aa1c8e..fcc3ef685af7d394db5a3fab51c29c63e2002db5 100644 (file)
@@ -1,6 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
-//
-// Intel SOF Machine Driver with Cirrus Logic CS35L56 Smart Amp
+// This file incorporates work covered by the following copyright notice:
+// Copyright (c) 2024 Intel Corporation
+// Copyright (c) 2024 Advanced Micro Devices, Inc.
+
+/*
+ * soc_sdw_bridge_cs35l56 - codec helper functions for handling CS35L56 Smart AMP
+ */
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
@@ -9,7 +14,7 @@
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/soc-acpi.h>
-#include "sof_sdw_common.h"
+#include <sound/soc_sdw_utils.h>
 
 static const struct snd_soc_dapm_widget bridge_widgets[] = {
        SND_SOC_DAPM_SPK("Bridge Speaker", NULL),
@@ -25,7 +30,7 @@ static const char * const bridge_cs35l56_name_prefixes[] = {
        "AMPR",
 };
 
-static int bridge_cs35l56_asp_init(struct snd_soc_pcm_runtime *rtd)
+static int asoc_sdw_bridge_cs35l56_asp_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_card *card = rtd->card;
        int i, ret;
@@ -73,7 +78,7 @@ static int bridge_cs35l56_asp_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static const struct snd_soc_pcm_stream bridge_params = {
+static const struct snd_soc_pcm_stream asoc_sdw_bridge_params = {
        .formats = SNDRV_PCM_FMTBIT_S16_LE,
        .rate_min = 48000,
        .rate_max = 48000,
@@ -81,7 +86,7 @@ static const struct snd_soc_pcm_stream bridge_params = {
        .channels_max = 2,
 };
 
-SND_SOC_DAILINK_DEFS(bridge_dai,
+SND_SOC_DAILINK_DEFS(asoc_sdw_bridge_dai,
                     DAILINK_COMP_ARRAY(COMP_CODEC("cs42l43-codec", "cs42l43-asp")),
                     DAILINK_COMP_ARRAY(COMP_CODEC("spi-cs35l56-left", "cs35l56-asp1"),
                                        COMP_CODEC("spi-cs35l56-right", "cs35l56-asp1")),
@@ -89,28 +94,33 @@ SND_SOC_DAILINK_DEFS(bridge_dai,
 
 static const struct snd_soc_dai_link bridge_dai_template = {
        .name = "cs42l43-cs35l56",
-       .init = bridge_cs35l56_asp_init,
-       .c2c_params = &bridge_params,
+       .init = asoc_sdw_bridge_cs35l56_asp_init,
+       .c2c_params = &asoc_sdw_bridge_params,
        .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBC_CFC,
-       SND_SOC_DAILINK_REG(bridge_dai),
+       SND_SOC_DAILINK_REG(asoc_sdw_bridge_dai),
 };
 
 int asoc_sdw_bridge_cs35l56_count_sidecar(struct snd_soc_card *card,
                                          int *num_dais, int *num_devs)
 {
-       if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) {
+       struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
+
+       if (ctx->mc_quirk & SOC_SDW_SIDECAR_AMPS) {
                (*num_dais)++;
                (*num_devs) += ARRAY_SIZE(bridge_cs35l56_name_prefixes);
        }
 
        return 0;
 }
+EXPORT_SYMBOL_NS(asoc_sdw_bridge_cs35l56_count_sidecar, SND_SOC_SDW_UTILS);
 
 int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card,
                                        struct snd_soc_dai_link **dai_links,
                                        struct snd_soc_codec_conf **codec_conf)
 {
-       if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) {
+       struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
+
+       if (ctx->mc_quirk & SOC_SDW_SIDECAR_AMPS) {
                **dai_links = bridge_dai_template;
 
                for (int i = 0; i < ARRAY_SIZE(bridge_cs35l56_name_prefixes); i++) {
@@ -124,14 +134,18 @@ int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card,
 
        return 0;
 }
+EXPORT_SYMBOL_NS(asoc_sdw_bridge_cs35l56_add_sidecar, SND_SOC_SDW_UTILS);
 
 int asoc_sdw_bridge_cs35l56_spk_init(struct snd_soc_card *card,
                                     struct snd_soc_dai_link *dai_links,
                                     struct asoc_sdw_codec_info *info,
                                     bool playback)
 {
-       if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS)
+       struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
+
+       if (ctx->mc_quirk & SOC_SDW_SIDECAR_AMPS)
                info->amp_num += ARRAY_SIZE(bridge_cs35l56_name_prefixes);
 
        return 0;
 }
+EXPORT_SYMBOL_NS(asoc_sdw_bridge_cs35l56_spk_init, SND_SOC_SDW_UTILS);
similarity index 88%
rename from sound/soc/intel/boards/sof_sdw_cs42l42.c
rename to sound/soc/sdw_utils/soc_sdw_cs42l42.c
index 3ce2f65f994acc4612537fb3f0f73a00eea69e6c..78a6cb059ac06b655efbe9c18d55ad2ab13296e9 100644 (file)
@@ -1,8 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// This file incorporates work covered by the following copyright notice:
 // Copyright (c) 2023 Intel Corporation
-
+// Copyright (c) 2024 Advanced Micro Devices, Inc.
 /*
- *  sof_sdw_cs42l42 - Helpers to handle CS42L42 from generic machine driver
+ *  soc_sdw_cs42l42 - Helpers to handle CS42L42 from generic machine driver
  */
 
 #include <linux/device.h>
@@ -15,7 +16,7 @@
 #include <sound/soc-acpi.h>
 #include <sound/soc-dapm.h>
 #include <sound/jack.h>
-#include "sof_sdw_common.h"
+#include <sound/soc_sdw_utils.h>
 
 static const struct snd_soc_dapm_route cs42l42_map[] = {
        /* HP jack connectors - unknown if we have jack detection */
@@ -87,4 +88,4 @@ int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_da
 
        return ret;
 }
-MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS);
+EXPORT_SYMBOL_NS(asoc_sdw_cs42l42_rtd_init, SND_SOC_SDW_UTILS);
similarity index 85%
rename from sound/soc/intel/boards/sof_sdw_cs42l43.c
rename to sound/soc/sdw_utils/soc_sdw_cs42l43.c
index 47d05fe7de534d8f8ff35657ad9e170dea3a3dd0..adb1c008e871d508a5d838196592c5b52c197a9c 100644 (file)
@@ -1,9 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-only
 // Based on sof_sdw_rt5682.c
+// This file incorporates work covered by the following copyright notice:
 // Copyright (c) 2023 Intel Corporation
+// Copyright (c) 2024 Advanced Micro Devices, Inc.
 
 /*
- *  sof_sdw_cs42l43 - Helpers to handle CS42L43 from generic machine driver
+ *  soc_sdw_cs42l43 - Helpers to handle CS42L43 from generic machine driver
  */
 #include <linux/device.h>
 #include <linux/errno.h>
@@ -16,7 +18,7 @@
 #include <sound/soc.h>
 #include <sound/soc-acpi.h>
 #include <sound/soc-dapm.h>
-#include "sof_sdw_common.h"
+#include <sound/soc_sdw_utils.h>
 
 static const struct snd_soc_dapm_route cs42l43_hs_map[] = {
        { "Headphone", NULL, "cs42l43 AMP3_OUT" },
@@ -37,7 +39,7 @@ static const struct snd_soc_dapm_route cs42l43_dmic_map[] = {
        { "cs42l43 PDM2_DIN", NULL, "DMIC" },
 };
 
-static struct snd_soc_jack_pin sof_jack_pins[] = {
+static struct snd_soc_jack_pin soc_jack_pins[] = {
        {
                .pin    = "Headphone",
                .mask   = SND_JACK_HEADPHONE,
@@ -73,8 +75,8 @@ int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc
                                         SND_JACK_HEADSET | SND_JACK_LINEOUT |
                                         SND_JACK_BTN_0 | SND_JACK_BTN_1 |
                                         SND_JACK_BTN_2 | SND_JACK_BTN_3,
-                                        jack, sof_jack_pins,
-                                        ARRAY_SIZE(sof_jack_pins));
+                                        jack, soc_jack_pins,
+                                        ARRAY_SIZE(soc_jack_pins));
        if (ret) {
                dev_err(card->dev, "Failed to create jack: %d\n", ret);
                return ret;
@@ -98,13 +100,15 @@ int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc
 
        return ret;
 }
+EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_hs_rtd_init, SND_SOC_SDW_UTILS);
 
 int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)
 {
        struct snd_soc_card *card = rtd->card;
+       struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
        int ret;
 
-       if (!(sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS)) {
+       if (!(ctx->mc_quirk & SOC_SDW_SIDECAR_AMPS)) {
                /* Will be set by the bridge code in this case */
                card->components = devm_kasprintf(card->dev, GFP_KERNEL,
                                                  "%s spk:cs42l43-spk",
@@ -120,6 +124,7 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_so
 
        return ret;
 }
+EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_spk_rtd_init, SND_SOC_SDW_UTILS);
 
 int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card,
                              struct snd_soc_dai_link *dai_links,
@@ -134,6 +139,7 @@ int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card,
 
        return asoc_sdw_bridge_cs35l56_spk_init(card, dai_links, info, playback);
 }
+EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_spk_init, SND_SOC_SDW_UTILS);
 
 int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)
 {
@@ -152,4 +158,4 @@ int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_s
 
        return ret;
 }
-
+EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_dmic_rtd_init, SND_SOC_SDW_UTILS);
similarity index 80%
rename from sound/soc/intel/boards/sof_sdw_cs_amp.c
rename to sound/soc/sdw_utils/soc_sdw_cs_amp.c
index 6479974bd2c3b5bd12f8b3a8277cc0933aa49b4f..58b059b68016b80b69e4d646b59905d10f327fbd 100644 (file)
@@ -1,8 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// This file incorporates work covered by the following copyright notice:
 // Copyright (c) 2023 Intel Corporation
+// Copyright (c) 2024 Advanced Micro Devices, Inc.
 
 /*
- *  sof_sdw_cs_amp - Helpers to handle CS35L56 from generic machine driver
+ *  soc_sdw_cs_amp - Helpers to handle CS35L56 from generic machine driver
  */
 
 #include <linux/device.h>
@@ -10,7 +12,7 @@
 #include <sound/soc.h>
 #include <sound/soc-acpi.h>
 #include <sound/soc-dai.h>
-#include "sof_sdw_common.h"
+#include <sound/soc_sdw_utils.h>
 
 #define CODEC_NAME_SIZE        8
 
@@ -44,6 +46,7 @@ int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai
 
        return 0;
 }
+EXPORT_SYMBOL_NS(asoc_sdw_cs_spk_rtd_init, SND_SOC_SDW_UTILS);
 
 int asoc_sdw_cs_amp_init(struct snd_soc_card *card,
                         struct snd_soc_dai_link *dai_links,
@@ -58,3 +61,4 @@ int asoc_sdw_cs_amp_init(struct snd_soc_card *card,
 
        return 0;
 }
+EXPORT_SYMBOL_NS(asoc_sdw_cs_amp_init, SND_SOC_SDW_UTILS);