diff options
author | Simon Wilson <simonwilson@google.com> | 2011-08-30 13:27:45 -0700 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-08-30 13:27:50 -0700 |
commit | 5e4bfae611adc4258c857e62ed8d8c426daae020 (patch) | |
tree | cb89aa26608e95c965a8d5dd4e4e6819a7349d40 /sound/soc/soc-core.c | |
parent | 9acbd22b228e126b5b6597d34307952bd2940ab0 (diff) | |
parent | 3972071b60fead8dd5daba738dabdaa37e001bf1 (diff) | |
download | kernel_samsung_tuna-5e4bfae611adc4258c857e62ed8d8c426daae020.zip kernel_samsung_tuna-5e4bfae611adc4258c857e62ed8d8c426daae020.tar.gz kernel_samsung_tuna-5e4bfae611adc4258c857e62ed8d8c426daae020.tar.bz2 |
Merge branch 'linux-omap-audio-3.0' into linux-omap-3.0
Signed-off-by: Simon Wilson <simonwilson@google.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 67cd155..d92d8e1 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -561,13 +561,22 @@ int soc_pcm_open(struct snd_pcm_substream *substream) if (rtd->dai_link->no_host_mode == SND_SOC_DAI_LINK_NO_HOST) snd_soc_set_runtime_hwparams(substream, &no_host_hardware); + if (rtd->dai_link->pre) { + ret = rtd->dai_link->pre(substream); + if (ret < 0) { + printk(KERN_ERR "asoc: can't setup DAI link %s\n", + rtd->dai_link->name); + goto out; + } + } + /* startup the audio subsystem */ if (cpu_dai->driver->ops->startup) { ret = cpu_dai->driver->ops->startup(substream, cpu_dai); if (ret < 0) { printk(KERN_ERR "asoc: can't open interface %s\n", cpu_dai->name); - goto out; + goto cpu_err; } } @@ -712,6 +721,9 @@ codec_dai_err: platform_err: if (cpu_dai->driver->ops->shutdown) cpu_dai->driver->ops->shutdown(substream, cpu_dai); +cpu_err: + if (rtd->dai_link->post) + rtd->dai_link->post(substream); out: mutex_unlock(&rtd->pcm_mutex); return ret; @@ -790,6 +802,10 @@ int soc_pcm_close(struct snd_pcm_substream *substream) if (platform->driver->ops && platform->driver->ops->close) platform->driver->ops->close(substream); + + if (rtd->dai_link->post) + rtd->dai_link->post(substream); + cpu_dai->runtime = NULL; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |