Lines Matching full:fe
136 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_open_fe() local
138 fe->pcm->streams[cstream->direction].substream; in soc_compr_open_fe()
139 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); in soc_compr_open_fe()
145 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); in soc_compr_open_fe()
146 fe->dpcm[stream].runtime = fe_substream->runtime; in soc_compr_open_fe()
148 ret = dpcm_path_get(fe, stream, &list); in soc_compr_open_fe()
152 /* calculate valid and active FE <-> BE dpcms */ in soc_compr_open_fe()
153 dpcm_process_paths(fe, stream, &list, 1); in soc_compr_open_fe()
154 fe->dpcm[stream].runtime = fe_substream->runtime; in soc_compr_open_fe()
156 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in soc_compr_open_fe()
158 ret = dpcm_be_dai_startup(fe, stream); in soc_compr_open_fe()
161 for_each_dpcm_be(fe, stream, dpcm) in soc_compr_open_fe()
164 dpcm_be_disconnect(fe, stream); in soc_compr_open_fe()
165 fe->dpcm[stream].runtime = NULL; in soc_compr_open_fe()
181 dpcm_clear_pending_state(fe, stream); in soc_compr_open_fe()
184 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in soc_compr_open_fe()
185 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_open_fe()
187 mutex_lock_nested(&fe->card->pcm_mutex, fe->card->pcm_subclass); in soc_compr_open_fe()
188 snd_soc_runtime_activate(fe, stream); in soc_compr_open_fe()
189 mutex_unlock(&fe->card->pcm_mutex); in soc_compr_open_fe()
191 mutex_unlock(&fe->card->mutex); in soc_compr_open_fe()
202 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_open_fe()
203 mutex_unlock(&fe->card->mutex); in soc_compr_open_fe()
209 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_free_fe() local
210 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); in soc_compr_free_fe()
214 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); in soc_compr_free_fe()
216 mutex_lock_nested(&fe->card->pcm_mutex, fe->card->pcm_subclass); in soc_compr_free_fe()
217 snd_soc_runtime_deactivate(fe, stream); in soc_compr_free_fe()
218 mutex_unlock(&fe->card->pcm_mutex); in soc_compr_free_fe()
220 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in soc_compr_free_fe()
222 dpcm_be_dai_hw_free(fe, stream); in soc_compr_free_fe()
224 dpcm_be_dai_shutdown(fe, stream); in soc_compr_free_fe()
226 /* mark FE's links ready to prune */ in soc_compr_free_fe()
227 for_each_dpcm_be(fe, stream, dpcm) in soc_compr_free_fe()
230 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); in soc_compr_free_fe()
232 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in soc_compr_free_fe()
233 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_free_fe()
235 dpcm_be_disconnect(fe, stream); in soc_compr_free_fe()
237 fe->dpcm[stream].runtime = NULL; in soc_compr_free_fe()
245 mutex_unlock(&fe->card->mutex); in soc_compr_free_fe()
283 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_trigger_fe() local
284 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); in soc_compr_trigger_fe()
292 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); in soc_compr_trigger_fe()
302 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in soc_compr_trigger_fe()
304 ret = dpcm_be_dai_trigger(fe, stream, cmd); in soc_compr_trigger_fe()
310 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in soc_compr_trigger_fe()
314 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in soc_compr_trigger_fe()
317 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in soc_compr_trigger_fe()
322 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_trigger_fe()
323 mutex_unlock(&fe->card->mutex); in soc_compr_trigger_fe()
374 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_set_params_fe() local
376 fe->pcm->streams[cstream->direction].substream; in soc_compr_set_params_fe()
377 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); in soc_compr_set_params_fe()
381 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); in soc_compr_set_params_fe()
388 memset(&fe->dpcm[fe_substream->stream].hw_params, 0, in soc_compr_set_params_fe()
391 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in soc_compr_set_params_fe()
393 ret = dpcm_be_dai_hw_params(fe, stream); in soc_compr_set_params_fe()
397 ret = dpcm_be_dai_prepare(fe, stream); in soc_compr_set_params_fe()
413 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); in soc_compr_set_params_fe()
414 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in soc_compr_set_params_fe()
417 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_set_params_fe()
418 mutex_unlock(&fe->card->mutex); in soc_compr_set_params_fe()