Lines Matching full:be

38 	/* Negative values might be errors */  in _soc_pcm_ret()
157 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_show_state() local
161 "- %s\n", be->dai_link->name); in dpcm_show_state()
165 dpcm_state_string(be->dpcm[stream].state)); in dpcm_show_state()
167 if ((be->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_show_state()
168 (be->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) in dpcm_show_state()
237 name = kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, in dpcm_create_debugfs_state()
286 static void dpcm_set_be_update_state(struct snd_soc_pcm_runtime *be, in dpcm_set_be_update_state() argument
289 be->dpcm[stream].runtime_update = state; in dpcm_set_be_update_state()
301 * Should typically be called when a stream is opened.
303 * Must be called with the rtd->card->pcm_mutex being held
320 * @rtd: The ASoC PCM runtime that should be checked.
322 * This function checks whether the power down delay should be ignored for a
368 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_dapm_stream_event() local
370 dev_dbg(be->dev, "ASoC: BE %s event %d dir %d\n", in dpcm_dapm_stream_event()
371 be->dai_link->name, event, dir); in dpcm_dapm_stream_event()
374 (be->dpcm[dir].users >= 1)) in dpcm_dapm_stream_event()
377 snd_soc_dapm_stream_event(be, dir, event); in dpcm_dapm_stream_event()
636 * chan min/max cannot be enforced if there are multiple CODEC DAIs in snd_soc_runtime_calc_hw()
638 * channel allocation be fixed up later in snd_soc_runtime_calc_hw()
657 * have bailed out on a higher level, since there would be no CPU or in soc_pcm_init_runtime_hw()
732 * Called by ALSA when a PCM substream is closed. Private data can be
793 * then initialized and any private data can be allocated. This also calls
872 * rate, etc. This function is non atomic and can be called multiple times,
943 /* clear the corresponding DAIs parameters when going to be inactive */ in soc_pcm_hw_clean()
970 * Frees resources allocated by hw_params, can be called multiple times
992 * function can also be called multiple times and can allocate buffers
1019 * set up transfer direction, it should not need to be in __soc_pcm_hw_params()
1021 * not even be supported by that CODEC. There may be cases in __soc_pcm_hw_params()
1022 * however where a CODEC needs to be set up although it is in __soc_pcm_hw_params()
1167 * the runtime->delay will be updated via snd_soc_pcm_component/dai_delay().
1178 /* should be called *after* snd_soc_pcm_component_pointer() */ in soc_pcm_pointer()
1187 /* connect a FE and BE */
1189 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_connect() argument
1199 if (dpcm->be == be && dpcm->fe == fe) in dpcm_be_connect()
1204 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_connect()
1207 dev_err(be->dev, "%s: FE is atomic but BE is nonatomic, invalid configuration\n", in dpcm_be_connect()
1212 dev_dbg(be->dev, "FE is nonatomic but BE is not, forcing BE as nonatomic\n"); in dpcm_be_connect()
1220 dpcm->be = be; in dpcm_be_connect()
1222 be->dpcm[stream].runtime = fe->dpcm[stream].runtime; in dpcm_be_connect()
1226 list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); in dpcm_be_connect()
1231 stream ? "<-" : "->", be->dai_link->name); in dpcm_be_connect()
1238 /* reparent a BE onto another FE */
1240 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_reparent() argument
1245 /* reparent if BE is connected to other FEs */ in dpcm_be_reparent()
1246 if (!be->dpcm[stream].users) in dpcm_be_reparent()
1249 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_reparent()
1253 for_each_dpcm_fe(be, stream, dpcm) { in dpcm_be_reparent()
1260 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_reparent()
1268 /* disconnect a BE and FE */
1278 dev_dbg(fe->dev, "ASoC: BE %s disconnect check for %s\n", in dpcm_be_disconnect()
1280 dpcm->be->dai_link->name); in dpcm_be_disconnect()
1287 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_disconnect()
1290 dpcm_be_reparent(fe, dpcm->be, stream); in dpcm_be_disconnect()
1306 /* get BE for DAI widget and stream */
1310 struct snd_soc_pcm_runtime *be; in dpcm_get_be() local
1315 dev_dbg(card->dev, "ASoC: find BE for widget %s\n", widget->name); in dpcm_get_be()
1317 for_each_card_rtds(card, be) { in dpcm_get_be()
1319 if (!be->dai_link->no_pcm) in dpcm_get_be()
1322 if (!snd_soc_dpcm_get_substream(be, stream)) in dpcm_get_be()
1325 for_each_rtd_dais(be, i, dai) { in dpcm_get_be()
1328 dev_dbg(card->dev, "ASoC: try BE : %s\n", in dpcm_get_be()
1332 return be; in dpcm_get_be()
1336 /* Widget provided is not a BE */ in dpcm_get_be()
1411 /* is there a valid DAI widget for this BE */ in dpcm_be_is_active()
1412 for_each_rtd_dais(dpcm->be, i, dai) { in dpcm_be_is_active()
1416 * The BE is pruned only if none of the dai in dpcm_be_is_active()
1432 /* Destroy any old FE <--> BE connections */ in dpcm_prune_paths()
1437 dev_dbg(fe->dev, "ASoC: pruning %s BE %s for %s\n", in dpcm_prune_paths()
1439 dpcm->be->dai_link->name, fe->dai_link->name); in dpcm_prune_paths()
1441 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_prune_paths()
1445 dev_dbg(fe->dev, "ASoC: found %d old BE paths for pruning\n", prune); in dpcm_prune_paths()
1454 struct snd_soc_pcm_runtime *be; in dpcm_add_paths() local
1462 /* Create any new FE <--> BE connections */ in dpcm_add_paths()
1478 /* is there a valid BE rtd for this widget */ in dpcm_add_paths()
1479 be = dpcm_get_be(card, widget, stream); in dpcm_add_paths()
1480 if (!be) { in dpcm_add_paths()
1481 dev_dbg(fe->dev, "ASoC: no BE found for %s\n", in dpcm_add_paths()
1489 * already active BE on such systems. in dpcm_add_paths()
1492 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_add_paths()
1493 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_add_paths()
1496 /* newly connected FE and BE */ in dpcm_add_paths()
1497 err = dpcm_be_connect(fe, be, stream); in dpcm_add_paths()
1506 dpcm_set_be_update_state(be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_add_paths()
1510 dev_dbg(fe->dev, "ASoC: found %d new BE paths\n", new); in dpcm_add_paths()
1515 * Find the corresponding BE DAIs that source or sink audio to this
1532 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_NO); in dpcm_clear_pending_state()
1542 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_stop() local
1544 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_stop()
1549 /* is this op for this BE ? */ in dpcm_be_dai_stop()
1550 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_stop()
1553 if (be->dpcm[stream].users == 0) { in dpcm_be_dai_stop()
1554 dev_err(be->dev, "ASoC: no users %s at close - state %d\n", in dpcm_be_dai_stop()
1556 be->dpcm[stream].state); in dpcm_be_dai_stop()
1560 if (--be->dpcm[stream].users != 0) in dpcm_be_dai_stop()
1563 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) { in dpcm_be_dai_stop()
1567 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) { in dpcm_be_dai_stop()
1568 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_stop()
1569 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_stop()
1573 __soc_pcm_close(be, be_substream); in dpcm_be_dai_stop()
1575 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_stop()
1581 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_startup() local
1585 /* only startup BE DAIs that are either sinks or sources to this FE DAI */ in dpcm_be_dai_startup()
1589 be = dpcm->be; in dpcm_be_dai_startup()
1590 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_startup()
1593 dev_err(be->dev, "ASoC: no backend %s stream\n", in dpcm_be_dai_startup()
1598 /* is this op for this BE ? */ in dpcm_be_dai_startup()
1599 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_startup()
1603 if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) { in dpcm_be_dai_startup()
1604 dev_err(be->dev, "ASoC: too many users %s at open %d\n", in dpcm_be_dai_startup()
1606 be->dpcm[stream].state); in dpcm_be_dai_startup()
1610 if (be->dpcm[stream].users++ != 0) in dpcm_be_dai_startup()
1613 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_be_dai_startup()
1614 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_be_dai_startup()
1617 dev_dbg(be->dev, "ASoC: open %s BE %s\n", in dpcm_be_dai_startup()
1618 stream ? "capture" : "playback", be->dai_link->name); in dpcm_be_dai_startup()
1620 be_substream->runtime = be->dpcm[stream].runtime; in dpcm_be_dai_startup()
1621 err = __soc_pcm_open(be, be_substream); in dpcm_be_dai_startup()
1623 be->dpcm[stream].users--; in dpcm_be_dai_startup()
1624 if (be->dpcm[stream].users < 0) in dpcm_be_dai_startup()
1625 dev_err(be->dev, "ASoC: no users %s at unwind %d\n", in dpcm_be_dai_startup()
1627 be->dpcm[stream].state); in dpcm_be_dai_startup()
1629 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_startup()
1632 be->dpcm[stream].be_start = 0; in dpcm_be_dai_startup()
1633 be->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in dpcm_be_dai_startup()
1688 * It returns merged BE codec format in dpcm_runtime_setup_be_format()
1693 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_format() local
1697 for_each_rtd_codec_dais(be, i, dai) { in dpcm_runtime_setup_be_format()
1724 * It returns merged BE codec channel; in dpcm_runtime_setup_be_chan()
1729 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_chan() local
1734 for_each_rtd_cpu_dais(be, i, dai) { in dpcm_runtime_setup_be_chan()
1748 * chan min/max cannot be enforced if there are multiple CODEC in dpcm_runtime_setup_be_chan()
1751 if (be->dai_link->num_codecs == 1) { in dpcm_runtime_setup_be_chan()
1753 asoc_rtd_to_codec(be, 0), stream); in dpcm_runtime_setup_be_chan()
1772 * It returns merged BE codec channel; in dpcm_runtime_setup_be_rate()
1777 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_rate() local
1782 for_each_rtd_dais(be, i, dai) { in dpcm_runtime_setup_be_rate()
1816 /* apply symmetry for BE */ in dpcm_apply_symmetry()
1818 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_apply_symmetry() local
1820 snd_soc_dpcm_get_substream(be, stream); in dpcm_apply_symmetry()
1915 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_hw_free() local
1917 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_free()
1919 /* is this op for this BE ? */ in dpcm_be_dai_hw_free()
1920 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_free()
1924 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_free()
1927 /* do not free hw if this BE is used by other FE */ in dpcm_be_dai_hw_free()
1928 if (be->dpcm[stream].users > 1) in dpcm_be_dai_hw_free()
1931 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_free()
1932 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_hw_free()
1933 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_free()
1934 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) && in dpcm_be_dai_hw_free()
1935 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_hw_free()
1936 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_hw_free()
1939 dev_dbg(be->dev, "ASoC: hw_free BE %s\n", in dpcm_be_dai_hw_free()
1940 be->dai_link->name); in dpcm_be_dai_hw_free()
1942 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_free()
1944 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_hw_free()
1974 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_hw_params() local
1980 be = dpcm->be; in dpcm_be_dai_hw_params()
1981 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
1983 /* is this op for this BE ? */ in dpcm_be_dai_hw_params()
1984 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
1992 ret = snd_soc_link_be_hw_params_fixup(be, &dpcm->hw_params); in dpcm_be_dai_hw_params()
1996 /* copy the fixed-up hw params for BE dai */ in dpcm_be_dai_hw_params()
1997 memcpy(&be->dpcm[stream].hw_params, &dpcm->hw_params, in dpcm_be_dai_hw_params()
2001 if (!snd_soc_dpcm_can_be_params(fe, be, stream)) in dpcm_be_dai_hw_params()
2004 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2005 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2006 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE)) in dpcm_be_dai_hw_params()
2009 dev_dbg(be->dev, "ASoC: hw_params BE %s\n", in dpcm_be_dai_hw_params()
2010 be->dai_link->name); in dpcm_be_dai_hw_params()
2012 ret = __soc_pcm_hw_params(be, be_substream, &dpcm->hw_params); in dpcm_be_dai_hw_params()
2016 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_be_dai_hw_params()
2022 __func__, be->dai_link->name, ret); in dpcm_be_dai_hw_params()
2026 be = dpcm->be; in dpcm_be_dai_hw_params()
2027 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2029 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2033 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_params()
2036 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2037 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2038 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_params()
2039 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) in dpcm_be_dai_hw_params()
2042 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_params()
2084 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_trigger() local
2093 be = dpcm->be; in dpcm_be_dai_trigger()
2094 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_trigger()
2096 snd_soc_dpcm_stream_lock_irqsave_nested(be, stream, flags); in dpcm_be_dai_trigger()
2098 /* is this op for this BE ? */ in dpcm_be_dai_trigger()
2099 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_trigger()
2102 dev_dbg(be->dev, "ASoC: trigger BE %s cmd %d\n", in dpcm_be_dai_trigger()
2103 be->dai_link->name, cmd); in dpcm_be_dai_trigger()
2107 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2108 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_trigger()
2109 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_trigger()
2110 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2113 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2114 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2117 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_PAUSED) in dpcm_be_dai_trigger()
2124 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2128 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2131 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_trigger()
2134 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2135 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2140 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2144 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2147 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2148 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2149 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2153 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2155 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2156 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2161 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2165 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2168 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2169 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2172 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2173 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2175 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2182 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2185 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2191 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2192 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2195 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2200 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2201 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2203 be->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in dpcm_be_dai_trigger()
2207 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2210 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2211 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2216 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2220 be->dpcm[stream].state = SND_SOC_DPCM_STATE_SUSPEND; in dpcm_be_dai_trigger()
2223 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2227 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2229 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2230 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2235 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2239 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2243 snd_soc_dpcm_stream_unlock_irqrestore(be, stream, flags); in dpcm_be_dai_trigger()
2394 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_prepare() local
2396 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_prepare()
2398 /* is this op for this BE ? */ in dpcm_be_dai_prepare()
2399 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_prepare()
2402 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_prepare()
2403 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_prepare()
2404 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND) && in dpcm_be_dai_prepare()
2405 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_prepare()
2408 dev_dbg(be->dev, "ASoC: prepare BE %s\n", in dpcm_be_dai_prepare()
2409 be->dai_link->name); in dpcm_be_dai_prepare()
2411 ret = __soc_pcm_prepare(be, be_substream); in dpcm_be_dai_prepare()
2415 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_be_dai_prepare()
2469 /* call bespoke trigger - FE takes care of all BE triggers */ in dpcm_run_update_shutdown()
2485 /* run the stream event for each BE */ in dpcm_run_update_shutdown()
2502 /* Only start the BE if the FE is ready */ in dpcm_run_update_startup()
2511 /* startup must always be called for new BEs */ in dpcm_run_update_startup()
2532 /* run the stream event for each BE */ in dpcm_run_update_startup()
2541 /* call trigger on the frontend - FE takes care of all BE triggers */ in dpcm_run_update_startup()
2567 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_run_update_startup() local
2569 /* is this op for this BE ? */ in dpcm_run_update_startup()
2570 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_run_update_startup()
2573 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE || in dpcm_run_update_startup()
2574 be->dpcm[stream].state == SND_SOC_DPCM_STATE_NEW) in dpcm_run_update_startup()
2714 /* calculate valid and active FE <-> BE dpcms */ in dpcm_fe_dai_open()
2959 /* is the current PCM operation for this BE ? */
2961 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_be_can_update() argument
2965 be->dpcm[stream].runtime_update)) in snd_soc_dpcm_be_can_update()
2971 /* get the substream for this BE */
2973 snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_get_substream() argument
2975 return be->pcm->streams[stream].substream; in snd_soc_dpcm_get_substream()
2980 struct snd_soc_pcm_runtime *be, in snd_soc_dpcm_check_state() argument
2990 for_each_dpcm_fe(be, stream, dpcm) { in snd_soc_dpcm_check_state()
3004 /* it's safe to do this BE DAI */ in snd_soc_dpcm_check_state()
3009 * We can only hw_free, stop, pause or suspend a BE DAI if any of it's FE
3013 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_free_stop() argument
3021 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_free_stop()
3026 * We can only change hw params a BE DAI if any of it's FE are not prepared,
3030 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_params() argument
3039 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_params()