.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) ST-Ericsson SA 2012 |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * for ST-Ericsson. |
---|
7 | 8 | * |
---|
8 | 9 | * License terms: |
---|
9 | | - * |
---|
10 | | - * This program is free software; you can redistribute it and/or modify |
---|
11 | | - * it under the terms of the GNU General Public License version 2 as published |
---|
12 | | - * by the Free Software Foundation. |
---|
13 | 10 | */ |
---|
14 | 11 | |
---|
15 | 12 | #include <asm/page.h> |
---|
.. | .. |
---|
49 | 46 | static struct dma_chan *ux500_pcm_request_chan(struct snd_soc_pcm_runtime *rtd, |
---|
50 | 47 | struct snd_pcm_substream *substream) |
---|
51 | 48 | { |
---|
52 | | - struct snd_soc_dai *dai = rtd->cpu_dai; |
---|
| 49 | + struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0); |
---|
53 | 50 | u16 per_data_width, mem_data_width; |
---|
54 | 51 | struct stedma40_chan_cfg *dma_cfg; |
---|
55 | 52 | struct ux500_msp_dma_params *dma_params; |
---|
.. | .. |
---|
88 | 85 | struct snd_pcm_hw_params *params, |
---|
89 | 86 | struct dma_slave_config *slave_config) |
---|
90 | 87 | { |
---|
91 | | - struct snd_soc_pcm_runtime *rtd = substream->private_data; |
---|
92 | | - struct msp_i2s_platform_data *pdata = rtd->cpu_dai->dev->platform_data; |
---|
| 88 | + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); |
---|
| 89 | + struct msp_i2s_platform_data *pdata = asoc_rtd_to_cpu(rtd, 0)->dev->platform_data; |
---|
93 | 90 | struct snd_dmaengine_dai_dma_data *snd_dma_params; |
---|
94 | 91 | struct ux500_msp_dma_params *ste_dma_params; |
---|
95 | 92 | dma_addr_t dma_addr; |
---|
.. | .. |
---|
97 | 94 | |
---|
98 | 95 | if (pdata) { |
---|
99 | 96 | ste_dma_params = |
---|
100 | | - snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
---|
| 97 | + snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); |
---|
101 | 98 | dma_addr = ste_dma_params->tx_rx_addr; |
---|
102 | 99 | } else { |
---|
103 | 100 | snd_dma_params = |
---|
104 | | - snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
---|
| 101 | + snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream); |
---|
105 | 102 | dma_addr = snd_dma_params->addr; |
---|
106 | 103 | } |
---|
107 | 104 | |
---|