Commit 436f4c70 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: tegra: convert not to use asoc_xxx()

ASoC is now unified asoc_xxx() into snd_soc_xxx().
This patch convert asoc_xxx() to snd_soc_xxx().
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87msxsqni9.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 79123714
......@@ -288,7 +288,7 @@ static int tegra_machine_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
struct snd_soc_card *card = rtd->card;
struct tegra_machine *machine = snd_soc_card_get_drvdata(card);
unsigned int srate = params_rate(params);
......
......@@ -34,7 +34,7 @@ enum srate_type {
};
struct tegra_audio_priv {
struct asoc_simple_priv simple;
struct simple_util_priv simple;
struct clk *clk_plla_out0;
struct clk *clk_plla;
};
......@@ -64,8 +64,8 @@ static bool need_clk_update(struct snd_soc_dai *dai)
static int tegra_audio_graph_update_pll(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct asoc_simple_priv *simple = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct simple_util_priv *simple = snd_soc_card_get_drvdata(rtd->card);
struct tegra_audio_priv *priv = simple_to_tegra_priv(simple);
struct device *dev = rtd->card->dev;
const struct tegra_audio_cdata *data = of_device_get_match_data(dev);
......@@ -152,8 +152,8 @@ static int tegra_audio_graph_update_pll(struct snd_pcm_substream *substream,
static int tegra_audio_graph_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
int err;
if (need_clk_update(cpu_dai)) {
......@@ -162,18 +162,18 @@ static int tegra_audio_graph_hw_params(struct snd_pcm_substream *substream,
return err;
}
return asoc_simple_hw_params(substream, params);
return simple_util_hw_params(substream, params);
}
static const struct snd_soc_ops tegra_audio_graph_ops = {
.startup = asoc_simple_startup,
.shutdown = asoc_simple_shutdown,
.startup = simple_util_startup,
.shutdown = simple_util_shutdown,
.hw_params = tegra_audio_graph_hw_params,
};
static int tegra_audio_graph_card_probe(struct snd_soc_card *card)
{
struct asoc_simple_priv *simple = snd_soc_card_get_drvdata(card);
struct simple_util_priv *simple = snd_soc_card_get_drvdata(card);
struct tegra_audio_priv *priv = simple_to_tegra_priv(simple);
priv->clk_plla = devm_clk_get(card->dev, "pll_a");
......@@ -188,7 +188,7 @@ static int tegra_audio_graph_card_probe(struct snd_soc_card *card)
return PTR_ERR(priv->clk_plla_out0);
}
return asoc_graph_card_probe(card);
return graph_util_card_probe(card);
}
static int tegra_audio_graph_probe(struct platform_device *pdev)
......@@ -248,7 +248,7 @@ static struct platform_driver tegra_audio_graph_card = {
.of_match_table = graph_of_tegra_match,
},
.probe = tegra_audio_graph_probe,
.remove = asoc_simple_remove,
.remove = simple_util_remove,
};
module_platform_driver(tegra_audio_graph_card);
......
......@@ -79,7 +79,7 @@ int tegra_pcm_open(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_dmaengine_dai_dma_data *dmap;
struct dma_chan *chan;
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
int ret;
if (rtd->dai_link->no_pcm)
......@@ -151,7 +151,7 @@ int tegra_pcm_hw_params(struct snd_soc_component *component,
if (rtd->dai_link->no_pcm)
return 0;
dmap = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
dmap = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream);
if (!dmap)
return 0;
......
......@@ -75,7 +75,7 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
return err;
if (!machine->gpiod_mic_det && machine->asoc->add_mic_jack) {
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
struct snd_soc_component *component = codec_dai->component;
int shrt = 0;
......@@ -105,7 +105,7 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
{
struct snd_soc_dai_link *link = &card->dai_link[0];
struct snd_soc_pcm_runtime *rtd = snd_soc_get_pcm_runtime(card, link);
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
struct snd_soc_component *component = codec_dai->component;
wm8903_mic_detect(component, NULL, 0, 0);
......
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