From: Bard Liao Date: Thu, 9 Oct 2025 09:40:19 +0000 (+0800) Subject: ASoC: soc_sdw_utils: export asoc_sdw_get_dai_type X-Git-Tag: v6.19-rc1~156^2~3^2~110^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ed60e45c59d66e61586a10433e2b5527d4d72b5;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Simon Trimmer Reviewed-by: Ranjani Sridharan Link: https://patch.msgid.link/20251009094023.3474895-6-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index e289b453babaa..76c64c5245d47 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 cd41b0e167778..0460e2a8c50a6 100644 --- a/sound/soc/sdw_utils/soc_sdw_utils.c +++ b/sound/soc/sdw_utils/soc_sdw_utils.c @@ -1239,7 +1239,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: @@ -1257,6 +1257,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