未验证 提交 0be429f9 编写于 作者: K Kuninori Morimoto 提交者: Mark Brown
上级 f183f927
...@@ -37,6 +37,14 @@ static int soc_rtd_startup(struct snd_soc_pcm_runtime *rtd, ...@@ -37,6 +37,14 @@ static int soc_rtd_startup(struct snd_soc_pcm_runtime *rtd,
return 0; return 0;
} }
static void soc_rtd_shutdown(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_substream *substream)
{
if (rtd->dai_link->ops &&
rtd->dai_link->ops->shutdown)
rtd->dai_link->ops->shutdown(substream);
}
/** /**
* snd_soc_runtime_activate() - Increment active count for PCM runtime components * snd_soc_runtime_activate() - Increment active count for PCM runtime components
* @rtd: ASoC PCM runtime that is activated * @rtd: ASoC PCM runtime that is activated
...@@ -602,8 +610,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) ...@@ -602,8 +610,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
return 0; return 0;
config_err: config_err:
if (rtd->dai_link->ops->shutdown) soc_rtd_shutdown(rtd, substream);
rtd->dai_link->ops->shutdown(substream);
machine_err: machine_err:
i = rtd->num_codecs; i = rtd->num_codecs;
...@@ -674,8 +681,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) ...@@ -674,8 +681,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
for_each_rtd_codec_dai(rtd, i, codec_dai) for_each_rtd_codec_dai(rtd, i, codec_dai)
snd_soc_dai_shutdown(codec_dai, substream); snd_soc_dai_shutdown(codec_dai, substream);
if (rtd->dai_link->ops->shutdown) soc_rtd_shutdown(rtd, substream);
rtd->dai_link->ops->shutdown(substream);
soc_pcm_components_close(substream, NULL); soc_pcm_components_close(substream, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册