Merge commit 'v2.6.34-rc1' into for-2.6.35

This commit is contained in:
Mark Brown
2010-03-10 15:02:37 +00:00
6786 changed files with 408125 additions and 179493 deletions

View File

@@ -427,24 +427,24 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
if (!runtime->hw.rates) {
printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",
codec_dai->name, cpu_dai->name);
goto machine_err;
goto config_err;
}
if (!runtime->hw.formats) {
printk(KERN_ERR "asoc: %s <-> %s No matching formats\n",
codec_dai->name, cpu_dai->name);
goto machine_err;
goto config_err;
}
if (!runtime->hw.channels_min || !runtime->hw.channels_max) {
printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",
codec_dai->name, cpu_dai->name);
goto machine_err;
goto config_err;
}
/* Symmetry only applies if we've already got an active stream. */
if (cpu_dai->active || codec_dai->active) {
ret = soc_pcm_apply_symmetry(substream);
if (ret != 0)
goto machine_err;
goto config_err;
}
pr_debug("asoc: %s <-> %s info:\n", codec_dai->name, cpu_dai->name);
@@ -467,10 +467,14 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
mutex_unlock(&pcm_mutex);
return 0;
machine_err:
config_err:
if (machine->ops && machine->ops->shutdown)
machine->ops->shutdown(substream);
machine_err:
if (codec_dai->ops->shutdown)
codec_dai->ops->shutdown(substream, codec_dai);
codec_dai_err:
if (platform->pcm_ops->close)
platform->pcm_ops->close(substream);
@@ -1002,6 +1006,12 @@ static int soc_resume(struct device *dev)
struct snd_soc_card *card = socdev->card;
struct snd_soc_dai *cpu_dai = card->dai_link[0].cpu_dai;
/* If the initialization of this soc device failed, there is no codec
* associated with it. Just bail out in this case.
*/
if (!card->codec)
return 0;
/* AC97 devices might have other drivers hanging off them so
* need to resume immediately. Other drivers don't have that
* problem and may take a substantial amount of time to resume