• 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);
238 * @w: The widget for which to invalidate the cached number of input paths
240 * Resets the cached number of inputs for the specified widget and all widgets
241 * that can be reached via outcoming paths from the widget.
243 * This function must be called if the number of output paths for a widget might
244 * have changed. E.g. if the source state of a widget changes or a path is added
245 * or activated with the widget as the sink.
255 * @w: The widget for which to invalidate the cached number of output paths
257 * Resets the cached number of outputs for the specified widget and all widgets
258 * that can be reached via incoming paths from the widget.
260 * This function must be called if the number of output paths for a widget might
261 * have changed. E.g. if the sink state of a widget changes or a path is added
262 * or activated with the widget as the source.
321 /* create a new dapm widget */
347 struct snd_soc_dapm_widget *widget; member
352 static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget, in dapm_kcontrol_data_alloc() argument
367 switch (widget->id) { in dapm_kcontrol_data_alloc()
377 dev_warn(widget->dapm->dev, in dapm_kcontrol_data_alloc()
402 data->widget = in dapm_kcontrol_data_alloc()
403 snd_soc_dapm_new_control_unlocked(widget->dapm, in dapm_kcontrol_data_alloc()
406 if (IS_ERR(data->widget)) { in dapm_kcontrol_data_alloc()
407 ret = PTR_ERR(data->widget); in dapm_kcontrol_data_alloc()
437 data->widget = snd_soc_dapm_new_control_unlocked( in dapm_kcontrol_data_alloc()
438 widget->dapm, &template); in dapm_kcontrol_data_alloc()
440 if (IS_ERR(data->widget)) { in dapm_kcontrol_data_alloc()
441 ret = PTR_ERR(data->widget); in dapm_kcontrol_data_alloc()
445 snd_soc_dapm_add_path(widget->dapm, data->widget, in dapm_kcontrol_data_alloc()
446 widget, NULL, NULL); in dapm_kcontrol_data_alloc()
448 data->value = soc_dapm_read(widget->dapm, e->reg) & in dapm_kcontrol_data_alloc()
483 struct snd_soc_dapm_widget *widget) in dapm_kcontrol_add_widget() argument
500 new_wlist->widgets[n - 1] = widget; in dapm_kcontrol_add_widget()
520 if (!data->widget) in dapm_kcontrol_is_powered()
523 return data->widget->power; in dapm_kcontrol_is_powered()
554 if (data->widget) { in dapm_kcontrol_set_value()
559 data->widget->on_val = value & data->widget->mask; in dapm_kcontrol_set_value()
563 data->widget->on_val = value >> data->widget->shift; in dapm_kcontrol_set_value()
566 data->widget->on_val = value; in dapm_kcontrol_set_value()
577 * snd_soc_dapm_kcontrol_widget() - Returns the widget associated to a
740 /* connect mux widget to its interconnecting audio paths */
823 /* connect mixer widget to its interconnecting audio paths */
867 * create it. Either way, add the widget into the control's widget list
927 * front of the widget name. in dapm_create_or_share_kcontrol()
962 "ASoC: failed to add widget %s dapm kcontrol %s: %d\n", in dapm_create_or_share_kcontrol()
1002 if (data->widget) in dapm_new_mixer()
1003 snd_soc_dapm_add_path(data->widget->dapm, in dapm_new_mixer()
1004 data->widget, in dapm_new_mixer()
1093 "ASoC: failed to add widget %s dapm kcontrol %s: %d\n", in dapm_new_dai_link()
1108 static int snd_soc_dapm_suspend_check(struct snd_soc_dapm_widget *widget) in snd_soc_dapm_suspend_check() argument
1110 int level = snd_power_get_state(widget->dapm->card->snd_card); in snd_soc_dapm_suspend_check()
1115 if (widget->ignore_suspend) in snd_soc_dapm_suspend_check()
1116 dev_dbg(widget->dapm->dev, "ASoC: %s ignoring suspend\n", in snd_soc_dapm_suspend_check()
1117 widget->name); in snd_soc_dapm_suspend_check()
1118 return widget->ignore_suspend; in snd_soc_dapm_suspend_check()
1154 * widget and all widgets that can be reached via incoming or outcoming paths
1155 * from the widget.
1157 static void invalidate_paths_ep(struct snd_soc_dapm_widget *widget, in invalidate_paths_ep() argument
1163 widget->endpoints[dir] = -1; in invalidate_paths_ep()
1165 snd_soc_dapm_widget_for_each_path(widget, rdir, path) { in invalidate_paths_ep()
1187 static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget, in is_connected_ep() argument
1199 if (widget->endpoints[dir] >= 0) in is_connected_ep()
1200 return widget->endpoints[dir]; in is_connected_ep()
1202 DAPM_UPDATE_STAT(widget, path_checks); in is_connected_ep()
1204 /* do we need to add this widget to the list ? */ in is_connected_ep()
1206 list_add_tail(&widget->work_list, list); in is_connected_ep()
1208 if (custom_stop_condition && custom_stop_condition(widget, dir)) { in is_connected_ep()
1213 if ((widget->is_ep & SND_SOC_DAPM_DIR_TO_EP(dir)) && widget->connected) { in is_connected_ep()
1214 widget->endpoints[dir] = snd_soc_dapm_suspend_check(widget); in is_connected_ep()
1215 return widget->endpoints[dir]; in is_connected_ep()
1218 snd_soc_dapm_widget_for_each_path(widget, rdir, path) { in is_connected_ep()
1219 DAPM_UPDATE_STAT(widget, neighbour_checks); in is_connected_ep()
1227 trace_snd_soc_dapm_path(widget, dir, path); in is_connected_ep()
1236 widget->endpoints[dir] = con; in is_connected_ep()
1243 * output widget. Returns number of complete paths.
1246 * This function takes the dapm widget currently being examined and the walk
1248 * in the graph onwards should not be added to the widget list.
1250 static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, in is_connected_output_ep() argument
1255 return is_connected_ep(widget, list, SND_SOC_DAPM_DIR_OUT, in is_connected_output_ep()
1261 * input widget. Returns number of complete paths.
1264 * This function takes the dapm widget currently being examined and the walk
1268 static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, in is_connected_input_ep() argument
1273 return is_connected_ep(widget, list, SND_SOC_DAPM_DIR_IN, in is_connected_input_ep()
1282 * @custom_stop_condition: (optional) a function meant to stop the widget graph
1290 * This function takes the dapm widget currently being examined and the walk
1340 * Handler for regulator supply widget.
1374 * Handler for pinctrl widget.
1399 * Handler for clock supply widget.
1435 /* Generic check to see if a widget should be powered. */
1510 /* Insert a widget in order into a DAPM power sequence. */
1614 /* Any widget will do, they should all be updating the in dapm_seq_run_coalesced()
1721 "ASoC: Failed to apply widget power: %d\n", ret); in dapm_seq_run()
1939 * Scan each dapm widget for complete audio path.
2276 /* test and update the power status of a mux widget */
2286 /* find dapm widget path assoc with kcontrol */ in soc_dapm_mux_update_power()
2322 /* test and update the power status of a mixer or switch widget */
2332 /* find dapm widget path assoc with kcontrol */ in soc_dapm_mixer_update_power()
2451 /* show dapm widget status in sys fs */
2489 * snd_soc_dapm_free_widget - Free specified widget
2490 * @w: widget to free
2492 * Removes widget from all paths and frees memory occupied by it.
2505 * remove source and sink paths associated to this widget. in snd_soc_dapm_free_widget()
2731 int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s) in snd_soc_dapm_widget_name_cmp() argument
2733 struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm); in snd_soc_dapm_widget_name_cmp()
2734 const char *wname = widget->name; in snd_soc_dapm_widget_name_cmp()
2744 * dapm_update_widget_flags() - Re-compute widget sink and source flags
2745 * @w: The widget for which to update the flags
2750 * This function must be called whenever a path is added or removed to a widget.
2859 "Connecting non-supply widget to supply widget is not supported (%s -> %s)\n", in snd_soc_dapm_add_path()
2981 * find src and dest widgets over all widgets but favor a widget from in snd_soc_dapm_add_route()
2995 "ASoC: sink widget %s overwritten\n", in snd_soc_dapm_add_route()
3009 "ASoC: source widget %s overwritten\n", in snd_soc_dapm_add_route()
3013 /* use widget from another DAPM context if not found from this */ in snd_soc_dapm_add_route()
3111 * the widget receiving the audio signal, whilst the source is the sender
3302 dapm_mark_dirty(w, "new widget"); in snd_soc_dapm_new_widgets()
3628 const struct snd_soc_dapm_widget *widget) in snd_soc_dapm_new_control_unlocked() argument
3635 if ((w = dapm_cnew_widget(widget)) == NULL) in snd_soc_dapm_new_control_unlocked()
3640 w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name); in snd_soc_dapm_new_control_unlocked()
3642 w->name = kstrdup_const(widget->name, GFP_KERNEL); in snd_soc_dapm_new_control_unlocked()
3648 w->regulator = devm_regulator_get(dapm->dev, widget->name); in snd_soc_dapm_new_control_unlocked()
3673 w->clk = devm_clk_get(dapm->dev, widget->name); in snd_soc_dapm_new_control_unlocked()
3780 * @widget: widget template
3784 * Returns a widget pointer on success or an error pointer on failure
3788 const struct snd_soc_dapm_widget *widget) in snd_soc_dapm_new_control() argument
3793 w = snd_soc_dapm_new_control_unlocked(dapm, widget); in snd_soc_dapm_new_control()
3803 * @widget: widget array
3811 const struct snd_soc_dapm_widget *widget, in snd_soc_dapm_new_controls() argument
3819 struct snd_soc_dapm_widget *w = snd_soc_dapm_new_control_unlocked(dapm, widget); in snd_soc_dapm_new_controls()
3824 widget++; in snd_soc_dapm_new_controls()
4052 /* Can't change the config when widget is already powered */ in snd_soc_dapm_dai_link_put()
4132 dev_err(card->dev, "ASoC: Failed to create control for %s widget\n", in snd_soc_dapm_alloc_kcontrol()
4142 dev_err(card->dev, "ASoC: Failed to create control for %s widget\n", in snd_soc_dapm_alloc_kcontrol()
4203 dev_dbg(card->dev, "ASoC: adding %s widget\n", link_name); in snd_soc_dapm_new_dai()
4222 dev_err(rtd->dev, "ASoC: Failed to create %s-%s widget: %d\n", in snd_soc_dapm_new_dai()
4250 dev_dbg(dai->dev, "ASoC: adding %s widget\n", in snd_soc_dapm_new_dai_widgets()
4266 dev_dbg(dai->dev, "ASoC: adding %s widget\n", in snd_soc_dapm_new_dai_widgets()
4287 /* For each DAI widget... */ in snd_soc_dapm_link_dai_widgets()
4299 dev_dbg(card->dev, "dai widget %s has no DAI\n", in snd_soc_dapm_link_dai_widgets()
4510 * necessary widget power changes.
4558 * do any widget power switching.
4576 * do any widget power switching.
4604 * do any widget power switching.
4643 * do any widget power switching.
4670 * do any widget power switching.
4687 * do any widget power switching.
4718 * do any widget power switching.
4739 * do any widget power switching.