Skip to content

Commit 575be88

Browse files
morimotobroonie
authored andcommitted
ASoC: arm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
Signed-off-by: Kuninori Morimoto <[email protected]> Tested-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent aafa4ef commit 575be88

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/arm/pxa2xx-pcm-lib.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
3838
struct dma_slave_config config;
3939
int ret;
4040

41-
dma_params = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
41+
dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
4242
if (!dma_params)
4343
return 0;
4444

@@ -47,7 +47,7 @@ int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
4747
return ret;
4848

4949
snd_dmaengine_pcm_set_config_from_dai_data(substream,
50-
snd_soc_dai_get_dma_data(rtd->cpu_dai, substream),
50+
snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream),
5151
&config);
5252

5353
ret = dmaengine_slave_config(chan, &config);
@@ -95,7 +95,7 @@ int pxa2xx_pcm_open(struct snd_pcm_substream *substream)
9595

9696
runtime->hw = pxa2xx_pcm_hardware;
9797

98-
dma_params = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
98+
dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
9999
if (!dma_params)
100100
return 0;
101101

@@ -120,7 +120,7 @@ int pxa2xx_pcm_open(struct snd_pcm_substream *substream)
120120
return ret;
121121

122122
return snd_dmaengine_pcm_open(
123-
substream, dma_request_slave_channel(rtd->cpu_dai->dev,
123+
substream, dma_request_slave_channel(asoc_rtd_to_cpu(rtd, 0)->dev,
124124
dma_params->chan_name));
125125
}
126126
EXPORT_SYMBOL(pxa2xx_pcm_open);

0 commit comments

Comments
 (0)