]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - sound/soc/fsl/mpc5200_dma.c
ASoC: fsl: use asoc_substream_to_rtd()
[mirror_ubuntu-hirsute-kernel.git] / sound / soc / fsl / mpc5200_dma.c
index 3b8c796d7829f5c096e9337ee3d92aa9ad97442c..9e4f66b6b92b00f6da379c637f2d51bfde6aba1f 100644 (file)
@@ -114,7 +114,7 @@ static int psc_dma_hw_free(struct snd_soc_component *component,
 static int psc_dma_trigger(struct snd_soc_component *component,
                           struct snd_pcm_substream *substream, int cmd)
 {
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
        struct snd_pcm_runtime *runtime = substream->runtime;
        struct psc_dma_stream *s = to_psc_dma_stream(substream, psc_dma);
@@ -216,7 +216,7 @@ static int psc_dma_open(struct snd_soc_component *component,
                        struct snd_pcm_substream *substream)
 {
        struct snd_pcm_runtime *runtime = substream->runtime;
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
        struct psc_dma_stream *s;
        int rc;
@@ -244,7 +244,7 @@ static int psc_dma_open(struct snd_soc_component *component,
 static int psc_dma_close(struct snd_soc_component *component,
                         struct snd_pcm_substream *substream)
 {
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
        struct psc_dma_stream *s;
 
@@ -270,7 +270,7 @@ static snd_pcm_uframes_t
 psc_dma_pointer(struct snd_soc_component *component,
                struct snd_pcm_substream *substream)
 {
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
        struct psc_dma_stream *s;
        dma_addr_t count;