Lines Matching refs:path
203 * the size of the generic function and at the same time the fast path of the
244 * have changed. E.g. if the source state of a widget changes or a path is added
261 * have changed. E.g. if the sink state of a widget changes or a path is added
271 * for the widgets connected to a path
272 * @p: The path to invalidate
274 * Resets the cached number of inputs for the sink of the path and the cached
275 * number of outputs for the source of the path.
277 * This function must be called when a path is added, removed or the connected
293 * so there is no need to re-check the path.
509 struct snd_soc_dapm_path *path)
513 list_add_tail(&path->list_kcontrol, &data->paths);
534 #define dapm_kcontrol_for_each_path(path, kcontrol) \
535 list_for_each_entry(path, dapm_kcontrol_get_path_list(kcontrol), \
742 struct snd_soc_dapm_path *path, const char *control_name,
757 * decide which path to connect, it will try to match
769 path->name = e->texts[i];
770 path->connect = (i == item);
792 * which path of a kcontrol it is setting the initial
799 * first path is the left channel, and all remaining
814 * decide which path to connect, it will try to match
825 struct snd_soc_dapm_path *path, const char *control_name)
830 for (i = 0; i < path->sink->num_kcontrols; i++) {
831 if (!strcmp(control_name, path->sink->kcontrol_news[i].name)) {
832 path->name = path->sink->kcontrol_news[i].name;
833 dapm_set_mixer_path_status(path, i, nth_path++);
982 struct snd_soc_dapm_path *path;
988 snd_soc_dapm_widget_for_each_source_path(w, path) {
990 if (path->name != (char *)w->kcontrol_news[i].name)
999 dapm_kcontrol_add_path(w->kcontrols[i], path);
1005 path->source,
1018 struct snd_soc_dapm_path *path;
1051 snd_soc_dapm_widget_for_each_path(w, dir, path) {
1052 if (path->name)
1053 dapm_kcontrol_add_path(w->kcontrols[0], path);
1161 struct snd_soc_dapm_path *path;
1165 snd_soc_dapm_widget_for_each_path(widget, rdir, path) {
1166 if (path->weak || path->is_supply)
1169 if (path->walking)
1172 if (path->connect) {
1173 path->walking = 1;
1174 invalidate_paths_ep(path->node[dir], dir);
1175 path->walking = 0;
1184 * generic function and at the same time the fast path of the specialized
1196 struct snd_soc_dapm_path *path;
1218 snd_soc_dapm_widget_for_each_path(widget, rdir, path) {
1221 if (path->weak || path->is_supply)
1224 if (path->walking)
1227 trace_snd_soc_dapm_path(widget, dir, path);
1229 if (path->connect) {
1230 path->walking = 1;
1231 con += fn(path->node[dir], list, custom_stop_condition);
1232 path->walking = 0;
1242 * Recursively check for a completed path to an active or physically connected
1260 * Recursively check for a completed path to an active or physically connected
1278 * snd_soc_dapm_dai_get_connected_widgets - query audio path and it's widgets.
1285 * Queries DAPM graph as to whether a valid audio stream path exists for
1450 struct snd_soc_dapm_path *path;
1455 snd_soc_dapm_widget_for_each_sink_path(w, path) {
1458 if (path->weak)
1461 if (path->connected &&
1462 !path->connected(path->source, path->sink))
1465 if (dapm_widget_power_check(path->sink))
1880 struct snd_soc_dapm_path *path;
1905 snd_soc_dapm_widget_for_each_source_path(w, path)
1906 dapm_widget_set_peer_power(path->source, power, path->connect);
1912 snd_soc_dapm_widget_for_each_sink_path(w, path)
1913 dapm_widget_set_peer_power(path->sink, power, path->connect);
1939 * Scan each dapm widget for complete audio path.
1940 * A complete path is a route that has valid endpoints i.e.:-
2258 * soc_dapm_connect_path() - Connects or disconnects a path
2259 * @path: The path to update
2260 * @connect: The new connect state of the path. True if the path is connected,
2262 * @reason: The reason why the path changed (for debugging only)
2264 static void soc_dapm_connect_path(struct snd_soc_dapm_path *path,
2267 if (path->connect == connect)
2270 path->connect = connect;
2271 dapm_mark_dirty(path->source, reason);
2272 dapm_mark_dirty(path->sink, reason);
2273 dapm_path_invalidate(path);
2280 struct snd_soc_dapm_path *path;
2286 /* find dapm widget path assoc with kcontrol */
2287 dapm_kcontrol_for_each_path(path, kcontrol) {
2289 /* we now need to match the string in the enum to the path */
2290 if (e && !(strcmp(path->name, e->texts[mux])))
2295 soc_dapm_connect_path(path, connect, "mux update");
2327 struct snd_soc_dapm_path *path;
2332 /* find dapm widget path assoc with kcontrol */
2333 dapm_kcontrol_for_each_path(path, kcontrol) {
2341 * first path (when 'found == 0') is the left channel,
2352 * It passes 'connect' as the path connect status for
2357 soc_dapm_connect_path(path, rconnect, "mixer update");
2359 soc_dapm_connect_path(path, connect, "mixer update");
2479 static void dapm_free_path(struct snd_soc_dapm_path *path)
2481 list_del(&path->list_node[SND_SOC_DAPM_DIR_IN]);
2482 list_del(&path->list_node[SND_SOC_DAPM_DIR_OUT]);
2483 list_del(&path->list_kcontrol);
2484 list_del(&path->list);
2485 kfree(path);
2506 * While removing the path, remove reference to it from both
2507 * source and sink widgets so that path is removed only once.
2620 * stream or path usage.
2644 * stream or path usage.
2750 * This function must be called whenever a path is added or removed to a widget.
2834 "Direct connection between demux and mixer/mux not supported for path %s -> [%s] -> %s\n",
2839 "Control not supported for path %s -> [%s] -> %s\n",
2854 struct snd_soc_dapm_path *path;
2882 path = kzalloc(sizeof(struct snd_soc_dapm_path), GFP_KERNEL);
2883 if (!path)
2886 path->node[SND_SOC_DAPM_DIR_IN] = wsource;
2887 path->node[SND_SOC_DAPM_DIR_OUT] = wsink;
2889 path->connected = connected;
2890 INIT_LIST_HEAD(&path->list);
2891 INIT_LIST_HEAD(&path->list_kcontrol);
2894 path->is_supply = 1;
2898 path->connect = 1;
2902 ret = dapm_connect_mux(dapm, path, control, wsource);
2912 ret = dapm_connect_mux(dapm, path, control, wsink);
2919 ret = dapm_connect_mixer(dapm, path, control);
2928 list_add(&path->list, &dapm->card->paths);
2931 list_add(&path->list_node[dir], &path->node[dir]->edges[dir]);
2934 dapm_update_widget_flags(path->node[dir]);
2935 dapm_mark_dirty(path->node[dir], "Route added");
2938 if (snd_soc_card_is_instantiated(dapm->card) && path->connect)
2939 dapm_path_invalidate(path);
2943 kfree(path);
3046 struct snd_soc_dapm_path *path, *p;
3072 path = NULL;
3078 path = p;
3082 if (path) {
3083 struct snd_soc_dapm_widget *wsource = path->source;
3084 struct snd_soc_dapm_widget *wsink = path->sink;
3088 if (path->connect)
3089 dapm_path_invalidate(path);
3091 dapm_free_path(path);
3093 /* Update any path related flags */
3110 * Connects 2 dapm widgets together via a named audio path. The sink is
3168 struct snd_soc_dapm_path *path;
3187 snd_soc_dapm_widget_for_each_sink_path(source, path) {
3188 if (path->sink == sink) {
3189 path->weak = 1;
3195 dev_err(dapm->dev, "ASoC: No path found for weak route %s->%s\n",
3835 struct snd_soc_dapm_path *path;
3866 snd_soc_dapm_widget_for_each_source_path(w, path) {
3867 source = path->source->priv;
3877 snd_soc_dapm_widget_for_each_sink_path(w, path) {
3878 sink = path->sink->priv;
3922 snd_soc_dapm_widget_for_each_source_path(w, path) {
3923 source = path->source->priv;
3933 snd_soc_dapm_widget_for_each_sink_path(w, path) {
3934 sink = path->sink->priv;
3958 struct snd_soc_dapm_path *path;
3976 snd_soc_dapm_widget_for_each_sink_path(w, path) {
3977 sink = path->sink->priv;
3985 snd_soc_dapm_widget_for_each_sink_path(w, path) {
3986 sink = path->sink->priv;
3993 snd_soc_dapm_widget_for_each_source_path(w, path) {
3994 source = path->source->priv;
3999 snd_soc_dapm_widget_for_each_sink_path(w, path) {
4000 sink = path->sink->priv;
4005 snd_soc_dapm_widget_for_each_source_path(w, path) {
4006 source = path->source->priv;
4012 snd_soc_dapm_widget_for_each_sink_path(w, path) {
4013 sink = path->sink->priv;
4781 * system is disabled a path between two endpoints flagged as ignoring
4782 * suspend will not be disabled. The path must already be enabled via