Lines Matching refs:fe

70 	struct snd_soc_pcm_runtime *fe = cstream->private_data;  in soc_compr_open_fe()  local
71 struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream; in soc_compr_open_fe()
72 struct snd_soc_platform *platform = fe->platform; in soc_compr_open_fe()
83 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); in soc_compr_open_fe()
94 if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->startup) { in soc_compr_open_fe()
95 ret = fe->dai_link->compr_ops->startup(cstream); in soc_compr_open_fe()
97 pr_err("compress asoc: %s startup failed\n", fe->dai_link->name); in soc_compr_open_fe()
102 fe->dpcm[stream].runtime = fe_substream->runtime; in soc_compr_open_fe()
104 ret = dpcm_path_get(fe, stream, &list); in soc_compr_open_fe()
108 dev_dbg(fe->dev, "ASoC: %s no valid %s route\n", in soc_compr_open_fe()
109 fe->dai_link->name, stream ? "capture" : "playback"); in soc_compr_open_fe()
112 dpcm_process_paths(fe, stream, &list, 1); in soc_compr_open_fe()
114 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in soc_compr_open_fe()
116 ret = dpcm_be_dai_startup(fe, stream); in soc_compr_open_fe()
119 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) in soc_compr_open_fe()
122 dpcm_be_disconnect(fe, stream); in soc_compr_open_fe()
123 fe->dpcm[stream].runtime = NULL; in soc_compr_open_fe()
127 dpcm_clear_pending_state(fe, stream); in soc_compr_open_fe()
130 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in soc_compr_open_fe()
131 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_open_fe()
133 snd_soc_runtime_activate(fe, stream); in soc_compr_open_fe()
135 mutex_unlock(&fe->card->mutex); in soc_compr_open_fe()
140 if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown) in soc_compr_open_fe()
141 fe->dai_link->compr_ops->shutdown(cstream); in soc_compr_open_fe()
146 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_open_fe()
147 mutex_unlock(&fe->card->mutex); in soc_compr_open_fe()
235 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_free_fe() local
236 struct snd_soc_platform *platform = fe->platform; in soc_compr_free_fe()
240 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); in soc_compr_free_fe()
247 snd_soc_runtime_deactivate(fe, stream); in soc_compr_free_fe()
249 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in soc_compr_free_fe()
251 ret = dpcm_be_dai_hw_free(fe, stream); in soc_compr_free_fe()
253 dev_err(fe->dev, "compressed hw_free failed %d\n", ret); in soc_compr_free_fe()
255 ret = dpcm_be_dai_shutdown(fe, stream); in soc_compr_free_fe()
258 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) in soc_compr_free_fe()
261 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); in soc_compr_free_fe()
263 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in soc_compr_free_fe()
264 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_free_fe()
266 dpcm_be_disconnect(fe, stream); in soc_compr_free_fe()
268 fe->dpcm[stream].runtime = NULL; in soc_compr_free_fe()
270 if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown) in soc_compr_free_fe()
271 fe->dai_link->compr_ops->shutdown(cstream); in soc_compr_free_fe()
276 mutex_unlock(&fe->card->mutex); in soc_compr_free_fe()
312 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_trigger_fe() local
313 struct snd_soc_platform *platform = fe->platform; in soc_compr_trigger_fe()
331 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); in soc_compr_trigger_fe()
339 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in soc_compr_trigger_fe()
341 ret = dpcm_be_dai_trigger(fe, stream, cmd); in soc_compr_trigger_fe()
347 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in soc_compr_trigger_fe()
351 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in soc_compr_trigger_fe()
354 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in soc_compr_trigger_fe()
359 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_trigger_fe()
360 mutex_unlock(&fe->card->mutex); in soc_compr_trigger_fe()
414 struct snd_soc_pcm_runtime *fe = cstream->private_data; in soc_compr_set_params_fe() local
415 struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream; in soc_compr_set_params_fe()
416 struct snd_soc_platform *platform = fe->platform; in soc_compr_set_params_fe()
424 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); in soc_compr_set_params_fe()
432 if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->set_params) { in soc_compr_set_params_fe()
433 ret = fe->dai_link->compr_ops->set_params(cstream); in soc_compr_set_params_fe()
443 memset(&fe->dpcm[fe_substream->stream].hw_params, 0, in soc_compr_set_params_fe()
446 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in soc_compr_set_params_fe()
448 ret = dpcm_be_dai_hw_params(fe, stream); in soc_compr_set_params_fe()
452 ret = dpcm_be_dai_prepare(fe, stream); in soc_compr_set_params_fe()
456 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_START); in soc_compr_set_params_fe()
457 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in soc_compr_set_params_fe()
460 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in soc_compr_set_params_fe()
461 mutex_unlock(&fe->card->mutex); in soc_compr_set_params_fe()