summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBard Liao <yung-chuan.liao@linux.intel.com>2025-10-14 10:13:31 +0300
committerMark Brown <broonie@kernel.org>2025-10-14 14:32:32 +0300
commit506cbe36a2ac7b504a2362476dc53cd548b7a29e (patch)
tree225516f99d1da7bdf778ecd5b85519cb15de2189
parent55f8b5a96597a7b88c323a7de7228f9eae8c9943 (diff)
downloadlinux-506cbe36a2ac7b504a2362476dc53cd548b7a29e.tar.xz
ASoC: soc_sdw_utils: export asoc_sdw_get_dai_type
asoc_sdw_get_dai_type() is quite useful to convert SDCA function types to SDW DAI types. It can be used by other drivers. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Simon Trimmer <simont@opensource.cirrus.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20251014071335.3844631-6-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--include/sound/soc_sdw_utils.h1
-rw-r--r--sound/soc/sdw_utils/soc_sdw_utils.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h
index e289b453baba..76c64c5245d4 100644
--- a/include/sound/soc_sdw_utils.h
+++ b/include/sound/soc_sdw_utils.h
@@ -169,6 +169,7 @@ int asoc_sdw_count_sdw_endpoints(struct snd_soc_card *card, int *num_devs, int *
struct asoc_sdw_dailink *asoc_sdw_find_dailink(struct asoc_sdw_dailink *dailinks,
const struct snd_soc_acpi_endpoint *new);
+int asoc_sdw_get_dai_type(u32 type);
int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
struct asoc_sdw_dailink *soc_dais,
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
index d2db597f84c0..b75cb5c535d1 100644
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
@@ -1241,7 +1241,7 @@ struct asoc_sdw_dailink *asoc_sdw_find_dailink(struct asoc_sdw_dailink *dailinks
}
EXPORT_SYMBOL_NS(asoc_sdw_find_dailink, "SND_SOC_SDW_UTILS");
-static int asoc_sdw_get_dai_type(u32 type)
+int asoc_sdw_get_dai_type(u32 type)
{
switch (type) {
case SDCA_FUNCTION_TYPE_SMART_AMP:
@@ -1259,6 +1259,7 @@ static int asoc_sdw_get_dai_type(u32 type)
return -EINVAL;
}
}
+EXPORT_SYMBOL_NS(asoc_sdw_get_dai_type, "SND_SOC_SDW_UTILS");
/*
* Check if the SDCA endpoint is present by the SDW peripheral