ASoC: meson: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87mu87ir6j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c8ac82127c
commit
385a5c60ad
|
@ -26,7 +26,7 @@ static struct snd_soc_dai *aiu_fifo_dai(struct snd_pcm_substream *ss)
|
||||||
{
|
{
|
||||||
struct snd_soc_pcm_runtime *rtd = ss->private_data;
|
struct snd_soc_pcm_runtime *rtd = ss->private_data;
|
||||||
|
|
||||||
return rtd->cpu_dai;
|
return asoc_rtd_to_cpu(rtd, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_pcm_uframes_t aiu_fifo_pointer(struct snd_soc_component *component,
|
snd_pcm_uframes_t aiu_fifo_pointer(struct snd_soc_component *component,
|
||||||
|
|
|
@ -72,10 +72,10 @@ static int axg_card_tdm_dai_init(struct snd_soc_pcm_runtime *rtd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = axg_tdm_set_tdm_slots(rtd->cpu_dai, be->tx_mask, be->rx_mask,
|
ret = axg_tdm_set_tdm_slots(asoc_rtd_to_cpu(rtd, 0), be->tx_mask, be->rx_mask,
|
||||||
be->slots, be->slot_width);
|
be->slots, be->slot_width);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(rtd->cpu_dai->dev, "setting tdm link slots failed\n");
|
dev_err(asoc_rtd_to_cpu(rtd, 0)->dev, "setting tdm link slots failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,10 +90,10 @@ static int axg_card_tdm_dai_lb_init(struct snd_soc_pcm_runtime *rtd)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* The loopback rx_mask is the pad tx_mask */
|
/* The loopback rx_mask is the pad tx_mask */
|
||||||
ret = axg_tdm_set_tdm_slots(rtd->cpu_dai, NULL, be->tx_mask,
|
ret = axg_tdm_set_tdm_slots(asoc_rtd_to_cpu(rtd, 0), NULL, be->tx_mask,
|
||||||
be->slots, be->slot_width);
|
be->slots, be->slot_width);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(rtd->cpu_dai->dev, "setting tdm link slots failed\n");
|
dev_err(asoc_rtd_to_cpu(rtd, 0)->dev, "setting tdm link slots failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ static struct snd_soc_dai *axg_fifo_dai(struct snd_pcm_substream *ss)
|
||||||
{
|
{
|
||||||
struct snd_soc_pcm_runtime *rtd = ss->private_data;
|
struct snd_soc_pcm_runtime *rtd = ss->private_data;
|
||||||
|
|
||||||
return rtd->cpu_dai;
|
return asoc_rtd_to_cpu(rtd, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct axg_fifo *axg_fifo_data(struct snd_pcm_substream *ss)
|
static struct axg_fifo *axg_fifo_data(struct snd_pcm_substream *ss)
|
||||||
|
|
|
@ -30,7 +30,7 @@ int meson_card_i2s_set_sysclk(struct snd_pcm_substream *substream,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = snd_soc_dai_set_sysclk(rtd->cpu_dai, 0, mclk,
|
ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), 0, mclk,
|
||||||
SND_SOC_CLOCK_OUT);
|
SND_SOC_CLOCK_OUT);
|
||||||
if (ret && ret != -ENOTSUPP)
|
if (ret && ret != -ENOTSUPP)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue