diff options
author | Vinod Koul <vinod.koul@linux.intel.com> | 2011-10-14 01:19:30 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2011-10-31 00:10:27 -0400 |
commit | 35e16581ed6bff55009a0bac34c755140407b03f (patch) | |
tree | a3d8e027d102e618c9602a0bbf8e693640c8a3d5 /sound/soc | |
parent | a485df4b4404379786c4bdd258bc528b2617449d (diff) |
sound-soc: move to dma_transfer_direction
fixup usage of dma direction by introducing dma_transfer_direction,
this patch moves asoc drivers to use new enum
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/ep93xx/ep93xx-pcm.c | 4 | ||||
-rw-r--r-- | sound/soc/imx/imx-pcm-dma-mx2.c | 6 | ||||
-rw-r--r-- | sound/soc/samsung/dma.c | 4 | ||||
-rw-r--r-- | sound/soc/sh/siu_pcm.c | 4 | ||||
-rw-r--r-- | sound/soc/txx9/txx9aclc.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/ep93xx/ep93xx-pcm.c b/sound/soc/ep93xx/ep93xx-pcm.c index 8dfd3ad84b19..faf7d4f7412b 100644 --- a/sound/soc/ep93xx/ep93xx-pcm.c +++ b/sound/soc/ep93xx/ep93xx-pcm.c | |||
@@ -113,9 +113,9 @@ static int ep93xx_pcm_open(struct snd_pcm_substream *substream) | |||
113 | rtd->dma_data.name = dma_params->name; | 113 | rtd->dma_data.name = dma_params->name; |
114 | 114 | ||
115 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 115 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
116 | rtd->dma_data.direction = DMA_TO_DEVICE; | 116 | rtd->dma_data.direction = DMA_MEM_TO_DEV; |
117 | else | 117 | else |
118 | rtd->dma_data.direction = DMA_FROM_DEVICE; | 118 | rtd->dma_data.direction = DMA_DEV_TO_MEM; |
119 | 119 | ||
120 | rtd->dma_chan = dma_request_channel(mask, ep93xx_pcm_dma_filter, | 120 | rtd->dma_chan = dma_request_channel(mask, ep93xx_pcm_dma_filter, |
121 | &rtd->dma_data); | 121 | &rtd->dma_data); |
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index 43fdc24f7e8d..7d28de9758f3 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c | |||
@@ -107,12 +107,12 @@ static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream, | |||
107 | } | 107 | } |
108 | 108 | ||
109 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 109 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
110 | slave_config.direction = DMA_TO_DEVICE; | 110 | slave_config.direction = DMA_MEM_TO_DEV; |
111 | slave_config.dst_addr = dma_params->dma_addr; | 111 | slave_config.dst_addr = dma_params->dma_addr; |
112 | slave_config.dst_addr_width = buswidth; | 112 | slave_config.dst_addr_width = buswidth; |
113 | slave_config.dst_maxburst = dma_params->burstsize; | 113 | slave_config.dst_maxburst = dma_params->burstsize; |
114 | } else { | 114 | } else { |
115 | slave_config.direction = DMA_FROM_DEVICE; | 115 | slave_config.direction = DMA_DEV_TO_MEM; |
116 | slave_config.src_addr = dma_params->dma_addr; | 116 | slave_config.src_addr = dma_params->dma_addr; |
117 | slave_config.src_addr_width = buswidth; | 117 | slave_config.src_addr_width = buswidth; |
118 | slave_config.src_maxburst = dma_params->burstsize; | 118 | slave_config.src_maxburst = dma_params->burstsize; |
@@ -159,7 +159,7 @@ static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
159 | iprtd->period_bytes * iprtd->periods, | 159 | iprtd->period_bytes * iprtd->periods, |
160 | iprtd->period_bytes, | 160 | iprtd->period_bytes, |
161 | substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? | 161 | substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? |
162 | DMA_TO_DEVICE : DMA_FROM_DEVICE); | 162 | DMA_MEM_TO_DEV : DMA_DEV_TO_MEM); |
163 | if (!iprtd->desc) { | 163 | if (!iprtd->desc) { |
164 | dev_err(&chan->dev->device, "cannot prepare slave dma\n"); | 164 | dev_err(&chan->dev->device, "cannot prepare slave dma\n"); |
165 | return -EINVAL; | 165 | return -EINVAL; |
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index 851346f7d68d..87a39575fb61 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c | |||
@@ -85,7 +85,7 @@ static void dma_enqueue(struct snd_pcm_substream *substream) | |||
85 | dma_info.cap = (samsung_dma_has_circular() ? DMA_CYCLIC : DMA_SLAVE); | 85 | dma_info.cap = (samsung_dma_has_circular() ? DMA_CYCLIC : DMA_SLAVE); |
86 | dma_info.direction = | 86 | dma_info.direction = |
87 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK | 87 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK |
88 | ? DMA_TO_DEVICE : DMA_FROM_DEVICE); | 88 | ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM); |
89 | dma_info.fp = audio_buffdone; | 89 | dma_info.fp = audio_buffdone; |
90 | dma_info.fp_param = substream; | 90 | dma_info.fp_param = substream; |
91 | dma_info.period = prtd->dma_period; | 91 | dma_info.period = prtd->dma_period; |
@@ -170,7 +170,7 @@ static int dma_hw_params(struct snd_pcm_substream *substream, | |||
170 | dma_info.client = prtd->params->client; | 170 | dma_info.client = prtd->params->client; |
171 | dma_info.direction = | 171 | dma_info.direction = |
172 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK | 172 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK |
173 | ? DMA_TO_DEVICE : DMA_FROM_DEVICE); | 173 | ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM); |
174 | dma_info.width = prtd->params->dma_size; | 174 | dma_info.width = prtd->params->dma_size; |
175 | dma_info.fifo = prtd->params->dma_addr; | 175 | dma_info.fifo = prtd->params->dma_addr; |
176 | prtd->params->ch = prtd->params->ops->request( | 176 | prtd->params->ch = prtd->params->ops->request( |
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index f8f681690a71..0193e595d415 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c | |||
@@ -131,7 +131,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info, | |||
131 | sg_dma_address(&sg) = buff; | 131 | sg_dma_address(&sg) = buff; |
132 | 132 | ||
133 | desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, | 133 | desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, |
134 | &sg, 1, DMA_TO_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 134 | &sg, 1, DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
135 | if (!desc) { | 135 | if (!desc) { |
136 | dev_err(dev, "Failed to allocate a dma descriptor\n"); | 136 | dev_err(dev, "Failed to allocate a dma descriptor\n"); |
137 | return -ENOMEM; | 137 | return -ENOMEM; |
@@ -181,7 +181,7 @@ static int siu_pcm_rd_set(struct siu_port *port_info, | |||
181 | sg_dma_address(&sg) = buff; | 181 | sg_dma_address(&sg) = buff; |
182 | 182 | ||
183 | desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, | 183 | desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, |
184 | &sg, 1, DMA_FROM_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 184 | &sg, 1, DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
185 | if (!desc) { | 185 | if (!desc) { |
186 | dev_err(dev, "Failed to allocate dma descriptor\n"); | 186 | dev_err(dev, "Failed to allocate dma descriptor\n"); |
187 | return -ENOMEM; | 187 | return -ENOMEM; |
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c index 3de99af8cb82..602bb68b8784 100644 --- a/sound/soc/txx9/txx9aclc.c +++ b/sound/soc/txx9/txx9aclc.c | |||
@@ -134,7 +134,7 @@ txx9aclc_dma_submit(struct txx9aclc_dmadata *dmadata, dma_addr_t buf_dma_addr) | |||
134 | sg_dma_address(&sg) = buf_dma_addr; | 134 | sg_dma_address(&sg) = buf_dma_addr; |
135 | desc = chan->device->device_prep_slave_sg(chan, &sg, 1, | 135 | desc = chan->device->device_prep_slave_sg(chan, &sg, 1, |
136 | dmadata->substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? | 136 | dmadata->substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? |
137 | DMA_TO_DEVICE : DMA_FROM_DEVICE, | 137 | DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, |
138 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 138 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
139 | if (!desc) { | 139 | if (!desc) { |
140 | dev_err(&chan->dev->device, "cannot prepare slave dma\n"); | 140 | dev_err(&chan->dev->device, "cannot prepare slave dma\n"); |