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
307 * @rtd: The ASoC PCM runtime that should be checked.
309 * This function checks whether the power down delay should be ignored for a
355 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_dapm_stream_event() local
357 dev_dbg(be->dev, "ASoC: BE %s event %d dir %d\n", in dpcm_dapm_stream_event()
358 be->dai_link->name, event, dir); in dpcm_dapm_stream_event()
361 (be->dpcm[dir].users >= 1)) in dpcm_dapm_stream_event()
364 snd_soc_dapm_stream_event(be, dir, event); in dpcm_dapm_stream_event()
623 * chan min/max cannot be enforced if there are multiple CODEC DAIs in snd_soc_runtime_calc_hw()
625 * channel allocation be fixed up later in snd_soc_runtime_calc_hw()
644 * have bailed out on a higher level, since there would be no CPU or in soc_pcm_init_runtime_hw()
726 * Called by ALSA when a PCM substream is closed. Private data can be
787 * then initialized and any private data can be allocated. This also calls
866 * rate, etc. This function is non atomic and can be called multiple times,
939 /* clear the corresponding DAIs parameters when going to be inactive */ in soc_pcm_hw_clean()
968 * Frees resources allocated by hw_params, can be called multiple times
990 * function can also be called multiple times and can allocate buffers
1018 * set up transfer direction, it should not need to be in __soc_pcm_hw_params()
1020 * not even be supported by that CODEC. There may be cases in __soc_pcm_hw_params()
1021 * however where a CODEC needs to be set up although it is in __soc_pcm_hw_params()
1202 * the runtime->delay will be updated via snd_soc_pcm_component/dai_delay().
1213 /* should be called *after* snd_soc_pcm_component_pointer() */ in soc_pcm_pointer()
1222 /* connect a FE and BE */
1224 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_connect() argument
1234 if (dpcm->be == be && dpcm->fe == fe) in dpcm_be_connect()
1239 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_connect()
1242 dev_err(be->dev, "%s: FE is atomic but BE is nonatomic, invalid configuration\n", in dpcm_be_connect()
1247 dev_dbg(be->dev, "FE is nonatomic but BE is not, forcing BE as nonatomic\n"); in dpcm_be_connect()
1255 dpcm->be = be; in dpcm_be_connect()
1260 list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); in dpcm_be_connect()
1265 stream ? "<-" : "->", be->dai_link->name); in dpcm_be_connect()
1272 /* reparent a BE onto another FE */
1274 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_reparent() argument
1279 /* reparent if BE is connected to other FEs */ in dpcm_be_reparent()
1280 if (!be->dpcm[stream].users) in dpcm_be_reparent()
1283 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_reparent()
1287 for_each_dpcm_fe(be, stream, dpcm) { in dpcm_be_reparent()
1294 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_reparent()
1302 /* disconnect a BE and FE */
1312 dev_dbg(fe->dev, "ASoC: BE %s disconnect check for %s\n", in dpcm_be_disconnect()
1314 dpcm->be->dai_link->name); in dpcm_be_disconnect()
1321 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_disconnect()
1324 dpcm_be_reparent(fe, dpcm->be, stream); in dpcm_be_disconnect()
1340 /* get BE for DAI widget and stream */
1344 struct snd_soc_pcm_runtime *be; in dpcm_get_be() local
1349 dev_dbg(card->dev, "ASoC: find BE for widget %s\n", widget->name); in dpcm_get_be()
1351 for_each_card_rtds(card, be) { in dpcm_get_be()
1353 if (!be->dai_link->no_pcm) in dpcm_get_be()
1356 if (!snd_soc_dpcm_get_substream(be, stream)) in dpcm_get_be()
1359 for_each_rtd_dais(be, i, dai) { in dpcm_get_be()
1362 dev_dbg(card->dev, "ASoC: try BE : %s\n", in dpcm_get_be()
1366 return be; in dpcm_get_be()
1370 /* Widget provided is not a BE */ in dpcm_get_be()
1446 /* is there a valid DAI widget for this BE */ in dpcm_be_is_active()
1447 for_each_rtd_dais(dpcm->be, i, dai) { in dpcm_be_is_active()
1451 * The BE is pruned only if none of the dai in dpcm_be_is_active()
1467 /* Destroy any old FE <--> BE connections */ in dpcm_prune_paths()
1472 dev_dbg(fe->dev, "ASoC: pruning %s BE %s for %s\n", in dpcm_prune_paths()
1474 dpcm->be->dai_link->name, fe->dai_link->name); in dpcm_prune_paths()
1476 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_prune_paths()
1480 dev_dbg(fe->dev, "ASoC: found %d old BE paths for pruning\n", prune); in dpcm_prune_paths()
1489 struct snd_soc_pcm_runtime *be; in dpcm_add_paths() local
1498 /* Create any new FE <--> BE connections */ in dpcm_add_paths()
1514 /* is there a valid BE rtd for this widget */ in dpcm_add_paths()
1515 be = dpcm_get_be(card, widget, stream); in dpcm_add_paths()
1516 if (!be) { in dpcm_add_paths()
1517 dev_dbg(fe->dev, "ASoC: no BE found for %s\n", in dpcm_add_paths()
1525 * already active BE on such systems. in dpcm_add_paths()
1528 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_add_paths()
1529 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_add_paths()
1532 /* newly connected FE and BE */ in dpcm_add_paths()
1533 err = dpcm_be_connect(fe, be, stream); in dpcm_add_paths()
1542 dpcm_set_be_update_state(be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_add_paths()
1546 dev_dbg(fe->dev, "ASoC: found %d new BE paths\n", new); in dpcm_add_paths()
1551 * Find the corresponding BE DAIs that source or sink audio to this
1568 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_NO); in dpcm_clear_pending_state()
1578 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_stop() local
1580 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_stop()
1585 /* is this op for this BE ? */ in dpcm_be_dai_stop()
1586 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_stop()
1589 if (be->dpcm[stream].users == 0) { in dpcm_be_dai_stop()
1590 dev_err(be->dev, "ASoC: no users %s at close - state %d\n", in dpcm_be_dai_stop()
1592 be->dpcm[stream].state); in dpcm_be_dai_stop()
1596 if (--be->dpcm[stream].users != 0) in dpcm_be_dai_stop()
1599 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) { in dpcm_be_dai_stop()
1603 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) { in dpcm_be_dai_stop()
1604 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_stop()
1605 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_stop()
1609 __soc_pcm_close(be, be_substream); in dpcm_be_dai_stop()
1611 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_stop()
1618 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_startup() local
1622 /* only startup BE DAIs that are either sinks or sources to this FE DAI */ in dpcm_be_dai_startup()
1626 be = dpcm->be; in dpcm_be_dai_startup()
1627 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_startup()
1630 dev_err(be->dev, "ASoC: no backend %s stream\n", in dpcm_be_dai_startup()
1635 /* is this op for this BE ? */ in dpcm_be_dai_startup()
1636 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_startup()
1640 if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) { in dpcm_be_dai_startup()
1641 dev_err(be->dev, "ASoC: too many users %s at open %d\n", in dpcm_be_dai_startup()
1643 be->dpcm[stream].state); in dpcm_be_dai_startup()
1647 if (be->dpcm[stream].users++ != 0) in dpcm_be_dai_startup()
1650 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_be_dai_startup()
1651 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_be_dai_startup()
1654 dev_dbg(be->dev, "ASoC: open %s BE %s\n", in dpcm_be_dai_startup()
1655 stream ? "capture" : "playback", be->dai_link->name); in dpcm_be_dai_startup()
1658 err = __soc_pcm_open(be, be_substream); in dpcm_be_dai_startup()
1660 be->dpcm[stream].users--; in dpcm_be_dai_startup()
1661 if (be->dpcm[stream].users < 0) in dpcm_be_dai_startup()
1662 dev_err(be->dev, "ASoC: no users %s at unwind %d\n", in dpcm_be_dai_startup()
1664 be->dpcm[stream].state); in dpcm_be_dai_startup()
1666 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_startup()
1669 be->dpcm[stream].be_start = 0; in dpcm_be_dai_startup()
1670 be->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in dpcm_be_dai_startup()
1729 * It returns merged BE codec format in dpcm_runtime_setup_be_format()
1734 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_format() local
1738 for_each_rtd_codec_dais(be, i, dai) { in dpcm_runtime_setup_be_format()
1765 * It returns merged BE codec channel; in dpcm_runtime_setup_be_chan()
1770 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_chan() local
1775 for_each_rtd_cpu_dais(be, i, dai) { in dpcm_runtime_setup_be_chan()
1789 * chan min/max cannot be enforced if there are multiple CODEC in dpcm_runtime_setup_be_chan()
1792 if (be->dai_link->num_codecs == 1) { in dpcm_runtime_setup_be_chan()
1794 asoc_rtd_to_codec(be, 0), stream); in dpcm_runtime_setup_be_chan()
1813 * It returns merged BE codec channel; in dpcm_runtime_setup_be_rate()
1818 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_rate() local
1823 for_each_rtd_dais(be, i, dai) { in dpcm_runtime_setup_be_rate()
1857 /* apply symmetry for BE */ in dpcm_apply_symmetry()
1859 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_apply_symmetry() local
1861 snd_soc_dpcm_get_substream(be, stream); in dpcm_apply_symmetry()
1956 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_hw_free() local
1958 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_free()
1960 /* is this op for this BE ? */ in dpcm_be_dai_hw_free()
1961 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_free()
1965 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_free()
1968 /* do not free hw if this BE is used by other FE */ in dpcm_be_dai_hw_free()
1969 if (be->dpcm[stream].users > 1) in dpcm_be_dai_hw_free()
1972 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_free()
1973 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_hw_free()
1974 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_free()
1975 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) && in dpcm_be_dai_hw_free()
1976 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_hw_free()
1977 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_hw_free()
1980 dev_dbg(be->dev, "ASoC: hw_free BE %s\n", in dpcm_be_dai_hw_free()
1981 be->dai_link->name); in dpcm_be_dai_hw_free()
1983 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_free()
1985 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_hw_free()
2015 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_hw_params() local
2023 be = dpcm->be; in dpcm_be_dai_hw_params()
2024 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2026 /* is this op for this BE ? */ in dpcm_be_dai_hw_params()
2027 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2035 ret = snd_soc_link_be_hw_params_fixup(be, &hw_params); in dpcm_be_dai_hw_params()
2039 /* copy the fixed-up hw params for BE dai */ in dpcm_be_dai_hw_params()
2040 memcpy(&be->dpcm[stream].hw_params, &hw_params, in dpcm_be_dai_hw_params()
2044 if (!snd_soc_dpcm_can_be_params(fe, be, stream)) in dpcm_be_dai_hw_params()
2047 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2048 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2049 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE)) in dpcm_be_dai_hw_params()
2052 dev_dbg(be->dev, "ASoC: hw_params BE %s\n", in dpcm_be_dai_hw_params()
2053 be->dai_link->name); in dpcm_be_dai_hw_params()
2055 ret = __soc_pcm_hw_params(be, be_substream, &hw_params); in dpcm_be_dai_hw_params()
2059 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_be_dai_hw_params()
2065 __func__, be->dai_link->name, ret); in dpcm_be_dai_hw_params()
2069 be = dpcm->be; in dpcm_be_dai_hw_params()
2070 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2072 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2076 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_params()
2079 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2080 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2081 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_params()
2082 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) in dpcm_be_dai_hw_params()
2085 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_params()
2127 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_trigger() local
2136 be = dpcm->be; in dpcm_be_dai_trigger()
2137 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_trigger()
2139 snd_soc_dpcm_stream_lock_irqsave_nested(be, stream, flags); in dpcm_be_dai_trigger()
2141 /* is this op for this BE ? */ in dpcm_be_dai_trigger()
2142 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_trigger()
2145 dev_dbg(be->dev, "ASoC: trigger BE %s cmd %d\n", in dpcm_be_dai_trigger()
2146 be->dai_link->name, cmd); in dpcm_be_dai_trigger()
2150 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2151 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_trigger()
2152 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_trigger()
2153 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2156 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2157 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2160 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_PAUSED) in dpcm_be_dai_trigger()
2167 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2171 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2174 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_trigger()
2177 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2178 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2183 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2187 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2190 if (!be->dpcm[stream].be_start && in dpcm_be_dai_trigger()
2191 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2192 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2196 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2198 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2199 if (be->dpcm[stream].be_start != 1) in dpcm_be_dai_trigger()
2204 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2208 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2211 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2212 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2215 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2216 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2218 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2225 be->dpcm[stream].be_pause--; in dpcm_be_dai_trigger()
2228 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2234 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2235 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2238 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2243 if (be->dpcm[stream].be_pause != 0) in dpcm_be_dai_trigger()
2244 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2246 be->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in dpcm_be_dai_trigger()
2250 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()
2254 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2259 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2263 be->dpcm[stream].state = SND_SOC_DPCM_STATE_SUSPEND; in dpcm_be_dai_trigger()
2266 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2270 be->dpcm[stream].be_pause++; in dpcm_be_dai_trigger()
2272 be->dpcm[stream].be_start--; in dpcm_be_dai_trigger()
2273 if (be->dpcm[stream].be_start != 0) in dpcm_be_dai_trigger()
2278 be->dpcm[stream].be_start++; in dpcm_be_dai_trigger()
2282 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2286 snd_soc_dpcm_stream_unlock_irqrestore(be, stream, flags); in dpcm_be_dai_trigger()
2437 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_prepare() local
2439 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_prepare()
2441 /* is this op for this BE ? */ in dpcm_be_dai_prepare()
2442 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_prepare()
2445 if (!snd_soc_dpcm_can_be_prepared(fe, be, stream)) in dpcm_be_dai_prepare()
2448 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_prepare()
2449 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_prepare()
2450 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND) && in dpcm_be_dai_prepare()
2451 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_prepare()
2454 dev_dbg(be->dev, "ASoC: prepare BE %s\n", in dpcm_be_dai_prepare()
2455 be->dai_link->name); in dpcm_be_dai_prepare()
2457 ret = __soc_pcm_prepare(be, be_substream); in dpcm_be_dai_prepare()
2461 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_be_dai_prepare()
2518 /* call bespoke trigger - FE takes care of all BE triggers */ in dpcm_run_update_shutdown()
2534 /* run the stream event for each BE */ in dpcm_run_update_shutdown()
2551 /* Only start the BE if the FE is ready */ in dpcm_run_update_startup()
2560 /* startup must always be called for new BEs */ in dpcm_run_update_startup()
2581 /* run the stream event for each BE */ in dpcm_run_update_startup()
2590 /* call trigger on the frontend - FE takes care of all BE triggers */ in dpcm_run_update_startup()
2616 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_run_update_startup() local
2618 /* is this op for this BE ? */ in dpcm_run_update_startup()
2619 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_run_update_startup()
2622 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE || in dpcm_run_update_startup()
2623 be->dpcm[stream].state == SND_SOC_DPCM_STATE_NEW) in dpcm_run_update_startup()
2760 /* calculate valid and active FE <-> BE dpcms */ in dpcm_fe_dai_open()
3024 /* is the current PCM operation for this BE ? */
3026 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_be_can_update() argument
3030 be->dpcm[stream].runtime_update)) in snd_soc_dpcm_be_can_update()
3036 /* get the substream for this BE */
3038 snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_get_substream() argument
3040 return be->pcm->streams[stream].substream; in snd_soc_dpcm_get_substream()
3045 struct snd_soc_pcm_runtime *be, in snd_soc_dpcm_check_state() argument
3055 for_each_dpcm_fe(be, stream, dpcm) { in snd_soc_dpcm_check_state()
3069 /* it's safe to do this BE DAI */ in snd_soc_dpcm_check_state()
3074 * We can only hw_free, stop, pause or suspend a BE DAI if any of it's FE
3078 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_free_stop() argument
3086 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_free_stop()
3091 * We can only change hw params a BE DAI if any of it's FE are not prepared,
3095 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_params() argument
3104 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_params()
3109 * We can only prepare a BE DAI if any of it's FE are not prepared,
3113 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_prepared() argument
3121 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_prepared()