Lines Matching refs:widget

17 static bool is_virtual_widget(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *widget,  in is_virtual_widget()  argument
20 switch (widget->id) { in is_virtual_widget()
24 dev_dbg(sdev->dev, "%s: %s is a virtual widget\n", func, widget->name); in is_virtual_widget()
31 static void sof_reset_route_setup_status(struct snd_sof_dev *sdev, struct snd_sof_widget *widget) in sof_reset_route_setup_status() argument
37 if (sroute->src_widget == widget || sroute->sink_widget == widget) { in sof_reset_route_setup_status()
78 swidget->widget->name); in sof_widget_free_unlocked()
96 swidget->core, swidget->widget->name); in sof_widget_free_unlocked()
116 dev_dbg(sdev->dev, "widget %s freed\n", swidget->widget->name); in sof_widget_free_unlocked()
159 dev_err(sdev->dev, "No pipeline set for %s\n", swidget->widget->name); in sof_widget_setup_unlocked()
173 swidget->widget->name); in sof_widget_setup_unlocked()
206 dev_dbg(sdev->dev, "widget %s setup complete\n", swidget->widget->name); in sof_widget_setup_unlocked()
249 if (is_virtual_widget(sdev, src_widget->widget, __func__) || in sof_route_setup()
250 is_virtual_widget(sdev, sink_widget->widget, __func__)) in sof_route_setup()
285 struct snd_soc_dapm_widget *widget; in sof_setup_pipeline_connections() local
298 for_each_dapm_widgets(list, i, widget) { in sof_setup_pipeline_connections()
299 if (!widget->dobj.private) in sof_setup_pipeline_connections()
302 snd_soc_dapm_widget_for_each_sink_path(widget, p) { in sof_setup_pipeline_connections()
307 ret = sof_route_setup(sdev, widget, p->sink); in sof_setup_pipeline_connections()
314 for_each_dapm_widgets(list, i, widget) { in sof_setup_pipeline_connections()
315 if (!widget->dobj.private) in sof_setup_pipeline_connections()
318 snd_soc_dapm_widget_for_each_source_path(widget, p) { in sof_setup_pipeline_connections()
323 ret = sof_route_setup(sdev, p->source, widget); in sof_setup_pipeline_connections()
344 src_widget_in_dapm_list = widget_in_list(list, sroute->src_widget->widget); in sof_setup_pipeline_connections()
345 sink_widget_in_dapm_list = widget_in_list(list, sroute->sink_widget->widget); in sof_setup_pipeline_connections()
392 sof_unprepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *widget, in sof_unprepare_widgets_in_path() argument
396 struct snd_sof_widget *swidget = widget->dobj.private; in sof_unprepare_widgets_in_path()
400 if (is_virtual_widget(sdev, widget, __func__)) in sof_unprepare_widgets_in_path()
407 widget_ops = tplg_ops ? tplg_ops->widget : NULL; in sof_unprepare_widgets_in_path()
408 if (widget_ops && widget_ops[widget->id].ipc_unprepare) in sof_unprepare_widgets_in_path()
410 widget_ops[widget->id].ipc_unprepare(swidget); in sof_unprepare_widgets_in_path()
416 snd_soc_dapm_widget_for_each_sink_path(widget, p) { in sof_unprepare_widgets_in_path()
428 sof_prepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget *widget, in sof_prepare_widgets_in_path() argument
435 struct snd_sof_widget *swidget = widget->dobj.private; in sof_prepare_widgets_in_path()
440 if (is_virtual_widget(sdev, widget, __func__)) in sof_prepare_widgets_in_path()
443 widget_ops = tplg_ops ? tplg_ops->widget : NULL; in sof_prepare_widgets_in_path()
447 if (!swidget || !widget_ops[widget->id].ipc_prepare || swidget->prepared) in sof_prepare_widgets_in_path()
451 ret = widget_ops[widget->id].ipc_prepare(swidget, fe_params, platform_params, in sof_prepare_widgets_in_path()
454 dev_err(sdev->dev, "failed to prepare widget %s\n", widget->name); in sof_prepare_widgets_in_path()
462 snd_soc_dapm_widget_for_each_sink_path(widget, p) { in sof_prepare_widgets_in_path()
473 if (widget_ops[widget->id].ipc_unprepare && in sof_prepare_widgets_in_path()
475 widget_ops[widget->id].ipc_unprepare(swidget); in sof_prepare_widgets_in_path()
490 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
498 if (is_virtual_widget(sdev, widget, __func__)) in sof_free_widgets_in_path()
501 if (widget->dobj.private) { in sof_free_widgets_in_path()
502 err = sof_widget_free(sdev, widget->dobj.private); in sof_free_widgets_in_path()
508 snd_soc_dapm_widget_for_each_sink_path(widget, p) { in sof_free_widgets_in_path()
530 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
535 struct snd_sof_widget *swidget = widget->dobj.private; in sof_set_up_widgets_in_path()
540 if (is_virtual_widget(sdev, widget, __func__)) in sof_set_up_widgets_in_path()
546 ret = sof_widget_setup(sdev, widget->dobj.private); in sof_set_up_widgets_in_path()
572 snd_soc_dapm_widget_for_each_sink_path(widget, p) { in sof_set_up_widgets_in_path()
599 struct snd_soc_dapm_widget *widget; in sof_walk_widgets_in_order() local
607 for_each_dapm_widgets(list, i, widget) { in sof_walk_widgets_in_order()
608 if (is_virtual_widget(sdev, widget, __func__)) in sof_walk_widgets_in_order()
612 if (dir == SNDRV_PCM_STREAM_PLAYBACK && widget->id != snd_soc_dapm_aif_in) in sof_walk_widgets_in_order()
616 if (dir == SNDRV_PCM_STREAM_CAPTURE && widget->id != snd_soc_dapm_dai_out) in sof_walk_widgets_in_order()
621 ret = sof_set_up_widgets_in_path(sdev, widget, dir, spcm); in sof_walk_widgets_in_order()
625 ret = sof_free_widgets_in_path(sdev, widget, dir, spcm); in sof_walk_widgets_in_order()
641 ret = sof_prepare_widgets_in_path(sdev, widget, fe_params, platform_params, in sof_walk_widgets_in_order()
646 sof_unprepare_widgets_in_path(sdev, widget, list); in sof_walk_widgets_in_order()
668 struct snd_soc_dapm_widget *widget; in sof_widget_list_setup() local
702 for_each_dapm_widgets(list, i, widget) { in sof_widget_list_setup()
703 struct snd_sof_widget *swidget = widget->dobj.private; in sof_widget_list_setup()
713 swidget->widget->name); in sof_widget_list_setup()
721 swidget->widget->name); in sof_widget_list_setup()
910 if (strcmp(name, swidget->widget->name) == 0) in snd_sof_find_swidget()
932 if (!strcmp(pcm_name, swidget->widget->sname) && in snd_sof_find_swidget_sname()