ASoC: soc-dai: add snd_soc_dai_trigger()

Current ALSA SoC is directly using dai->driver->ops->xxx,
thus, it has deep nested bracket, and it makes code unreadable.
This patch adds new snd_soc_dai_trigger() and use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sgqyhn40.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
此提交包含在:
Kuninori Morimoto
2019-07-22 10:33:51 +09:00
提交者 Mark Brown
父節點 4beb8e109d
當前提交 95aef35533
共有 3 個檔案被更改,包括 20 行新增11 行删除

查看文件

@@ -318,3 +318,15 @@ int snd_soc_dai_prepare(struct snd_soc_dai *dai,
return ret;
}
int snd_soc_dai_trigger(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream,
int cmd)
{
int ret = 0;
if (dai->driver->ops->trigger)
ret = dai->driver->ops->trigger(substream, cmd, dai);
return ret;
}