aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/s3c24xx/s3c-i2s-v2.c2
-rw-r--r--sound/soc/s3c24xx/s3c-i2s-v2.h4
-rw-r--r--sound/soc/s3c24xx/s3c2412-i2s.c4
-rw-r--r--sound/soc/s3c24xx/s3c2443-ac97.c10
-rw-r--r--sound/soc/s3c24xx/s3c24xx-i2s.c10
-rw-r--r--sound/soc/s3c24xx/s3c24xx-pcm.c76
-rw-r--r--sound/soc/s3c24xx/s3c24xx-pcm.h6
-rw-r--r--sound/soc/s3c24xx/s3c64xx-i2s.c4
8 files changed, 58 insertions, 58 deletions
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c
index 28b0ab255096..5a442aa8b87b 100644
--- a/sound/soc/s3c24xx/s3c-i2s-v2.c
+++ b/sound/soc/s3c24xx/s3c-i2s-v2.c
@@ -394,7 +394,7 @@ static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
394 int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); 394 int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
395 unsigned long irqs; 395 unsigned long irqs;
396 int ret = 0; 396 int ret = 0;
397 int channel = ((struct s3c24xx_pcm_dma_params *) 397 int channel = ((struct s3c_dma_params *)
398 rtd->dai->cpu_dai->dma_data)->channel; 398 rtd->dai->cpu_dai->dma_data)->channel;
399 399
400 pr_debug("Entered %s\n", __func__); 400 pr_debug("Entered %s\n", __func__);
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.h b/sound/soc/s3c24xx/s3c-i2s-v2.h
index f66854a77fb2..ecf8eaaed1db 100644
--- a/sound/soc/s3c24xx/s3c-i2s-v2.h
+++ b/sound/soc/s3c24xx/s3c-i2s-v2.h
@@ -49,8 +49,8 @@ struct s3c_i2sv2_info {
49 49
50 unsigned char master; 50 unsigned char master;
51 51
52 struct s3c24xx_pcm_dma_params *dma_playback; 52 struct s3c_dma_params *dma_playback;
53 struct s3c24xx_pcm_dma_params *dma_capture; 53 struct s3c_dma_params *dma_capture;
54 54
55 u32 suspend_iismod; 55 u32 suspend_iismod;
56 u32 suspend_iiscon; 56 u32 suspend_iiscon;
diff --git a/sound/soc/s3c24xx/s3c2412-i2s.c b/sound/soc/s3c24xx/s3c2412-i2s.c
index ac5e47b082fb..23718ea85182 100644
--- a/sound/soc/s3c24xx/s3c2412-i2s.c
+++ b/sound/soc/s3c24xx/s3c2412-i2s.c
@@ -50,14 +50,14 @@ static struct s3c2410_dma_client s3c2412_dma_client_in = {
50 .name = "I2S PCM Stereo in" 50 .name = "I2S PCM Stereo in"
51}; 51};
52 52
53static struct s3c24xx_pcm_dma_params s3c2412_i2s_pcm_stereo_out = { 53static struct s3c_dma_params s3c2412_i2s_pcm_stereo_out = {
54 .client = &s3c2412_dma_client_out, 54 .client = &s3c2412_dma_client_out,
55 .channel = DMACH_I2S_OUT, 55 .channel = DMACH_I2S_OUT,
56 .dma_addr = S3C2410_PA_IIS + S3C2412_IISTXD, 56 .dma_addr = S3C2410_PA_IIS + S3C2412_IISTXD,
57 .dma_size = 4, 57 .dma_size = 4,
58}; 58};
59 59
60static struct s3c24xx_pcm_dma_params s3c2412_i2s_pcm_stereo_in = { 60static struct s3c_dma_params s3c2412_i2s_pcm_stereo_in = {
61 .client = &s3c2412_dma_client_in, 61 .client = &s3c2412_dma_client_in,
62 .channel = DMACH_I2S_IN, 62 .channel = DMACH_I2S_IN,
63 .dma_addr = S3C2410_PA_IIS + S3C2412_IISRXD, 63 .dma_addr = S3C2410_PA_IIS + S3C2412_IISRXD,
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index b25e9f968df9..678b1763160b 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -188,21 +188,21 @@ static struct s3c2410_dma_client s3c2443_dma_client_micin = {
188 .name = "AC97 Mic Mono in" 188 .name = "AC97 Mic Mono in"
189}; 189};
190 190
191static struct s3c24xx_pcm_dma_params s3c2443_ac97_pcm_stereo_out = { 191static struct s3c_dma_params s3c2443_ac97_pcm_stereo_out = {
192 .client = &s3c2443_dma_client_out, 192 .client = &s3c2443_dma_client_out,
193 .channel = DMACH_PCM_OUT, 193 .channel = DMACH_PCM_OUT,
194 .dma_addr = S3C2440_PA_AC97 + S3C_AC97_PCM_DATA, 194 .dma_addr = S3C2440_PA_AC97 + S3C_AC97_PCM_DATA,
195 .dma_size = 4, 195 .dma_size = 4,
196}; 196};
197 197
198static struct s3c24xx_pcm_dma_params s3c2443_ac97_pcm_stereo_in = { 198static struct s3c_dma_params s3c2443_ac97_pcm_stereo_in = {
199 .client = &s3c2443_dma_client_in, 199 .client = &s3c2443_dma_client_in,
200 .channel = DMACH_PCM_IN, 200 .channel = DMACH_PCM_IN,
201 .dma_addr = S3C2440_PA_AC97 + S3C_AC97_PCM_DATA, 201 .dma_addr = S3C2440_PA_AC97 + S3C_AC97_PCM_DATA,
202 .dma_size = 4, 202 .dma_size = 4,
203}; 203};
204 204
205static struct s3c24xx_pcm_dma_params s3c2443_ac97_mic_mono_in = { 205static struct s3c_dma_params s3c2443_ac97_mic_mono_in = {
206 .client = &s3c2443_dma_client_micin, 206 .client = &s3c2443_dma_client_micin,
207 .channel = DMACH_MIC_IN, 207 .channel = DMACH_MIC_IN,
208 .dma_addr = S3C2440_PA_AC97 + S3C_AC97_MIC_DATA, 208 .dma_addr = S3C2440_PA_AC97 + S3C_AC97_MIC_DATA,
@@ -290,7 +290,7 @@ static int s3c2443_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
290{ 290{
291 u32 ac_glbctrl; 291 u32 ac_glbctrl;
292 struct snd_soc_pcm_runtime *rtd = substream->private_data; 292 struct snd_soc_pcm_runtime *rtd = substream->private_data;
293 int channel = ((struct s3c24xx_pcm_dma_params *) 293 int channel = ((struct s3c_dma_params *)
294 rtd->dai->cpu_dai->dma_data)->channel; 294 rtd->dai->cpu_dai->dma_data)->channel;
295 295
296 ac_glbctrl = readl(s3c24xx_ac97.regs + S3C_AC97_GLBCTRL); 296 ac_glbctrl = readl(s3c24xx_ac97.regs + S3C_AC97_GLBCTRL);
@@ -339,7 +339,7 @@ static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream,
339{ 339{
340 u32 ac_glbctrl; 340 u32 ac_glbctrl;
341 struct snd_soc_pcm_runtime *rtd = substream->private_data; 341 struct snd_soc_pcm_runtime *rtd = substream->private_data;
342 int channel = ((struct s3c24xx_pcm_dma_params *) 342 int channel = ((struct s3c_dma_params *)
343 rtd->dai->cpu_dai->dma_data)->channel; 343 rtd->dai->cpu_dai->dma_data)->channel;
344 344
345 ac_glbctrl = readl(s3c24xx_ac97.regs + S3C_AC97_GLBCTRL); 345 ac_glbctrl = readl(s3c24xx_ac97.regs + S3C_AC97_GLBCTRL);
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c
index c76b8bb214bc..afb4bc9033c8 100644
--- a/sound/soc/s3c24xx/s3c24xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c24xx-i2s.c
@@ -49,14 +49,14 @@ static struct s3c2410_dma_client s3c24xx_dma_client_in = {
49 .name = "I2S PCM Stereo in" 49 .name = "I2S PCM Stereo in"
50}; 50};
51 51
52static struct s3c24xx_pcm_dma_params s3c24xx_i2s_pcm_stereo_out = { 52static struct s3c_dma_params s3c24xx_i2s_pcm_stereo_out = {
53 .client = &s3c24xx_dma_client_out, 53 .client = &s3c24xx_dma_client_out,
54 .channel = DMACH_I2S_OUT, 54 .channel = DMACH_I2S_OUT,
55 .dma_addr = S3C2410_PA_IIS + S3C2410_IISFIFO, 55 .dma_addr = S3C2410_PA_IIS + S3C2410_IISFIFO,
56 .dma_size = 2, 56 .dma_size = 2,
57}; 57};
58 58
59static struct s3c24xx_pcm_dma_params s3c24xx_i2s_pcm_stereo_in = { 59static struct s3c_dma_params s3c24xx_i2s_pcm_stereo_in = {
60 .client = &s3c24xx_dma_client_in, 60 .client = &s3c24xx_dma_client_in,
61 .channel = DMACH_I2S_IN, 61 .channel = DMACH_I2S_IN,
62 .dma_addr = S3C2410_PA_IIS + S3C2410_IISFIFO, 62 .dma_addr = S3C2410_PA_IIS + S3C2410_IISFIFO,
@@ -258,12 +258,12 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream,
258 switch (params_format(params)) { 258 switch (params_format(params)) {
259 case SNDRV_PCM_FORMAT_S8: 259 case SNDRV_PCM_FORMAT_S8:
260 iismod &= ~S3C2410_IISMOD_16BIT; 260 iismod &= ~S3C2410_IISMOD_16BIT;
261 ((struct s3c24xx_pcm_dma_params *) 261 ((struct s3c_dma_params *)
262 rtd->dai->cpu_dai->dma_data)->dma_size = 1; 262 rtd->dai->cpu_dai->dma_data)->dma_size = 1;
263 break; 263 break;
264 case SNDRV_PCM_FORMAT_S16_LE: 264 case SNDRV_PCM_FORMAT_S16_LE:
265 iismod |= S3C2410_IISMOD_16BIT; 265 iismod |= S3C2410_IISMOD_16BIT;
266 ((struct s3c24xx_pcm_dma_params *) 266 ((struct s3c_dma_params *)
267 rtd->dai->cpu_dai->dma_data)->dma_size = 2; 267 rtd->dai->cpu_dai->dma_data)->dma_size = 2;
268 break; 268 break;
269 default: 269 default:
@@ -280,7 +280,7 @@ static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
280{ 280{
281 int ret = 0; 281 int ret = 0;
282 struct snd_soc_pcm_runtime *rtd = substream->private_data; 282 struct snd_soc_pcm_runtime *rtd = substream->private_data;
283 int channel = ((struct s3c24xx_pcm_dma_params *) 283 int channel = ((struct s3c_dma_params *)
284 rtd->dai->cpu_dai->dma_data)->channel; 284 rtd->dai->cpu_dai->dma_data)->channel;
285 285
286 pr_debug("Entered %s\n", __func__); 286 pr_debug("Entered %s\n", __func__);
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
index 151a69463269..cb49400d8c56 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
@@ -32,7 +32,7 @@
32 32
33#include "s3c24xx-pcm.h" 33#include "s3c24xx-pcm.h"
34 34
35static const struct snd_pcm_hardware s3c24xx_pcm_hardware = { 35static const struct snd_pcm_hardware s3c_dma_hardware = {
36 .info = SNDRV_PCM_INFO_INTERLEAVED | 36 .info = SNDRV_PCM_INFO_INTERLEAVED |
37 SNDRV_PCM_INFO_BLOCK_TRANSFER | 37 SNDRV_PCM_INFO_BLOCK_TRANSFER |
38 SNDRV_PCM_INFO_MMAP | 38 SNDRV_PCM_INFO_MMAP |
@@ -62,15 +62,15 @@ struct s3c24xx_runtime_data {
62 dma_addr_t dma_start; 62 dma_addr_t dma_start;
63 dma_addr_t dma_pos; 63 dma_addr_t dma_pos;
64 dma_addr_t dma_end; 64 dma_addr_t dma_end;
65 struct s3c24xx_pcm_dma_params *params; 65 struct s3c_dma_params *params;
66}; 66};
67 67
68/* s3c24xx_pcm_enqueue 68/* s3c_dma_enqueue
69 * 69 *
70 * place a dma buffer onto the queue for the dma system 70 * place a dma buffer onto the queue for the dma system
71 * to handle. 71 * to handle.
72*/ 72*/
73static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream) 73static void s3c_dma_enqueue(struct snd_pcm_substream *substream)
74{ 74{
75 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; 75 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
76 dma_addr_t pos = prtd->dma_pos; 76 dma_addr_t pos = prtd->dma_pos;
@@ -132,19 +132,19 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel,
132 spin_lock(&prtd->lock); 132 spin_lock(&prtd->lock);
133 if (prtd->state & ST_RUNNING && !s3c_dma_has_circular()) { 133 if (prtd->state & ST_RUNNING && !s3c_dma_has_circular()) {
134 prtd->dma_loaded--; 134 prtd->dma_loaded--;
135 s3c24xx_pcm_enqueue(substream); 135 s3c_dma_enqueue(substream);
136 } 136 }
137 137
138 spin_unlock(&prtd->lock); 138 spin_unlock(&prtd->lock);
139} 139}
140 140
141static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream, 141static int s3c_dma_hw_params(struct snd_pcm_substream *substream,
142 struct snd_pcm_hw_params *params) 142 struct snd_pcm_hw_params *params)
143{ 143{
144 struct snd_pcm_runtime *runtime = substream->runtime; 144 struct snd_pcm_runtime *runtime = substream->runtime;
145 struct s3c24xx_runtime_data *prtd = runtime->private_data; 145 struct s3c24xx_runtime_data *prtd = runtime->private_data;
146 struct snd_soc_pcm_runtime *rtd = substream->private_data; 146 struct snd_soc_pcm_runtime *rtd = substream->private_data;
147 struct s3c24xx_pcm_dma_params *dma = rtd->dai->cpu_dai->dma_data; 147 struct s3c_dma_params *dma = rtd->dai->cpu_dai->dma_data;
148 unsigned long totbytes = params_buffer_bytes(params); 148 unsigned long totbytes = params_buffer_bytes(params);
149 int ret = 0; 149 int ret = 0;
150 150
@@ -197,7 +197,7 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream,
197 return 0; 197 return 0;
198} 198}
199 199
200static int s3c24xx_pcm_hw_free(struct snd_pcm_substream *substream) 200static int s3c_dma_hw_free(struct snd_pcm_substream *substream)
201{ 201{
202 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; 202 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
203 203
@@ -214,7 +214,7 @@ static int s3c24xx_pcm_hw_free(struct snd_pcm_substream *substream)
214 return 0; 214 return 0;
215} 215}
216 216
217static int s3c24xx_pcm_prepare(struct snd_pcm_substream *substream) 217static int s3c_dma_prepare(struct snd_pcm_substream *substream)
218{ 218{
219 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; 219 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
220 int ret = 0; 220 int ret = 0;
@@ -247,12 +247,12 @@ static int s3c24xx_pcm_prepare(struct snd_pcm_substream *substream)
247 prtd->dma_pos = prtd->dma_start; 247 prtd->dma_pos = prtd->dma_start;
248 248
249 /* enqueue dma buffers */ 249 /* enqueue dma buffers */
250 s3c24xx_pcm_enqueue(substream); 250 s3c_dma_enqueue(substream);
251 251
252 return ret; 252 return ret;
253} 253}
254 254
255static int s3c24xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) 255static int s3c_dma_trigger(struct snd_pcm_substream *substream, int cmd)
256{ 256{
257 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; 257 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
258 int ret = 0; 258 int ret = 0;
@@ -287,7 +287,7 @@ static int s3c24xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
287} 287}
288 288
289static snd_pcm_uframes_t 289static snd_pcm_uframes_t
290s3c24xx_pcm_pointer(struct snd_pcm_substream *substream) 290s3c_dma_pointer(struct snd_pcm_substream *substream)
291{ 291{
292 struct snd_pcm_runtime *runtime = substream->runtime; 292 struct snd_pcm_runtime *runtime = substream->runtime;
293 struct s3c24xx_runtime_data *prtd = runtime->private_data; 293 struct s3c24xx_runtime_data *prtd = runtime->private_data;
@@ -322,7 +322,7 @@ s3c24xx_pcm_pointer(struct snd_pcm_substream *substream)
322 return bytes_to_frames(substream->runtime, res); 322 return bytes_to_frames(substream->runtime, res);
323} 323}
324 324
325static int s3c24xx_pcm_open(struct snd_pcm_substream *substream) 325static int s3c_dma_open(struct snd_pcm_substream *substream)
326{ 326{
327 struct snd_pcm_runtime *runtime = substream->runtime; 327 struct snd_pcm_runtime *runtime = substream->runtime;
328 struct s3c24xx_runtime_data *prtd; 328 struct s3c24xx_runtime_data *prtd;
@@ -330,7 +330,7 @@ static int s3c24xx_pcm_open(struct snd_pcm_substream *substream)
330 pr_debug("Entered %s\n", __func__); 330 pr_debug("Entered %s\n", __func__);
331 331
332 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); 332 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
333 snd_soc_set_runtime_hwparams(substream, &s3c24xx_pcm_hardware); 333 snd_soc_set_runtime_hwparams(substream, &s3c_dma_hardware);
334 334
335 prtd = kzalloc(sizeof(struct s3c24xx_runtime_data), GFP_KERNEL); 335 prtd = kzalloc(sizeof(struct s3c24xx_runtime_data), GFP_KERNEL);
336 if (prtd == NULL) 336 if (prtd == NULL)
@@ -342,7 +342,7 @@ static int s3c24xx_pcm_open(struct snd_pcm_substream *substream)
342 return 0; 342 return 0;
343} 343}
344 344
345static int s3c24xx_pcm_close(struct snd_pcm_substream *substream) 345static int s3c_dma_close(struct snd_pcm_substream *substream)
346{ 346{
347 struct snd_pcm_runtime *runtime = substream->runtime; 347 struct snd_pcm_runtime *runtime = substream->runtime;
348 struct s3c24xx_runtime_data *prtd = runtime->private_data; 348 struct s3c24xx_runtime_data *prtd = runtime->private_data;
@@ -350,14 +350,14 @@ static int s3c24xx_pcm_close(struct snd_pcm_substream *substream)
350 pr_debug("Entered %s\n", __func__); 350 pr_debug("Entered %s\n", __func__);
351 351
352 if (!prtd) 352 if (!prtd)
353 pr_debug("s3c24xx_pcm_close called with prtd == NULL\n"); 353 pr_debug("s3c_dma_close called with prtd == NULL\n");
354 354
355 kfree(prtd); 355 kfree(prtd);
356 356
357 return 0; 357 return 0;
358} 358}
359 359
360static int s3c24xx_pcm_mmap(struct snd_pcm_substream *substream, 360static int s3c_dma_mmap(struct snd_pcm_substream *substream,
361 struct vm_area_struct *vma) 361 struct vm_area_struct *vma)
362{ 362{
363 struct snd_pcm_runtime *runtime = substream->runtime; 363 struct snd_pcm_runtime *runtime = substream->runtime;
@@ -370,23 +370,23 @@ static int s3c24xx_pcm_mmap(struct snd_pcm_substream *substream,
370 runtime->dma_bytes); 370 runtime->dma_bytes);
371} 371}
372 372
373static struct snd_pcm_ops s3c24xx_pcm_ops = { 373static struct snd_pcm_ops s3c_dma_ops = {
374 .open = s3c24xx_pcm_open, 374 .open = s3c_dma_open,
375 .close = s3c24xx_pcm_close, 375 .close = s3c_dma_close,
376 .ioctl = snd_pcm_lib_ioctl, 376 .ioctl = snd_pcm_lib_ioctl,
377 .hw_params = s3c24xx_pcm_hw_params, 377 .hw_params = s3c_dma_hw_params,
378 .hw_free = s3c24xx_pcm_hw_free, 378 .hw_free = s3c_dma_hw_free,
379 .prepare = s3c24xx_pcm_prepare, 379 .prepare = s3c_dma_prepare,
380 .trigger = s3c24xx_pcm_trigger, 380 .trigger = s3c_dma_trigger,
381 .pointer = s3c24xx_pcm_pointer, 381 .pointer = s3c_dma_pointer,
382 .mmap = s3c24xx_pcm_mmap, 382 .mmap = s3c_dma_mmap,
383}; 383};
384 384
385static int s3c24xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) 385static int s3c_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
386{ 386{
387 struct snd_pcm_substream *substream = pcm->streams[stream].substream; 387 struct snd_pcm_substream *substream = pcm->streams[stream].substream;
388 struct snd_dma_buffer *buf = &substream->dma_buffer; 388 struct snd_dma_buffer *buf = &substream->dma_buffer;
389 size_t size = s3c24xx_pcm_hardware.buffer_bytes_max; 389 size_t size = s3c_dma_hardware.buffer_bytes_max;
390 390
391 pr_debug("Entered %s\n", __func__); 391 pr_debug("Entered %s\n", __func__);
392 392
@@ -401,7 +401,7 @@ static int s3c24xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
401 return 0; 401 return 0;
402} 402}
403 403
404static void s3c24xx_pcm_free_dma_buffers(struct snd_pcm *pcm) 404static void s3c_dma_free_dma_buffers(struct snd_pcm *pcm)
405{ 405{
406 struct snd_pcm_substream *substream; 406 struct snd_pcm_substream *substream;
407 struct snd_dma_buffer *buf; 407 struct snd_dma_buffer *buf;
@@ -424,9 +424,9 @@ static void s3c24xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
424 } 424 }
425} 425}
426 426
427static u64 s3c24xx_pcm_dmamask = DMA_BIT_MASK(32); 427static u64 s3c_dma_mask = DMA_BIT_MASK(32);
428 428
429static int s3c24xx_pcm_new(struct snd_card *card, 429static int s3c_dma_new(struct snd_card *card,
430 struct snd_soc_dai *dai, struct snd_pcm *pcm) 430 struct snd_soc_dai *dai, struct snd_pcm *pcm)
431{ 431{
432 int ret = 0; 432 int ret = 0;
@@ -434,19 +434,19 @@ static int s3c24xx_pcm_new(struct snd_card *card,
434 pr_debug("Entered %s\n", __func__); 434 pr_debug("Entered %s\n", __func__);
435 435
436 if (!card->dev->dma_mask) 436 if (!card->dev->dma_mask)
437 card->dev->dma_mask = &s3c24xx_pcm_dmamask; 437 card->dev->dma_mask = &s3c_dma_mask;
438 if (!card->dev->coherent_dma_mask) 438 if (!card->dev->coherent_dma_mask)
439 card->dev->coherent_dma_mask = 0xffffffff; 439 card->dev->coherent_dma_mask = 0xffffffff;
440 440
441 if (dai->playback.channels_min) { 441 if (dai->playback.channels_min) {
442 ret = s3c24xx_pcm_preallocate_dma_buffer(pcm, 442 ret = s3c_preallocate_dma_buffer(pcm,
443 SNDRV_PCM_STREAM_PLAYBACK); 443 SNDRV_PCM_STREAM_PLAYBACK);
444 if (ret) 444 if (ret)
445 goto out; 445 goto out;
446 } 446 }
447 447
448 if (dai->capture.channels_min) { 448 if (dai->capture.channels_min) {
449 ret = s3c24xx_pcm_preallocate_dma_buffer(pcm, 449 ret = s3c_preallocate_dma_buffer(pcm,
450 SNDRV_PCM_STREAM_CAPTURE); 450 SNDRV_PCM_STREAM_CAPTURE);
451 if (ret) 451 if (ret)
452 goto out; 452 goto out;
@@ -457,9 +457,9 @@ static int s3c24xx_pcm_new(struct snd_card *card,
457 457
458struct snd_soc_platform s3c24xx_soc_platform = { 458struct snd_soc_platform s3c24xx_soc_platform = {
459 .name = "s3c24xx-audio", 459 .name = "s3c24xx-audio",
460 .pcm_ops = &s3c24xx_pcm_ops, 460 .pcm_ops = &s3c_dma_ops,
461 .pcm_new = s3c24xx_pcm_new, 461 .pcm_new = s3c_dma_new,
462 .pcm_free = s3c24xx_pcm_free_dma_buffers, 462 .pcm_free = s3c_dma_free_dma_buffers,
463}; 463};
464EXPORT_SYMBOL_GPL(s3c24xx_soc_platform); 464EXPORT_SYMBOL_GPL(s3c24xx_soc_platform);
465 465
@@ -476,5 +476,5 @@ static void __exit s3c24xx_soc_platform_exit(void)
476module_exit(s3c24xx_soc_platform_exit); 476module_exit(s3c24xx_soc_platform_exit);
477 477
478MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); 478MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
479MODULE_DESCRIPTION("Samsung S3C24XX PCM DMA module"); 479MODULE_DESCRIPTION("Samsung S3C Audio DMA module");
480MODULE_LICENSE("GPL"); 480MODULE_LICENSE("GPL");
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.h b/sound/soc/s3c24xx/s3c24xx-pcm.h
index 0088c79822ea..8cbc071124c4 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.h
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.h
@@ -9,13 +9,13 @@
9 * ALSA PCM interface for the Samsung S3C24xx CPU 9 * ALSA PCM interface for the Samsung S3C24xx CPU
10 */ 10 */
11 11
12#ifndef _S3C24XX_PCM_H 12#ifndef _S3C_AUDIO_H
13#define _S3C24XX_PCM_H 13#define _S3C_AUDIO_H
14 14
15#define ST_RUNNING (1<<0) 15#define ST_RUNNING (1<<0)
16#define ST_OPENED (1<<1) 16#define ST_OPENED (1<<1)
17 17
18struct s3c24xx_pcm_dma_params { 18struct s3c_dma_params {
19 struct s3c2410_dma_client *client; /* stream identifier */ 19 struct s3c2410_dma_client *client; /* stream identifier */
20 int channel; /* Channel ID */ 20 int channel; /* Channel ID */
21 dma_addr_t dma_addr; 21 dma_addr_t dma_addr;
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c
index d68cae15561c..719d63c27fdb 100644
--- a/sound/soc/s3c24xx/s3c64xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c64xx-i2s.c
@@ -46,7 +46,7 @@ static struct s3c2410_dma_client s3c64xx_dma_client_in = {
46 .name = "I2S PCM Stereo in" 46 .name = "I2S PCM Stereo in"
47}; 47};
48 48
49static struct s3c24xx_pcm_dma_params s3c64xx_i2s_pcm_stereo_out[2] = { 49static struct s3c_dma_params s3c64xx_i2s_pcm_stereo_out[2] = {
50 [0] = { 50 [0] = {
51 .channel = DMACH_I2S0_OUT, 51 .channel = DMACH_I2S0_OUT,
52 .client = &s3c64xx_dma_client_out, 52 .client = &s3c64xx_dma_client_out,
@@ -61,7 +61,7 @@ static struct s3c24xx_pcm_dma_params s3c64xx_i2s_pcm_stereo_out[2] = {
61 }, 61 },
62}; 62};
63 63
64static struct s3c24xx_pcm_dma_params s3c64xx_i2s_pcm_stereo_in[2] = { 64static struct s3c_dma_params s3c64xx_i2s_pcm_stereo_in[2] = {
65 [0] = { 65 [0] = {
66 .channel = DMACH_I2S0_IN, 66 .channel = DMACH_I2S0_IN,
67 .client = &s3c64xx_dma_client_in, 67 .client = &s3c64xx_dma_client_in,