diff options
author | Vinod Koul <vinod.koul@linux.intel.com> | 2011-11-17 04:24:38 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2011-11-17 04:24:57 -0500 |
commit | e0d23ef29ed637dc6bd739f590985746d9ad9caa (patch) | |
tree | c5b5856dc88582697997bb10ccacad6fc2535465 /sound | |
parent | ca7fe2db892dcf91b2c72ee352eda4ff867903a7 (diff) | |
parent | 55ba4e5ed4ac57b60fe56acfd324f6a87123cc34 (diff) |
Merge branch 'dma_slave_direction' into next_test_dirn
resolved conflicts:
drivers/media/video/mx3_camera.c
Diffstat (limited to 'sound')
-rw-r--r-- | sound/atmel/abdac.c | 2 | ||||
-rw-r--r-- | sound/atmel/ac97c.c | 10 | ||||
-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 |
7 files changed, 16 insertions, 16 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index 6fd9391b3a6c..4fa1dbd8ee83 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
@@ -133,7 +133,7 @@ static int atmel_abdac_prepare_dma(struct atmel_abdac *dac, | |||
133 | period_len = frames_to_bytes(runtime, runtime->period_size); | 133 | period_len = frames_to_bytes(runtime, runtime->period_size); |
134 | 134 | ||
135 | cdesc = dw_dma_cyclic_prep(chan, runtime->dma_addr, buffer_len, | 135 | cdesc = dw_dma_cyclic_prep(chan, runtime->dma_addr, buffer_len, |
136 | period_len, DMA_TO_DEVICE); | 136 | period_len, DMA_MEM_TO_DEV); |
137 | if (IS_ERR(cdesc)) { | 137 | if (IS_ERR(cdesc)) { |
138 | dev_dbg(&dac->pdev->dev, "could not prepare cyclic DMA\n"); | 138 | dev_dbg(&dac->pdev->dev, "could not prepare cyclic DMA\n"); |
139 | return PTR_ERR(cdesc); | 139 | return PTR_ERR(cdesc); |
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 6e5addeb236b..cd9428b24a36 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
@@ -102,7 +102,7 @@ static void atmel_ac97c_dma_capture_period_done(void *arg) | |||
102 | 102 | ||
103 | static int atmel_ac97c_prepare_dma(struct atmel_ac97c *chip, | 103 | static int atmel_ac97c_prepare_dma(struct atmel_ac97c *chip, |
104 | struct snd_pcm_substream *substream, | 104 | struct snd_pcm_substream *substream, |
105 | enum dma_data_direction direction) | 105 | enum dma_transfer_direction direction) |
106 | { | 106 | { |
107 | struct dma_chan *chan; | 107 | struct dma_chan *chan; |
108 | struct dw_cyclic_desc *cdesc; | 108 | struct dw_cyclic_desc *cdesc; |
@@ -118,7 +118,7 @@ static int atmel_ac97c_prepare_dma(struct atmel_ac97c *chip, | |||
118 | return -EINVAL; | 118 | return -EINVAL; |
119 | } | 119 | } |
120 | 120 | ||
121 | if (direction == DMA_TO_DEVICE) | 121 | if (direction == DMA_MEM_TO_DEV) |
122 | chan = chip->dma.tx_chan; | 122 | chan = chip->dma.tx_chan; |
123 | else | 123 | else |
124 | chan = chip->dma.rx_chan; | 124 | chan = chip->dma.rx_chan; |
@@ -133,7 +133,7 @@ static int atmel_ac97c_prepare_dma(struct atmel_ac97c *chip, | |||
133 | return PTR_ERR(cdesc); | 133 | return PTR_ERR(cdesc); |
134 | } | 134 | } |
135 | 135 | ||
136 | if (direction == DMA_TO_DEVICE) { | 136 | if (direction == DMA_MEM_TO_DEV) { |
137 | cdesc->period_callback = atmel_ac97c_dma_playback_period_done; | 137 | cdesc->period_callback = atmel_ac97c_dma_playback_period_done; |
138 | set_bit(DMA_TX_READY, &chip->flags); | 138 | set_bit(DMA_TX_READY, &chip->flags); |
139 | } else { | 139 | } else { |
@@ -393,7 +393,7 @@ static int atmel_ac97c_playback_prepare(struct snd_pcm_substream *substream) | |||
393 | if (cpu_is_at32ap7000()) { | 393 | if (cpu_is_at32ap7000()) { |
394 | if (!test_bit(DMA_TX_READY, &chip->flags)) | 394 | if (!test_bit(DMA_TX_READY, &chip->flags)) |
395 | retval = atmel_ac97c_prepare_dma(chip, substream, | 395 | retval = atmel_ac97c_prepare_dma(chip, substream, |
396 | DMA_TO_DEVICE); | 396 | DMA_MEM_TO_DEV); |
397 | } else { | 397 | } else { |
398 | /* Initialize and start the PDC */ | 398 | /* Initialize and start the PDC */ |
399 | writel(runtime->dma_addr, chip->regs + ATMEL_PDC_TPR); | 399 | writel(runtime->dma_addr, chip->regs + ATMEL_PDC_TPR); |
@@ -484,7 +484,7 @@ static int atmel_ac97c_capture_prepare(struct snd_pcm_substream *substream) | |||
484 | if (cpu_is_at32ap7000()) { | 484 | if (cpu_is_at32ap7000()) { |
485 | if (!test_bit(DMA_RX_READY, &chip->flags)) | 485 | if (!test_bit(DMA_RX_READY, &chip->flags)) |
486 | retval = atmel_ac97c_prepare_dma(chip, substream, | 486 | retval = atmel_ac97c_prepare_dma(chip, substream, |
487 | DMA_FROM_DEVICE); | 487 | DMA_DEV_TO_MEM); |
488 | } else { | 488 | } else { |
489 | /* Initialize and start the PDC */ | 489 | /* Initialize and start the PDC */ |
490 | writel(runtime->dma_addr, chip->regs + ATMEL_PDC_RPR); | 490 | writel(runtime->dma_addr, chip->regs + ATMEL_PDC_RPR); |
diff --git a/sound/soc/ep93xx/ep93xx-pcm.c b/sound/soc/ep93xx/ep93xx-pcm.c index d00230a591b1..23de7927810c 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 a68b26441784..d400ed0a71f2 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c | |||
@@ -86,7 +86,7 @@ static void dma_enqueue(struct snd_pcm_substream *substream) | |||
86 | dma_info.cap = (samsung_dma_has_circular() ? DMA_CYCLIC : DMA_SLAVE); | 86 | dma_info.cap = (samsung_dma_has_circular() ? DMA_CYCLIC : DMA_SLAVE); |
87 | dma_info.direction = | 87 | dma_info.direction = |
88 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK | 88 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK |
89 | ? DMA_TO_DEVICE : DMA_FROM_DEVICE); | 89 | ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM); |
90 | dma_info.fp = audio_buffdone; | 90 | dma_info.fp = audio_buffdone; |
91 | dma_info.fp_param = substream; | 91 | dma_info.fp_param = substream; |
92 | dma_info.period = prtd->dma_period; | 92 | dma_info.period = prtd->dma_period; |
@@ -171,7 +171,7 @@ static int dma_hw_params(struct snd_pcm_substream *substream, | |||
171 | dma_info.client = prtd->params->client; | 171 | dma_info.client = prtd->params->client; |
172 | dma_info.direction = | 172 | dma_info.direction = |
173 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK | 173 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK |
174 | ? DMA_TO_DEVICE : DMA_FROM_DEVICE); | 174 | ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM); |
175 | dma_info.width = prtd->params->dma_size; | 175 | dma_info.width = prtd->params->dma_size; |
176 | dma_info.fifo = prtd->params->dma_addr; | 176 | dma_info.fifo = prtd->params->dma_addr; |
177 | prtd->params->ch = prtd->params->ops->request( | 177 | 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"); |