Lines Matching refs:widget

17 static void sof_reset_route_setup_status(struct snd_sof_dev *sdev, struct snd_sof_widget *widget)  in sof_reset_route_setup_status()  argument
23 if (sroute->src_widget == widget || sroute->sink_widget == widget) { in sof_reset_route_setup_status()
60 swidget->core, swidget->widget->name); in sof_widget_free()
77 dev_dbg(sdev->dev, "widget %s freed\n", swidget->widget->name); in sof_widget_free()
108 swidget->widget->name); in sof_widget_setup()
122 swidget->widget->name); in sof_widget_setup()
151 dev_dbg(sdev->dev, "widget %s setup complete\n", swidget->widget->name); in sof_widget_setup()
226 struct snd_soc_dapm_widget *widget; in sof_setup_pipeline_connections() local
238 for_each_dapm_widgets(list, i, widget) { in sof_setup_pipeline_connections()
239 if (!widget->dobj.private) in sof_setup_pipeline_connections()
242 snd_soc_dapm_widget_for_each_sink_path(widget, p) in sof_setup_pipeline_connections()
244 ret = sof_route_setup(sdev, widget, p->sink); in sof_setup_pipeline_connections()
250 for_each_dapm_widgets(list, i, widget) { in sof_setup_pipeline_connections()
251 if (!widget->dobj.private) in sof_setup_pipeline_connections()
254 snd_soc_dapm_widget_for_each_source_path(widget, p) in sof_setup_pipeline_connections()
256 ret = sof_route_setup(sdev, p->source, widget); in sof_setup_pipeline_connections()
267 sof_unprepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *widget) in sof_unprepare_widgets_in_path() argument
270 const struct sof_ipc_tplg_widget_ops *widget_ops = ipc_tplg_ops->widget; in sof_unprepare_widgets_in_path()
271 struct snd_sof_widget *swidget = widget->dobj.private; in sof_unprepare_widgets_in_path()
278 if (widget_ops[widget->id].ipc_unprepare) in sof_unprepare_widgets_in_path()
280 widget_ops[widget->id].ipc_unprepare(swidget); in sof_unprepare_widgets_in_path()
285 snd_soc_dapm_widget_for_each_sink_path(widget, p) { in sof_unprepare_widgets_in_path()
295 sof_prepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *widget, in sof_prepare_widgets_in_path() argument
301 const struct sof_ipc_tplg_widget_ops *widget_ops = ipc_tplg_ops->widget; in sof_prepare_widgets_in_path()
302 struct snd_sof_widget *swidget = widget->dobj.private; in sof_prepare_widgets_in_path()
306 if (!widget_ops[widget->id].ipc_prepare || swidget->prepared) in sof_prepare_widgets_in_path()
310 ret = widget_ops[widget->id].ipc_prepare(swidget, fe_params, platform_params, in sof_prepare_widgets_in_path()
313 dev_err(sdev->dev, "failed to prepare widget %s\n", widget->name); in sof_prepare_widgets_in_path()
321 snd_soc_dapm_widget_for_each_sink_path(widget, p) { in sof_prepare_widgets_in_path()
329 if (widget_ops[widget->id].ipc_unprepare && swidget->prepared) { in sof_prepare_widgets_in_path()
330 widget_ops[widget->id].ipc_unprepare(swidget); in sof_prepare_widgets_in_path()
345 static int sof_free_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *widget, in sof_free_widgets_in_path() argument
353 snd_soc_dapm_widget_for_each_sink_path(widget, p) { in sof_free_widgets_in_path()
354 if (!p->walking && p->sink->dobj.private && widget->dobj.private) { in sof_free_widgets_in_path()
356 if (WIDGET_IS_AIF_OR_DAI(widget->id)) { in sof_free_widgets_in_path()
357 err = sof_widget_free(sdev, widget->dobj.private); in sof_free_widgets_in_path()
381 static int sof_set_up_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *widget, in sof_set_up_widgets_in_path() argument
387 snd_soc_dapm_widget_for_each_sink_path(widget, p) { in sof_set_up_widgets_in_path()
388 if (!p->walking && p->sink->dobj.private && widget->dobj.private) { in sof_set_up_widgets_in_path()
390 if (WIDGET_IS_AIF_OR_DAI(widget->id)) { in sof_set_up_widgets_in_path()
391 ret = sof_widget_setup(sdev, widget->dobj.private); in sof_set_up_widgets_in_path()
398 if (WIDGET_IS_AIF_OR_DAI(widget->id)) in sof_set_up_widgets_in_path()
399 sof_widget_free(sdev, widget->dobj.private); in sof_set_up_widgets_in_path()
405 if (WIDGET_IS_AIF_OR_DAI(widget->id)) in sof_set_up_widgets_in_path()
406 sof_widget_free(sdev, widget->dobj.private); in sof_set_up_widgets_in_path()
425 struct snd_soc_dapm_widget *widget; in sof_walk_widgets_in_order() local
430 for_each_dapm_widgets(list, i, widget) { in sof_walk_widgets_in_order()
432 if (dir == SNDRV_PCM_STREAM_PLAYBACK && !WIDGET_IS_AIF(widget->id)) in sof_walk_widgets_in_order()
436 if (dir == SNDRV_PCM_STREAM_CAPTURE && !WIDGET_IS_DAI(widget->id)) in sof_walk_widgets_in_order()
441 ret = sof_set_up_widgets_in_path(sdev, widget, dir); in sof_walk_widgets_in_order()
445 ret = sof_free_widgets_in_path(sdev, widget, dir); in sof_walk_widgets_in_order()
461 ret = sof_prepare_widgets_in_path(sdev, widget, fe_params, in sof_walk_widgets_in_order()
466 sof_unprepare_widgets_in_path(sdev, widget); in sof_walk_widgets_in_order()
488 struct snd_soc_dapm_widget *widget; in sof_widget_list_setup() local
522 for_each_dapm_widgets(list, i, widget) { in sof_widget_list_setup()
523 struct snd_sof_widget *swidget = widget->dobj.private; in sof_widget_list_setup()
532 swidget->widget->name); in sof_widget_list_setup()
712 if (strcmp(name, swidget->widget->name) == 0) in snd_sof_find_swidget()
734 if (!strcmp(pcm_name, swidget->widget->sname) && in snd_sof_find_swidget_sname()