aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-05-13 09:26:20 -0400
committerMark Brown <broonie@kernel.org>2016-05-13 09:26:20 -0400
commitbf10262159cfd7ed76b777927e7cba628cea85ba (patch)
treec5fdf9e4983ddcba733b313d7ba37ba05b948528 /sound/core
parentf84025ba12ec843daf81511feef764f6b5f1972f (diff)
parent73fe01cfb3babff01748a9fbc95cc3ea2079cc7f (diff)
Merge remote-tracking branch 'asoc/topic/dmaengine' into asoc-next
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_dmaengine.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c
index 697c166acf05..8eb58c709b14 100644
--- a/sound/core/pcm_dmaengine.c
+++ b/sound/core/pcm_dmaengine.c
@@ -106,8 +106,9 @@ EXPORT_SYMBOL_GPL(snd_hwparams_to_dma_slave_config);
106 * direction of the substream. If the substream is a playback stream the dst 106 * direction of the substream. If the substream is a playback stream the dst
107 * fields will be initialized, if it is a capture stream the src fields will be 107 * fields will be initialized, if it is a capture stream the src fields will be
108 * initialized. The {dst,src}_addr_width field will only be initialized if the 108 * initialized. The {dst,src}_addr_width field will only be initialized if the
109 * addr_width field of the DAI DMA data struct is not equal to 109 * SND_DMAENGINE_PCM_DAI_FLAG_PACK flag is set or if the addr_width field of
110 * DMA_SLAVE_BUSWIDTH_UNDEFINED. 110 * the DAI DMA data struct is not equal to DMA_SLAVE_BUSWIDTH_UNDEFINED. If
111 * both conditions are met the latter takes priority.
111 */ 112 */
112void snd_dmaengine_pcm_set_config_from_dai_data( 113void snd_dmaengine_pcm_set_config_from_dai_data(
113 const struct snd_pcm_substream *substream, 114 const struct snd_pcm_substream *substream,
@@ -117,11 +118,17 @@ void snd_dmaengine_pcm_set_config_from_dai_data(
117 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 118 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
118 slave_config->dst_addr = dma_data->addr; 119 slave_config->dst_addr = dma_data->addr;
119 slave_config->dst_maxburst = dma_data->maxburst; 120 slave_config->dst_maxburst = dma_data->maxburst;
121 if (dma_data->flags & SND_DMAENGINE_PCM_DAI_FLAG_PACK)
122 slave_config->dst_addr_width =
123 DMA_SLAVE_BUSWIDTH_UNDEFINED;
120 if (dma_data->addr_width != DMA_SLAVE_BUSWIDTH_UNDEFINED) 124 if (dma_data->addr_width != DMA_SLAVE_BUSWIDTH_UNDEFINED)
121 slave_config->dst_addr_width = dma_data->addr_width; 125 slave_config->dst_addr_width = dma_data->addr_width;
122 } else { 126 } else {
123 slave_config->src_addr = dma_data->addr; 127 slave_config->src_addr = dma_data->addr;
124 slave_config->src_maxburst = dma_data->maxburst; 128 slave_config->src_maxburst = dma_data->maxburst;
129 if (dma_data->flags & SND_DMAENGINE_PCM_DAI_FLAG_PACK)
130 slave_config->src_addr_width =
131 DMA_SLAVE_BUSWIDTH_UNDEFINED;
125 if (dma_data->addr_width != DMA_SLAVE_BUSWIDTH_UNDEFINED) 132 if (dma_data->addr_width != DMA_SLAVE_BUSWIDTH_UNDEFINED)
126 slave_config->src_addr_width = dma_data->addr_width; 133 slave_config->src_addr_width = dma_data->addr_width;
127 } 134 }