Skip to content

Commit

Permalink
ASoC: arm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI …
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
morimoto authored and broonie committed Mar 27, 2020
1 parent aafa4ef commit 575be88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/arm/pxa2xx-pcm-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
struct dma_slave_config config;
int ret;

dma_params = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
if (!dma_params)
return 0;

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

snd_dmaengine_pcm_set_config_from_dai_data(substream,
snd_soc_dai_get_dma_data(rtd->cpu_dai, substream),
snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream),
&config);

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

runtime->hw = pxa2xx_pcm_hardware;

dma_params = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
dma_params = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
if (!dma_params)
return 0;

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

return snd_dmaengine_pcm_open(
substream, dma_request_slave_channel(rtd->cpu_dai->dev,
substream, dma_request_slave_channel(asoc_rtd_to_cpu(rtd, 0)->dev,
dma_params->chan_name));
}
EXPORT_SYMBOL(pxa2xx_pcm_open);
Expand Down

0 comments on commit 575be88

Please sign in to comment.