Commit 23f020bd authored by Vijendar Mukunda's avatar Vijendar Mukunda Committed by Mark Brown

ASoC: intel: sof_sdw: rename soundwire parsing helper functions

Rename SoundWire parsing helper functions with 'asoc_sdw' tag
to make it generic.
Signed-off-by: default avatarVijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240913090631.1834543-3-Vijendar.Mukunda@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f5c05fd7
...@@ -640,7 +640,7 @@ struct asoc_sdw_dailink { ...@@ -640,7 +640,7 @@ struct asoc_sdw_dailink {
static const char * const type_strings[] = {"SimpleJack", "SmartAmp", "SmartMic"}; static const char * const type_strings[] = {"SimpleJack", "SmartAmp", "SmartMic"};
static int count_sdw_endpoints(struct snd_soc_card *card, int *num_devs, int *num_ends) static int asoc_sdw_count_sdw_endpoints(struct snd_soc_card *card, int *num_devs, int *num_ends)
{ {
struct device *dev = card->dev; struct device *dev = card->dev;
struct snd_soc_acpi_mach *mach = dev_get_platdata(dev); struct snd_soc_acpi_mach *mach = dev_get_platdata(dev);
...@@ -660,7 +660,7 @@ static int count_sdw_endpoints(struct snd_soc_card *card, int *num_devs, int *nu ...@@ -660,7 +660,7 @@ static int count_sdw_endpoints(struct snd_soc_card *card, int *num_devs, int *nu
return 0; return 0;
} }
static struct asoc_sdw_dailink *find_dailink(struct asoc_sdw_dailink *dailinks, static struct asoc_sdw_dailink *asoc_sdw_find_dailink(struct asoc_sdw_dailink *dailinks,
const struct snd_soc_acpi_endpoint *new) const struct snd_soc_acpi_endpoint *new)
{ {
while (dailinks->initialised) { while (dailinks->initialised) {
...@@ -677,7 +677,7 @@ static struct asoc_sdw_dailink *find_dailink(struct asoc_sdw_dailink *dailinks, ...@@ -677,7 +677,7 @@ static struct asoc_sdw_dailink *find_dailink(struct asoc_sdw_dailink *dailinks,
return dailinks; return dailinks;
} }
static int parse_sdw_endpoints(struct snd_soc_card *card, static int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
struct asoc_sdw_dailink *sof_dais, struct asoc_sdw_dailink *sof_dais,
struct asoc_sdw_endpoint *sof_ends, struct asoc_sdw_endpoint *sof_ends,
int *num_devs) int *num_devs)
...@@ -743,7 +743,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card, ...@@ -743,7 +743,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card,
adr_end = &adr_dev->endpoints[j]; adr_end = &adr_dev->endpoints[j];
dai_info = &codec_info->dais[adr_end->num]; dai_info = &codec_info->dais[adr_end->num];
sof_dai = find_dailink(sof_dais, adr_end); sof_dai = asoc_sdw_find_dailink(sof_dais, adr_end);
if (dai_info->quirk && !(dai_info->quirk & sof_sdw_quirk)) if (dai_info->quirk && !(dai_info->quirk & sof_sdw_quirk))
continue; continue;
...@@ -1115,7 +1115,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) ...@@ -1115,7 +1115,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
unsigned long ssp_mask; unsigned long ssp_mask;
int ret; int ret;
ret = count_sdw_endpoints(card, &num_devs, &num_ends); ret = asoc_sdw_count_sdw_endpoints(card, &num_devs, &num_ends);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "failed to count devices/endpoints: %d\n", ret); dev_err(dev, "failed to count devices/endpoints: %d\n", ret);
return ret; return ret;
...@@ -1133,7 +1133,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) ...@@ -1133,7 +1133,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
goto err_dai; goto err_dai;
} }
ret = parse_sdw_endpoints(card, sof_dais, sof_ends, &num_devs); ret = asoc_sdw_parse_sdw_endpoints(card, sof_dais, sof_ends, &num_devs);
if (ret < 0) if (ret < 0)
goto err_end; goto err_end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment