Lines Matching full:be
37 /* Negative values might be errors */ in _soc_pcm_ret()
62 /* is the current PCM operation for this BE ? */
64 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_be_can_update() argument
68 be->dpcm[stream].runtime_update)) in snd_soc_dpcm_be_can_update()
74 struct snd_soc_pcm_runtime *be, in snd_soc_dpcm_check_state() argument
84 for_each_dpcm_fe(be, stream, dpcm) { in snd_soc_dpcm_check_state()
98 /* it's safe to do this BE DAI */ in snd_soc_dpcm_check_state()
103 * We can only hw_free, stop, pause or suspend a BE DAI if any of it's FE
107 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_free_stop() argument
115 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_free_stop()
119 * We can only change hw params a BE DAI if any of it's FE are not prepared,
123 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_params() argument
132 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_params()
136 * We can only prepare a BE DAI if any of it's FE are not prepared,
140 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_prepared() argument
148 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_prepared()
225 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_show_state() local
226 params = &be->dpcm[stream].hw_params; in dpcm_show_state()
229 "- %s\n", be->dai_link->name); 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()
305 name = kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, in dpcm_create_debugfs_state()
354 static void dpcm_set_be_update_state(struct snd_soc_pcm_runtime *be, in dpcm_set_be_update_state() argument
357 be->dpcm[stream].runtime_update = state; in dpcm_set_be_update_state()
369 * Should typically be called when a stream is opened.
371 * Must be called with the rtd->card->pcm_mutex being held
396 * @rtd: The ASoC PCM runtime that should be checked.
398 * This function checks whether the power down delay should be ignored for a
445 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_dapm_stream_event() local
447 dev_dbg(be->dev, "ASoC: BE %s event %d dir %d\n", in dpcm_dapm_stream_event()
448 be->dai_link->name, event, dir); in dpcm_dapm_stream_event()
451 (be->dpcm[dir].users >= 1)) in dpcm_dapm_stream_event()
454 snd_soc_dapm_stream_event(be, dir, event); in dpcm_dapm_stream_event()
721 * chan min/max cannot be enforced if there are multiple CODEC DAIs in snd_soc_runtime_calc_hw()
723 * channel allocation be fixed up later in snd_soc_runtime_calc_hw()
742 * have bailed out on a higher level, since there would be no CPU or in soc_pcm_init_runtime_hw()
825 * Called by ALSA when a PCM substream is closed. Private data can be
886 * then initialized and any private data can be allocated. This also calls
965 * rate, etc. This function is non atomic and can be called multiple times,
1038 /* clear the corresponding DAIs parameters when going to be inactive */ in soc_pcm_hw_clean()
1067 * Frees resources allocated by hw_params, can be called multiple times
1089 * function can also be called multiple times and can allocate buffers
1117 * set up transfer direction, it should not need to be in __soc_pcm_hw_params()
1119 * not even be supported by that CODEC. There may be cases in __soc_pcm_hw_params()
1120 * however where a CODEC needs to be set up although it is in __soc_pcm_hw_params()
1300 * the runtime->delay will be updated via snd_soc_pcm_component/dai_delay().
1311 /* should be called *after* snd_soc_pcm_component_pointer() */ in soc_pcm_pointer()
1320 /* connect a FE and BE */
1322 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_connect() argument
1332 if (dpcm->be == be && dpcm->fe == fe) in dpcm_be_connect()
1337 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_connect()
1340 dev_err(be->dev, "%s: FE is atomic but BE is nonatomic, invalid configuration\n", in dpcm_be_connect()
1345 dev_dbg(be->dev, "FE is nonatomic but BE is not, forcing BE as nonatomic\n"); in dpcm_be_connect()
1353 dpcm->be = be; in dpcm_be_connect()
1358 list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); in dpcm_be_connect()
1363 stream ? "<-" : "->", be->dai_link->name); in dpcm_be_connect()
1370 /* reparent a BE onto another FE */
1372 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_reparent() argument
1377 /* reparent if BE is connected to other FEs */ in dpcm_be_reparent()
1378 if (!be->dpcm[stream].users) in dpcm_be_reparent()
1381 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_reparent()
1385 for_each_dpcm_fe(be, stream, dpcm) { in dpcm_be_reparent()
1392 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_reparent()
1400 /* disconnect a BE and FE */
1411 dev_dbg(fe->dev, "ASoC: BE %s disconnect check for %s\n", in dpcm_be_disconnect()
1413 dpcm->be->dai_link->name); 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()
1439 /* get BE for DAI widget and stream */
1443 struct snd_soc_pcm_runtime *be; in dpcm_get_be() local
1448 dev_dbg(card->dev, "ASoC: find BE for widget %s\n", widget->name); in dpcm_get_be()
1450 for_each_card_rtds(card, be) { in dpcm_get_be()
1452 if (!be->dai_link->no_pcm) in dpcm_get_be()
1455 if (!snd_soc_dpcm_get_substream(be, stream)) in dpcm_get_be()
1458 for_each_rtd_dais(be, i, dai) { in dpcm_get_be()
1461 dev_dbg(card->dev, "ASoC: try BE : %s\n", in dpcm_get_be()
1465 return be; in dpcm_get_be()
1469 /* Widget provided is not a BE */ in dpcm_get_be()
1545 /* is there a valid DAI widget for this BE */ in dpcm_be_is_active()
1546 for_each_rtd_dais(dpcm->be, i, dai) { in dpcm_be_is_active()
1550 * The BE is pruned only if none of the dai in dpcm_be_is_active()
1566 /* Destroy any old FE <--> BE connections */ in dpcm_prune_paths()
1571 dev_dbg(fe->dev, "ASoC: pruning %s BE %s for %s\n", in dpcm_prune_paths()
1573 dpcm->be->dai_link->name, fe->dai_link->name); in dpcm_prune_paths()
1575 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_prune_paths()
1579 dev_dbg(fe->dev, "ASoC: found %d old BE paths for pruning\n", prune); in dpcm_prune_paths()
1588 struct snd_soc_pcm_runtime *be; in dpcm_add_paths() local
1597 /* Create any new FE <--> BE connections */ in dpcm_add_paths()
1613 /* is there a valid BE rtd for this widget */ in dpcm_add_paths()
1614 be = dpcm_get_be(card, widget, stream); in dpcm_add_paths()
1615 if (!be) { in dpcm_add_paths()
1616 dev_dbg(fe->dev, "ASoC: no BE found for %s\n", in dpcm_add_paths()
1624 * already active BE on such systems. in dpcm_add_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()
1631 /* newly connected FE and BE */ in dpcm_add_paths()
1632 err = dpcm_be_connect(fe, be, stream); in dpcm_add_paths()
1641 dpcm_set_be_update_state(be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_add_paths()
1645 dev_dbg(fe->dev, "ASoC: found %d new BE paths\n", new); in dpcm_add_paths()
1650 * Find the corresponding BE DAIs that source or sink audio to this
1667 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_NO); in dpcm_clear_pending_state()
1677 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_stop() local
1679 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_stop()
1684 /* is this op for this BE ? */ in dpcm_be_dai_stop()
1685 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_stop()
1688 if (be->dpcm[stream].users == 0) { in dpcm_be_dai_stop()
1689 dev_err(be->dev, "ASoC: no users %s at close - state %d\n", 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()
1703 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_stop()
1704 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_stop()
1708 __soc_pcm_close(be, be_substream); in dpcm_be_dai_stop()
1710 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_stop()
1717 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_startup() local
1721 /* only startup BE DAIs that are either sinks or sources to this FE DAI */ in dpcm_be_dai_startup()
1725 be = dpcm->be; in dpcm_be_dai_startup()
1726 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_startup()
1729 dev_err(be->dev, "ASoC: no backend %s stream\n", in dpcm_be_dai_startup()
1734 /* is this op for this BE ? */ in dpcm_be_dai_startup()
1735 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_startup()
1739 if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) { in dpcm_be_dai_startup()
1740 dev_err(be->dev, "ASoC: too many users %s at open %d\n", 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()
1753 dev_dbg(be->dev, "ASoC: open %s BE %s\n", in dpcm_be_dai_startup()
1754 snd_pcm_direction_name(stream), be->dai_link->name); in dpcm_be_dai_startup()
1757 err = __soc_pcm_open(be, be_substream); 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()
1761 dev_err(be->dev, "ASoC: no users %s at unwind %d\n", 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()
1829 * It returns merged BE codec format in dpcm_runtime_setup_be_format()
1834 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_format() local
1838 for_each_rtd_codec_dais(be, i, dai) { in dpcm_runtime_setup_be_format()
1866 * It returns merged BE codec channel; in dpcm_runtime_setup_be_chan()
1871 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_chan() local
1876 for_each_rtd_cpu_dais(be, i, dai) { in dpcm_runtime_setup_be_chan()
1890 * chan min/max cannot be enforced if there are multiple CODEC in dpcm_runtime_setup_be_chan()
1893 if (be->dai_link->num_codecs == 1) { in dpcm_runtime_setup_be_chan()
1895 snd_soc_rtd_to_codec(be, 0), stream); in dpcm_runtime_setup_be_chan()
1914 * It returns merged BE codec channel; in dpcm_runtime_setup_be_rate()
1919 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_rate() local
1924 for_each_rtd_dais(be, i, dai) { in dpcm_runtime_setup_be_rate()
1958 /* apply symmetry for BE */ in dpcm_apply_symmetry()
1960 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_apply_symmetry() local
1962 snd_soc_dpcm_get_substream(be, stream); in dpcm_apply_symmetry()
2057 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_hw_free() local
2059 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_free()
2061 /* is this op for this BE ? */ in dpcm_be_dai_hw_free()
2062 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_free()
2066 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_free()
2069 /* do not free hw if this BE is used by other FE */ 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()
2081 dev_dbg(be->dev, "ASoC: hw_free BE %s\n", in dpcm_be_dai_hw_free()
2082 be->dai_link->name); in dpcm_be_dai_hw_free()
2084 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_free()
2086 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_hw_free()
2116 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_hw_params() local
2124 be = dpcm->be; in dpcm_be_dai_hw_params()
2125 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2127 /* is this op for this BE ? */ in dpcm_be_dai_hw_params()
2128 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2136 ret = snd_soc_link_be_hw_params_fixup(be, &hw_params); in dpcm_be_dai_hw_params()
2140 /* copy the fixed-up hw params for BE dai */ in dpcm_be_dai_hw_params()
2141 memcpy(&be->dpcm[stream].hw_params, &hw_params, in dpcm_be_dai_hw_params()
2145 if (!snd_soc_dpcm_can_be_params(fe, be, stream)) 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()
2153 dev_dbg(be->dev, "ASoC: hw_params BE %s\n", in dpcm_be_dai_hw_params()
2154 be->dai_link->name); in dpcm_be_dai_hw_params()
2156 ret = __soc_pcm_hw_params(be, be_substream, &hw_params); in dpcm_be_dai_hw_params()
2160 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_be_dai_hw_params()
2166 __func__, be->dai_link->name, ret); in dpcm_be_dai_hw_params()
2170 be = dpcm->be; in dpcm_be_dai_hw_params()
2171 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2173 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2177 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) 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()
2186 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_params()
2228 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_trigger() local
2237 be = dpcm->be; in dpcm_be_dai_trigger()
2238 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_trigger()
2242 /* is this op for this BE ? */ in dpcm_be_dai_trigger()
2243 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_trigger()
2246 dev_dbg(be->dev, "ASoC: trigger BE %s cmd %d\n", in dpcm_be_dai_trigger()
2247 be->dai_link->name, cmd); 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()
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()
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()
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()
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()
2530 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_prepare() local
2532 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_prepare()
2534 /* is this op for this BE ? */ in dpcm_be_dai_prepare()
2535 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_prepare()
2538 if (!snd_soc_dpcm_can_be_prepared(fe, be, stream)) 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()
2547 dev_dbg(be->dev, "ASoC: prepare BE %s\n", in dpcm_be_dai_prepare()
2548 be->dai_link->name); in dpcm_be_dai_prepare()
2550 ret = __soc_pcm_prepare(be, be_substream); in dpcm_be_dai_prepare()
2554 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_be_dai_prepare()
2613 /* run the stream event for each BE */ in dpcm_run_update_shutdown()
2627 /* Only start the BE if the FE is ready */ in dpcm_run_update_startup()
2636 /* startup must always be called for new BEs */ in dpcm_run_update_startup()
2657 /* run the stream event for each BE */ in dpcm_run_update_startup()
2678 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_run_update_startup() local
2680 /* is this op for this BE ? */ in dpcm_run_update_startup()
2681 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) 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()
2822 /* calculate valid and active FE <-> BE dpcms */ in dpcm_fe_dai_open()
2866 * dpcm_xxx flag will be removed soon, Indicates warning if dpcm_xxx flag was used in soc_get_playback_capture()
3071 /* get the substream for this BE */
3073 snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_get_substream() argument
3075 return be->pcm->streams[stream].substream; in snd_soc_dpcm_get_substream()