Lines Matching refs:tplg
122 int tplg_save_refs(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_refs()
530 static struct tplg_elem *get_tokens(snd_tplg_t *tplg, struct tplg_elem *elem) in get_tokens() argument
544 ref->elem = tplg_elem_lookup(&tplg->token_list, in get_tokens()
675 static int build_tuples(snd_tplg_t *tplg, struct tplg_elem *elem) in build_tuples() argument
693 ref->elem = tplg_elem_lookup(&tplg->tuple_list, in build_tuples()
701 tokens = get_tokens(tplg, tuples); in build_tuples()
1014 int tplg_save_tuple_sets(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_tuple_sets()
1035 int tplg_parse_tokens(snd_tplg_t *tplg, snd_config_t *cfg, in tplg_parse_tokens() argument
1045 elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_TOKEN); in tplg_parse_tokens()
1085 int tplg_save_tokens(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_tokens()
1111 int tplg_parse_tuples(snd_tplg_t *tplg, snd_config_t *cfg, in tplg_parse_tuples() argument
1121 elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_TUPLE); in tplg_parse_tuples()
1156 int tplg_save_tuples(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_tuples()
1169 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_TOKEN, in tplg_save_tuples()
1172 err = tplg_save_tuple_sets(tplg, elem, dst, pfx2); in tplg_save_tuples()
1195 int tplg_parse_manifest_data(snd_tplg_t *tplg, snd_config_t *cfg, in tplg_parse_manifest_data() argument
1205 if (!list_empty(&tplg->manifest_list)) { in tplg_parse_manifest_data()
1210 elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_MANIFEST); in tplg_parse_manifest_data()
1243 int tplg_save_manifest_data(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_manifest_data()
1291 int tplg_build_manifest_data(snd_tplg_t *tplg) in tplg_build_manifest_data() argument
1299 base = &tplg->manifest_list; in tplg_build_manifest_data()
1319 err = tplg_copy_data(tplg, elem, ref); in tplg_build_manifest_data()
1329 tplg->manifest_pdata = malloc(manifest->priv.size); in tplg_build_manifest_data()
1330 if (!tplg->manifest_pdata) in tplg_build_manifest_data()
1333 tplg->manifest.priv.size = manifest->priv.size; in tplg_build_manifest_data()
1334 memcpy(tplg->manifest_pdata, manifest->priv.data, manifest->priv.size); in tplg_build_manifest_data()
1343 int tplg_parse_data(snd_tplg_t *tplg, snd_config_t *cfg, in tplg_parse_data() argument
1352 elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_DATA); in tplg_parse_data()
1420 int tplg_save_data(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_data()
1483 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_TUPLE, in tplg_save_data()
1499 int tplg_copy_data(snd_tplg_t *tplg, struct tplg_elem *elem, in tplg_copy_data() argument
1507 ref_elem = tplg_elem_lookup(&tplg->pdata_list, in tplg_copy_data()
1550 int tplg_build_data(snd_tplg_t *tplg) in tplg_build_data() argument
1556 base = &tplg->pdata_list; in tplg_build_data()
1561 err = build_tuples(tplg, elem); in tplg_build_data()
1571 int tplg_decode_manifest_data(snd_tplg_t *tplg, in tplg_decode_manifest_data() argument
1602 tplg->manifest = *m; in tplg_decode_manifest_data()
1608 elem = tplg_elem_new_common(tplg, NULL, "manifest", in tplg_decode_manifest_data()
1613 tplg_log(tplg, 'D', pos, "manifest: private size %zd", size); in tplg_decode_manifest_data()
1614 return tplg_add_data(tplg, elem, bin, size); in tplg_decode_manifest_data()
1617 int tplg_add_token(snd_tplg_t *tplg, struct tplg_elem *parent, in tplg_add_token() argument
1627 elem = tplg_elem_lookup(&tplg->token_list, parent->id, in tplg_add_token()
1630 elem = tplg_elem_new_common(tplg, NULL, parent->id, in tplg_add_token()
1665 static int tplg_verify_tuple_set(snd_tplg_t *tplg, size_t pos, in tplg_verify_tuple_set() argument
1673 tplg_log(tplg, 'A', pos, "tuple set verify: wrong size %zd", size); in tplg_verify_tuple_set()
1686 tplg_log(tplg, 'A', pos, "tuple set verify: unknown array type %d", va->type); in tplg_verify_tuple_set()
1692 tplg_log(tplg, 'A', pos, "tuple set verify: wrong vendor array size %d " in tplg_verify_tuple_set()
1699 tplg_log(tplg, 'A', pos, "tuple set verify: tuples overflow %d", va->num_elems); in tplg_verify_tuple_set()
1706 static int tplg_decode_tuple_set(snd_tplg_t *tplg, in tplg_decode_tuple_set() argument
1757 tplg_log(tplg, 'A', pos, "tuple set: type %d (%s) tuples %d size %d", set->type, in tplg_decode_tuple_set()
1763 err = tplg_add_token(tplg, parent, va->uuid[j].token, in tplg_decode_tuple_set()
1771 err = tplg_add_token(tplg, parent, va->string[j].token, in tplg_decode_tuple_set()
1782 err = tplg_add_token(tplg, parent, va->value[j].token, in tplg_decode_tuple_set()
1800 static int tplg_verify_tuples(snd_tplg_t *tplg, size_t pos, in tplg_verify_tuples() argument
1807 tplg_log(tplg, 'A', pos, "tuples: small size %zd", size); in tplg_verify_tuples()
1814 tplg_log(tplg, 'A', pos, "tuples: unexpected vendor arry size %zd", size); in tplg_verify_tuples()
1818 err = tplg_verify_tuple_set(tplg, pos, va, va->size); in tplg_verify_tuples()
1832 static int tplg_decode_tuples(snd_tplg_t *tplg, in tplg_decode_tuples() argument
1859 err = tplg_decode_tuple_set(tplg, pos, parent, &set, va, va->size); in tplg_decode_tuples()
1874 int tplg_add_data(snd_tplg_t *tplg, in tplg_add_data() argument
1899 if (tplg_verify_tuples(tplg, pos, tp->array, tp->size) < 0) { in tplg_add_data()
1912 tplg_log(tplg, 'A', pos, "add bytes: size %d", tp->size); in tplg_add_data()
1914 err = tplg_add_data_bytes(tplg, parent, suffix, tp->array, tp->size); in tplg_add_data()
1918 elem = tplg_elem_new_common(tplg, NULL, id, SND_TPLG_TYPE_TUPLE); in tplg_add_data()
1922 elem2 = tplg_elem_new_common(tplg, NULL, id, SND_TPLG_TYPE_DATA); in tplg_add_data()
1938 tplg_log(tplg, 'A', pos, "decode tuples: size %d", tp->size); in tplg_add_data()
1939 err = tplg_decode_tuples(tplg, pos, parent, tuples, tp->array, tp->size); in tplg_add_data()
1967 int tplg_add_data_bytes(snd_tplg_t *tplg, struct tplg_elem *parent, in tplg_add_data_bytes() argument
1978 elem = tplg_elem_new_common(tplg, NULL, id, SND_TPLG_TYPE_DATA); in tplg_add_data_bytes()
1993 int tplg_decode_data(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_decode_data()