Lines Matching refs:tplg
101 static int tplg_build_widget(snd_tplg_t *tplg, struct tplg_elem *elem) in tplg_build_widget() argument
118 err = tplg_copy_data(tplg, elem, ref); in tplg_build_widget()
131 ref->elem = tplg_elem_lookup(&tplg->mixer_list, in tplg_build_widget()
139 ref->elem = tplg_elem_lookup(&tplg->enum_list, in tplg_build_widget()
147 ref->elem = tplg_elem_lookup(&tplg->bytes_ext_list, in tplg_build_widget()
170 int tplg_build_widgets(snd_tplg_t *tplg) in tplg_build_widgets() argument
177 base = &tplg->widget_list; in tplg_build_widgets()
186 err = tplg_build_widget(tplg, elem); in tplg_build_widgets()
191 tplg->manifest.widget_elems++; in tplg_build_widgets()
197 int tplg_build_routes(snd_tplg_t *tplg) in tplg_build_routes() argument
203 base = &tplg->route_list; in tplg_build_routes()
223 if (!tplg_elem_lookup(&tplg->widget_list, route->sink, in tplg_build_routes()
230 if (!tplg_elem_lookup(&tplg->mixer_list, route->control, in tplg_build_routes()
232 !tplg_elem_lookup(&tplg->enum_list, route->control, in tplg_build_routes()
245 if (!tplg_elem_lookup(&tplg->widget_list, route->source, in tplg_build_routes()
252 tplg->manifest.graph_elems++; in tplg_build_routes()
258 struct tplg_elem *tplg_elem_new_route(snd_tplg_t *tplg, int index) in tplg_elem_new_route() argument
268 if (tplg->dapm_sort) in tplg_elem_new_route()
269 tplg_elem_insert(elem, &tplg->route_list); in tplg_elem_new_route()
271 list_add_tail(&elem->list, &tplg->route_list); in tplg_elem_new_route()
337 static int tplg_parse_routes(snd_tplg_t *tplg, snd_config_t *cfg, int index) in tplg_parse_routes() argument
352 elem = tplg_elem_new_route(tplg, index); in tplg_parse_routes()
368 int tplg_parse_dapm_graph(snd_tplg_t *tplg, snd_config_t *cfg, in tplg_parse_dapm_graph() argument
405 err = tplg_parse_routes(tplg, n, index); in tplg_parse_dapm_graph()
419 int tplg_save_dapm_graph(snd_tplg_t *tplg, int index, in tplg_save_dapm_graph() argument
432 list_for_each(pos, &tplg->route_list) { in tplg_save_dapm_graph()
459 list_for_each(pos, &tplg->route_list) { in tplg_save_dapm_graph()
511 int tplg_parse_dapm_widget(snd_tplg_t *tplg, in tplg_parse_dapm_widget() argument
521 elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_DAPM_WIDGET); in tplg_parse_dapm_widget()
671 int tplg_save_dapm_widget(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_dapm_widget()
714 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_ENUM, in tplg_save_dapm_widget()
717 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_MIXER, in tplg_save_dapm_widget()
720 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_BYTES, in tplg_save_dapm_widget()
723 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_DATA, in tplg_save_dapm_widget()
730 int tplg_add_route(snd_tplg_t *tplg, struct snd_tplg_graph_elem *t, int index) in tplg_add_route() argument
738 elem = tplg_elem_new_route(tplg, index); in tplg_add_route()
752 int tplg_add_graph_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t) in tplg_add_graph_object() argument
758 ret = tplg_add_route(tplg, gt->elem + i, t->index); in tplg_add_graph_object()
766 int tplg_add_widget_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t) in tplg_add_widget_object() argument
775 elem = tplg_elem_new_common(tplg, NULL, wt->name, in tplg_add_widget_object()
799 ret = tplg_add_data(tplg, elem, wt->priv, in tplg_add_widget_object()
823 ret = tplg_add_mixer(tplg, mt, &elem_ctl); in tplg_add_widget_object()
828 ret = tplg_add_bytes(tplg, bt, &elem_ctl); in tplg_add_widget_object()
833 ret = tplg_add_enum(tplg, et, &elem_ctl); in tplg_add_widget_object()
859 int tplg_decode_dapm_widget(snd_tplg_t *tplg, in tplg_decode_dapm_widget() argument
879 err = tplg_decode_template(tplg, pos, hdr, &t); in tplg_decode_dapm_widget()
902 tplg_log(tplg, 'D', pos, "dapm widget: size %d private size %d kcontrols %d", in tplg_decode_dapm_widget()
920 tplg_log(tplg, 'D', pos, "dapm widget: name '%s' sname '%s'", in tplg_decode_dapm_widget()
929 tplg_log(tplg, 'D', pos + offsetof(struct snd_soc_tplg_dapm_widget, priv), in tplg_decode_dapm_widget()
950 tplg_log(tplg, 'D', pos, "kcontrol mixer size %zd", size2); in tplg_decode_dapm_widget()
957 err = tplg_decode_control_mixer1(tplg, &heap, mt, pos, in tplg_decode_dapm_widget()
970 tplg_log(tplg, 'D', pos, "kcontrol enum size %zd", size2); in tplg_decode_dapm_widget()
977 err = tplg_decode_control_enum1(tplg, &heap, et, pos, ec); in tplg_decode_dapm_widget()
989 tplg_log(tplg, 'D', pos, "kcontrol bytes size %zd", size2); in tplg_decode_dapm_widget()
996 err = tplg_decode_control_bytes1(tplg, bt, pos, in tplg_decode_dapm_widget()
1013 err = snd_tplg_add_object(tplg, &t); in tplg_decode_dapm_widget()
1027 int tplg_decode_dapm_graph(snd_tplg_t *tplg, in tplg_decode_dapm_graph() argument
1039 err = tplg_decode_template(tplg, pos, hdr, &t); in tplg_decode_dapm_graph()
1056 tplg_log(tplg, 'D', pos, "dapm graph: src='%s' ctl='%s' sink='%s'", in tplg_decode_dapm_graph()
1064 return snd_tplg_add_object(tplg, &t); in tplg_decode_dapm_graph()