Lines Matching refs:swidget

31 int sof_widget_free(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget)  in sof_widget_free()  argument
37 if (!swidget->private) in sof_widget_free()
40 trace_sof_widget_free(swidget); in sof_widget_free()
43 if (--swidget->use_count) in sof_widget_free()
47 sof_reset_route_setup_status(sdev, swidget); in sof_widget_free()
51 err = tplg_ops->widget_free(sdev, swidget); in sof_widget_free()
57 ret = snd_sof_dsp_core_put(sdev, swidget->core); in sof_widget_free()
60 swidget->core, swidget->widget->name); in sof_widget_free()
69 if (swidget->dynamic_pipeline_widget && swidget->id != snd_soc_dapm_scheduler) { in sof_widget_free()
70 ret = sof_widget_free(sdev, swidget->pipe_widget); in sof_widget_free()
73 swidget->pipe_widget->complete = 0; in sof_widget_free()
77 dev_dbg(sdev->dev, "widget %s freed\n", swidget->widget->name); in sof_widget_free()
83 int sof_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget) in sof_widget_setup() argument
89 if (!swidget->private) in sof_widget_setup()
92 trace_sof_widget_setup(swidget); in sof_widget_setup()
95 if (++swidget->use_count > 1) in sof_widget_setup()
105 if (swidget->dynamic_pipeline_widget && swidget->id != snd_soc_dapm_scheduler) { in sof_widget_setup()
106 if (!swidget->pipe_widget) { in sof_widget_setup()
108 swidget->widget->name); in sof_widget_setup()
113 ret = sof_widget_setup(sdev, swidget->pipe_widget); in sof_widget_setup()
119 ret = snd_sof_dsp_core_get(sdev, swidget->core); in sof_widget_setup()
122 swidget->widget->name); in sof_widget_setup()
128 ret = tplg_ops->widget_setup(sdev, swidget); in sof_widget_setup()
134 if (WIDGET_IS_DAI(swidget->id)) { in sof_widget_setup()
138 ret = tplg_ops->dai_config(sdev, swidget, flags, NULL); in sof_widget_setup()
146 ret = tplg_ops->control->widget_kcontrol_setup(sdev, swidget); in sof_widget_setup()
151 dev_dbg(sdev->dev, "widget %s setup complete\n", swidget->widget->name); in sof_widget_setup()
157 sof_widget_free(sdev, swidget); in sof_widget_setup()
159 snd_sof_dsp_core_put(sdev, swidget->core); in sof_widget_setup()
161 if (swidget->id != snd_soc_dapm_scheduler) in sof_widget_setup()
162 sof_widget_free(sdev, swidget->pipe_widget); in sof_widget_setup()
164 swidget->use_count--; in sof_widget_setup()
271 struct snd_sof_widget *swidget = widget->dobj.private; in sof_unprepare_widgets_in_path() local
275 if (!swidget->prepared || swidget->use_count > 1) in sof_unprepare_widgets_in_path()
280 widget_ops[widget->id].ipc_unprepare(swidget); in sof_unprepare_widgets_in_path()
282 swidget->prepared = false; in sof_unprepare_widgets_in_path()
302 struct snd_sof_widget *swidget = widget->dobj.private; in sof_prepare_widgets_in_path() local
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()
317 swidget->prepared = true; 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()
331 swidget->prepared = false; in sof_prepare_widgets_in_path()
523 struct snd_sof_widget *swidget = widget->dobj.private; in sof_widget_list_setup() local
526 if (!swidget) in sof_widget_list_setup()
529 pipe_widget = swidget->pipe_widget; in sof_widget_list_setup()
532 swidget->widget->name); in sof_widget_list_setup()
709 struct snd_sof_widget *swidget; in snd_sof_find_swidget() local
711 list_for_each_entry(swidget, &sdev->widget_list, list) { in snd_sof_find_swidget()
712 if (strcmp(name, swidget->widget->name) == 0) in snd_sof_find_swidget()
713 return swidget; in snd_sof_find_swidget()
725 struct snd_sof_widget *swidget; in snd_sof_find_swidget_sname() local
733 list_for_each_entry(swidget, &sdev->widget_list, list) { in snd_sof_find_swidget_sname()
734 if (!strcmp(pcm_name, swidget->widget->sname) && in snd_sof_find_swidget_sname()
735 swidget->id == type) in snd_sof_find_swidget_sname()
736 return swidget; in snd_sof_find_swidget_sname()