mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
sound: soc: Avoid uses of asoc_xxx()
From Linux 6.7, the asoc_xxx() is replaced by the various function. Use the appropriate functions. *** commit 1d5a2b5dd0a8d2b2b535b5266699429dbd48e62f Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ASoC: soc.h: convert asoc_xxx() to snd_soc_xxx() Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> ASoC: simple_card_utils.h: convert not to use asoc_xxx() *** Bug 4346767 Change-Id: Ie3945f3997d745df8223fd31c1386a3db44e6ceb Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019997 Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
1d4285fa30
commit
36d1775879
@@ -37,13 +37,21 @@ static int tegra_alt_pcm_open(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct tegra_alt_pcm_dma_params *dmap;
|
||||
struct dma_chan *chan;
|
||||
#if defined(NV_ASOC_XXX_DROP)
|
||||
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
|
||||
#else
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
if (rtd->dai_link->no_pcm)
|
||||
return 0;
|
||||
|
||||
#if defined(NV_ASOC_XXX_DROP)
|
||||
dmap = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream);
|
||||
#else
|
||||
dmap = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
|
||||
#endif
|
||||
|
||||
/* Set HW params now that initialization is complete */
|
||||
snd_soc_set_runtime_hwparams(substream, &tegra_alt_pcm_hardware);
|
||||
@@ -106,7 +114,11 @@ static int tegra_alt_pcm_hw_params(struct snd_soc_component *component,
|
||||
if (rtd->dai_link->no_pcm)
|
||||
return 0;
|
||||
|
||||
#if defined(NV_ASOC_XXX_DROP)
|
||||
dmap = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream);
|
||||
#else
|
||||
dmap = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
|
||||
#endif
|
||||
if (!dmap)
|
||||
return 0;
|
||||
|
||||
@@ -249,8 +261,13 @@ static int tegra_alt_pcm_dma_allocate(struct snd_soc_pcm_runtime *rtd,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
#if defined(NV_ASOC_XXX_DROP)
|
||||
dmap = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0),
|
||||
pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream);
|
||||
#else
|
||||
dmap = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0),
|
||||
pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream);
|
||||
#endif
|
||||
if (dmap->buffer_size > size)
|
||||
buffer_size = dmap->buffer_size;
|
||||
if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
|
||||
@@ -261,8 +278,13 @@ static int tegra_alt_pcm_dma_allocate(struct snd_soc_pcm_runtime *rtd,
|
||||
goto err;
|
||||
}
|
||||
|
||||
#if defined(NV_ASOC_XXX_DROP)
|
||||
dmap = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0),
|
||||
pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
|
||||
#else
|
||||
dmap = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0),
|
||||
pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
|
||||
#endif
|
||||
if (dmap->buffer_size > size)
|
||||
buffer_size = dmap->buffer_size;
|
||||
if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
|
||||
|
||||
@@ -203,9 +203,14 @@ static int tegra_virt_machine_driver_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
list_for_each_entry(rtd, &card->rtd_list, list) {
|
||||
#if defined(NV_ASOC_XXX_DROP)
|
||||
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
|
||||
#else
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai_driver *codec_drv = codec_dai->driver;
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
#endif
|
||||
struct snd_soc_dai_driver *codec_drv = codec_dai->driver;
|
||||
struct snd_soc_dai_driver *cpu_drv = cpu_dai->driver;
|
||||
|
||||
cpu_drv->playback.rates = SNDRV_PCM_RATE_KNOT;
|
||||
|
||||
@@ -498,18 +498,32 @@ 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)
|
||||
ret = simple_util_set_dailink_name(
|
||||
&pdev->dev, dai_link, "%s-%d",
|
||||
"tegra-dlink", link_count);
|
||||
#else
|
||||
ret = asoc_simple_set_dailink_name(
|
||||
&pdev->dev, dai_link, "%s-%d",
|
||||
"tegra-dlink", link_count);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
#if defined(NV_ASOC_XXX_DROP)
|
||||
simple_util_parse_daifmt(&pdev->dev, link_node, codec,
|
||||
NULL, &dai_link->dai_fmt);
|
||||
|
||||
simple_util_canonicalize_platform(dai_link->platforms,
|
||||
dai_link->cpus);
|
||||
#else
|
||||
asoc_simple_parse_daifmt(&pdev->dev, link_node, codec,
|
||||
NULL, &dai_link->dai_fmt);
|
||||
|
||||
asoc_simple_canonicalize_platform(dai_link->platforms,
|
||||
dai_link->cpus);
|
||||
#endif
|
||||
|
||||
of_property_read_u32(link_node, "link-type",
|
||||
&link_type);
|
||||
@@ -582,7 +596,11 @@ 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)
|
||||
ret = simple_util_parse_card_name(card, PREFIX);
|
||||
#else
|
||||
ret = asoc_simple_parse_card_name(card, PREFIX);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -22,8 +22,13 @@
|
||||
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 (rtd->card->component_chaining)
|
||||
return simple_util_dai_init(rtd);
|
||||
#else
|
||||
if (rtd->card->component_chaining)
|
||||
return asoc_simple_dai_init(rtd);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user