aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-09-24 16:22:33 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-24 16:22:33 -0400
commitbaea7b946f00a291b166ccae7fcfed6c01530cc6 (patch)
tree4aa275fbdbec9c7b9b4629e8bee2bbecd3c6a6af /sound
parentae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (diff)
parent94e0fb086fc5663c38bbc0fe86d698be8314f82f (diff)
Merge branch 'origin' into for-linus
Conflicts: MAINTAINERS
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_native.c73
-rw-r--r--sound/oss/swarm_cs4297a.c3
-rw-r--r--sound/oss/sys_timer.c3
-rw-r--r--sound/pci/lx6464es/lx6464es.h2
-rw-r--r--sound/pci/lx6464es/lx_core.c98
-rw-r--r--sound/soc/blackfin/bf5xx-ac97.c8
-rw-r--r--sound/soc/blackfin/bf5xx-ac97.h2
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c22
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.h2
-rw-r--r--sound/soc/blackfin/bf5xx-sport.c2
-rw-r--r--sound/soc/codecs/ad1836.c3
-rw-r--r--sound/soc/codecs/ad1938.c2
-rw-r--r--sound/soc/codecs/wm8753.c1
-rw-r--r--sound/soc/codecs/wm9081.c2
-rw-r--r--sound/soc/davinci/davinci-mcasp.c24
-rw-r--r--sound/soc/davinci/davinci-pcm.c6
-rw-r--r--sound/soc/pxa/pxa-ssp.c2
-rw-r--r--sound/soc/s3c24xx/s3c24xx_uda134x.c2
-rw-r--r--sound/sound_core.c4
19 files changed, 74 insertions, 187 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 59e5fbe6af51..561d6d95a2d3 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1387,11 +1387,6 @@ static struct action_ops snd_pcm_action_drain_init = {
1387 .post_action = snd_pcm_post_drain_init 1387 .post_action = snd_pcm_post_drain_init
1388}; 1388};
1389 1389
1390struct drain_rec {
1391 struct snd_pcm_substream *substream;
1392 wait_queue_t wait;
1393};
1394
1395static int snd_pcm_drop(struct snd_pcm_substream *substream); 1390static int snd_pcm_drop(struct snd_pcm_substream *substream);
1396 1391
1397/* 1392/*
@@ -1407,10 +1402,9 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
1407 struct snd_card *card; 1402 struct snd_card *card;
1408 struct snd_pcm_runtime *runtime; 1403 struct snd_pcm_runtime *runtime;
1409 struct snd_pcm_substream *s; 1404 struct snd_pcm_substream *s;
1405 wait_queue_t wait;
1410 int result = 0; 1406 int result = 0;
1411 int i, num_drecs;
1412 int nonblock = 0; 1407 int nonblock = 0;
1413 struct drain_rec *drec, drec_tmp, *d;
1414 1408
1415 card = substream->pcm->card; 1409 card = substream->pcm->card;
1416 runtime = substream->runtime; 1410 runtime = substream->runtime;
@@ -1433,38 +1427,10 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
1433 } else if (substream->f_flags & O_NONBLOCK) 1427 } else if (substream->f_flags & O_NONBLOCK)
1434 nonblock = 1; 1428 nonblock = 1;
1435 1429
1436 if (nonblock)
1437 goto lock; /* no need to allocate waitqueues */
1438
1439 /* allocate temporary record for drain sync */
1440 down_read(&snd_pcm_link_rwsem); 1430 down_read(&snd_pcm_link_rwsem);
1441 if (snd_pcm_stream_linked(substream)) {
1442 drec = kmalloc(substream->group->count * sizeof(*drec), GFP_KERNEL);
1443 if (! drec) {
1444 up_read(&snd_pcm_link_rwsem);
1445 snd_power_unlock(card);
1446 return -ENOMEM;
1447 }
1448 } else
1449 drec = &drec_tmp;
1450
1451 /* count only playback streams */
1452 num_drecs = 0;
1453 snd_pcm_group_for_each_entry(s, substream) {
1454 runtime = s->runtime;
1455 if (s->stream == SNDRV_PCM_STREAM_PLAYBACK) {
1456 d = &drec[num_drecs++];
1457 d->substream = s;
1458 init_waitqueue_entry(&d->wait, current);
1459 add_wait_queue(&runtime->sleep, &d->wait);
1460 }
1461 }
1462 up_read(&snd_pcm_link_rwsem);
1463
1464 lock:
1465 snd_pcm_stream_lock_irq(substream); 1431 snd_pcm_stream_lock_irq(substream);
1466 /* resume pause */ 1432 /* resume pause */
1467 if (substream->runtime->status->state == SNDRV_PCM_STATE_PAUSED) 1433 if (runtime->status->state == SNDRV_PCM_STATE_PAUSED)
1468 snd_pcm_pause(substream, 0); 1434 snd_pcm_pause(substream, 0);
1469 1435
1470 /* pre-start/stop - all running streams are changed to DRAINING state */ 1436 /* pre-start/stop - all running streams are changed to DRAINING state */
@@ -1479,25 +1445,35 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
1479 1445
1480 for (;;) { 1446 for (;;) {
1481 long tout; 1447 long tout;
1448 struct snd_pcm_runtime *to_check;
1482 if (signal_pending(current)) { 1449 if (signal_pending(current)) {
1483 result = -ERESTARTSYS; 1450 result = -ERESTARTSYS;
1484 break; 1451 break;
1485 } 1452 }
1486 /* all finished? */ 1453 /* find a substream to drain */
1487 for (i = 0; i < num_drecs; i++) { 1454 to_check = NULL;
1488 runtime = drec[i].substream->runtime; 1455 snd_pcm_group_for_each_entry(s, substream) {
1489 if (runtime->status->state == SNDRV_PCM_STATE_DRAINING) 1456 if (s->stream != SNDRV_PCM_STREAM_PLAYBACK)
1457 continue;
1458 runtime = s->runtime;
1459 if (runtime->status->state == SNDRV_PCM_STATE_DRAINING) {
1460 to_check = runtime;
1490 break; 1461 break;
1462 }
1491 } 1463 }
1492 if (i == num_drecs) 1464 if (!to_check)
1493 break; /* yes, all drained */ 1465 break; /* all drained */
1494 1466 init_waitqueue_entry(&wait, current);
1467 add_wait_queue(&to_check->sleep, &wait);
1495 set_current_state(TASK_INTERRUPTIBLE); 1468 set_current_state(TASK_INTERRUPTIBLE);
1496 snd_pcm_stream_unlock_irq(substream); 1469 snd_pcm_stream_unlock_irq(substream);
1470 up_read(&snd_pcm_link_rwsem);
1497 snd_power_unlock(card); 1471 snd_power_unlock(card);
1498 tout = schedule_timeout(10 * HZ); 1472 tout = schedule_timeout(10 * HZ);
1499 snd_power_lock(card); 1473 snd_power_lock(card);
1474 down_read(&snd_pcm_link_rwsem);
1500 snd_pcm_stream_lock_irq(substream); 1475 snd_pcm_stream_lock_irq(substream);
1476 remove_wait_queue(&to_check->sleep, &wait);
1501 if (tout == 0) { 1477 if (tout == 0) {
1502 if (substream->runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) 1478 if (substream->runtime->status->state == SNDRV_PCM_STATE_SUSPENDED)
1503 result = -ESTRPIPE; 1479 result = -ESTRPIPE;
@@ -1512,16 +1488,7 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
1512 1488
1513 unlock: 1489 unlock:
1514 snd_pcm_stream_unlock_irq(substream); 1490 snd_pcm_stream_unlock_irq(substream);
1515 1491 up_read(&snd_pcm_link_rwsem);
1516 if (!nonblock) {
1517 for (i = 0; i < num_drecs; i++) {
1518 d = &drec[i];
1519 runtime = d->substream->runtime;
1520 remove_wait_queue(&runtime->sleep, &d->wait);
1521 }
1522 if (drec != &drec_tmp)
1523 kfree(drec);
1524 }
1525 snd_power_unlock(card); 1492 snd_power_unlock(card);
1526 1493
1527 return result; 1494 return result;
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c
index 1edab7b4ea83..3136c88eacdf 100644
--- a/sound/oss/swarm_cs4297a.c
+++ b/sound/oss/swarm_cs4297a.c
@@ -110,9 +110,6 @@ static void start_adc(struct cs4297a_state *s);
110// rather than 64k as some of the games work more responsively. 110// rather than 64k as some of the games work more responsively.
111// log base 2( buff sz = 32k). 111// log base 2( buff sz = 32k).
112 112
113//static unsigned long defaultorder = 3;
114//MODULE_PARM(defaultorder, "i");
115
116// 113//
117// Turn on/off debugging compilation by commenting out "#define CSDEBUG" 114// Turn on/off debugging compilation by commenting out "#define CSDEBUG"
118// 115//
diff --git a/sound/oss/sys_timer.c b/sound/oss/sys_timer.c
index 107534477a2f..8db6aefe15e4 100644
--- a/sound/oss/sys_timer.c
+++ b/sound/oss/sys_timer.c
@@ -100,9 +100,6 @@ def_tmr_open(int dev, int mode)
100 curr_tempo = 60; 100 curr_tempo = 60;
101 curr_timebase = 100; 101 curr_timebase = 100;
102 opened = 1; 102 opened = 1;
103
104 ;
105
106 { 103 {
107 def_tmr.expires = (1) + jiffies; 104 def_tmr.expires = (1) + jiffies;
108 add_timer(&def_tmr); 105 add_timer(&def_tmr);
diff --git a/sound/pci/lx6464es/lx6464es.h b/sound/pci/lx6464es/lx6464es.h
index 012c010c8c89..51afc048961d 100644
--- a/sound/pci/lx6464es/lx6464es.h
+++ b/sound/pci/lx6464es/lx6464es.h
@@ -86,7 +86,6 @@ struct lx6464es {
86 86
87 /* messaging */ 87 /* messaging */
88 spinlock_t msg_lock; /* message spinlock */ 88 spinlock_t msg_lock; /* message spinlock */
89 atomic_t send_message_locked;
90 struct lx_rmh rmh; 89 struct lx_rmh rmh;
91 90
92 /* configuration */ 91 /* configuration */
@@ -95,7 +94,6 @@ struct lx6464es {
95 uint hardware_running[2]; 94 uint hardware_running[2];
96 u32 board_sample_rate; /* sample rate read from 95 u32 board_sample_rate; /* sample rate read from
97 * board */ 96 * board */
98 u32 sample_rate; /* our sample rate */
99 u16 pcm_granularity; /* board blocksize */ 97 u16 pcm_granularity; /* board blocksize */
100 98
101 /* dma */ 99 /* dma */
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index 5812780d6e89..3086b751da4a 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -314,98 +314,6 @@ static inline void lx_message_dump(struct lx_rmh *rmh)
314#define XILINX_POLL_NO_SLEEP 100 314#define XILINX_POLL_NO_SLEEP 100
315#define XILINX_POLL_ITERATIONS 150 315#define XILINX_POLL_ITERATIONS 150
316 316
317#if 0 /* not used now */
318static int lx_message_send(struct lx6464es *chip, struct lx_rmh *rmh)
319{
320 u32 reg = ED_DSP_TIMED_OUT;
321 int dwloop;
322 int answer_received;
323
324 if (lx_dsp_reg_read(chip, eReg_CSM) & (Reg_CSM_MC | Reg_CSM_MR)) {
325 snd_printk(KERN_ERR LXP "PIOSendMessage eReg_CSM %x\n", reg);
326 return -EBUSY;
327 }
328
329 /* write command */
330 lx_dsp_reg_writebuf(chip, eReg_CRM1, rmh->cmd, rmh->cmd_len);
331
332 snd_BUG_ON(atomic_read(&chip->send_message_locked) != 0);
333 atomic_set(&chip->send_message_locked, 1);
334
335 /* MicoBlaze gogogo */
336 lx_dsp_reg_write(chip, eReg_CSM, Reg_CSM_MC);
337
338 /* wait for interrupt to answer */
339 for (dwloop = 0; dwloop != XILINX_TIMEOUT_MS; ++dwloop) {
340 answer_received = atomic_read(&chip->send_message_locked);
341 if (answer_received == 0)
342 break;
343 msleep(1);
344 }
345
346 if (answer_received == 0) {
347 /* in Debug mode verify Reg_CSM_MR */
348 snd_BUG_ON(!(lx_dsp_reg_read(chip, eReg_CSM) & Reg_CSM_MR));
349
350 /* command finished, read status */
351 if (rmh->dsp_stat == 0)
352 reg = lx_dsp_reg_read(chip, eReg_CRM1);
353 else
354 reg = 0;
355 } else {
356 int i;
357 snd_printk(KERN_WARNING LXP "TIMEOUT lx_message_send! "
358 "Interrupts disabled?\n");
359
360 /* attente bit Reg_CSM_MR */
361 for (i = 0; i != XILINX_POLL_ITERATIONS; i++) {
362 if ((lx_dsp_reg_read(chip, eReg_CSM) & Reg_CSM_MR)) {
363 if (rmh->dsp_stat == 0)
364 reg = lx_dsp_reg_read(chip, eReg_CRM1);
365 else
366 reg = 0;
367 goto polling_successful;
368 }
369
370 if (i > XILINX_POLL_NO_SLEEP)
371 msleep(1);
372 }
373 snd_printk(KERN_WARNING LXP "TIMEOUT lx_message_send! "
374 "polling failed\n");
375
376polling_successful:
377 atomic_set(&chip->send_message_locked, 0);
378 }
379
380 if ((reg & ERROR_VALUE) == 0) {
381 /* read response */
382 if (rmh->stat_len) {
383 snd_BUG_ON(rmh->stat_len >= (REG_CRM_NUMBER-1));
384
385 lx_dsp_reg_readbuf(chip, eReg_CRM2, rmh->stat,
386 rmh->stat_len);
387 }
388 } else
389 snd_printk(KERN_WARNING LXP "lx_message_send: error_value %x\n",
390 reg);
391
392 /* clear Reg_CSM_MR */
393 lx_dsp_reg_write(chip, eReg_CSM, 0);
394
395 switch (reg) {
396 case ED_DSP_TIMED_OUT:
397 snd_printk(KERN_WARNING LXP "lx_message_send: dsp timeout\n");
398 return -ETIMEDOUT;
399
400 case ED_DSP_CRASHED:
401 snd_printk(KERN_WARNING LXP "lx_message_send: dsp crashed\n");
402 return -EAGAIN;
403 }
404
405 lx_message_dump(rmh);
406 return 0;
407}
408#endif /* not used now */
409 317
410static int lx_message_send_atomic(struct lx6464es *chip, struct lx_rmh *rmh) 318static int lx_message_send_atomic(struct lx6464es *chip, struct lx_rmh *rmh)
411{ 319{
@@ -423,7 +331,7 @@ static int lx_message_send_atomic(struct lx6464es *chip, struct lx_rmh *rmh)
423 /* MicoBlaze gogogo */ 331 /* MicoBlaze gogogo */
424 lx_dsp_reg_write(chip, eReg_CSM, Reg_CSM_MC); 332 lx_dsp_reg_write(chip, eReg_CSM, Reg_CSM_MC);
425 333
426 /* wait for interrupt to answer */ 334 /* wait for device to answer */
427 for (dwloop = 0; dwloop != XILINX_TIMEOUT_MS * 1000; ++dwloop) { 335 for (dwloop = 0; dwloop != XILINX_TIMEOUT_MS * 1000; ++dwloop) {
428 if (lx_dsp_reg_read(chip, eReg_CSM) & Reg_CSM_MR) { 336 if (lx_dsp_reg_read(chip, eReg_CSM) & Reg_CSM_MR) {
429 if (rmh->dsp_stat == 0) 337 if (rmh->dsp_stat == 0)
@@ -1175,10 +1083,6 @@ static int lx_interrupt_ack(struct lx6464es *chip, u32 *r_irqsrc,
1175 *r_async_escmd = 1; 1083 *r_async_escmd = 1;
1176 } 1084 }
1177 1085
1178 if (irqsrc & MASK_SYS_STATUS_CMD_DONE)
1179 /* xilinx command notification */
1180 atomic_set(&chip->send_message_locked, 0);
1181
1182 if (irq_async) { 1086 if (irq_async) {
1183 /* snd_printd("interrupt: async event pending\n"); */ 1087 /* snd_printd("interrupt: async event pending\n"); */
1184 *r_async_pending = 1; 1088 *r_async_pending = 1;
diff --git a/sound/soc/blackfin/bf5xx-ac97.c b/sound/soc/blackfin/bf5xx-ac97.c
index 2758b9017a7f..e69322978739 100644
--- a/sound/soc/blackfin/bf5xx-ac97.c
+++ b/sound/soc/blackfin/bf5xx-ac97.c
@@ -277,7 +277,11 @@ static int bf5xx_ac97_resume(struct snd_soc_dai *dai)
277 if (!dai->active) 277 if (!dai->active)
278 return 0; 278 return 0;
279 279
280#if defined(CONFIG_SND_BF5XX_MULTICHAN_SUPPORT)
281 ret = sport_set_multichannel(sport, 16, 0x3FF, 1);
282#else
280 ret = sport_set_multichannel(sport, 16, 0x1F, 1); 283 ret = sport_set_multichannel(sport, 16, 0x1F, 1);
284#endif
281 if (ret) { 285 if (ret) {
282 pr_err("SPORT is busy!\n"); 286 pr_err("SPORT is busy!\n");
283 return -EBUSY; 287 return -EBUSY;
@@ -334,7 +338,11 @@ static int bf5xx_ac97_probe(struct platform_device *pdev,
334 goto sport_err; 338 goto sport_err;
335 } 339 }
336 /*SPORT works in TDM mode to simulate AC97 transfers*/ 340 /*SPORT works in TDM mode to simulate AC97 transfers*/
341#if defined(CONFIG_SND_BF5XX_MULTICHAN_SUPPORT)
342 ret = sport_set_multichannel(sport_handle, 16, 0x3FF, 1);
343#else
337 ret = sport_set_multichannel(sport_handle, 16, 0x1F, 1); 344 ret = sport_set_multichannel(sport_handle, 16, 0x1F, 1);
345#endif
338 if (ret) { 346 if (ret) {
339 pr_err("SPORT is busy!\n"); 347 pr_err("SPORT is busy!\n");
340 ret = -EBUSY; 348 ret = -EBUSY;
diff --git a/sound/soc/blackfin/bf5xx-ac97.h b/sound/soc/blackfin/bf5xx-ac97.h
index 3f2a911fe0cb..a1f97dd809d6 100644
--- a/sound/soc/blackfin/bf5xx-ac97.h
+++ b/sound/soc/blackfin/bf5xx-ac97.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/sound/arm/bf5xx-ac97.h 2 * sound/soc/blackfin/bf5xx-ac97.h
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 876abade27e1..1e9d161c76c4 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -227,7 +227,8 @@ static int bf5xx_i2s_probe(struct platform_device *pdev,
227 return 0; 227 return 0;
228} 228}
229 229
230static void bf5xx_i2s_remove(struct snd_soc_dai *dai) 230static void bf5xx_i2s_remove(struct platform_device *pdev,
231 struct snd_soc_dai *dai)
231{ 232{
232 pr_debug("%s enter\n", __func__); 233 pr_debug("%s enter\n", __func__);
233 peripheral_free_list(&sport_req[sport_num][0]); 234 peripheral_free_list(&sport_req[sport_num][0]);
@@ -236,36 +237,31 @@ static void bf5xx_i2s_remove(struct snd_soc_dai *dai)
236#ifdef CONFIG_PM 237#ifdef CONFIG_PM
237static int bf5xx_i2s_suspend(struct snd_soc_dai *dai) 238static int bf5xx_i2s_suspend(struct snd_soc_dai *dai)
238{ 239{
239 struct sport_device *sport =
240 (struct sport_device *)dai->private_data;
241 240
242 pr_debug("%s : sport %d\n", __func__, dai->id); 241 pr_debug("%s : sport %d\n", __func__, dai->id);
243 if (!dai->active) 242
244 return 0;
245 if (dai->capture.active) 243 if (dai->capture.active)
246 sport_rx_stop(sport); 244 sport_rx_stop(sport_handle);
247 if (dai->playback.active) 245 if (dai->playback.active)
248 sport_tx_stop(sport); 246 sport_tx_stop(sport_handle);
249 return 0; 247 return 0;
250} 248}
251 249
252static int bf5xx_i2s_resume(struct snd_soc_dai *dai) 250static int bf5xx_i2s_resume(struct snd_soc_dai *dai)
253{ 251{
254 int ret; 252 int ret;
255 struct sport_device *sport =
256 (struct sport_device *)dai->private_data;
257 253
258 pr_debug("%s : sport %d\n", __func__, dai->id); 254 pr_debug("%s : sport %d\n", __func__, dai->id);
259 if (!dai->active)
260 return 0;
261 255
262 ret = sport_config_rx(sport, RFSR | RCKFE, RSFSE|0x1f, 0, 0); 256 ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1,
257 bf5xx_i2s.rcr2, 0, 0);
263 if (ret) { 258 if (ret) {
264 pr_err("SPORT is busy!\n"); 259 pr_err("SPORT is busy!\n");
265 return -EBUSY; 260 return -EBUSY;
266 } 261 }
267 262
268 ret = sport_config_tx(sport, TFSR | TCKFE, TSFSE|0x1f, 0, 0); 263 ret = sport_config_tx(sport_handle, bf5xx_i2s.tcr1,
264 bf5xx_i2s.tcr2, 0, 0);
269 if (ret) { 265 if (ret) {
270 pr_err("SPORT is busy!\n"); 266 pr_err("SPORT is busy!\n");
271 return -EBUSY; 267 return -EBUSY;
diff --git a/sound/soc/blackfin/bf5xx-i2s.h b/sound/soc/blackfin/bf5xx-i2s.h
index 7107d1a0b06b..264ecdcba35a 100644
--- a/sound/soc/blackfin/bf5xx-i2s.h
+++ b/sound/soc/blackfin/bf5xx-i2s.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/sound/arm/bf5xx-i2s.h 2 * sound/soc/blackfin/bf5xx-i2s.h
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
diff --git a/sound/soc/blackfin/bf5xx-sport.c b/sound/soc/blackfin/bf5xx-sport.c
index 469ce7fab20c..99051ff0954e 100644
--- a/sound/soc/blackfin/bf5xx-sport.c
+++ b/sound/soc/blackfin/bf5xx-sport.c
@@ -326,7 +326,7 @@ static inline int sport_hook_tx_dummy(struct sport_device *sport)
326 326
327int sport_tx_start(struct sport_device *sport) 327int sport_tx_start(struct sport_device *sport)
328{ 328{
329 unsigned flags; 329 unsigned long flags;
330 pr_debug("%s: tx_run:%d, rx_run:%d\n", __func__, 330 pr_debug("%s: tx_run:%d, rx_run:%d\n", __func__,
331 sport->tx_run, sport->rx_run); 331 sport->tx_run, sport->rx_run);
332 if (sport->tx_run) 332 if (sport->tx_run)
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index 01343dc984fd..c48485f2c55d 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -251,8 +251,7 @@ static int __devexit ad1836_spi_remove(struct spi_device *spi)
251 251
252static struct spi_driver ad1836_spi_driver = { 252static struct spi_driver ad1836_spi_driver = {
253 .driver = { 253 .driver = {
254 .name = "ad1836-spi", 254 .name = "ad1836",
255 .bus = &spi_bus_type,
256 .owner = THIS_MODULE, 255 .owner = THIS_MODULE,
257 }, 256 },
258 .probe = ad1836_spi_probe, 257 .probe = ad1836_spi_probe,
diff --git a/sound/soc/codecs/ad1938.c b/sound/soc/codecs/ad1938.c
index 9a049a1995a3..34b30efc3cb0 100644
--- a/sound/soc/codecs/ad1938.c
+++ b/sound/soc/codecs/ad1938.c
@@ -456,7 +456,6 @@ static int __devexit ad1938_spi_remove(struct spi_device *spi)
456static struct spi_driver ad1938_spi_driver = { 456static struct spi_driver ad1938_spi_driver = {
457 .driver = { 457 .driver = {
458 .name = "ad1938", 458 .name = "ad1938",
459 .bus = &spi_bus_type,
460 .owner = THIS_MODULE, 459 .owner = THIS_MODULE,
461 }, 460 },
462 .probe = ad1938_spi_probe, 461 .probe = ad1938_spi_probe,
@@ -515,6 +514,7 @@ static int ad1938_register(struct ad1938_priv *ad1938)
515 codec->num_dai = 1; 514 codec->num_dai = 1;
516 codec->write = ad1938_write_reg; 515 codec->write = ad1938_write_reg;
517 codec->read = ad1938_read_reg_cache; 516 codec->read = ad1938_read_reg_cache;
517 codec->set_bias_level = ad1938_set_bias_level;
518 INIT_LIST_HEAD(&codec->dapm_widgets); 518 INIT_LIST_HEAD(&codec->dapm_widgets);
519 INIT_LIST_HEAD(&codec->dapm_paths); 519 INIT_LIST_HEAD(&codec->dapm_paths);
520 520
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index d80d414cfbbd..5ad677ce80da 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -595,6 +595,7 @@ static const struct snd_soc_dapm_route audio_map[] = {
595 595
596 /* Mono Capture mixer-mux */ 596 /* Mono Capture mixer-mux */
597 {"Capture Right Mixer", "Stereo", "Capture Right Mux"}, 597 {"Capture Right Mixer", "Stereo", "Capture Right Mux"},
598 {"Capture Left Mixer", "Stereo", "Capture Left Mux"},
598 {"Capture Left Mixer", "Analogue Mix Left", "Capture Left Mux"}, 599 {"Capture Left Mixer", "Analogue Mix Left", "Capture Left Mux"},
599 {"Capture Left Mixer", "Analogue Mix Left", "Capture Right Mux"}, 600 {"Capture Left Mixer", "Analogue Mix Left", "Capture Right Mux"},
600 {"Capture Right Mixer", "Analogue Mix Right", "Capture Left Mux"}, 601 {"Capture Right Mixer", "Analogue Mix Right", "Capture Left Mux"},
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index c64e55aa63b6..686e5aa97206 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -1027,7 +1027,7 @@ static int wm9081_hw_params(struct snd_pcm_substream *substream,
1027 - wm9081->fs); 1027 - wm9081->fs);
1028 for (i = 1; i < ARRAY_SIZE(clk_sys_rates); i++) { 1028 for (i = 1; i < ARRAY_SIZE(clk_sys_rates); i++) {
1029 cur_val = abs((wm9081->sysclk_rate / 1029 cur_val = abs((wm9081->sysclk_rate /
1030 clk_sys_rates[i].ratio) - wm9081->fs);; 1030 clk_sys_rates[i].ratio) - wm9081->fs);
1031 if (cur_val < best_val) { 1031 if (cur_val < best_val) {
1032 best = i; 1032 best = i;
1033 best_val = cur_val; 1033 best_val = cur_val;
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index eca22d7829d2..7a06c0a86665 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -512,34 +512,49 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev,
512 int channel_size) 512 int channel_size)
513{ 513{
514 u32 fmt = 0; 514 u32 fmt = 0;
515 u32 mask, rotate;
515 516
516 switch (channel_size) { 517 switch (channel_size) {
517 case DAVINCI_AUDIO_WORD_8: 518 case DAVINCI_AUDIO_WORD_8:
518 fmt = 0x03; 519 fmt = 0x03;
520 rotate = 6;
521 mask = 0x000000ff;
519 break; 522 break;
520 523
521 case DAVINCI_AUDIO_WORD_12: 524 case DAVINCI_AUDIO_WORD_12:
522 fmt = 0x05; 525 fmt = 0x05;
526 rotate = 5;
527 mask = 0x00000fff;
523 break; 528 break;
524 529
525 case DAVINCI_AUDIO_WORD_16: 530 case DAVINCI_AUDIO_WORD_16:
526 fmt = 0x07; 531 fmt = 0x07;
532 rotate = 4;
533 mask = 0x0000ffff;
527 break; 534 break;
528 535
529 case DAVINCI_AUDIO_WORD_20: 536 case DAVINCI_AUDIO_WORD_20:
530 fmt = 0x09; 537 fmt = 0x09;
538 rotate = 3;
539 mask = 0x000fffff;
531 break; 540 break;
532 541
533 case DAVINCI_AUDIO_WORD_24: 542 case DAVINCI_AUDIO_WORD_24:
534 fmt = 0x0B; 543 fmt = 0x0B;
544 rotate = 2;
545 mask = 0x00ffffff;
535 break; 546 break;
536 547
537 case DAVINCI_AUDIO_WORD_28: 548 case DAVINCI_AUDIO_WORD_28:
538 fmt = 0x0D; 549 fmt = 0x0D;
550 rotate = 1;
551 mask = 0x0fffffff;
539 break; 552 break;
540 553
541 case DAVINCI_AUDIO_WORD_32: 554 case DAVINCI_AUDIO_WORD_32:
542 fmt = 0x0F; 555 fmt = 0x0F;
556 rotate = 0;
557 mask = 0xffffffff;
543 break; 558 break;
544 559
545 default: 560 default:
@@ -550,6 +565,13 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev,
550 RXSSZ(fmt), RXSSZ(0x0F)); 565 RXSSZ(fmt), RXSSZ(0x0F));
551 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, 566 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG,
552 TXSSZ(fmt), TXSSZ(0x0F)); 567 TXSSZ(fmt), TXSSZ(0x0F));
568 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, TXROT(rotate),
569 TXROT(7));
570 mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMT_REG, RXROT(rotate),
571 RXROT(7));
572 mcasp_set_reg(dev->base + DAVINCI_MCASP_TXMASK_REG, mask);
573 mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG, mask);
574
553 return 0; 575 return 0;
554} 576}
555 577
@@ -638,7 +660,6 @@ static void davinci_hw_param(struct davinci_audio_dev *dev, int stream)
638 printk(KERN_ERR "playback tdm slot %d not supported\n", 660 printk(KERN_ERR "playback tdm slot %d not supported\n",
639 dev->tdm_slots); 661 dev->tdm_slots);
640 662
641 mcasp_set_reg(dev->base + DAVINCI_MCASP_TXMASK_REG, 0xFFFFFFFF);
642 mcasp_clr_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, FSXDUR); 663 mcasp_clr_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, FSXDUR);
643 } else { 664 } else {
644 /* bit stream is MSB first with no delay */ 665 /* bit stream is MSB first with no delay */
@@ -655,7 +676,6 @@ static void davinci_hw_param(struct davinci_audio_dev *dev, int stream)
655 printk(KERN_ERR "capture tdm slot %d not supported\n", 676 printk(KERN_ERR "capture tdm slot %d not supported\n",
656 dev->tdm_slots); 677 dev->tdm_slots);
657 678
658 mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG, 0xFFFFFFFF);
659 mcasp_clr_bits(dev->base + DAVINCI_MCASP_RXFMCTL_REG, FSRDUR); 679 mcasp_clr_bits(dev->base + DAVINCI_MCASP_RXFMCTL_REG, FSRDUR);
660 } 680 }
661} 681}
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
index 091dacb78b4d..2f7da49ed34f 100644
--- a/sound/soc/davinci/davinci-pcm.c
+++ b/sound/soc/davinci/davinci-pcm.c
@@ -145,7 +145,7 @@ static int davinci_pcm_dma_request(struct snd_pcm_substream *substream)
145 prtd->master_lch = ret; 145 prtd->master_lch = ret;
146 146
147 /* Request parameter RAM reload slot */ 147 /* Request parameter RAM reload slot */
148 ret = edma_alloc_slot(EDMA_SLOT_ANY); 148 ret = edma_alloc_slot(EDMA_CTLR(prtd->master_lch), EDMA_SLOT_ANY);
149 if (ret < 0) { 149 if (ret < 0) {
150 edma_free_channel(prtd->master_lch); 150 edma_free_channel(prtd->master_lch);
151 return ret; 151 return ret;
@@ -162,8 +162,8 @@ static int davinci_pcm_dma_request(struct snd_pcm_substream *substream)
162 * so davinci_pcm_enqueue_dma() takes less time in IRQ. 162 * so davinci_pcm_enqueue_dma() takes less time in IRQ.
163 */ 163 */
164 edma_read_slot(prtd->slave_lch, &p_ram); 164 edma_read_slot(prtd->slave_lch, &p_ram);
165 p_ram.opt |= TCINTEN | EDMA_TCC(prtd->master_lch); 165 p_ram.opt |= TCINTEN | EDMA_TCC(EDMA_CHAN_SLOT(prtd->master_lch));
166 p_ram.link_bcntrld = prtd->slave_lch << 5; 166 p_ram.link_bcntrld = EDMA_CHAN_SLOT(prtd->slave_lch) << 5;
167 edma_write_slot(prtd->slave_lch, &p_ram); 167 edma_write_slot(prtd->slave_lch, &p_ram);
168 168
169 return 0; 169 return 0;
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 5b9ed6464789..d11a6d7e384a 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -351,7 +351,7 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai,
351 do_div(tmp, freq_out); 351 do_div(tmp, freq_out);
352 val = tmp; 352 val = tmp;
353 353
354 val = (val << 16) | 64;; 354 val = (val << 16) | 64;
355 ssp_write_reg(ssp, SSACDD, val); 355 ssp_write_reg(ssp, SSACDD, val);
356 356
357 ssacd |= (0x6 << 4); 357 ssacd |= (0x6 << 4);
diff --git a/sound/soc/s3c24xx/s3c24xx_uda134x.c b/sound/soc/s3c24xx/s3c24xx_uda134x.c
index 8e79a416db57..c215d32d6322 100644
--- a/sound/soc/s3c24xx/s3c24xx_uda134x.c
+++ b/sound/soc/s3c24xx/s3c24xx_uda134x.c
@@ -67,7 +67,7 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream)
67{ 67{
68 int ret = 0; 68 int ret = 0;
69#ifdef ENFORCE_RATES 69#ifdef ENFORCE_RATES
70 struct snd_pcm_runtime *runtime = substream->runtime;; 70 struct snd_pcm_runtime *runtime = substream->runtime;
71#endif 71#endif
72 72
73 mutex_lock(&clk_lock); 73 mutex_lock(&clk_lock);
diff --git a/sound/sound_core.c b/sound/sound_core.c
index bb4b88e606bb..49c998186592 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -29,7 +29,7 @@ MODULE_DESCRIPTION("Core sound module");
29MODULE_AUTHOR("Alan Cox"); 29MODULE_AUTHOR("Alan Cox");
30MODULE_LICENSE("GPL"); 30MODULE_LICENSE("GPL");
31 31
32static char *sound_nodename(struct device *dev) 32static char *sound_devnode(struct device *dev, mode_t *mode)
33{ 33{
34 if (MAJOR(dev->devt) == SOUND_MAJOR) 34 if (MAJOR(dev->devt) == SOUND_MAJOR)
35 return NULL; 35 return NULL;
@@ -50,7 +50,7 @@ static int __init init_soundcore(void)
50 return PTR_ERR(sound_class); 50 return PTR_ERR(sound_class);
51 } 51 }
52 52
53 sound_class->nodename = sound_nodename; 53 sound_class->devnode = sound_devnode;
54 54
55 return 0; 55 return 0;
56} 56}