• Home
  • Raw
  • Download

Lines Matching refs:be

135 		struct snd_soc_pcm_runtime *be = dpcm->be;  in dpcm_show_state()  local
139 "- %s\n", be->dai_link->name); in dpcm_show_state()
143 dpcm_state_string(be->dpcm[stream].state)); in dpcm_show_state()
145 if ((be->dpcm[stream].state >= SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_show_state()
146 (be->dpcm[stream].state <= SND_SOC_DPCM_STATE_STOP)) in dpcm_show_state()
215 name = kasprintf(GFP_KERNEL, "%s:%s", dpcm->be->dai_link->name, in dpcm_create_debugfs_state()
264 static void dpcm_set_be_update_state(struct snd_soc_pcm_runtime *be, in dpcm_set_be_update_state() argument
267 be->dpcm[stream].runtime_update = state; in dpcm_set_be_update_state()
346 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_dapm_stream_event() local
348 dev_dbg(be->dev, "ASoC: BE %s event %d dir %d\n", in dpcm_dapm_stream_event()
349 be->dai_link->name, event, dir); in dpcm_dapm_stream_event()
352 (be->dpcm[dir].users >= 1)) in dpcm_dapm_stream_event()
355 snd_soc_dapm_stream_event(be, dir, event); in dpcm_dapm_stream_event()
1208 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_connect() argument
1218 if (dpcm->be == be && dpcm->fe == fe) in dpcm_be_connect()
1223 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_connect()
1226 dev_err(be->dev, "%s: FE is atomic but BE is nonatomic, invalid configuration\n", in dpcm_be_connect()
1231 dev_warn(be->dev, "%s: FE is nonatomic but BE is not, forcing BE as nonatomic\n", in dpcm_be_connect()
1240 dpcm->be = be; in dpcm_be_connect()
1242 be->dpcm[stream].runtime = fe->dpcm[stream].runtime; in dpcm_be_connect()
1246 list_add(&dpcm->list_fe, &be->dpcm[stream].fe_clients); in dpcm_be_connect()
1251 stream ? "<-" : "->", be->dai_link->name); in dpcm_be_connect()
1260 struct snd_soc_pcm_runtime *be, int stream) in dpcm_be_reparent() argument
1266 if (!be->dpcm[stream].users) in dpcm_be_reparent()
1269 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_reparent()
1273 for_each_dpcm_fe(be, stream, dpcm) { in dpcm_be_reparent()
1280 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_reparent()
1300 dpcm->be->dai_link->name); in dpcm_be_disconnect()
1307 stream ? "<-" : "->", dpcm->be->dai_link->name); in dpcm_be_disconnect()
1310 dpcm_be_reparent(fe, dpcm->be, stream); in dpcm_be_disconnect()
1330 struct snd_soc_pcm_runtime *be; in dpcm_get_be() local
1337 for_each_card_rtds(card, be) { in dpcm_get_be()
1339 if (!be->dai_link->no_pcm) in dpcm_get_be()
1342 if (!snd_soc_dpcm_get_substream(be, stream)) in dpcm_get_be()
1345 for_each_rtd_dais(be, i, dai) { in dpcm_get_be()
1352 return be; in dpcm_get_be()
1432 for_each_rtd_dais(dpcm->be, i, dai) { in dpcm_be_is_active()
1459 dpcm->be->dai_link->name, fe->dai_link->name); in dpcm_prune_paths()
1461 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_prune_paths()
1474 struct snd_soc_pcm_runtime *be; in dpcm_add_paths() local
1495 be = dpcm_get_be(card, widget, stream); in dpcm_add_paths()
1496 if (!be) { in dpcm_add_paths()
1507 err = dpcm_be_connect(fe, be, stream); in dpcm_add_paths()
1516 dpcm_set_be_update_state(be, stream, SND_SOC_DPCM_UPDATE_BE); in dpcm_add_paths()
1542 dpcm_set_be_update_state(dpcm->be, stream, SND_SOC_DPCM_UPDATE_NO); in dpcm_clear_pending_state()
1552 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_stop() local
1554 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_stop()
1560 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_stop()
1563 if (be->dpcm[stream].users == 0) { in dpcm_be_dai_stop()
1564 dev_err(be->dev, "ASoC: no users %s at close - state %d\n", in dpcm_be_dai_stop()
1566 be->dpcm[stream].state); in dpcm_be_dai_stop()
1570 if (--be->dpcm[stream].users != 0) in dpcm_be_dai_stop()
1573 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) { in dpcm_be_dai_stop()
1577 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) { in dpcm_be_dai_stop()
1578 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_stop()
1579 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_stop()
1583 __soc_pcm_close(be, be_substream); in dpcm_be_dai_stop()
1585 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_stop()
1591 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_startup() local
1599 be = dpcm->be; in dpcm_be_dai_startup()
1600 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_startup()
1603 dev_err(be->dev, "ASoC: no backend %s stream\n", in dpcm_be_dai_startup()
1609 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_startup()
1613 if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) { in dpcm_be_dai_startup()
1614 dev_err(be->dev, "ASoC: too many users %s at open %d\n", in dpcm_be_dai_startup()
1616 be->dpcm[stream].state); in dpcm_be_dai_startup()
1620 if (be->dpcm[stream].users++ != 0) in dpcm_be_dai_startup()
1623 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) && in dpcm_be_dai_startup()
1624 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE)) in dpcm_be_dai_startup()
1627 dev_dbg(be->dev, "ASoC: open %s BE %s\n", in dpcm_be_dai_startup()
1628 stream ? "capture" : "playback", be->dai_link->name); in dpcm_be_dai_startup()
1630 be_substream->runtime = be->dpcm[stream].runtime; in dpcm_be_dai_startup()
1631 err = __soc_pcm_open(be, be_substream); in dpcm_be_dai_startup()
1633 be->dpcm[stream].users--; in dpcm_be_dai_startup()
1634 if (be->dpcm[stream].users < 0) in dpcm_be_dai_startup()
1635 dev_err(be->dev, "ASoC: no users %s at unwind %d\n", in dpcm_be_dai_startup()
1637 be->dpcm[stream].state); in dpcm_be_dai_startup()
1639 be->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; in dpcm_be_dai_startup()
1642 be->dpcm_be_start[stream] = 0; in dpcm_be_dai_startup()
1643 be->dpcm[stream].state = SND_SOC_DPCM_STATE_OPEN; in dpcm_be_dai_startup()
1653 __func__, be->dai_link->name, err); in dpcm_be_dai_startup()
1710 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_format() local
1714 for_each_rtd_codec_dais(be, i, dai) { in dpcm_runtime_setup_be_format()
1746 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_chan() local
1751 for_each_rtd_cpu_dais(be, i, dai) { in dpcm_runtime_setup_be_chan()
1768 if (be->num_codecs == 1) { in dpcm_runtime_setup_be_chan()
1770 asoc_rtd_to_codec(be, 0), stream); in dpcm_runtime_setup_be_chan()
1794 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_runtime_setup_be_rate() local
1799 for_each_rtd_dais(be, i, dai) { in dpcm_runtime_setup_be_rate()
1835 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_apply_symmetry() local
1837 snd_soc_dpcm_get_substream(be, stream); in dpcm_apply_symmetry()
1938 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_hw_free() local
1940 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_free()
1943 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_free()
1947 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_free()
1951 if (be->dpcm[stream].users > 1) in dpcm_be_dai_hw_free()
1954 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_free()
1955 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_hw_free()
1956 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_free()
1957 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) && in dpcm_be_dai_hw_free()
1958 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_hw_free()
1959 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_hw_free()
1962 dev_dbg(be->dev, "ASoC: hw_free BE %s\n", in dpcm_be_dai_hw_free()
1963 be->dai_link->name); in dpcm_be_dai_hw_free()
1965 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_free()
1967 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; in dpcm_be_dai_hw_free()
1997 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_hw_params() local
2003 be = dpcm->be; in dpcm_be_dai_hw_params()
2004 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2007 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2015 ret = snd_soc_link_be_hw_params_fixup(be, &dpcm->hw_params); in dpcm_be_dai_hw_params()
2020 memcpy(&be->dpcm[stream].hw_params, &dpcm->hw_params, in dpcm_be_dai_hw_params()
2024 if (!snd_soc_dpcm_can_be_params(fe, be, stream)) in dpcm_be_dai_hw_params()
2027 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2028 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2029 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE)) in dpcm_be_dai_hw_params()
2032 dev_dbg(be->dev, "ASoC: hw_params BE %s\n", in dpcm_be_dai_hw_params()
2033 be->dai_link->name); in dpcm_be_dai_hw_params()
2035 ret = __soc_pcm_hw_params(be, be_substream, &dpcm->hw_params); in dpcm_be_dai_hw_params()
2039 be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; in dpcm_be_dai_hw_params()
2045 __func__, be->dai_link->name, ret); in dpcm_be_dai_hw_params()
2049 be = dpcm->be; in dpcm_be_dai_hw_params()
2050 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_hw_params()
2052 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_hw_params()
2056 if (!snd_soc_dpcm_can_be_free_stop(fe, be, stream)) in dpcm_be_dai_hw_params()
2059 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN) && in dpcm_be_dai_hw_params()
2060 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_hw_params()
2061 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && in dpcm_be_dai_hw_params()
2062 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) in dpcm_be_dai_hw_params()
2065 __soc_pcm_hw_free(be, be_substream); in dpcm_be_dai_hw_params()
2110 struct snd_soc_pcm_runtime *be; in dpcm_be_dai_trigger() local
2118 be = dpcm->be; in dpcm_be_dai_trigger()
2119 be_substream = snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_trigger()
2121 snd_soc_dpcm_stream_lock_irqsave_nested(be, stream, flags); in dpcm_be_dai_trigger()
2124 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_trigger()
2127 dev_dbg(be->dev, "ASoC: trigger BE %s cmd %d\n", in dpcm_be_dai_trigger()
2128 be->dai_link->name, cmd); in dpcm_be_dai_trigger()
2132 if (!be->dpcm_be_start[stream] && in dpcm_be_dai_trigger()
2133 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && in dpcm_be_dai_trigger()
2134 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_trigger()
2135 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2138 be->dpcm_be_start[stream]++; in dpcm_be_dai_trigger()
2139 if (be->dpcm_be_start[stream] != 1) in dpcm_be_dai_trigger()
2144 be->dpcm_be_start[stream]--; in dpcm_be_dai_trigger()
2148 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2151 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) in dpcm_be_dai_trigger()
2154 be->dpcm_be_start[stream]++; in dpcm_be_dai_trigger()
2155 if (be->dpcm_be_start[stream]!= 1) in dpcm_be_dai_trigger()
2160 be->dpcm_be_start[stream]--; in dpcm_be_dai_trigger()
2164 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2167 if (!be->dpcm_be_start[stream] && in dpcm_be_dai_trigger()
2168 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2169 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_trigger()
2170 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2173 be->dpcm_be_start[stream]++; in dpcm_be_dai_trigger()
2174 if (be->dpcm_be_start[stream] != 1) in dpcm_be_dai_trigger()
2179 be->dpcm_be_start[stream]--; in dpcm_be_dai_trigger()
2183 be->dpcm[stream].state = SND_SOC_DPCM_STATE_START; in dpcm_be_dai_trigger()
2186 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) && in dpcm_be_dai_trigger()
2187 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_trigger()
2190 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2191 be->dpcm_be_start[stream]--; in dpcm_be_dai_trigger()
2193 if (be->dpcm_be_start[stream] != 0) in dpcm_be_dai_trigger()
2198 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2199 be->dpcm_be_start[stream]++; in dpcm_be_dai_trigger()
2203 be->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; in dpcm_be_dai_trigger()
2206 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2209 be->dpcm_be_start[stream]--; in dpcm_be_dai_trigger()
2210 if (be->dpcm_be_start[stream] != 0) in dpcm_be_dai_trigger()
2215 be->dpcm_be_start[stream]++; in dpcm_be_dai_trigger()
2219 be->dpcm[stream].state = SND_SOC_DPCM_STATE_SUSPEND; in dpcm_be_dai_trigger()
2222 if (be->dpcm[stream].state != SND_SOC_DPCM_STATE_START) in dpcm_be_dai_trigger()
2225 be->dpcm_be_start[stream]--; in dpcm_be_dai_trigger()
2226 if (be->dpcm_be_start[stream] != 0) in dpcm_be_dai_trigger()
2231 be->dpcm_be_start[stream]++; in dpcm_be_dai_trigger()
2235 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; in dpcm_be_dai_trigger()
2239 snd_soc_dpcm_stream_unlock_irqrestore(be, stream, flags); in dpcm_be_dai_trigger()
2245 __func__, be->dai_link->name, ret); in dpcm_be_dai_trigger()
2393 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_be_dai_prepare() local
2395 snd_soc_dpcm_get_substream(be, stream); in dpcm_be_dai_prepare()
2398 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_be_dai_prepare()
2401 if (!snd_soc_dpcm_can_be_prepared(fe, be, stream)) in dpcm_be_dai_prepare()
2404 if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) && in dpcm_be_dai_prepare()
2405 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && in dpcm_be_dai_prepare()
2406 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND) && in dpcm_be_dai_prepare()
2407 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED)) in dpcm_be_dai_prepare()
2410 dev_dbg(be->dev, "ASoC: prepare BE %s\n", in dpcm_be_dai_prepare()
2411 be->dai_link->name); in dpcm_be_dai_prepare()
2413 ret = __soc_pcm_prepare(be, be_substream); in dpcm_be_dai_prepare()
2417 be->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; in dpcm_be_dai_prepare()
2578 struct snd_soc_pcm_runtime *be = dpcm->be; in dpcm_run_update_startup() local
2581 if (!snd_soc_dpcm_be_can_update(fe, be, stream)) in dpcm_run_update_startup()
2584 if (be->dpcm[stream].state == SND_SOC_DPCM_STATE_CLOSE || in dpcm_run_update_startup()
2585 be->dpcm[stream].state == SND_SOC_DPCM_STATE_NEW) in dpcm_run_update_startup()
2972 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_be_can_update() argument
2976 be->dpcm[stream].runtime_update)) in snd_soc_dpcm_be_can_update()
2984 snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_get_substream() argument
2986 return be->pcm->streams[stream].substream; in snd_soc_dpcm_get_substream()
2991 struct snd_soc_pcm_runtime *be, in snd_soc_dpcm_check_state() argument
3001 for_each_dpcm_fe(be, stream, dpcm) { in snd_soc_dpcm_check_state()
3024 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_free_stop() argument
3032 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_free_stop()
3041 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_params() argument
3050 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_params()
3059 struct snd_soc_pcm_runtime *be, int stream) in snd_soc_dpcm_can_be_prepared() argument
3067 return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); in snd_soc_dpcm_can_be_prepared()