• Home
  • Raw
  • Download

Lines Matching full: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);
236 * @w: The widget for which to invalidate the cached number of input paths
238 * Resets the cached number of inputs for the specified widget and all widgets
239 * that can be reached via outcoming paths from the widget.
241 * This function must be called if the number of output paths for a widget might
242 * have changed. E.g. if the source state of a widget changes or a path is added
243 * or activated with the widget as the sink.
253 * @w: The widget for which to invalidate the cached number of output paths
255 * Resets the cached number of outputs for the specified widget and all widgets
256 * that can be reached via incoming paths from the widget.
258 * This function must be called if the number of output paths for a widget might
259 * have changed. E.g. if the sink state of a widget changes or a path is added
260 * or activated with the widget as the source.
319 /* create a new dapm 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()
554 data->widget->on_val = value & data->widget->mask; in dapm_kcontrol_set_value()
558 data->widget->on_val = value >> data->widget->shift; in dapm_kcontrol_set_value()
561 data->widget->on_val = value; in dapm_kcontrol_set_value()
572 * snd_soc_dapm_kcontrol_widget() - Returns the widget associated to a
652 struct snd_soc_dapm_widget *w = wcache->widget; in dapm_wcache_lookup()
675 wcache->widget = w; in dapm_wcache_update()
744 /* connect mux widget to its interconnecting audio paths */
826 /* connect mixer widget to its interconnecting audio paths */
870 * create it. Either way, add the widget into the control's widget list
928 * front of the widget name. in dapm_create_or_share_kcontrol()
963 "ASoC: failed to add widget %s dapm kcontrol %s: %d\n", in dapm_create_or_share_kcontrol()
1003 if (data->widget) in dapm_new_mixer()
1004 snd_soc_dapm_add_path(data->widget->dapm, in dapm_new_mixer()
1005 data->widget, in dapm_new_mixer()
1094 "ASoC: failed to add widget %s dapm kcontrol %s: %d\n", in dapm_new_dai_link()
1109 static int snd_soc_dapm_suspend_check(struct snd_soc_dapm_widget *widget) in snd_soc_dapm_suspend_check() argument
1111 int level = snd_power_get_state(widget->dapm->card->snd_card); in snd_soc_dapm_suspend_check()
1116 if (widget->ignore_suspend) in snd_soc_dapm_suspend_check()
1117 dev_dbg(widget->dapm->dev, "ASoC: %s ignoring suspend\n", in snd_soc_dapm_suspend_check()
1118 widget->name); in snd_soc_dapm_suspend_check()
1119 return widget->ignore_suspend; in snd_soc_dapm_suspend_check()
1155 * widget and all widgets that can be reached via incoming or outcoming paths
1156 * from the widget.
1158 static void invalidate_paths_ep(struct snd_soc_dapm_widget *widget, in invalidate_paths_ep() argument
1164 widget->endpoints[dir] = -1; in invalidate_paths_ep()
1166 snd_soc_dapm_widget_for_each_path(widget, rdir, path) { in invalidate_paths_ep()
1188 static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget, in is_connected_ep() argument
1200 if (widget->endpoints[dir] >= 0) in is_connected_ep()
1201 return widget->endpoints[dir]; in is_connected_ep()
1203 DAPM_UPDATE_STAT(widget, path_checks); in is_connected_ep()
1205 /* do we need to add this widget to the list ? */ in is_connected_ep()
1207 list_add_tail(&widget->work_list, list); in is_connected_ep()
1209 if (custom_stop_condition && custom_stop_condition(widget, dir)) { in is_connected_ep()
1214 if ((widget->is_ep & SND_SOC_DAPM_DIR_TO_EP(dir)) && widget->connected) { in is_connected_ep()
1215 widget->endpoints[dir] = snd_soc_dapm_suspend_check(widget); in is_connected_ep()
1216 return widget->endpoints[dir]; in is_connected_ep()
1219 snd_soc_dapm_widget_for_each_path(widget, rdir, path) { in is_connected_ep()
1220 DAPM_UPDATE_STAT(widget, neighbour_checks); in is_connected_ep()
1228 trace_snd_soc_dapm_path(widget, dir, path); in is_connected_ep()
1237 widget->endpoints[dir] = con; in is_connected_ep()
1244 * output widget. Returns number of complete paths.
1247 * This function takes the dapm widget currently being examined and the walk
1249 * in the graph onwards should not be added to the widget list.
1251 static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, in is_connected_output_ep() argument
1256 return is_connected_ep(widget, list, SND_SOC_DAPM_DIR_OUT, in is_connected_output_ep()
1262 * input widget. Returns number of complete paths.
1265 * This function takes the dapm widget currently being examined and the walk
1269 static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, in is_connected_input_ep() argument
1274 return is_connected_ep(widget, list, SND_SOC_DAPM_DIR_IN, in is_connected_input_ep()
1283 * @custom_stop_condition: (optional) a function meant to stop the widget graph
1291 * This function takes the dapm widget currently being examined and the walk
1341 * Handler for regulator supply widget.
1375 * Handler for pinctrl widget.
1400 * Handler for clock supply widget.
1436 /* Generic check to see if a widget should be powered. */
1511 /* Insert a widget in order into a DAPM power sequence. */
1613 /* Any widget will do, they should all be updating the in dapm_seq_run_coalesced()
1722 "ASoC: Failed to apply widget power: %d\n", ret); in dapm_seq_run()
1946 * Scan each dapm widget for complete audio path.
2270 /* test and update the power status of a mux widget */
2280 /* find dapm widget path assoc with kcontrol */ in soc_dapm_mux_update_power()
2316 /* test and update the power status of a mixer or switch widget */
2326 /* find dapm widget path assoc with kcontrol */ in soc_dapm_mixer_update_power()
2446 /* show dapm widget status in sys fs */
2491 * remove source and sink paths associated to this widget. in snd_soc_dapm_free_widget()
2508 dapm->path_sink_cache.widget = NULL; in snd_soc_dapm_reset_cache()
2509 dapm->path_source_cache.widget = NULL; in snd_soc_dapm_reset_cache()
2719 * dapm_update_widget_flags() - Re-compute widget sink and source flags
2720 * @w: The widget for which to update the flags
2725 * This function must be called whenever a path is added or removed to a widget.
2835 "Connecting non-supply widget to supply widget is not supported (%s -> %s)\n", in snd_soc_dapm_add_path()
2958 * find src and dest widgets over all widgets but favor a widget from in snd_soc_dapm_add_route()
2972 "ASoC: sink widget %s overwritten\n", in snd_soc_dapm_add_route()
2986 "ASoC: source widget %s overwritten\n", in snd_soc_dapm_add_route()
2990 /* use widget from another DAPM context if not found from this */ in snd_soc_dapm_add_route()
2997 dev_err(dapm->dev, "ASoC: no source widget found for %s\n", in snd_soc_dapm_add_route()
3002 dev_err(dapm->dev, "ASoC: no sink widget found for %s\n", in snd_soc_dapm_add_route()
3092 * the widget receiving the audio signal, whilst the source is the sender
3288 dapm_mark_dirty(w, "new widget"); in snd_soc_dapm_new_widgets()
3618 const struct snd_soc_dapm_widget *widget) in snd_soc_dapm_new_control_unlocked() argument
3625 if ((w = dapm_cnew_widget(widget)) == NULL) in snd_soc_dapm_new_control_unlocked()
3667 w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name); in snd_soc_dapm_new_control_unlocked()
3669 w->name = kstrdup_const(widget->name, GFP_KERNEL); in snd_soc_dapm_new_control_unlocked()
3772 * @widget: widget template
3776 * Returns a widget pointer on success or an error pointer on failure
3780 const struct snd_soc_dapm_widget *widget) in snd_soc_dapm_new_control() argument
3785 w = snd_soc_dapm_new_control_unlocked(dapm, widget); in snd_soc_dapm_new_control()
3795 * @widget: widget array
3803 const struct snd_soc_dapm_widget *widget, in snd_soc_dapm_new_controls() argument
3812 w = snd_soc_dapm_new_control_unlocked(dapm, widget); in snd_soc_dapm_new_controls()
3817 widget++; in snd_soc_dapm_new_controls()
4046 /* Can't change the config when widget is already powered */ in snd_soc_dapm_dai_link_put()
4126 dev_err(card->dev, "ASoC: Failed to create control for %s widget\n", in snd_soc_dapm_alloc_kcontrol()
4136 dev_err(card->dev, "ASoC: Failed to create control for %s widget\n", in snd_soc_dapm_alloc_kcontrol()
4198 dev_dbg(card->dev, "ASoC: adding %s widget\n", link_name); in snd_soc_dapm_new_dai()
4203 dev_err(rtd->dev, "ASoC: Failed to create %s widget: %d\n", in snd_soc_dapm_new_dai()
4237 dev_dbg(dai->dev, "ASoC: adding %s widget\n", in snd_soc_dapm_new_dai_widgets()
4253 dev_dbg(dai->dev, "ASoC: adding %s widget\n", in snd_soc_dapm_new_dai_widgets()
4273 /* For each DAI widget... */ in snd_soc_dapm_link_dai_widgets()
4285 dev_dbg(card->dev, "dai widget %s has no DAI\n", in snd_soc_dapm_link_dai_widgets()
4482 * necessary widget power changes.
4530 * do any widget power switching.
4548 * do any widget power switching.
4576 * do any widget power switching.
4615 * do any widget power switching.
4642 * do any widget power switching.
4659 * do any widget power switching.
4690 * do any widget power switching.
4711 * do any widget power switching.