Lines Matching refs:substream

37 #define soc_link_mark_push(rtd, substream, tgt)		((rtd)->mark_##tgt = substream)  argument
38 #define soc_link_mark_pop(rtd, substream, tgt) ((rtd)->mark_##tgt = NULL) argument
39 #define soc_link_mark_match(rtd, substream, tgt) ((rtd)->mark_##tgt == substream) argument
68 int snd_soc_link_startup(struct snd_pcm_substream *substream) in snd_soc_link_startup() argument
70 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in snd_soc_link_startup()
75 ret = rtd->dai_link->ops->startup(substream); in snd_soc_link_startup()
79 soc_link_mark_push(rtd, substream, startup); in snd_soc_link_startup()
84 void snd_soc_link_shutdown(struct snd_pcm_substream *substream, in snd_soc_link_shutdown() argument
87 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in snd_soc_link_shutdown()
89 if (rollback && !soc_link_mark_match(rtd, substream, startup)) in snd_soc_link_shutdown()
94 rtd->dai_link->ops->shutdown(substream); in snd_soc_link_shutdown()
97 soc_link_mark_pop(rtd, substream, startup); in snd_soc_link_shutdown()
100 int snd_soc_link_prepare(struct snd_pcm_substream *substream) in snd_soc_link_prepare() argument
102 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in snd_soc_link_prepare()
107 ret = rtd->dai_link->ops->prepare(substream); in snd_soc_link_prepare()
112 int snd_soc_link_hw_params(struct snd_pcm_substream *substream, in snd_soc_link_hw_params() argument
115 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in snd_soc_link_hw_params()
120 ret = rtd->dai_link->ops->hw_params(substream, params); in snd_soc_link_hw_params()
124 soc_link_mark_push(rtd, substream, hw_params); in snd_soc_link_hw_params()
129 void snd_soc_link_hw_free(struct snd_pcm_substream *substream, int rollback) in snd_soc_link_hw_free() argument
131 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in snd_soc_link_hw_free()
133 if (rollback && !soc_link_mark_match(rtd, substream, hw_params)) in snd_soc_link_hw_free()
138 rtd->dai_link->ops->hw_free(substream); in snd_soc_link_hw_free()
141 soc_link_mark_pop(rtd, substream, hw_params); in snd_soc_link_hw_free()
144 static int soc_link_trigger(struct snd_pcm_substream *substream, int cmd) in soc_link_trigger() argument
146 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in soc_link_trigger()
151 ret = rtd->dai_link->ops->trigger(substream, cmd); in soc_link_trigger()
156 int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd, in snd_soc_link_trigger() argument
159 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); in snd_soc_link_trigger()
166 ret = soc_link_trigger(substream, cmd); in snd_soc_link_trigger()
169 soc_link_mark_push(rtd, substream, trigger); in snd_soc_link_trigger()
174 if (rollback && !soc_link_mark_match(rtd, substream, trigger)) in snd_soc_link_trigger()
177 ret = soc_link_trigger(substream, cmd); in snd_soc_link_trigger()
178 soc_link_mark_pop(rtd, substream, startup); in snd_soc_link_trigger()