Lines Matching refs:widget

42 #define DAPM_UPDATE_STAT(widget, val) widget->dapm->card->dapm_stats.val++;  argument
59 const struct snd_soc_dapm_widget *widget);
63 const struct snd_soc_dapm_widget *widget);
345 struct snd_soc_dapm_widget *widget; member
350 static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget, in dapm_kcontrol_data_alloc() argument
365 switch (widget->id) { in dapm_kcontrol_data_alloc()
372 dev_warn(widget->dapm->dev, in dapm_kcontrol_data_alloc()
400 data->widget = in dapm_kcontrol_data_alloc()
401 snd_soc_dapm_new_control_unlocked(widget->dapm, in dapm_kcontrol_data_alloc()
404 if (IS_ERR(data->widget)) { in dapm_kcontrol_data_alloc()
405 ret = PTR_ERR(data->widget); in dapm_kcontrol_data_alloc()
435 data->widget = snd_soc_dapm_new_control_unlocked( in dapm_kcontrol_data_alloc()
436 widget->dapm, &template); in dapm_kcontrol_data_alloc()
438 if (IS_ERR(data->widget)) { in dapm_kcontrol_data_alloc()
439 ret = PTR_ERR(data->widget); in dapm_kcontrol_data_alloc()
443 snd_soc_dapm_add_path(widget->dapm, data->widget, in dapm_kcontrol_data_alloc()
444 widget, NULL, NULL); in dapm_kcontrol_data_alloc()
478 struct snd_soc_dapm_widget *widget) in dapm_kcontrol_add_widget() argument
495 new_wlist->widgets[n - 1] = widget; in dapm_kcontrol_add_widget()
515 if (!data->widget) in dapm_kcontrol_is_powered()
518 return data->widget->power; in dapm_kcontrol_is_powered()
549 if (data->widget) in dapm_kcontrol_set_value()
550 data->widget->on_val = value; in dapm_kcontrol_set_value()
639 struct snd_soc_dapm_widget *w = wcache->widget; in dapm_wcache_lookup()
662 wcache->widget = w; in dapm_wcache_update()
986 if (data->widget) in dapm_new_mixer()
987 snd_soc_dapm_add_path(data->widget->dapm, in dapm_new_mixer()
988 data->widget, in dapm_new_mixer()
1092 static int snd_soc_dapm_suspend_check(struct snd_soc_dapm_widget *widget) in snd_soc_dapm_suspend_check() argument
1094 int level = snd_power_get_state(widget->dapm->card->snd_card); in snd_soc_dapm_suspend_check()
1099 if (widget->ignore_suspend) in snd_soc_dapm_suspend_check()
1100 dev_dbg(widget->dapm->dev, "ASoC: %s ignoring suspend\n", in snd_soc_dapm_suspend_check()
1101 widget->name); in snd_soc_dapm_suspend_check()
1102 return widget->ignore_suspend; in snd_soc_dapm_suspend_check()
1136 static void invalidate_paths_ep(struct snd_soc_dapm_widget *widget, in invalidate_paths_ep() argument
1142 widget->endpoints[dir] = -1; in invalidate_paths_ep()
1144 snd_soc_dapm_widget_for_each_path(widget, rdir, path) { in invalidate_paths_ep()
1166 static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget, in is_connected_ep() argument
1178 if (widget->endpoints[dir] >= 0) in is_connected_ep()
1179 return widget->endpoints[dir]; in is_connected_ep()
1181 DAPM_UPDATE_STAT(widget, path_checks); in is_connected_ep()
1185 list_add_tail(&widget->work_list, list); in is_connected_ep()
1187 if (custom_stop_condition && custom_stop_condition(widget, dir)) { in is_connected_ep()
1192 if ((widget->is_ep & SND_SOC_DAPM_DIR_TO_EP(dir)) && widget->connected) { in is_connected_ep()
1193 widget->endpoints[dir] = snd_soc_dapm_suspend_check(widget); in is_connected_ep()
1194 return widget->endpoints[dir]; in is_connected_ep()
1197 snd_soc_dapm_widget_for_each_path(widget, rdir, path) { in is_connected_ep()
1198 DAPM_UPDATE_STAT(widget, neighbour_checks); in is_connected_ep()
1206 trace_snd_soc_dapm_path(widget, dir, path); in is_connected_ep()
1215 widget->endpoints[dir] = con; in is_connected_ep()
1229 static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, in is_connected_output_ep() argument
1234 return is_connected_ep(widget, list, SND_SOC_DAPM_DIR_OUT, in is_connected_output_ep()
1247 static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, in is_connected_input_ep() argument
1252 return is_connected_ep(widget, list, SND_SOC_DAPM_DIR_IN, in is_connected_input_ep()
2485 dapm->path_sink_cache.widget = NULL; in snd_soc_dapm_reset_cache()
2486 dapm->path_source_cache.widget = NULL; in snd_soc_dapm_reset_cache()
3575 const struct snd_soc_dapm_widget *widget) in snd_soc_dapm_new_control_unlocked() argument
3582 if ((w = dapm_cnew_widget(widget)) == NULL) in snd_soc_dapm_new_control_unlocked()
3621 w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name); in snd_soc_dapm_new_control_unlocked()
3623 w->name = kstrdup_const(widget->name, GFP_KERNEL); in snd_soc_dapm_new_control_unlocked()
3733 const struct snd_soc_dapm_widget *widget) in snd_soc_dapm_new_control() argument
3738 w = snd_soc_dapm_new_control_unlocked(dapm, widget); in snd_soc_dapm_new_control()
3756 const struct snd_soc_dapm_widget *widget, in snd_soc_dapm_new_controls() argument
3765 w = snd_soc_dapm_new_control_unlocked(dapm, widget); in snd_soc_dapm_new_controls()
3770 widget++; in snd_soc_dapm_new_controls()