diff options
author | Jassi Brar <jassi.brar@samsung.com> | 2010-02-24 21:24:53 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-03-03 14:19:36 -0500 |
commit | bb1c04784d39b95a4382bd283f3048c4eb859b58 (patch) | |
tree | 4d63272d2a38cf8fec87c6b9d36773fa05215ec2 /sound/soc | |
parent | a0b62329bb290c10d7278809af910ed115768991 (diff) |
ASoC: soc_pcm_open: Add missing bailout tag
The codec_dai needs to be shutdown should the machine startup fails.
This patch adds another bailout tag for that case and rename the tag
for configuration failures.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/soc-core.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a03bac943aaf..c8b0556ef431 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -427,24 +427,24 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) | |||
427 | if (!runtime->hw.rates) { | 427 | if (!runtime->hw.rates) { |
428 | printk(KERN_ERR "asoc: %s <-> %s No matching rates\n", | 428 | printk(KERN_ERR "asoc: %s <-> %s No matching rates\n", |
429 | codec_dai->name, cpu_dai->name); | 429 | codec_dai->name, cpu_dai->name); |
430 | goto machine_err; | 430 | goto config_err; |
431 | } | 431 | } |
432 | if (!runtime->hw.formats) { | 432 | if (!runtime->hw.formats) { |
433 | printk(KERN_ERR "asoc: %s <-> %s No matching formats\n", | 433 | printk(KERN_ERR "asoc: %s <-> %s No matching formats\n", |
434 | codec_dai->name, cpu_dai->name); | 434 | codec_dai->name, cpu_dai->name); |
435 | goto machine_err; | 435 | goto config_err; |
436 | } | 436 | } |
437 | if (!runtime->hw.channels_min || !runtime->hw.channels_max) { | 437 | if (!runtime->hw.channels_min || !runtime->hw.channels_max) { |
438 | printk(KERN_ERR "asoc: %s <-> %s No matching channels\n", | 438 | printk(KERN_ERR "asoc: %s <-> %s No matching channels\n", |
439 | codec_dai->name, cpu_dai->name); | 439 | codec_dai->name, cpu_dai->name); |
440 | goto machine_err; | 440 | goto config_err; |
441 | } | 441 | } |
442 | 442 | ||
443 | /* Symmetry only applies if we've already got an active stream. */ | 443 | /* Symmetry only applies if we've already got an active stream. */ |
444 | if (cpu_dai->active || codec_dai->active) { | 444 | if (cpu_dai->active || codec_dai->active) { |
445 | ret = soc_pcm_apply_symmetry(substream); | 445 | ret = soc_pcm_apply_symmetry(substream); |
446 | if (ret != 0) | 446 | if (ret != 0) |
447 | goto machine_err; | 447 | goto config_err; |
448 | } | 448 | } |
449 | 449 | ||
450 | pr_debug("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name); | 450 | pr_debug("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name); |
@@ -464,10 +464,14 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) | |||
464 | mutex_unlock(&pcm_mutex); | 464 | mutex_unlock(&pcm_mutex); |
465 | return 0; | 465 | return 0; |
466 | 466 | ||
467 | machine_err: | 467 | config_err: |
468 | if (machine->ops && machine->ops->shutdown) | 468 | if (machine->ops && machine->ops->shutdown) |
469 | machine->ops->shutdown(substream); | 469 | machine->ops->shutdown(substream); |
470 | 470 | ||
471 | machine_err: | ||
472 | if (codec_dai->ops->shutdown) | ||
473 | codec_dai->ops->shutdown(substream, codec_dai); | ||
474 | |||
471 | codec_dai_err: | 475 | codec_dai_err: |
472 | if (platform->pcm_ops->close) | 476 | if (platform->pcm_ops->close) |
473 | platform->pcm_ops->close(substream); | 477 | platform->pcm_ops->close(substream); |