diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 15:54:53 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 16:01:40 -0400 |
commit | ae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (patch) | |
tree | 3c2086ab67398a019089a47ca3f362a4bc6db74f /sound/soc | |
parent | 34e84f39a27d059a3e6ec6e8b94aafa702e6f220 (diff) | |
parent | 9173a8ef24a6b1b8031507b35b8ffe5f85a87692 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/ad1836.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/ad1938.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm8974.c | 1 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.c | 33 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c-i2s-v2.c | 16 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 7 |
6 files changed, 34 insertions, 25 deletions
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index 3612bb92df90..01343dc984fd 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/version.h> | ||
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/device.h> | 22 | #include <linux/device.h> |
24 | #include <sound/core.h> | 23 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/ad1938.c b/sound/soc/codecs/ad1938.c index e62b27701a49..9a049a1995a3 100644 --- a/sound/soc/codecs/ad1938.c +++ b/sound/soc/codecs/ad1938.c | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/version.h> | ||
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/device.h> | 32 | #include <linux/device.h> |
34 | #include <sound/core.h> | 33 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index d8a013ab3177..98d663afc97d 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/version.h> | ||
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index 9ff62e3a9b1d..6096d22283e6 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -447,6 +447,7 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
447 | int size, irq, rc; | 447 | int size, irq, rc; |
448 | const __be32 *prop; | 448 | const __be32 *prop; |
449 | void __iomem *regs; | 449 | void __iomem *regs; |
450 | int ret; | ||
450 | 451 | ||
451 | /* Fetch the registers and IRQ of the PSC */ | 452 | /* Fetch the registers and IRQ of the PSC */ |
452 | irq = irq_of_parse_and_map(op->node, 0); | 453 | irq = irq_of_parse_and_map(op->node, 0); |
@@ -463,14 +464,16 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
463 | /* Allocate and initialize the driver private data */ | 464 | /* Allocate and initialize the driver private data */ |
464 | psc_dma = kzalloc(sizeof *psc_dma, GFP_KERNEL); | 465 | psc_dma = kzalloc(sizeof *psc_dma, GFP_KERNEL); |
465 | if (!psc_dma) { | 466 | if (!psc_dma) { |
466 | iounmap(regs); | 467 | ret = -ENOMEM; |
467 | return -ENOMEM; | 468 | goto out_unmap; |
468 | } | 469 | } |
469 | 470 | ||
470 | /* Get the PSC ID */ | 471 | /* Get the PSC ID */ |
471 | prop = of_get_property(op->node, "cell-index", &size); | 472 | prop = of_get_property(op->node, "cell-index", &size); |
472 | if (!prop || size < sizeof *prop) | 473 | if (!prop || size < sizeof *prop) { |
473 | return -ENODEV; | 474 | ret = -ENODEV; |
475 | goto out_free; | ||
476 | } | ||
474 | 477 | ||
475 | spin_lock_init(&psc_dma->lock); | 478 | spin_lock_init(&psc_dma->lock); |
476 | mutex_init(&psc_dma->mutex); | 479 | mutex_init(&psc_dma->mutex); |
@@ -493,9 +496,8 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
493 | if (!psc_dma->capture.bcom_task || | 496 | if (!psc_dma->capture.bcom_task || |
494 | !psc_dma->playback.bcom_task) { | 497 | !psc_dma->playback.bcom_task) { |
495 | dev_err(&op->dev, "Could not allocate bestcomm tasks\n"); | 498 | dev_err(&op->dev, "Could not allocate bestcomm tasks\n"); |
496 | iounmap(regs); | 499 | ret = -ENODEV; |
497 | kfree(psc_dma); | 500 | goto out_free; |
498 | return -ENODEV; | ||
499 | } | 501 | } |
500 | 502 | ||
501 | /* Disable all interrupts and reset the PSC */ | 503 | /* Disable all interrupts and reset the PSC */ |
@@ -537,12 +539,8 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
537 | &psc_dma_bcom_irq_tx, IRQF_SHARED, | 539 | &psc_dma_bcom_irq_tx, IRQF_SHARED, |
538 | "psc-dma-playback", &psc_dma->playback); | 540 | "psc-dma-playback", &psc_dma->playback); |
539 | if (rc) { | 541 | if (rc) { |
540 | free_irq(psc_dma->irq, psc_dma); | 542 | ret = -ENODEV; |
541 | free_irq(psc_dma->capture.irq, | 543 | goto out_irq; |
542 | &psc_dma->capture); | ||
543 | free_irq(psc_dma->playback.irq, | ||
544 | &psc_dma->playback); | ||
545 | return -ENODEV; | ||
546 | } | 544 | } |
547 | 545 | ||
548 | /* Save what we've done so it can be found again later */ | 546 | /* Save what we've done so it can be found again later */ |
@@ -550,6 +548,15 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
550 | 548 | ||
551 | /* Tell the ASoC OF helpers about it */ | 549 | /* Tell the ASoC OF helpers about it */ |
552 | return snd_soc_register_platform(&mpc5200_audio_dma_platform); | 550 | return snd_soc_register_platform(&mpc5200_audio_dma_platform); |
551 | out_irq: | ||
552 | free_irq(psc_dma->irq, psc_dma); | ||
553 | free_irq(psc_dma->capture.irq, &psc_dma->capture); | ||
554 | free_irq(psc_dma->playback.irq, &psc_dma->playback); | ||
555 | out_free: | ||
556 | kfree(psc_dma); | ||
557 | out_unmap: | ||
558 | iounmap(regs); | ||
559 | return ret; | ||
553 | } | 560 | } |
554 | EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create); | 561 | EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create); |
555 | 562 | ||
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c index aa7af0b8d421..9bc4aa35caab 100644 --- a/sound/soc/s3c24xx/s3c-i2s-v2.c +++ b/sound/soc/s3c24xx/s3c-i2s-v2.c | |||
@@ -230,6 +230,8 @@ static void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) | |||
230 | pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); | 230 | pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); |
231 | } | 231 | } |
232 | 232 | ||
233 | #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) | ||
234 | |||
233 | /* | 235 | /* |
234 | * Wait for the LR signal to allow synchronisation to the L/R clock | 236 | * Wait for the LR signal to allow synchronisation to the L/R clock |
235 | * from the codec. May only be needed for slave mode. | 237 | * from the codec. May only be needed for slave mode. |
@@ -237,19 +239,21 @@ static void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) | |||
237 | static int s3c2412_snd_lrsync(struct s3c_i2sv2_info *i2s) | 239 | static int s3c2412_snd_lrsync(struct s3c_i2sv2_info *i2s) |
238 | { | 240 | { |
239 | u32 iiscon; | 241 | u32 iiscon; |
240 | unsigned long timeout = jiffies + msecs_to_jiffies(5); | 242 | unsigned long loops = msecs_to_loops(5); |
241 | 243 | ||
242 | pr_debug("Entered %s\n", __func__); | 244 | pr_debug("Entered %s\n", __func__); |
243 | 245 | ||
244 | while (1) { | 246 | while (--loops) { |
245 | iiscon = readl(i2s->regs + S3C2412_IISCON); | 247 | iiscon = readl(i2s->regs + S3C2412_IISCON); |
246 | if (iiscon & S3C2412_IISCON_LRINDEX) | 248 | if (iiscon & S3C2412_IISCON_LRINDEX) |
247 | break; | 249 | break; |
248 | 250 | ||
249 | if (timeout < jiffies) { | 251 | cpu_relax(); |
250 | printk(KERN_ERR "%s: timeout\n", __func__); | 252 | } |
251 | return -ETIMEDOUT; | 253 | |
252 | } | 254 | if (!loops) { |
255 | printk(KERN_ERR "%s: timeout\n", __func__); | ||
256 | return -ETIMEDOUT; | ||
253 | } | 257 | } |
254 | 258 | ||
255 | return 0; | 259 | return 0; |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 0d8b08ef8731..f79711b9fa5b 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -1131,9 +1131,10 @@ static ssize_t dapm_widget_power_read_file(struct file *file, | |||
1131 | ret = snprintf(buf, PAGE_SIZE, "%s: %s in %d out %d\n", | 1131 | ret = snprintf(buf, PAGE_SIZE, "%s: %s in %d out %d\n", |
1132 | w->name, w->power ? "On" : "Off", in, out); | 1132 | w->name, w->power ? "On" : "Off", in, out); |
1133 | 1133 | ||
1134 | if (w->active && w->sname) | 1134 | if (w->sname) |
1135 | ret += snprintf(buf, PAGE_SIZE - ret, " stream %s active\n", | 1135 | ret += snprintf(buf + ret, PAGE_SIZE - ret, " stream %s %s\n", |
1136 | w->sname); | 1136 | w->sname, |
1137 | w->active ? "active" : "inactive"); | ||
1137 | 1138 | ||
1138 | list_for_each_entry(p, &w->sources, list_sink) { | 1139 | list_for_each_entry(p, &w->sources, list_sink) { |
1139 | if (p->connect) | 1140 | if (p->connect) |