]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: sprd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 23 Mar 2020 05:20:44 +0000 (14:20 +0900)
committerMark Brown <broonie@kernel.org>
Fri, 27 Mar 2020 14:44:48 +0000 (14:44 +0000)
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/87blonir4j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sprd/sprd-pcm-compress.c
sound/soc/sprd/sprd-pcm-dma.c

index 6cddf551bc110e9ef8c18f342b6946fd41d27e9d..74d48340cade5bc7a41a8b3642a7c27969f909f8 100644 (file)
@@ -135,7 +135,7 @@ static int sprd_platform_compr_dma_config(struct snd_compr_stream *cstream,
        struct snd_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, DRV_NAME);
        struct device *dev = component->dev;
-       struct sprd_compr_data *data = snd_soc_dai_get_drvdata(rtd->cpu_dai);
+       struct sprd_compr_data *data = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
        struct sprd_pcm_dma_params *dma_params = data->dma_params;
        struct sprd_compr_dma *dma = &stream->dma[channel];
        struct dma_slave_config config = { };
@@ -321,7 +321,7 @@ static int sprd_platform_compr_open(struct snd_compr_stream *cstream)
        struct snd_soc_component *component =
                snd_soc_rtdcom_lookup(rtd, DRV_NAME);
        struct device *dev = component->dev;
-       struct sprd_compr_data *data = snd_soc_dai_get_drvdata(rtd->cpu_dai);
+       struct sprd_compr_data *data = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
        struct sprd_compr_stream *stream;
        struct sprd_compr_callback cb;
        int stream_id = cstream->direction, ret;
index 2284558684bc876bc518b833b7b947720187b635..d12d3cad8cbd7949f18c50be8d0d7f5bbbbc999d 100644 (file)
@@ -200,7 +200,7 @@ static int sprd_pcm_hw_params(struct snd_soc_component *component,
        unsigned long flags;
        int ret, i, j, sg_num;
 
-       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) {
                dev_warn(component->dev, "no dma parameters setting\n");
                dma_private->params = NULL;