Unverified Commit 5ed60e45 authored by Bard Liao's avatar Bard Liao Committed by Mark Brown
Browse files

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: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarSimon Trimmer <simont@opensource.cirrus.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20251009094023.3474895-6-yung-chuan.liao@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7196fc4e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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,
+2 −1
Original line number Diff line number Diff line
@@ -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