• Home
  • Raw
  • Download

Lines Matching refs:ret

37 	int ret;  in tplg_build_vendor_token_object()  local
39 ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &vtop, NULL, false); in tplg_build_vendor_token_object()
40 if (ret < 0) in tplg_build_vendor_token_object()
41 return ret; in tplg_build_vendor_token_object()
43 ret = snd_config_get_id(vtop, &name); in tplg_build_vendor_token_object()
44 if (ret < 0) in tplg_build_vendor_token_object()
45 return ret; in tplg_build_vendor_token_object()
61 ret = snd_config_copy(&dst, n); in tplg_build_vendor_token_object()
62 if (ret < 0) { in tplg_build_vendor_token_object()
64 return ret; in tplg_build_vendor_token_object()
67 ret = snd_config_add(vtop, dst); in tplg_build_vendor_token_object()
68 if (ret < 0) { in tplg_build_vendor_token_object()
71 return ret; in tplg_build_vendor_token_object()
75 return ret; in tplg_build_vendor_token_object()
85 int ret, id = 0; in tplg_parent_update() local
92 ret = snd_config_search(child, "name", &cfg); in tplg_parent_update()
93 if (ret < 0) { in tplg_parent_update()
94 ret = snd_config_get_id(child, &parent_name); in tplg_parent_update()
95 if (ret < 0) { in tplg_parent_update()
97 return ret; in tplg_parent_update()
100 ret = snd_config_get_string(cfg, &parent_name); in tplg_parent_update()
101 if (ret < 0) { in tplg_parent_update()
103 return ret; in tplg_parent_update()
114 return ret; in tplg_parent_update()
119 ret = snd_config_search(cfg, section_name, &item_config); in tplg_parent_update()
120 if (ret < 0) { in tplg_parent_update()
121 ret = tplg_config_make_add(&item_config, section_name, in tplg_parent_update()
123 if (ret < 0) { in tplg_parent_update()
126 return ret; in tplg_parent_update()
133 ret = snd_config_search(cfg, section_name, &item_config); in tplg_parent_update()
134 if (ret < 0) { in tplg_parent_update()
135 ret = tplg_config_make_add(&item_config, section_name, in tplg_parent_update()
137 if (ret < 0) { in tplg_parent_update()
140 return ret; in tplg_parent_update()
162 ret = snd_config_make(&cfg, item_id, SND_CONFIG_TYPE_STRING); in tplg_parent_update()
164 if (ret < 0) in tplg_parent_update()
165 return ret; in tplg_parent_update()
167 ret = snd_config_set_string(cfg, item_name); in tplg_parent_update()
168 if (ret < 0) in tplg_parent_update()
169 return ret; in tplg_parent_update()
171 ret = snd_config_add(item_config, cfg); in tplg_parent_update()
172 if (ret < 0) in tplg_parent_update()
175 return ret; in tplg_parent_update()
184 int ret; in tplg_build_data_object() local
186 ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &dtop, NULL, false); in tplg_build_data_object()
187 if (ret < 0) in tplg_build_data_object()
188 return ret; in tplg_build_data_object()
190 ret = snd_config_get_id(dtop, &name); in tplg_build_data_object()
191 if (ret < 0) in tplg_build_data_object()
192 return ret; in tplg_build_data_object()
202 int ret, i; in tplg_create_config_template() local
204 ret = snd_config_make(&top, "template", SND_CONFIG_TYPE_COMPOUND); in tplg_create_config_template()
205 if (ret < 0) in tplg_create_config_template()
206 return ret; in tplg_create_config_template()
211 ret = tplg_config_make_add(&child, items->int_config_ids[i], in tplg_create_config_template()
213 if (ret < 0) in tplg_create_config_template()
220 ret = tplg_config_make_add(&child, items->string_config_ids[i], in tplg_create_config_template()
222 if (ret < 0) in tplg_create_config_template()
229 ret = tplg_config_make_add(&child, items->compound_config_ids[i], in tplg_create_config_template()
231 if (ret < 0) in tplg_create_config_template()
237 if (ret < 0) { in tplg_create_config_template()
239 return ret; in tplg_create_config_template()
243 return ret; in tplg_create_config_template()
297 int ret; in tplg_object_is_attribute_min_max_valid() local
303 ret = snd_config_search(attr, "constraints.min", &valid); in tplg_object_is_attribute_min_max_valid()
304 if (ret < 0) in tplg_object_is_attribute_min_max_valid()
307 ret = snd_config_search(attr, "constraints.max", &valid); in tplg_object_is_attribute_min_max_valid()
308 if (ret < 0) in tplg_object_is_attribute_min_max_valid()
381 int ret; in tplg_object_is_attribute_valid() local
386 ret = snd_config_search(object, attr_name, &obj_attr); in tplg_object_is_attribute_valid()
387 if (ret < 0) { in tplg_object_is_attribute_valid()
394 ret = snd_config_search(attr, "constraints.valid_values", &valid); in tplg_object_is_attribute_valid()
395 if (ret < 0) in tplg_object_is_attribute_valid()
443 int ret; in tplg_object_get_name() local
445 ret = snd_config_search(object, "name", &cfg); in tplg_object_get_name()
446 if (ret < 0) in tplg_object_get_name()
449 ret = snd_config_get_string(cfg, &name); in tplg_object_get_name()
450 if (ret < 0) in tplg_object_get_name()
483 int ret; in tplg_pp_add_object_tuple_section() local
487 ret = snd_config_search(tplg_pp->output_cfg, "SectionVendorTuples", &top); in tplg_pp_add_object_tuple_section()
488 if (ret < 0) { in tplg_pp_add_object_tuple_section()
489 ret = tplg_config_make_add(&top, "SectionVendorTuples", in tplg_pp_add_object_tuple_section()
491 if (ret < 0) { in tplg_pp_add_object_tuple_section()
493 return ret; in tplg_pp_add_object_tuple_section()
513 ret = -ENOMEM; in tplg_pp_add_object_tuple_section()
520 ret = tplg_config_make_add(&tuple_cfg, data_name, SND_CONFIG_TYPE_COMPOUND, top); in tplg_pp_add_object_tuple_section()
521 if (ret < 0) { in tplg_pp_add_object_tuple_section()
526 ret = tplg_config_make_add(&child, "tokens", SND_CONFIG_TYPE_STRING, in tplg_pp_add_object_tuple_section()
528 if (ret < 0) { in tplg_pp_add_object_tuple_section()
533 ret = snd_config_set_string(child, token); in tplg_pp_add_object_tuple_section()
534 if (ret < 0) { in tplg_pp_add_object_tuple_section()
539 ret = tplg_config_make_add(&child, "tuples", SND_CONFIG_TYPE_COMPOUND, in tplg_pp_add_object_tuple_section()
541 if (ret < 0) { in tplg_pp_add_object_tuple_section()
546 ret = tplg_config_make_add(&cfg, str, SND_CONFIG_TYPE_COMPOUND, in tplg_pp_add_object_tuple_section()
548 if (ret < 0) { in tplg_pp_add_object_tuple_section()
555 ret = snd_config_search(tuple_cfg, "tuples" , &tuples_cfg); in tplg_pp_add_object_tuple_section()
556 if (ret < 0) { in tplg_pp_add_object_tuple_section()
563 ret = tplg_config_make_add(&cfg, str, SND_CONFIG_TYPE_COMPOUND, in tplg_pp_add_object_tuple_section()
565 if (ret < 0) { in tplg_pp_add_object_tuple_section()
572 ret = snd_config_get_id(attr, &id); in tplg_pp_add_object_tuple_section()
573 if (ret < 0) in tplg_pp_add_object_tuple_section()
577 ret = snd_config_search(cfg, id, &child); in tplg_pp_add_object_tuple_section()
578 if (ret >=0) in tplg_pp_add_object_tuple_section()
585 ret = snd_config_copy(&new, attr); in tplg_pp_add_object_tuple_section()
586 if (ret < 0) { in tplg_pp_add_object_tuple_section()
591 ret = snd_config_make(&new, id, SND_CONFIG_TYPE_INTEGER); in tplg_pp_add_object_tuple_section()
592 if (ret < 0) in tplg_pp_add_object_tuple_section()
595 ret = snd_config_set_integer(new, tuple_value); in tplg_pp_add_object_tuple_section()
596 if (ret < 0) in tplg_pp_add_object_tuple_section()
600 ret = snd_config_add(cfg, new); in tplg_pp_add_object_tuple_section()
605 return ret; in tplg_pp_add_object_tuple_section()
614 int ret, id = 0; in tplg_pp_add_object_data_section() local
616 ret = snd_config_search(tplg_pp->output_cfg, "SectionData", &top); in tplg_pp_add_object_data_section()
617 if (ret < 0) { in tplg_pp_add_object_data_section()
618 ret = tplg_config_make_add(&top, "SectionData", SND_CONFIG_TYPE_COMPOUND, in tplg_pp_add_object_data_section()
620 if (ret < 0) { in tplg_pp_add_object_data_section()
622 return ret; in tplg_pp_add_object_data_section()
634 ret = tplg_config_make_add(&data_cfg, data_name, SND_CONFIG_TYPE_COMPOUND, top); in tplg_pp_add_object_data_section()
635 if (ret < 0) in tplg_pp_add_object_data_section()
636 return ret; in tplg_pp_add_object_data_section()
638 ret = tplg_config_make_add(&child, "tuples", SND_CONFIG_TYPE_STRING, data_cfg); in tplg_pp_add_object_data_section()
639 if (ret < 0) { in tplg_pp_add_object_data_section()
641 return ret; in tplg_pp_add_object_data_section()
644 ret = snd_config_set_string(child, data_name); in tplg_pp_add_object_data_section()
645 if (ret < 0) { in tplg_pp_add_object_data_section()
647 return ret; in tplg_pp_add_object_data_section()
658 ret = tplg_config_make_add(&child, data_id, SND_CONFIG_TYPE_STRING, obj_data); in tplg_pp_add_object_data_section()
660 if (ret < 0) { in tplg_pp_add_object_data_section()
662 return ret; in tplg_pp_add_object_data_section()
674 int ret; in tplg_add_object_data() local
686 ret = snd_config_search(top, "data", &data_cfg); in tplg_add_object_data()
687 if (ret < 0) { in tplg_add_object_data()
688 ret = tplg_config_make_add(&data_cfg, "data", SND_CONFIG_TYPE_COMPOUND, top); in tplg_add_object_data()
689 if (ret < 0) { in tplg_add_object_data()
691 return ret; in tplg_add_object_data()
712 ret = tplg_pp_add_object_data_section(tplg_pp, data_cfg, data_cfg_name); in tplg_add_object_data()
713 if (ret < 0) { in tplg_add_object_data()
716 return ret; in tplg_add_object_data()
719 ret = tplg_pp_add_object_tuple_section(tplg_pp, class_cfg, n, data_cfg_name, in tplg_add_object_data()
721 if (ret < 0) { in tplg_add_object_data()
724 return ret; in tplg_add_object_data()
738 int ret; in tplg_object_add_attributes() local
748 ret = snd_config_search(src, id, &attr); in tplg_object_add_attributes()
749 if (ret < 0) in tplg_object_add_attributes()
753 ret = snd_config_search(dst, id, &new); in tplg_object_add_attributes()
754 if (ret >= 0) in tplg_object_add_attributes()
757 ret = snd_config_copy(&new, attr); in tplg_object_add_attributes()
758 if (ret < 0) { in tplg_object_add_attributes()
760 return ret; in tplg_object_add_attributes()
763 ret = snd_config_add(dst, new); in tplg_object_add_attributes()
764 if (ret < 0) { in tplg_object_add_attributes()
767 return ret; in tplg_object_add_attributes()
784 int ret; in tplg_build_parent_data() local
802 ret = snd_config_get_id(parent_obj, &parent_id); in tplg_build_parent_data()
803 if (ret < 0) { in tplg_build_parent_data()
805 return ret; in tplg_build_parent_data()
816 ret = snd_config_search(tplg_pp->output_cfg, map->section_name, &section_cfg); in tplg_build_parent_data()
817 if (ret < 0) { in tplg_build_parent_data()
819 return ret; in tplg_build_parent_data()
842 int ret; in tplg_build_object_from_template() local
857 ret = snd_config_search(top_config, map->section_name, &top); in tplg_build_object_from_template()
858 if (ret < 0) { in tplg_build_object_from_template()
859 ret = tplg_config_make_add(&top, map->section_name, SND_CONFIG_TYPE_COMPOUND, in tplg_build_object_from_template()
861 if (ret < 0) { in tplg_build_object_from_template()
863 return ret; in tplg_build_object_from_template()
870 ret = snd_config_get_id(obj, &object_name); in tplg_build_object_from_template()
871 if (ret < 0) { in tplg_build_object_from_template()
873 return ret; in tplg_build_object_from_template()
887 ret = tplg_config_make_add(wtop, object_name, SND_CONFIG_TYPE_COMPOUND, in tplg_build_object_from_template()
889 if (ret < 0) { in tplg_build_object_from_template()
891 return ret; in tplg_build_object_from_template()
900 ret = tplg_create_config_template(tplg_pp, &template, map->template_items); in tplg_build_object_from_template()
901 if (ret < 0) { in tplg_build_object_from_template()
903 return ret; in tplg_build_object_from_template()
907 ret = tplg_object_add_attributes(*wtop, template, obj); in tplg_build_object_from_template()
909 if (ret < 0) in tplg_build_object_from_template()
912 return ret; in tplg_build_object_from_template()
920 int ret; in tplg_build_generic_object() local
922 ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &wtop, NULL, false); in tplg_build_generic_object()
923 if (ret < 0) in tplg_build_generic_object()
924 return ret; in tplg_build_generic_object()
926 ret = snd_config_get_id(wtop, &name); in tplg_build_generic_object()
927 if (ret < 0) in tplg_build_generic_object()
928 return ret; in tplg_build_generic_object()
930 ret = tplg_add_object_data(tplg_pp, obj_cfg, wtop, NULL); in tplg_build_generic_object()
931 if (ret < 0) in tplg_build_generic_object()
934 return ret; in tplg_build_generic_object()
1071 int ret; in tplg_object_get_section() local
1077 ret = snd_config_search(tplg_pp->output_cfg, map->section_name, &cfg); in tplg_object_get_section()
1078 if (ret < 0) in tplg_object_get_section()
1092 int ret; in tplg_object_copy_and_add_param() local
1101 ret = snd_config_search(search_config, id, &attr); in tplg_object_copy_and_add_param()
1102 if (ret < 0) in tplg_object_copy_and_add_param()
1105 ret = snd_config_copy(&new, attr); in tplg_object_copy_and_add_param()
1106 if (ret < 0) { in tplg_object_copy_and_add_param()
1108 return ret; in tplg_object_copy_and_add_param()
1111 ret = snd_config_add(obj, new); in tplg_object_copy_and_add_param()
1112 if (ret < 0) { in tplg_object_copy_and_add_param()
1117 return ret; in tplg_object_copy_and_add_param()
1136 int ret; in tplg_object_update() local
1143 ret = snd_config_search(class_cfg, "DefineAttribute", &args); in tplg_object_update()
1144 if (ret < 0) in tplg_object_update()
1174 ret = snd_config_search(obj_cfg, id, &attr); in tplg_object_update()
1175 if (ret < 0) in tplg_object_update()
1180 ret = tplg_object_copy_and_add_param(tplg_pp, obj_cfg, n, class_cfg); in tplg_object_update()
1181 if (ret == 1) { in tplg_object_update()
1189 else if (ret < 0) in tplg_object_update()
1190 return ret; in tplg_object_update()
1202 ret = tplg_object_copy_and_add_param(tplg_pp, obj_cfg, n, parent_obj); in tplg_object_update()
1203 if (ret == 1) in tplg_object_update()
1205 else if (ret < 0) in tplg_object_update()
1206 return ret; in tplg_object_update()
1217 ret = tplg_object_copy_and_add_param(tplg_pp, obj_cfg, n, cfg); in tplg_object_update()
1218 if (ret == 1) in tplg_object_update()
1220 else if (ret < 0) in tplg_object_update()
1221 return ret; in tplg_object_update()
1236 ret = tplg_object_copy_and_add_param(tplg_pp, obj_cfg, n, cfg); in tplg_object_update()
1237 if (ret == 1) in tplg_object_update()
1239 else if (ret < 0) in tplg_object_update()
1240 return ret; in tplg_object_update()
1261 int ret; in tplg_object_pre_process_children() local
1263 ret = snd_config_search(cfg, "Object", &children); in tplg_object_pre_process_children()
1264 if (ret < 0) in tplg_object_pre_process_children()
1275 ret = tplg_pre_process_objects(tplg_pp, n, parent); in tplg_object_pre_process_children()
1276 if (ret < 0) in tplg_object_pre_process_children()
1277 return ret; in tplg_object_pre_process_children()
1290 int ret; in tplg_construct_object_name() local
1293 ret = snd_config_search(class_cfg, "attributes.constructor", &args); in tplg_construct_object_name()
1294 if (ret < 0) in tplg_construct_object_name()
1315 ret = -EINVAL; in tplg_construct_object_name()
1321 ret = -EINVAL; in tplg_construct_object_name()
1326 ret = snd_config_search(obj, s, &arg); in tplg_construct_object_name()
1327 if (ret < 0) { in tplg_construct_object_name()
1329 ret = -ENOENT; in tplg_construct_object_name()
1338 ret = snd_config_get_integer(arg, &v); in tplg_construct_object_name()
1339 assert(ret >= 0); in tplg_construct_object_name()
1343 ret = -ENOMEM; in tplg_construct_object_name()
1352 ret = snd_config_get_string(arg, &s); in tplg_construct_object_name()
1353 assert(ret >= 0); in tplg_construct_object_name()
1357 ret = -ENOMEM; in tplg_construct_object_name()
1365 ret = -EINVAL; in tplg_construct_object_name()
1373 ret = -ENOMEM; in tplg_construct_object_name()
1380 ret = snd_config_set_id(obj, new_name); in tplg_construct_object_name()
1383 return ret; in tplg_construct_object_name()
1435 int ret; in tplg_object_set_unique_attribute() local
1451 ret = snd_config_search(obj, unique_name, &new); in tplg_object_set_unique_attribute()
1452 if (ret < 0) { in tplg_object_set_unique_attribute()
1453 ret = snd_config_make(&new, unique_name, in tplg_object_set_unique_attribute()
1455 if (ret < 0) { in tplg_object_set_unique_attribute()
1457 return ret; in tplg_object_set_unique_attribute()
1459 ret = snd_config_add(obj, new); in tplg_object_set_unique_attribute()
1460 if (ret < 0) { in tplg_object_set_unique_attribute()
1462 return ret; in tplg_object_set_unique_attribute()
1466 ret = tplg_set_attribute_value(new, id); in tplg_object_set_unique_attribute()
1467 if (ret < 0) { in tplg_object_set_unique_attribute()
1469 return ret; in tplg_object_set_unique_attribute()
1472 return ret; in tplg_object_set_unique_attribute()
1500 int ret; in tplg_build_object() local
1517 ret = tplg_object_set_unique_attribute(tplg_pp, obj_local, class_cfg, id); in tplg_build_object()
1518 if (ret < 0) { in tplg_build_object()
1520 return ret; in tplg_build_object()
1524 ret = tplg_object_update(tplg_pp, new_obj, parent); in tplg_build_object()
1525 if (ret < 0) { in tplg_build_object()
1527 return ret; in tplg_build_object()
1531 ret = tplg_construct_object_name(tplg_pp, obj_local, class_cfg); in tplg_build_object()
1532 if (ret < 0) { in tplg_build_object()
1534 return ret; in tplg_build_object()
1548 ret = auto_attr_updater(tplg_pp, obj_local, parent); in tplg_build_object()
1549 if (ret < 0) { in tplg_build_object()
1551 return ret; in tplg_build_object()
1558 ret = builder(tplg_pp, new_obj, parent); in tplg_build_object()
1559 if (ret < 0) in tplg_build_object()
1560 return ret; in tplg_build_object()
1563 ret = tplg_object_pre_process_children(tplg_pp, new_obj, obj_local); in tplg_build_object()
1564 if (ret < 0) { in tplg_build_object()
1566 return ret; in tplg_build_object()
1570 ret = tplg_object_pre_process_children(tplg_pp, new_obj, class_cfg); in tplg_build_object()
1571 if (ret < 0) in tplg_build_object()
1574 return ret; in tplg_build_object()
1584 int ret; in tplg_pre_process_objects() local
1603 ret = snd_config_copy(&temp_n2, n2); in tplg_pre_process_objects()
1604 if (ret < 0) in tplg_pre_process_objects()
1605 return ret; in tplg_pre_process_objects()
1644 ret = snd_config_search(parent_instance, obj_cfg_name, &parent_obj); in tplg_pre_process_objects()
1646 if (ret < 0) in tplg_pre_process_objects()
1654 ret = snd_config_copy(&temp, parent_obj); in tplg_pre_process_objects()
1655 if (ret < 0) { in tplg_pre_process_objects()
1657 return ret; in tplg_pre_process_objects()
1664 ret = snd_config_merge(temp_n2, temp, false); in tplg_pre_process_objects()
1665 if (ret < 0) { in tplg_pre_process_objects()
1669 return ret; in tplg_pre_process_objects()
1674 ret = snd_config_make(&_obj_type, class_type, SND_CONFIG_TYPE_COMPOUND); in tplg_pre_process_objects()
1675 if (ret < 0) { in tplg_pre_process_objects()
1677 return ret; in tplg_pre_process_objects()
1680 ret = snd_config_make(&_obj_class, class_name, SND_CONFIG_TYPE_COMPOUND); in tplg_pre_process_objects()
1681 if (ret < 0) in tplg_pre_process_objects()
1684 ret = snd_config_add(_obj_type, _obj_class); in tplg_pre_process_objects()
1685 if (ret < 0) { in tplg_pre_process_objects()
1690 ret = snd_config_copy(&_obj, temp_n2); in tplg_pre_process_objects()
1691 if (ret < 0) in tplg_pre_process_objects()
1694 ret = snd_config_add(_obj_class, _obj); in tplg_pre_process_objects()
1695 if (ret < 0) { in tplg_pre_process_objects()
1701 ret = tplg_build_object(tplg_pp, _obj_type, parent); in tplg_pre_process_objects()
1702 if (ret < 0) in tplg_pre_process_objects()
1708 if (ret < 0) in tplg_pre_process_objects()
1709 return ret; in tplg_pre_process_objects()