Lines Matching full:dpcm
25 #include <sound/soc-dpcm.h>
55 if (fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE)
65 if ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) || in snd_soc_dpcm_be_can_update()
66 ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_BE) && in snd_soc_dpcm_be_can_update()
67 be->dpcm[stream].runtime_update)) in snd_soc_dpcm_be_can_update()
78 struct snd_soc_dpcm *dpcm; in snd_soc_dpcm_check_state() local
83 for_each_dpcm_fe(be, stream, dpcm) { in snd_soc_dpcm_check_state()
85 if (dpcm->fe == fe) in snd_soc_dpcm_check_state()
88 state = dpcm->fe->dpcm[stream].state; in snd_soc_dpcm_check_state()
193 struct snd_pcm_hw_params *params = &fe->dpcm[stream].hw_params; in dpcm_show_state()
194 struct snd_soc_dpcm *dpcm; in dpcm_show_state() local
203 dpcm_state_string(fe->dpcm[stream].state)); in dpcm_show_state()
205 if ((fe->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_show_state()
206 (fe->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) in dpcm_show_state()
217 if (list_empty(&fe->dpcm[stream].be_clients)) { in dpcm_show_state()
223 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_show_state()
224 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_show_state()
225 params = &be->dpcm[stream].hw_params; in dpcm_show_state()
232 dpcm_state_string(be->dpcm[stream].state)); in dpcm_show_state()
234 if ((be->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_show_state()
235 (be->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) in dpcm_show_state()
300 static void dpcm_create_debugfs_state(struct snd_soc_dpcm *dpcm, int stream) in dpcm_create_debugfs_state() argument
304 name = kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, in dpcm_create_debugfs_state()
307 dpcm->debugfs_state = debugfs_create_dir( in dpcm_create_debugfs_state()
308 name, dpcm->fe->debugfs_dpcm_root); in dpcm_create_debugfs_state()
309 debugfs_create_u32("state", 0644, dpcm->debugfs_state, in dpcm_create_debugfs_state()
310 &dpcm->state); in dpcm_create_debugfs_state()
315 static void dpcm_remove_debugfs_state(struct snd_soc_dpcm *dpcm) in dpcm_remove_debugfs_state() argument
317 debugfs_remove_recursive(dpcm->debugfs_state); in dpcm_remove_debugfs_state()
321 static inline void dpcm_create_debugfs_state(struct snd_soc_dpcm *dpcm, in dpcm_create_debugfs_state() argument
326 static inline void dpcm_remove_debugfs_state(struct snd_soc_dpcm *dpcm) in dpcm_remove_debugfs_state() argument
344 if (state == SND_SOC_DPCM_UPDATE_NO && fe->dpcm[stream].trigger_pending) { in dpcm_set_fe_update_state()
346 fe->dpcm[stream].trigger_pending - 1); in dpcm_set_fe_update_state()
347 fe->dpcm[stream].trigger_pending = 0; in dpcm_set_fe_update_state()
349 fe->dpcm[stream].runtime_update = state; in dpcm_set_fe_update_state()
356 be->dpcm[stream].runtime_update = state; in dpcm_set_be_update_state()
418 /* DPCM stream event, send event to FE and all active BEs. */
422 struct snd_soc_dpcm *dpcm; in dpcm_dapm_stream_event() local
426 for_each_dpcm_be(fe, dir, dpcm) { in dpcm_dapm_stream_event()
428 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_dapm_stream_event()
434 (be->dpcm[dir].users >= 1)) in dpcm_dapm_stream_event()
819 /* PCM close ops for non-DPCM streams */
935 /* PCM open ops for non-DPCM streams */
997 /* PCM prepare ops for non-DPCM streams */
1072 /* hw_free PCM ops for non-DPCM streams */
1190 /* hw_params PCM ops for non-DPCM streams */
1323 struct snd_soc_dpcm *dpcm; in dpcm_be_connect() local
1328 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_connect()
1329 if (dpcm->be == be && dpcm->fe == fe) in dpcm_be_connect()
1346 dpcm = kzalloc(sizeof(struct snd_soc_dpcm), GFP_KERNEL); in dpcm_be_connect()
1347 if (!dpcm) in dpcm_be_connect()
1350 dpcm->be = be; in dpcm_be_connect()
1351 dpcm->fe = fe; in dpcm_be_connect()
1352 dpcm->state = SND_SOC_DPCM_LINK_STATE_NEW; in dpcm_be_connect()
1354 list_add(&dpcm->list_be, &fe->dpcm[stream].be_clients); in dpcm_be_connect()
1355 list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); in dpcm_be_connect()
1358 dev_dbg(fe->dev, "connected new DPCM %s path %s %s %s\n", in dpcm_be_connect()
1362 dpcm_create_debugfs_state(dpcm, stream); in dpcm_be_connect()
1371 struct snd_soc_dpcm *dpcm; in dpcm_be_reparent() local
1375 if (!be->dpcm[stream].users) in dpcm_be_reparent()
1382 for_each_dpcm_fe(be, stream, dpcm) { in dpcm_be_reparent()
1383 if (dpcm->fe == fe) in dpcm_be_reparent()
1388 dpcm->fe->dai_link->name, in dpcm_be_reparent()
1389 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_reparent()
1391 fe_substream = snd_soc_dpcm_get_substream(dpcm->fe, stream); in dpcm_be_reparent()
1400 struct snd_soc_dpcm *dpcm, *d; in dpcm_be_disconnect() local
1407 for_each_dpcm_be_safe(fe, stream, dpcm, d) { in dpcm_be_disconnect()
1410 dpcm->be->dai_link->name); in dpcm_be_disconnect()
1412 if (dpcm->state != SND_SOC_DPCM_LINK_STATE_FREE) in dpcm_be_disconnect()
1417 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_disconnect()
1420 dpcm_be_reparent(fe, dpcm->be, stream); in dpcm_be_disconnect()
1422 list_del(&dpcm->list_be); in dpcm_be_disconnect()
1423 list_move(&dpcm->list_fe, &deleted_dpcms); in dpcm_be_disconnect()
1428 dpcm = list_first_entry(&deleted_dpcms, struct snd_soc_dpcm, in dpcm_be_disconnect()
1430 list_del(&dpcm->list_fe); in dpcm_be_disconnect()
1431 dpcm_remove_debugfs_state(dpcm); in dpcm_be_disconnect()
1432 kfree(dpcm); in dpcm_be_disconnect()
1536 static bool dpcm_be_is_active(struct snd_soc_dpcm *dpcm, int stream, in dpcm_be_is_active() argument
1543 for_each_rtd_dais(dpcm->be, i, dai) { in dpcm_be_is_active()
1560 struct snd_soc_dpcm *dpcm; in dpcm_prune_paths() local
1564 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_prune_paths()
1565 if (dpcm_be_is_active(dpcm, stream, *list_)) in dpcm_prune_paths()
1570 dpcm->be->dai_link->name, fe->dai_link->name); in dpcm_prune_paths()
1571 dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; in dpcm_prune_paths()
1572 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_prune_paths()
1624 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_add_paths()
1625 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_add_paths()
1661 struct snd_soc_dpcm *dpcm; in dpcm_clear_pending_state() local
1663 for_each_dpcm_be(fe, stream, dpcm) in dpcm_clear_pending_state()
1664 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_NO); in dpcm_clear_pending_state()
1670 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_stop() local
1673 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_stop()
1674 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_stop()
1678 if (dpcm == last) in dpcm_be_dai_stop()
1685 if (be->dpcm[stream].users == 0) { in dpcm_be_dai_stop()
1688 be->dpcm[stream].state); in dpcm_be_dai_stop()
1692 if (--be->dpcm[stream].users != 0) in dpcm_be_dai_stop()
1695 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) { in dpcm_be_dai_stop()
1699 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) { in dpcm_be_dai_stop()
1701 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_stop()
1707 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_stop()
1715 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_startup() local
1719 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_startup()
1722 be = dpcm->be; in dpcm_be_dai_startup()
1735 /* first time the dpcm is open ? */ in dpcm_be_dai_startup()
1736 if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) { in dpcm_be_dai_startup()
1739 be->dpcm[stream].state); in dpcm_be_dai_startup()
1743 if (be->dpcm[stream].users++ != 0) in dpcm_be_dai_startup()
1746 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_be_dai_startup()
1747 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_be_dai_startup()
1756 be->dpcm[stream].users--; in dpcm_be_dai_startup()
1757 if (be->dpcm[stream].users < 0) in dpcm_be_dai_startup()
1760 be->dpcm[stream].state); in dpcm_be_dai_startup()
1762 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_startup()
1765 be->dpcm[stream].be_start = 0; in dpcm_be_dai_startup()
1766 be->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in dpcm_be_dai_startup()
1773 dpcm_be_dai_startup_rollback(fe, stream, dpcm); in dpcm_be_dai_startup()
1818 struct snd_soc_dpcm *dpcm; in dpcm_runtime_setup_be_format() local
1830 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_runtime_setup_be_format()
1831 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_format()
1856 struct snd_soc_dpcm *dpcm; in dpcm_runtime_setup_be_chan() local
1867 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_runtime_setup_be_chan()
1868 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_chan()
1904 struct snd_soc_dpcm *dpcm; in dpcm_runtime_setup_be_rate() local
1915 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_runtime_setup_be_rate()
1916 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_rate()
1939 struct snd_soc_dpcm *dpcm; in dpcm_apply_symmetry() local
1956 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_apply_symmetry()
1957 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_apply_symmetry()
2002 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in dpcm_fe_dai_startup()
2041 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_fe_dai_shutdown()
2048 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_hw_free() local
2052 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_hw_free()
2054 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_hw_free()
2067 if (be->dpcm[stream].users > 1) in dpcm_be_dai_hw_free()
2070 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_free()
2071 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_hw_free()
2072 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_free()
2073 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) && in dpcm_be_dai_hw_free()
2074 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_hw_free()
2075 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_hw_free()
2083 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_hw_free()
2104 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_fe_dai_hw_free()
2115 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_hw_params() local
2118 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_hw_params()
2121 be = dpcm->be; in dpcm_be_dai_hw_params()
2128 /* copy params for each dpcm */ in dpcm_be_dai_hw_params()
2129 memcpy(&hw_params, &fe->dpcm[stream].hw_params, in dpcm_be_dai_hw_params()
2138 memcpy(&be->dpcm[stream].hw_params, &hw_params, in dpcm_be_dai_hw_params()
2145 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2146 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2147 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE)) in dpcm_be_dai_hw_params()
2157 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_be_dai_hw_params()
2166 for_each_dpcm_be_rollback(fe, stream, dpcm) { in dpcm_be_dai_hw_params()
2167 be = dpcm->be; in dpcm_be_dai_hw_params()
2177 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2178 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2179 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_params()
2180 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) in dpcm_be_dai_hw_params()
2198 memcpy(&fe->dpcm[stream].hw_params, params, in dpcm_fe_dai_hw_params()
2213 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_fe_dai_hw_params()
2227 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_trigger() local
2231 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_trigger()
2234 be = dpcm->be; in dpcm_be_dai_trigger()
2248 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2249 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_trigger()
2250 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_trigger()
2251 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2254 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2255 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2258 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_PAUSED) in dpcm_be_dai_trigger()
2265 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2269 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2272 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_trigger()
2275 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2276 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2281 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2285 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2288 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2289 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2290 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2293 fe->dpcm[stream].fe_pause = false; in dpcm_be_dai_trigger()
2294 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2296 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2297 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2302 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2306 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2309 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2310 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2313 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2314 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2316 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2320 if (fe->dpcm[stream].fe_pause) { in dpcm_be_dai_trigger()
2322 fe->dpcm[stream].fe_pause = false; in dpcm_be_dai_trigger()
2323 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2326 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2332 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2333 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2335 fe->dpcm[stream].fe_pause = true; in dpcm_be_dai_trigger()
2336 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2341 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2342 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2344 be->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in dpcm_be_dai_trigger()
2348 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2351 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2352 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2357 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2361 be->dpcm[stream].state = SND_SOC_DPCM_STATE_SUSPEND; in dpcm_be_dai_trigger()
2364 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2367 fe->dpcm[stream].fe_pause = true; in dpcm_be_dai_trigger()
2368 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2370 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2371 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2376 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2380 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2431 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; in dpcm_fe_dai_do_trigger()
2487 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_fe_dai_do_trigger()
2491 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in dpcm_fe_dai_do_trigger()
2494 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_fe_dai_do_trigger()
2499 fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; in dpcm_fe_dai_do_trigger()
2511 if (fe->dpcm[stream].runtime_update != SND_SOC_DPCM_UPDATE_NO) { in dpcm_fe_dai_trigger()
2512 fe->dpcm[stream].trigger_pending = cmd + 1; in dpcm_fe_dai_trigger()
2522 struct snd_soc_dpcm *dpcm; in dpcm_be_dai_prepare() local
2525 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_be_dai_prepare()
2527 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_prepare()
2538 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_prepare()
2539 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_prepare()
2540 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND) && in dpcm_be_dai_prepare()
2541 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_prepare()
2551 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_be_dai_prepare()
2575 if (list_empty(&fe->dpcm[stream].be_clients)) { in dpcm_fe_dai_prepare()
2594 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_fe_dai_prepare()
2630 struct snd_soc_dpcm *dpcm; in dpcm_run_update_startup() local
2637 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_FREE || in dpcm_run_update_startup()
2638 fe->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE) { in dpcm_run_update_startup()
2640 fe->dai_link->name, fe->dpcm[stream].state); in dpcm_run_update_startup()
2651 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_OPEN) in dpcm_run_update_startup()
2659 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_PARAMS) in dpcm_run_update_startup()
2670 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_PREPARE || in dpcm_run_update_startup()
2671 fe->dpcm[stream].state == SND_SOC_DPCM_STATE_STOP) in dpcm_run_update_startup()
2686 for_each_dpcm_be(fe, stream, dpcm) { in dpcm_run_update_startup()
2687 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_run_update_startup()
2693 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE || in dpcm_run_update_startup()
2694 be->dpcm[stream].state == SND_SOC_DPCM_STATE_NEW) in dpcm_run_update_startup()
2695 dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; in dpcm_run_update_startup()
2721 dev_dbg(fe->dev, "ASoC: DPCM %s runtime update for FE %s\n", in soc_dpcm_fe_runtime_update()
2792 struct snd_soc_dpcm *dpcm; in dpcm_fe_dai_cleanup() local
2798 for_each_dpcm_be(fe, stream, dpcm) in dpcm_fe_dai_cleanup()
2799 dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE; in dpcm_fe_dai_cleanup()
2860 dev_err(rtd->dev, "DPCM doesn't support Multi CPU for Front-Ends yet\n"); in soc_get_playback_capture()
2879 * DPCM Codec has been no checked before. in soc_get_playback_capture()