sound: soc: Use conftest to find if asoc_simple_xxx renamed

In Linux v6.7, commit b5a95c5bf6d69 ("ASoC: simple_card_utils.h: convert
not to use asoc_xxx()") add new APIs to convert asoc_simple_xxx() to
simple_util_xxx().

Use the conftest to find if soc_snd_util_xxx() present.

Bug 4346767

Change-Id: I3b282eb08d51c997760cc0b9752438c94e3caae5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028578
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-12-05 13:35:41 +00:00
committed by mobile promotions
parent e225408ff7
commit 3013b107c1
5 changed files with 24 additions and 6 deletions

View File

@@ -498,7 +498,7 @@ static int parse_dt_dai_links(struct snd_soc_card *card,
if (of_property_read_string(link_node,
"link-name",
&dai_link->name)) {
#if defined(NV_ASOC_XXX_DROP)
#if defined(NV_ASOC_SIMPLE_RENAMED_SIMPLE) /* Linux 6.7 */
ret = simple_util_set_dailink_name(
&pdev->dev, dai_link, "%s-%d",
"tegra-dlink", link_count);
@@ -511,7 +511,7 @@ static int parse_dt_dai_links(struct snd_soc_card *card,
goto cleanup;
}
#if defined(NV_ASOC_XXX_DROP)
#if defined(NV_ASOC_SIMPLE_RENAMED_SIMPLE) /* Linux 6.7 */
simple_util_parse_daifmt(&pdev->dev, link_node, codec,
NULL, &dai_link->dai_fmt);
@@ -596,7 +596,7 @@ int parse_card_info(struct snd_soc_card *card, struct snd_soc_ops *pcm_ops,
struct device_node *node = card->dev->of_node;
int ret;
#if defined(NV_ASOC_XXX_DROP)
#if defined(NV_ASOC_SIMPLE_RENAMED_SIMPLE) /* Linux 6.7 */
ret = simple_util_parse_card_name(card, PREFIX);
#else
ret = asoc_simple_parse_card_name(card, PREFIX);

View File

@@ -22,7 +22,7 @@
static int tegra_audio_dai_init(struct snd_soc_pcm_runtime *rtd)
{
/* Used for audio graph based sound cards only */
#if defined(NV_ASOC_XXX_DROP)
#if defined(NV_ASOC_SIMPLE_RENAMED_SIMPLE) /* Linux 6.7 */
if (rtd->card->component_chaining)
return simple_util_dai_init(rtd);
#else