Lines Matching full:be

37 	/* Negative values might be errors */  in _soc_pcm_ret()
61 /* is the current PCM operation for this BE ? */
63 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_be_can_update() argument
67 be->dpcm[stream].runtime_update)) in snd_soc_dpcm_be_can_update()
73 struct snd_soc_pcm_runtime *be, in snd_soc_dpcm_check_state() argument
83 for_each_dpcm_fe(be, stream, dpcm) { in snd_soc_dpcm_check_state()
97 /* it's safe to do this BE DAI */ in snd_soc_dpcm_check_state()
102 * We can only hw_free, stop, pause or suspend a BE DAI if any of it's FE
106 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_free_stop() argument
114 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_free_stop()
118 * We can only change hw params a BE DAI if any of it's FE are not prepared,
122 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_params() argument
131 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_params()
135 * We can only prepare a BE DAI if any of it's FE are not prepared,
139 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_prepared() argument
147 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_prepared()
224 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_show_state() local
225 params = &be->dpcm[stream].hw_params; in dpcm_show_state()
228 "- %s\n", be->dai_link->name); 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()
304 name = kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, in dpcm_create_debugfs_state()
353 static void dpcm_set_be_update_state(struct snd_soc_pcm_runtime *be, in dpcm_set_be_update_state() argument
356 be->dpcm[stream].runtime_update = state; in dpcm_set_be_update_state()
368 * Should typically be called when a stream is opened.
370 * Must be called with the rtd->card->pcm_mutex being held
395 * @rtd: The ASoC PCM runtime that should be checked.
397 * This function checks whether the power down delay should be ignored for a
428 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_dapm_stream_event() local
430 dev_dbg(be->dev, "ASoC: BE %s event %d dir %d\n", in dpcm_dapm_stream_event()
431 be->dai_link->name, event, dir); in dpcm_dapm_stream_event()
434 (be->dpcm[dir].users >= 1)) in dpcm_dapm_stream_event()
437 snd_soc_dapm_stream_event(be, dir, event); in dpcm_dapm_stream_event()
706 * chan min/max cannot be enforced if there are multiple CODEC DAIs in snd_soc_runtime_calc_hw()
708 * channel allocation be fixed up later in snd_soc_runtime_calc_hw()
727 * have bailed out on a higher level, since there would be no CPU or in soc_pcm_init_runtime_hw()
809 * Called by ALSA when a PCM substream is closed. Private data can be
870 * then initialized and any private data can be allocated. This also calls
949 * rate, etc. This function is non atomic and can be called multiple times,
1035 /* clear the corresponding DAIs parameters when going to be inactive */ in soc_pcm_hw_clean()
1064 * Frees resources allocated by hw_params, can be called multiple times
1086 * function can also be called multiple times and can allocate buffers
1114 * set up transfer direction, it should not need to be in __soc_pcm_hw_params()
1116 * not even be supported by that CODEC. There may be cases in __soc_pcm_hw_params()
1117 * however where a CODEC needs to be set up although it is in __soc_pcm_hw_params()
1297 * the runtime->delay will be updated via snd_soc_pcm_component/dai_delay().
1308 /* should be called *after* snd_soc_pcm_component_pointer() */ in soc_pcm_pointer()
1317 /* connect a FE and BE */
1319 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_connect() argument
1329 if (dpcm->be == be && dpcm->fe == fe) in dpcm_be_connect()
1334 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_connect()
1337 dev_err(be->dev, "%s: FE is atomic but BE is nonatomic, invalid configuration\n", in dpcm_be_connect()
1342 dev_dbg(be->dev, "FE is nonatomic but BE is not, forcing BE as nonatomic\n"); in dpcm_be_connect()
1350 dpcm->be = be; in dpcm_be_connect()
1355 list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); in dpcm_be_connect()
1360 stream ? "<-" : "->", be->dai_link->name); in dpcm_be_connect()
1367 /* reparent a BE onto another FE */
1369 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_reparent() argument
1374 /* reparent if BE is connected to other FEs */ in dpcm_be_reparent()
1375 if (!be->dpcm[stream].users) in dpcm_be_reparent()
1378 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_reparent()
1382 for_each_dpcm_fe(be, stream, dpcm) { in dpcm_be_reparent()
1389 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_reparent()
1397 /* disconnect a BE and FE */
1408 dev_dbg(fe->dev, "ASoC: BE %s disconnect check for %s\n", in dpcm_be_disconnect()
1410 dpcm->be->dai_link->name); 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()
1436 /* get BE for DAI widget and stream */
1440 struct snd_soc_pcm_runtime *be; in dpcm_get_be() local
1445 dev_dbg(card->dev, "ASoC: find BE for widget %s\n", widget->name); in dpcm_get_be()
1447 for_each_card_rtds(card, be) { in dpcm_get_be()
1449 if (!be->dai_link->no_pcm) in dpcm_get_be()
1452 if (!snd_soc_dpcm_get_substream(be, stream)) in dpcm_get_be()
1455 for_each_rtd_dais(be, i, dai) { in dpcm_get_be()
1458 dev_dbg(card->dev, "ASoC: try BE : %s\n", in dpcm_get_be()
1462 return be; in dpcm_get_be()
1466 /* Widget provided is not a BE */ in dpcm_get_be()
1542 /* is there a valid DAI widget for this BE */ in dpcm_be_is_active()
1543 for_each_rtd_dais(dpcm->be, i, dai) { in dpcm_be_is_active()
1547 * The BE is pruned only if none of the dai in dpcm_be_is_active()
1563 /* Destroy any old FE <--> BE connections */ in dpcm_prune_paths()
1568 dev_dbg(fe->dev, "ASoC: pruning %s BE %s for %s\n", in dpcm_prune_paths()
1570 dpcm->be->dai_link->name, fe->dai_link->name); in dpcm_prune_paths()
1572 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_prune_paths()
1576 dev_dbg(fe->dev, "ASoC: found %d old BE paths for pruning\n", prune); in dpcm_prune_paths()
1585 struct snd_soc_pcm_runtime *be; in dpcm_add_paths() local
1594 /* Create any new FE <--> BE connections */ in dpcm_add_paths()
1610 /* is there a valid BE rtd for this widget */ in dpcm_add_paths()
1611 be = dpcm_get_be(card, widget, stream); in dpcm_add_paths()
1612 if (!be) { in dpcm_add_paths()
1613 dev_dbg(fe->dev, "ASoC: no BE found for %s\n", in dpcm_add_paths()
1621 * already active BE on such systems. in dpcm_add_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()
1628 /* newly connected FE and BE */ in dpcm_add_paths()
1629 err = dpcm_be_connect(fe, be, stream); in dpcm_add_paths()
1638 dpcm_set_be_update_state(be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_add_paths()
1642 dev_dbg(fe->dev, "ASoC: found %d new BE paths\n", new); in dpcm_add_paths()
1647 * Find the corresponding BE DAIs that source or sink audio to this
1664 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_NO); in dpcm_clear_pending_state()
1674 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_stop() local
1676 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_stop()
1681 /* is this op for this BE ? */ in dpcm_be_dai_stop()
1682 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_stop()
1685 if (be->dpcm[stream].users == 0) { in dpcm_be_dai_stop()
1686 dev_err(be->dev, "ASoC: no users %s at close - state %d\n", 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()
1700 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_stop()
1701 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_stop()
1705 __soc_pcm_close(be, be_substream); in dpcm_be_dai_stop()
1707 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_stop()
1714 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_startup() local
1718 /* only startup BE DAIs that are either sinks or sources to this FE DAI */ in dpcm_be_dai_startup()
1722 be = dpcm->be; in dpcm_be_dai_startup()
1723 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_startup()
1726 dev_err(be->dev, "ASoC: no backend %s stream\n", in dpcm_be_dai_startup()
1731 /* is this op for this BE ? */ in dpcm_be_dai_startup()
1732 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_startup()
1736 if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) { in dpcm_be_dai_startup()
1737 dev_err(be->dev, "ASoC: too many users %s at open %d\n", 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()
1750 dev_dbg(be->dev, "ASoC: open %s BE %s\n", in dpcm_be_dai_startup()
1751 snd_pcm_direction_name(stream), be->dai_link->name); in dpcm_be_dai_startup()
1754 err = __soc_pcm_open(be, be_substream); 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()
1758 dev_err(be->dev, "ASoC: no users %s at unwind %d\n", 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()
1826 * It returns merged BE codec format in dpcm_runtime_setup_be_format()
1831 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_format() local
1835 for_each_rtd_codec_dais(be, i, dai) { in dpcm_runtime_setup_be_format()
1863 * It returns merged BE codec channel; in dpcm_runtime_setup_be_chan()
1868 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_chan() local
1873 for_each_rtd_cpu_dais(be, i, dai) { in dpcm_runtime_setup_be_chan()
1887 * chan min/max cannot be enforced if there are multiple CODEC in dpcm_runtime_setup_be_chan()
1890 if (be->dai_link->num_codecs == 1) { in dpcm_runtime_setup_be_chan()
1892 snd_soc_rtd_to_codec(be, 0), stream); in dpcm_runtime_setup_be_chan()
1911 * It returns merged BE codec channel; in dpcm_runtime_setup_be_rate()
1916 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_rate() local
1921 for_each_rtd_dais(be, i, dai) { in dpcm_runtime_setup_be_rate()
1955 /* apply symmetry for BE */ in dpcm_apply_symmetry()
1957 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_apply_symmetry() local
1959 snd_soc_dpcm_get_substream(be, stream); in dpcm_apply_symmetry()
2054 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_hw_free() local
2056 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_free()
2058 /* is this op for this BE ? */ in dpcm_be_dai_hw_free()
2059 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_free()
2063 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_free()
2066 /* do not free hw if this BE is used by other FE */ 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()
2078 dev_dbg(be->dev, "ASoC: hw_free BE %s\n", in dpcm_be_dai_hw_free()
2079 be->dai_link->name); in dpcm_be_dai_hw_free()
2081 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_free()
2083 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_hw_free()
2113 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_hw_params() local
2121 be = dpcm->be; in dpcm_be_dai_hw_params()
2122 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2124 /* is this op for this BE ? */ in dpcm_be_dai_hw_params()
2125 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2133 ret = snd_soc_link_be_hw_params_fixup(be, &hw_params); in dpcm_be_dai_hw_params()
2137 /* copy the fixed-up hw params for BE dai */ in dpcm_be_dai_hw_params()
2138 memcpy(&be->dpcm[stream].hw_params, &hw_params, in dpcm_be_dai_hw_params()
2142 if (!snd_soc_dpcm_can_be_params(fe, be, stream)) 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()
2150 dev_dbg(be->dev, "ASoC: hw_params BE %s\n", in dpcm_be_dai_hw_params()
2151 be->dai_link->name); in dpcm_be_dai_hw_params()
2153 ret = __soc_pcm_hw_params(be, be_substream, &hw_params); in dpcm_be_dai_hw_params()
2157 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_be_dai_hw_params()
2163 __func__, be->dai_link->name, ret); in dpcm_be_dai_hw_params()
2167 be = dpcm->be; in dpcm_be_dai_hw_params()
2168 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2170 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2174 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) 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()
2183 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_params()
2225 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_trigger() local
2234 be = dpcm->be; in dpcm_be_dai_trigger()
2235 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_trigger()
2239 /* is this op for this BE ? */ in dpcm_be_dai_trigger()
2240 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_trigger()
2243 dev_dbg(be->dev, "ASoC: trigger BE %s cmd %d\n", in dpcm_be_dai_trigger()
2244 be->dai_link->name, cmd); 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()
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()
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()
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()
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()
2527 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_prepare() local
2529 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_prepare()
2531 /* is this op for this BE ? */ in dpcm_be_dai_prepare()
2532 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_prepare()
2535 if (!snd_soc_dpcm_can_be_prepared(fe, be, stream)) 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()
2544 dev_dbg(be->dev, "ASoC: prepare BE %s\n", in dpcm_be_dai_prepare()
2545 be->dai_link->name); in dpcm_be_dai_prepare()
2547 ret = __soc_pcm_prepare(be, be_substream); in dpcm_be_dai_prepare()
2551 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_be_dai_prepare()
2622 /* run the stream event for each BE */ in dpcm_run_update_shutdown()
2636 /* Only start the BE if the FE is ready */ in dpcm_run_update_startup()
2645 /* startup must always be called for new BEs */ in dpcm_run_update_startup()
2666 /* run the stream event for each BE */ in dpcm_run_update_startup()
2687 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_run_update_startup() local
2689 /* is this op for this BE ? */ in dpcm_run_update_startup()
2690 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) 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()
2831 /* calculate valid and active FE <-> BE dpcms */ in dpcm_fe_dai_open()
2880 * It should be checked, but it breaks compatibility. in soc_get_playback_capture()
2884 * Codec capture validation check will be fail, but system should allow capture in soc_get_playback_capture()
3049 /* get the substream for this BE */
3051 snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_get_substream() argument
3053 return be->pcm->streams[stream].substream; in snd_soc_dpcm_get_substream()