Lines Matching full:be
37 /* Negative values might be errors */ in _soc_pcm_ret()
144 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_show_state() local
145 params = &be->dpcm[stream].hw_params; in dpcm_show_state()
148 "- %s\n", be->dai_link->name); in dpcm_show_state()
152 dpcm_state_string(be->dpcm[stream].state)); in dpcm_show_state()
154 if ((be->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_show_state()
155 (be->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) in dpcm_show_state()
224 name = kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, in dpcm_create_debugfs_state()
273 static void dpcm_set_be_update_state(struct snd_soc_pcm_runtime *be, in dpcm_set_be_update_state() argument
276 be->dpcm[stream].runtime_update = state; in dpcm_set_be_update_state()
288 * Should typically be called when a stream is opened.
290 * Must be called with the rtd->card->pcm_mutex being held
315 * @rtd: The ASoC PCM runtime that should be checked.
317 * This function checks whether the power down delay should be ignored for a
363 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_dapm_stream_event() local
365 dev_dbg(be->dev, "ASoC: BE %s event %d dir %d\n", in dpcm_dapm_stream_event()
366 be->dai_link->name, event, dir); in dpcm_dapm_stream_event()
369 (be->dpcm[dir].users >= 1)) in dpcm_dapm_stream_event()
372 snd_soc_dapm_stream_event(be, dir, event); in dpcm_dapm_stream_event()
639 * chan min/max cannot be enforced if there are multiple CODEC DAIs in snd_soc_runtime_calc_hw()
641 * channel allocation be fixed up later in snd_soc_runtime_calc_hw()
660 * have bailed out on a higher level, since there would be no CPU or in soc_pcm_init_runtime_hw()
743 * Called by ALSA when a PCM substream is closed. Private data can be
804 * then initialized and any private data can be allocated. This also calls
883 * rate, etc. This function is non atomic and can be called multiple times,
956 /* clear the corresponding DAIs parameters when going to be inactive */ in soc_pcm_hw_clean()
985 * Frees resources allocated by hw_params, can be called multiple times
1007 * function can also be called multiple times and can allocate buffers
1035 * set up transfer direction, it should not need to be in __soc_pcm_hw_params()
1037 * not even be supported by that CODEC. There may be cases in __soc_pcm_hw_params()
1038 * however where a CODEC needs to be set up although it is in __soc_pcm_hw_params()
1218 * the runtime->delay will be updated via snd_soc_pcm_component/dai_delay().
1229 /* should be called *after* snd_soc_pcm_component_pointer() */ in soc_pcm_pointer()
1238 /* connect a FE and BE */
1240 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_connect() argument
1250 if (dpcm->be == be && dpcm->fe == fe) in dpcm_be_connect()
1255 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_connect()
1258 dev_err(be->dev, "%s: FE is atomic but BE is nonatomic, invalid configuration\n", in dpcm_be_connect()
1263 dev_dbg(be->dev, "FE is nonatomic but BE is not, forcing BE as nonatomic\n"); in dpcm_be_connect()
1271 dpcm->be = be; in dpcm_be_connect()
1276 list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); in dpcm_be_connect()
1281 stream ? "<-" : "->", be->dai_link->name); in dpcm_be_connect()
1288 /* reparent a BE onto another FE */
1290 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_reparent() argument
1295 /* reparent if BE is connected to other FEs */ in dpcm_be_reparent()
1296 if (!be->dpcm[stream].users) in dpcm_be_reparent()
1299 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_reparent()
1303 for_each_dpcm_fe(be, stream, dpcm) { in dpcm_be_reparent()
1310 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_reparent()
1318 /* disconnect a BE and FE */
1328 dev_dbg(fe->dev, "ASoC: BE %s disconnect check for %s\n", in dpcm_be_disconnect()
1330 dpcm->be->dai_link->name); in dpcm_be_disconnect()
1337 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_disconnect()
1340 dpcm_be_reparent(fe, dpcm->be, stream); in dpcm_be_disconnect()
1356 /* get BE for DAI widget and stream */
1360 struct snd_soc_pcm_runtime *be; in dpcm_get_be() local
1365 dev_dbg(card->dev, "ASoC: find BE for widget %s\n", widget->name); in dpcm_get_be()
1367 for_each_card_rtds(card, be) { in dpcm_get_be()
1369 if (!be->dai_link->no_pcm) in dpcm_get_be()
1372 if (!snd_soc_dpcm_get_substream(be, stream)) in dpcm_get_be()
1375 for_each_rtd_dais(be, i, dai) { in dpcm_get_be()
1378 dev_dbg(card->dev, "ASoC: try BE : %s\n", in dpcm_get_be()
1382 return be; in dpcm_get_be()
1386 /* Widget provided is not a BE */ in dpcm_get_be()
1462 /* is there a valid DAI widget for this BE */ in dpcm_be_is_active()
1463 for_each_rtd_dais(dpcm->be, i, dai) { in dpcm_be_is_active()
1467 * The BE is pruned only if none of the dai in dpcm_be_is_active()
1483 /* Destroy any old FE <--> BE connections */ in dpcm_prune_paths()
1488 dev_dbg(fe->dev, "ASoC: pruning %s BE %s for %s\n", in dpcm_prune_paths()
1490 dpcm->be->dai_link->name, fe->dai_link->name); in dpcm_prune_paths()
1492 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_prune_paths()
1496 dev_dbg(fe->dev, "ASoC: found %d old BE paths for pruning\n", prune); in dpcm_prune_paths()
1505 struct snd_soc_pcm_runtime *be; in dpcm_add_paths() local
1514 /* Create any new FE <--> BE connections */ in dpcm_add_paths()
1530 /* is there a valid BE rtd for this widget */ in dpcm_add_paths()
1531 be = dpcm_get_be(card, widget, stream); in dpcm_add_paths()
1532 if (!be) { in dpcm_add_paths()
1533 dev_dbg(fe->dev, "ASoC: no BE found for %s\n", in dpcm_add_paths()
1541 * already active BE on such systems. in dpcm_add_paths()
1544 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_add_paths()
1545 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_add_paths()
1548 /* newly connected FE and BE */ in dpcm_add_paths()
1549 err = dpcm_be_connect(fe, be, stream); in dpcm_add_paths()
1558 dpcm_set_be_update_state(be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_add_paths()
1562 dev_dbg(fe->dev, "ASoC: found %d new BE paths\n", new); in dpcm_add_paths()
1567 * Find the corresponding BE DAIs that source or sink audio to this
1584 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_NO); in dpcm_clear_pending_state()
1594 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_stop() local
1596 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_stop()
1601 /* is this op for this BE ? */ in dpcm_be_dai_stop()
1602 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_stop()
1605 if (be->dpcm[stream].users == 0) { in dpcm_be_dai_stop()
1606 dev_err(be->dev, "ASoC: no users %s at close - state %d\n", in dpcm_be_dai_stop()
1608 be->dpcm[stream].state); in dpcm_be_dai_stop()
1612 if (--be->dpcm[stream].users != 0) in dpcm_be_dai_stop()
1615 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) { in dpcm_be_dai_stop()
1619 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) { in dpcm_be_dai_stop()
1620 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_stop()
1621 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_stop()
1625 __soc_pcm_close(be, be_substream); in dpcm_be_dai_stop()
1627 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_stop()
1634 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_startup() local
1638 /* only startup BE DAIs that are either sinks or sources to this FE DAI */ in dpcm_be_dai_startup()
1642 be = dpcm->be; in dpcm_be_dai_startup()
1643 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_startup()
1646 dev_err(be->dev, "ASoC: no backend %s stream\n", in dpcm_be_dai_startup()
1651 /* is this op for this BE ? */ in dpcm_be_dai_startup()
1652 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_startup()
1656 if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) { in dpcm_be_dai_startup()
1657 dev_err(be->dev, "ASoC: too many users %s at open %d\n", in dpcm_be_dai_startup()
1659 be->dpcm[stream].state); in dpcm_be_dai_startup()
1663 if (be->dpcm[stream].users++ != 0) in dpcm_be_dai_startup()
1666 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_be_dai_startup()
1667 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_be_dai_startup()
1670 dev_dbg(be->dev, "ASoC: open %s BE %s\n", in dpcm_be_dai_startup()
1671 stream ? "capture" : "playback", be->dai_link->name); in dpcm_be_dai_startup()
1674 err = __soc_pcm_open(be, be_substream); in dpcm_be_dai_startup()
1676 be->dpcm[stream].users--; in dpcm_be_dai_startup()
1677 if (be->dpcm[stream].users < 0) in dpcm_be_dai_startup()
1678 dev_err(be->dev, "ASoC: no users %s at unwind %d\n", in dpcm_be_dai_startup()
1680 be->dpcm[stream].state); in dpcm_be_dai_startup()
1682 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_startup()
1685 be->dpcm[stream].be_start = 0; in dpcm_be_dai_startup()
1686 be->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in dpcm_be_dai_startup()
1746 * It returns merged BE codec format in dpcm_runtime_setup_be_format()
1751 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_format() local
1755 for_each_rtd_codec_dais(be, i, dai) { in dpcm_runtime_setup_be_format()
1783 * It returns merged BE codec channel; in dpcm_runtime_setup_be_chan()
1788 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_chan() local
1793 for_each_rtd_cpu_dais(be, i, dai) { in dpcm_runtime_setup_be_chan()
1807 * chan min/max cannot be enforced if there are multiple CODEC in dpcm_runtime_setup_be_chan()
1810 if (be->dai_link->num_codecs == 1) { in dpcm_runtime_setup_be_chan()
1812 snd_soc_rtd_to_codec(be, 0), stream); in dpcm_runtime_setup_be_chan()
1831 * It returns merged BE codec channel; in dpcm_runtime_setup_be_rate()
1836 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_rate() local
1841 for_each_rtd_dais(be, i, dai) { in dpcm_runtime_setup_be_rate()
1875 /* apply symmetry for BE */ in dpcm_apply_symmetry()
1877 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_apply_symmetry() local
1879 snd_soc_dpcm_get_substream(be, stream); in dpcm_apply_symmetry()
1974 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_hw_free() local
1976 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_free()
1978 /* is this op for this BE ? */ in dpcm_be_dai_hw_free()
1979 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_free()
1983 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_free()
1986 /* do not free hw if this BE is used by other FE */ in dpcm_be_dai_hw_free()
1987 if (be->dpcm[stream].users > 1) in dpcm_be_dai_hw_free()
1990 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_free()
1991 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_hw_free()
1992 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_free()
1993 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) && in dpcm_be_dai_hw_free()
1994 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_hw_free()
1995 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_hw_free()
1998 dev_dbg(be->dev, "ASoC: hw_free BE %s\n", in dpcm_be_dai_hw_free()
1999 be->dai_link->name); in dpcm_be_dai_hw_free()
2001 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_free()
2003 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_hw_free()
2033 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_hw_params() local
2041 be = dpcm->be; in dpcm_be_dai_hw_params()
2042 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2044 /* is this op for this BE ? */ in dpcm_be_dai_hw_params()
2045 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2053 ret = snd_soc_link_be_hw_params_fixup(be, &hw_params); in dpcm_be_dai_hw_params()
2057 /* copy the fixed-up hw params for BE dai */ in dpcm_be_dai_hw_params()
2058 memcpy(&be->dpcm[stream].hw_params, &hw_params, in dpcm_be_dai_hw_params()
2062 if (!snd_soc_dpcm_can_be_params(fe, be, stream)) in dpcm_be_dai_hw_params()
2065 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2066 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2067 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE)) in dpcm_be_dai_hw_params()
2070 dev_dbg(be->dev, "ASoC: hw_params BE %s\n", in dpcm_be_dai_hw_params()
2071 be->dai_link->name); in dpcm_be_dai_hw_params()
2073 ret = __soc_pcm_hw_params(be, be_substream, &hw_params); in dpcm_be_dai_hw_params()
2077 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_be_dai_hw_params()
2083 __func__, be->dai_link->name, ret); in dpcm_be_dai_hw_params()
2087 be = dpcm->be; in dpcm_be_dai_hw_params()
2088 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2090 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2094 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_params()
2097 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2098 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2099 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_params()
2100 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) in dpcm_be_dai_hw_params()
2103 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_params()
2145 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_trigger() local
2154 be = dpcm->be; in dpcm_be_dai_trigger()
2155 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_trigger()
2157 snd_soc_dpcm_stream_lock_irqsave_nested(be, stream, flags); in dpcm_be_dai_trigger()
2159 /* is this op for this BE ? */ in dpcm_be_dai_trigger()
2160 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_trigger()
2163 dev_dbg(be->dev, "ASoC: trigger BE %s cmd %d\n", in dpcm_be_dai_trigger()
2164 be->dai_link->name, cmd); in dpcm_be_dai_trigger()
2168 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2169 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_trigger()
2170 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_trigger()
2171 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2174 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2175 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2178 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_PAUSED) in dpcm_be_dai_trigger()
2185 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2189 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2192 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_trigger()
2195 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2196 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2201 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2205 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2208 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2209 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2210 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2214 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2216 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2217 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2222 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2226 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2229 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2230 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2233 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2234 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2236 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2243 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2246 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2252 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2253 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2256 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2261 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2262 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2264 be->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in dpcm_be_dai_trigger()
2268 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2271 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2272 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2277 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2281 be->dpcm[stream].state = SND_SOC_DPCM_STATE_SUSPEND; in dpcm_be_dai_trigger()
2284 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2288 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2290 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2291 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2296 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2300 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2304 snd_soc_dpcm_stream_unlock_irqrestore(be, stream, flags); in dpcm_be_dai_trigger()
2455 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_prepare() local
2457 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_prepare()
2459 /* is this op for this BE ? */ in dpcm_be_dai_prepare()
2460 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_prepare()
2463 if (!snd_soc_dpcm_can_be_prepared(fe, be, stream)) in dpcm_be_dai_prepare()
2466 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_prepare()
2467 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_prepare()
2468 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND) && in dpcm_be_dai_prepare()
2469 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_prepare()
2472 dev_dbg(be->dev, "ASoC: prepare BE %s\n", in dpcm_be_dai_prepare()
2473 be->dai_link->name); in dpcm_be_dai_prepare()
2475 ret = __soc_pcm_prepare(be, be_substream); in dpcm_be_dai_prepare()
2479 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_be_dai_prepare()
2536 /* call bespoke trigger - FE takes care of all BE triggers */ in dpcm_run_update_shutdown()
2552 /* run the stream event for each BE */ in dpcm_run_update_shutdown()
2569 /* Only start the BE if the FE is ready */ in dpcm_run_update_startup()
2578 /* startup must always be called for new BEs */ in dpcm_run_update_startup()
2599 /* run the stream event for each BE */ in dpcm_run_update_startup()
2608 /* call trigger on the frontend - FE takes care of all BE triggers */ in dpcm_run_update_startup()
2634 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_run_update_startup() local
2636 /* is this op for this BE ? */ in dpcm_run_update_startup()
2637 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_run_update_startup()
2640 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE || in dpcm_run_update_startup()
2641 be->dpcm[stream].state == SND_SOC_DPCM_STATE_NEW) in dpcm_run_update_startup()
2778 /* calculate valid and active FE <-> BE dpcms */ in dpcm_fe_dai_open()
3027 /* is the current PCM operation for this BE ? */
3029 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_be_can_update() argument
3033 be->dpcm[stream].runtime_update)) in snd_soc_dpcm_be_can_update()
3039 /* get the substream for this BE */
3041 snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_get_substream() argument
3043 return be->pcm->streams[stream].substream; in snd_soc_dpcm_get_substream()
3048 struct snd_soc_pcm_runtime *be, in snd_soc_dpcm_check_state() argument
3058 for_each_dpcm_fe(be, stream, dpcm) { in snd_soc_dpcm_check_state()
3072 /* it's safe to do this BE DAI */ in snd_soc_dpcm_check_state()
3077 * We can only hw_free, stop, pause or suspend a BE DAI if any of it's FE
3081 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_free_stop() argument
3089 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_free_stop()
3094 * We can only change hw params a BE DAI if any of it's FE are not prepared,
3098 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_params() argument
3107 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_params()
3112 * We can only prepare a BE DAI if any of it's FE are not prepared,
3116 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_prepared() argument
3124 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_prepared()