diff options
-rw-r--r-- | sound/soc/ux500/ux500_pcm.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c index 32d457232110..8b53f22edcaf 100644 --- a/sound/soc/ux500/ux500_pcm.c +++ b/sound/soc/ux500/ux500_pcm.c | |||
@@ -108,10 +108,21 @@ static int ux500_pcm_prepare_slave_config(struct snd_pcm_substream *substream, | |||
108 | struct dma_slave_config *slave_config) | 108 | struct dma_slave_config *slave_config) |
109 | { | 109 | { |
110 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 110 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
111 | struct ux500_msp_dma_params *dma_params; | 111 | struct msp_i2s_platform_data *pdata = rtd->cpu_dai->dev->platform_data; |
112 | struct snd_dmaengine_dai_dma_data *snd_dma_params; | ||
113 | struct ux500_msp_dma_params *ste_dma_params; | ||
114 | dma_addr_t dma_addr; | ||
112 | int ret; | 115 | int ret; |
113 | 116 | ||
114 | dma_params = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | 117 | if (pdata) { |
118 | ste_dma_params = | ||
119 | snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | ||
120 | dma_addr = ste_dma_params->tx_rx_addr; | ||
121 | } else { | ||
122 | snd_dma_params = | ||
123 | snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | ||
124 | dma_addr = snd_dma_params->addr; | ||
125 | } | ||
115 | 126 | ||
116 | ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config); | 127 | ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config); |
117 | if (ret) | 128 | if (ret) |
@@ -124,9 +135,9 @@ static int ux500_pcm_prepare_slave_config(struct snd_pcm_substream *substream, | |||
124 | slave_config->dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | 135 | slave_config->dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; |
125 | 136 | ||
126 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 137 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
127 | slave_config->dst_addr = dma_params->tx_rx_addr; | 138 | slave_config->dst_addr = dma_addr; |
128 | else | 139 | else |
129 | slave_config->src_addr = dma_params->tx_rx_addr; | 140 | slave_config->src_addr = dma_addr; |
130 | 141 | ||
131 | return 0; | 142 | return 0; |
132 | } | 143 | } |