aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx/s3c24xx-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/s3c24xx/s3c24xx-pcm.c')
-rw-r--r--sound/soc/s3c24xx/s3c24xx-pcm.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
index 29a6c82f873a..40112e2b1ecb 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
@@ -88,7 +88,7 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream)
88 dma_addr_t pos = prtd->dma_pos; 88 dma_addr_t pos = prtd->dma_pos;
89 int ret; 89 int ret;
90 90
91 DBG("Entered %s\n", __FUNCTION__); 91 DBG("Entered %s\n", __func__);
92 92
93 while (prtd->dma_loaded < prtd->dma_limit) { 93 while (prtd->dma_loaded < prtd->dma_limit) {
94 unsigned long len = prtd->dma_period; 94 unsigned long len = prtd->dma_period;
@@ -98,7 +98,7 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream)
98 if ((pos + len) > prtd->dma_end) { 98 if ((pos + len) > prtd->dma_end) {
99 len = prtd->dma_end - pos; 99 len = prtd->dma_end - pos;
100 DBG(KERN_DEBUG "%s: corrected dma len %ld\n", 100 DBG(KERN_DEBUG "%s: corrected dma len %ld\n",
101 __FUNCTION__, len); 101 __func__, len);
102 } 102 }
103 103
104 ret = s3c2410_dma_enqueue(prtd->params->channel, 104 ret = s3c2410_dma_enqueue(prtd->params->channel,
@@ -123,7 +123,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel,
123 struct snd_pcm_substream *substream = dev_id; 123 struct snd_pcm_substream *substream = dev_id;
124 struct s3c24xx_runtime_data *prtd; 124 struct s3c24xx_runtime_data *prtd;
125 125
126 DBG("Entered %s\n", __FUNCTION__); 126 DBG("Entered %s\n", __func__);
127 127
128 if (result == S3C2410_RES_ABORT || result == S3C2410_RES_ERR) 128 if (result == S3C2410_RES_ABORT || result == S3C2410_RES_ERR)
129 return; 129 return;
@@ -152,7 +152,7 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream,
152 unsigned long totbytes = params_buffer_bytes(params); 152 unsigned long totbytes = params_buffer_bytes(params);
153 int ret=0; 153 int ret=0;
154 154
155 DBG("Entered %s\n", __FUNCTION__); 155 DBG("Entered %s\n", __func__);
156 156
157 /* return if this is a bufferless transfer e.g. 157 /* return if this is a bufferless transfer e.g.
158 * codec <--> BT codec or GSM modem -- lg FIXME */ 158 * codec <--> BT codec or GSM modem -- lg FIXME */
@@ -200,7 +200,7 @@ static int s3c24xx_pcm_hw_free(struct snd_pcm_substream *substream)
200{ 200{
201 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; 201 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
202 202
203 DBG("Entered %s\n", __FUNCTION__); 203 DBG("Entered %s\n", __func__);
204 204
205 /* TODO - do we need to ensure DMA flushed */ 205 /* TODO - do we need to ensure DMA flushed */
206 snd_pcm_set_runtime_buffer(substream, NULL); 206 snd_pcm_set_runtime_buffer(substream, NULL);
@@ -218,7 +218,7 @@ static int s3c24xx_pcm_prepare(struct snd_pcm_substream *substream)
218 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; 218 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
219 int ret = 0; 219 int ret = 0;
220 220
221 DBG("Entered %s\n", __FUNCTION__); 221 DBG("Entered %s\n", __func__);
222 222
223 /* return if this is a bufferless transfer e.g. 223 /* return if this is a bufferless transfer e.g.
224 * codec <--> BT codec or GSM modem -- lg FIXME */ 224 * codec <--> BT codec or GSM modem -- lg FIXME */
@@ -263,7 +263,7 @@ static int s3c24xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
263 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; 263 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
264 int ret = 0; 264 int ret = 0;
265 265
266 DBG("Entered %s\n", __FUNCTION__); 266 DBG("Entered %s\n", __func__);
267 267
268 spin_lock(&prtd->lock); 268 spin_lock(&prtd->lock);
269 269
@@ -301,7 +301,7 @@ static snd_pcm_uframes_t
301 unsigned long res; 301 unsigned long res;
302 dma_addr_t src, dst; 302 dma_addr_t src, dst;
303 303
304 DBG("Entered %s\n", __FUNCTION__); 304 DBG("Entered %s\n", __func__);
305 305
306 spin_lock(&prtd->lock); 306 spin_lock(&prtd->lock);
307 s3c2410_dma_getposition(prtd->params->channel, &src, &dst); 307 s3c2410_dma_getposition(prtd->params->channel, &src, &dst);
@@ -334,7 +334,7 @@ static int s3c24xx_pcm_open(struct snd_pcm_substream *substream)
334 struct snd_pcm_runtime *runtime = substream->runtime; 334 struct snd_pcm_runtime *runtime = substream->runtime;
335 struct s3c24xx_runtime_data *prtd; 335 struct s3c24xx_runtime_data *prtd;
336 336
337 DBG("Entered %s\n", __FUNCTION__); 337 DBG("Entered %s\n", __func__);
338 338
339 snd_soc_set_runtime_hwparams(substream, &s3c24xx_pcm_hardware); 339 snd_soc_set_runtime_hwparams(substream, &s3c24xx_pcm_hardware);
340 340
@@ -353,7 +353,7 @@ static int s3c24xx_pcm_close(struct snd_pcm_substream *substream)
353 struct snd_pcm_runtime *runtime = substream->runtime; 353 struct snd_pcm_runtime *runtime = substream->runtime;
354 struct s3c24xx_runtime_data *prtd = runtime->private_data; 354 struct s3c24xx_runtime_data *prtd = runtime->private_data;
355 355
356 DBG("Entered %s\n", __FUNCTION__); 356 DBG("Entered %s\n", __func__);
357 357
358 if (prtd) 358 if (prtd)
359 kfree(prtd); 359 kfree(prtd);
@@ -368,7 +368,7 @@ static int s3c24xx_pcm_mmap(struct snd_pcm_substream *substream,
368{ 368{
369 struct snd_pcm_runtime *runtime = substream->runtime; 369 struct snd_pcm_runtime *runtime = substream->runtime;
370 370
371 DBG("Entered %s\n", __FUNCTION__); 371 DBG("Entered %s\n", __func__);
372 372
373 return dma_mmap_writecombine(substream->pcm->card->dev, vma, 373 return dma_mmap_writecombine(substream->pcm->card->dev, vma,
374 runtime->dma_area, 374 runtime->dma_area,
@@ -394,7 +394,7 @@ static int s3c24xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
394 struct snd_dma_buffer *buf = &substream->dma_buffer; 394 struct snd_dma_buffer *buf = &substream->dma_buffer;
395 size_t size = s3c24xx_pcm_hardware.buffer_bytes_max; 395 size_t size = s3c24xx_pcm_hardware.buffer_bytes_max;
396 396
397 DBG("Entered %s\n", __FUNCTION__); 397 DBG("Entered %s\n", __func__);
398 398
399 buf->dev.type = SNDRV_DMA_TYPE_DEV; 399 buf->dev.type = SNDRV_DMA_TYPE_DEV;
400 buf->dev.dev = pcm->card->dev; 400 buf->dev.dev = pcm->card->dev;
@@ -413,7 +413,7 @@ static void s3c24xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
413 struct snd_dma_buffer *buf; 413 struct snd_dma_buffer *buf;
414 int stream; 414 int stream;
415 415
416 DBG("Entered %s\n", __FUNCTION__); 416 DBG("Entered %s\n", __func__);
417 417
418 for (stream = 0; stream < 2; stream++) { 418 for (stream = 0; stream < 2; stream++) {
419 substream = pcm->streams[stream].substream; 419 substream = pcm->streams[stream].substream;
@@ -437,7 +437,7 @@ static int s3c24xx_pcm_new(struct snd_card *card,
437{ 437{
438 int ret = 0; 438 int ret = 0;
439 439
440 DBG("Entered %s\n", __FUNCTION__); 440 DBG("Entered %s\n", __func__);
441 441
442 if (!card->dev->dma_mask) 442 if (!card->dev->dma_mask)
443 card->dev->dma_mask = &s3c24xx_pcm_dmamask; 443 card->dev->dma_mask = &s3c24xx_pcm_dmamask;