Lines Matching full:dpcm
25 #include <sound/soc-dpcm.h>
56 if (fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE)
66 if ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) || in snd_soc_dpcm_be_can_update()
67 ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_BE) && in snd_soc_dpcm_be_can_update()
68 be->dpcm[stream].runtime_update)) in snd_soc_dpcm_be_can_update()
79 struct snd_soc_dpcm *dpcm; in snd_soc_dpcm_check_state() local
84 for_each_dpcm_fe(be, stream, dpcm) { in snd_soc_dpcm_check_state()
86 if (dpcm->fe == fe) in snd_soc_dpcm_check_state()
89 state = dpcm->fe->dpcm[stream].state; in snd_soc_dpcm_check_state()
194 struct snd_pcm_hw_params *params = &fe->dpcm[stream].hw_params; in dpcm_show_state()
195 struct snd_soc_dpcm *dpcm; in dpcm_show_state() local
204 dpcm_state_string(fe->dpcm[stream].state)); in dpcm_show_state()
206 if ((fe->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_show_state()
207 (fe->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) in dpcm_show_state()
218 if (list_empty(&fe->dpcm[stream].be_clients)) { in dpcm_show_state()
224 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_show_state()
225 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_show_state()
226 params = &be->dpcm[stream].hw_params; in dpcm_show_state()
233 dpcm_state_string(be->dpcm[stream].state)); in dpcm_show_state()
235 if ((be->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_show_state()
236 (be->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) in dpcm_show_state()
301 static void dpcm_create_debugfs_state(struct snd_soc_dpcm *dpcm, int stream) in dpcm_create_debugfs_state() argument
305 name = kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, in dpcm_create_debugfs_state()
308 dpcm->debugfs_state = debugfs_create_dir( in dpcm_create_debugfs_state()
309 name, dpcm->fe->debugfs_dpcm_root); in dpcm_create_debugfs_state()
310 debugfs_create_u32("state", 0644, dpcm->debugfs_state, in dpcm_create_debugfs_state()
311 &dpcm->state); in dpcm_create_debugfs_state()
316 static void dpcm_remove_debugfs_state(struct snd_soc_dpcm *dpcm) in dpcm_remove_debugfs_state() argument
318 debugfs_remove_recursive(dpcm->debugfs_state); in dpcm_remove_debugfs_state()
322 static inline void dpcm_create_debugfs_state(struct snd_soc_dpcm *dpcm, in dpcm_create_debugfs_state() argument
327 static inline void dpcm_remove_debugfs_state(struct snd_soc_dpcm *dpcm) in dpcm_remove_debugfs_state() argument
345 if (state == SND_SOC_DPCM_UPDATE_NO && fe->dpcm[stream].trigger_pending) { in dpcm_set_fe_update_state()
347 fe->dpcm[stream].trigger_pending - 1); in dpcm_set_fe_update_state()
348 fe->dpcm[stream].trigger_pending = 0; in dpcm_set_fe_update_state()
350 fe->dpcm[stream].runtime_update = state; in dpcm_set_fe_update_state()
357 be->dpcm[stream].runtime_update = state; in dpcm_set_be_update_state()
435 /* DPCM stream event, send event to FE and all active BEs. */
439 struct snd_soc_dpcm *dpcm; in dpcm_dapm_stream_event() local
443 for_each_dpcm_be(fe, dir, dpcm) { in dpcm_dapm_stream_event()
445 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_dapm_stream_event()
451 (be->dpcm[dir].users >= 1)) in dpcm_dapm_stream_event()
835 /* PCM close ops for non-DPCM streams */
951 /* PCM open ops for non-DPCM streams */
1007 /* PCM prepare ops for non-DPCM streams */
1075 /* hw_free PCM ops for non-DPCM streams */
1193 /* hw_params PCM ops for non-DPCM streams */
1326 struct snd_soc_dpcm *dpcm; in dpcm_be_connect() local
1331 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_connect()
1332 if (dpcm->be == be && dpcm->fe == fe) in dpcm_be_connect()
1349 dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_KERNEL); in dpcm_be_connect()
1350 if (!dpcm) in dpcm_be_connect()
1353 dpcm->be = be; in dpcm_be_connect()
1354 dpcm->fe = fe; in dpcm_be_connect()
1355 dpcm->state = SND_SOC_DPCM_LINK_STATE_NEW; in dpcm_be_connect()
1357 list_add(&dpcm->list_be, &fe->dpcm[stream].be_clients); in dpcm_be_connect()
1358 list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); in dpcm_be_connect()
1361 dev_dbg(fe->dev, "connected new DPCM %s path %s %s %s\n", in dpcm_be_connect()
1365 dpcm_create_debugfs_state(dpcm, stream); in dpcm_be_connect()
1374 struct snd_soc_dpcm *dpcm; in dpcm_be_reparent() local
1378 if (!be->dpcm[stream].users) in dpcm_be_reparent()
1385 for_each_dpcm_fe(be, stream, dpcm) { in dpcm_be_reparent()
1386 if (dpcm->fe == fe) in dpcm_be_reparent()
1391 dpcm->fe->dai_link->name, in dpcm_be_reparent()
1392 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_reparent()
1394 fe_substream = snd_soc_dpcm_get_substream(dpcm->fe, stream); in dpcm_be_reparent()
1403 struct snd_soc_dpcm *dpcm, *d; in dpcm_be_disconnect() local
1410 for_each_dpcm_be_safe(fe, stream, dpcm, d) { in dpcm_be_disconnect()
1413 dpcm->be->dai_link->name); in dpcm_be_disconnect()
1415 if (dpcm->state != SND_SOC_DPCM_LINK_STATE_FREE) in dpcm_be_disconnect()
1420 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_disconnect()
1423 dpcm_be_reparent(fe, dpcm->be, stream); in dpcm_be_disconnect()
1425 list_del(&dpcm->list_be); in dpcm_be_disconnect()
1426 list_move(&dpcm->list_fe, &deleted_dpcms); in dpcm_be_disconnect()
1431 dpcm = list_first_entry(&deleted_dpcms, struct snd_soc_dpcm, in dpcm_be_disconnect()
1433 list_del(&dpcm->list_fe); in dpcm_be_disconnect()
1434 dpcm_remove_debugfs_state(dpcm); in dpcm_be_disconnect()
1435 kfree(dpcm); in dpcm_be_disconnect()
1539 static bool dpcm_be_is_active(struct snd_soc_dpcm *dpcm, int stream, in dpcm_be_is_active() argument
1546 for_each_rtd_dais(dpcm->be, i, dai) { in dpcm_be_is_active()
1563 struct snd_soc_dpcm *dpcm; in dpcm_prune_paths() local
1567 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_prune_paths()
1568 if (dpcm_be_is_active(dpcm, stream, *list_)) in dpcm_prune_paths()
1573 dpcm->be->dai_link->name, fe->dai_link->name); in dpcm_prune_paths()
1574 dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; in dpcm_prune_paths()
1575 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_prune_paths()
1627 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_add_paths()
1628 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_add_paths()
1664 struct snd_soc_dpcm *dpcm; in dpcm_clear_pending_state() local
1666 for_each_dpcm_be(fe, stream, dpcm) in dpcm_clear_pending_state()
1667 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_NO); in dpcm_clear_pending_state()
1673 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_stop() local
1676 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_stop()
1677 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_stop()
1681 if (dpcm == last) in dpcm_be_dai_stop()
1688 if (be->dpcm[stream].users == 0) { in dpcm_be_dai_stop()
1691 be->dpcm[stream].state); in dpcm_be_dai_stop()
1695 if (--be->dpcm[stream].users != 0) in dpcm_be_dai_stop()
1698 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) { in dpcm_be_dai_stop()
1702 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) { in dpcm_be_dai_stop()
1704 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_stop()
1710 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_stop()
1718 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_startup() local
1722 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_startup()
1725 be = dpcm->be; in dpcm_be_dai_startup()
1738 /* first time the dpcm is open ? */ in dpcm_be_dai_startup()
1739 if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) { in dpcm_be_dai_startup()
1742 be->dpcm[stream].state); in dpcm_be_dai_startup()
1746 if (be->dpcm[stream].users++ != 0) in dpcm_be_dai_startup()
1749 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_be_dai_startup()
1750 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_be_dai_startup()
1759 be->dpcm[stream].users--; in dpcm_be_dai_startup()
1760 if (be->dpcm[stream].users < 0) in dpcm_be_dai_startup()
1763 be->dpcm[stream].state); in dpcm_be_dai_startup()
1765 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_startup()
1768 be->dpcm[stream].be_start = 0; in dpcm_be_dai_startup()
1769 be->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in dpcm_be_dai_startup()
1776 dpcm_be_dai_startup_rollback(fe, stream, dpcm); in dpcm_be_dai_startup()
1821 struct snd_soc_dpcm *dpcm; in dpcm_runtime_setup_be_format() local
1833 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_runtime_setup_be_format()
1834 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_format()
1859 struct snd_soc_dpcm *dpcm; in dpcm_runtime_setup_be_chan() local
1870 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_runtime_setup_be_chan()
1871 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_chan()
1907 struct snd_soc_dpcm *dpcm; in dpcm_runtime_setup_be_rate() local
1918 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_runtime_setup_be_rate()
1919 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_rate()
1942 struct snd_soc_dpcm *dpcm; in dpcm_apply_symmetry() local
1959 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_apply_symmetry()
1960 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_apply_symmetry()
2005 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in dpcm_fe_dai_startup()
2044 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_fe_dai_shutdown()
2051 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_hw_free() local
2055 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_hw_free()
2057 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_hw_free()
2070 if (be->dpcm[stream].users > 1) in dpcm_be_dai_hw_free()
2073 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_free()
2074 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_hw_free()
2075 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_free()
2076 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) && in dpcm_be_dai_hw_free()
2077 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_hw_free()
2078 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_hw_free()
2086 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_hw_free()
2107 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_fe_dai_hw_free()
2118 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_hw_params() local
2121 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_hw_params()
2124 be = dpcm->be; in dpcm_be_dai_hw_params()
2131 /* copy params for each dpcm */ in dpcm_be_dai_hw_params()
2132 memcpy(&hw_params, &fe->dpcm[stream].hw_params, in dpcm_be_dai_hw_params()
2141 memcpy(&be->dpcm[stream].hw_params, &hw_params, in dpcm_be_dai_hw_params()
2148 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2149 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2150 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE)) in dpcm_be_dai_hw_params()
2160 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_be_dai_hw_params()
2169 for_each_dpcm_be_rollback(fe, stream, dpcm) { in dpcm_be_dai_hw_params()
2170 be = dpcm->be; in dpcm_be_dai_hw_params()
2180 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2181 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2182 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_params()
2183 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) in dpcm_be_dai_hw_params()
2201 memcpy(&fe->dpcm[stream].hw_params, params, in dpcm_fe_dai_hw_params()
2216 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_fe_dai_hw_params()
2230 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_trigger() local
2234 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_trigger()
2237 be = dpcm->be; in dpcm_be_dai_trigger()
2251 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2252 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_trigger()
2253 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_trigger()
2254 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2257 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2258 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2261 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_PAUSED) in dpcm_be_dai_trigger()
2268 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2272 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2275 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_trigger()
2278 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2279 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2284 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2288 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2291 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2292 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2293 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2296 fe->dpcm[stream].fe_pause = false; in dpcm_be_dai_trigger()
2297 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2299 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2300 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2305 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2309 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2312 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2313 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2316 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2317 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2319 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2323 if (fe->dpcm[stream].fe_pause) { in dpcm_be_dai_trigger()
2325 fe->dpcm[stream].fe_pause = false; in dpcm_be_dai_trigger()
2326 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2329 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2335 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2336 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2338 fe->dpcm[stream].fe_pause = true; in dpcm_be_dai_trigger()
2339 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2344 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2345 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2347 be->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in dpcm_be_dai_trigger()
2351 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2354 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2355 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2360 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2364 be->dpcm[stream].state = SND_SOC_DPCM_STATE_SUSPEND; in dpcm_be_dai_trigger()
2367 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2370 fe->dpcm[stream].fe_pause = true; in dpcm_be_dai_trigger()
2371 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2373 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2374 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2379 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2383 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2434 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in dpcm_fe_dai_do_trigger()
2490 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_fe_dai_do_trigger()
2494 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in dpcm_fe_dai_do_trigger()
2497 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_fe_dai_do_trigger()
2502 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in dpcm_fe_dai_do_trigger()
2514 if (fe->dpcm[stream].runtime_update != SND_SOC_DPCM_UPDATE_NO) { in dpcm_fe_dai_trigger()
2515 fe->dpcm[stream].trigger_pending = cmd + 1; in dpcm_fe_dai_trigger()
2525 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_prepare() local
2528 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_prepare()
2530 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_prepare()
2541 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_prepare()
2542 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_prepare()
2543 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND) && in dpcm_be_dai_prepare()
2544 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_prepare()
2554 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_be_dai_prepare()
2572 if (list_empty(&fe->dpcm[stream].be_clients)) { in dpcm_fe_dai_prepare()
2591 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_fe_dai_prepare()
2621 struct snd_soc_dpcm *dpcm; in dpcm_run_update_startup() local
2628 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_FREE || in dpcm_run_update_startup()
2629 fe->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE) { in dpcm_run_update_startup()
2631 fe->dai_link->name, fe->dpcm[stream].state); in dpcm_run_update_startup()
2642 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_OPEN) in dpcm_run_update_startup()
2650 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_PARAMS) in dpcm_run_update_startup()
2661 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_PREPARE || in dpcm_run_update_startup()
2662 fe->dpcm[stream].state == SND_SOC_DPCM_STATE_STOP) in dpcm_run_update_startup()
2677 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_run_update_startup()
2678 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_run_update_startup()
2684 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE || in dpcm_run_update_startup()
2685 be->dpcm[stream].state == SND_SOC_DPCM_STATE_NEW) in dpcm_run_update_startup()
2686 dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; in dpcm_run_update_startup()
2712 dev_dbg(fe->dev, "ASoC: DPCM %s runtime update for FE %s\n", in soc_dpcm_fe_runtime_update()
2783 struct snd_soc_dpcm *dpcm; in dpcm_fe_dai_cleanup() local
2789 for_each_dpcm_be(fe, stream, dpcm) in dpcm_fe_dai_cleanup()
2790 dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; in dpcm_fe_dai_cleanup()
2847 dev_err(rtd->dev, "DPCM doesn't support Multi CPU for Front-Ends yet\n"); in soc_get_playback_capture()