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>
此提交包含在:
@@ -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;
|
||||
}
|
||||
|
新增問題並參考
封鎖使用者