]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: soc_sdw_utils: export asoc_sdw_get_dai_type
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 9 Oct 2025 09:40:19 +0000 (17:40 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 13 Oct 2025 10:23:26 +0000 (11:23 +0100)
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/20251009094023.3474895-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc_sdw_utils.h
sound/soc/sdw_utils/soc_sdw_utils.c

index e289b453babaaa1d678f4505590fb8853053581d..76c64c5245d47c40ec4d6859a97c6ab6600aad56 100644 (file)
@@ -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,
index cd41b0e1677780633925b79862954e0a02addc63..0460e2a8c50a67f90932a3c5cf7db1d26cf9b929 100644 (file)
@@ -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