929 | 929 |
err = tplg_save_printf(dst, pfx, "\t'%s' ",
|
930 | 930 |
tuple->token);
|
931 | 931 |
}
|
|
932 |
if (err < 0)
|
|
933 |
return err;
|
932 | 934 |
switch (set->type) {
|
933 | 935 |
case SND_SOC_TPLG_TUPLE_TYPE_UUID:
|
934 | 936 |
err = tplg_save_printf(dst, NULL, "'" UUID_FORMAT "'\n",
|
|
1275 | 1277 |
elem->id, index, ref->id);
|
1276 | 1278 |
} else {
|
1277 | 1279 |
err = tplg_save_printf(dst, pfx, "\t'%s'\n", ref->id);
|
1278 | |
if (err < 0)
|
1279 | |
return err;
|
1280 | |
}
|
|
1280 |
}
|
|
1281 |
if (err < 0)
|
|
1282 |
return err;
|
1281 | 1283 |
index++;
|
1282 | 1284 |
}
|
1283 | 1285 |
if (count > 1) {
|
|
1611 | 1613 |
if (!elem)
|
1612 | 1614 |
return -ENOMEM;
|
1613 | 1615 |
|
1614 | |
tplg_log(tplg, 'D', pos, "manifest: private size %d", size);
|
|
1616 |
tplg_log(tplg, 'D', pos, "manifest: private size %zd", size);
|
1615 | 1617 |
return tplg_add_data(tplg, elem, bin, size);
|
1616 | 1618 |
}
|
1617 | 1619 |
|
|
1671 | 1673 |
|
1672 | 1674 |
va = bin;
|
1673 | 1675 |
if (size < sizeof(*va) || size < va->size) {
|
1674 | |
tplg_log(tplg, 'A', pos, "tuple set verify: wrong size %d", size);
|
|
1676 |
tplg_log(tplg, 'A', pos, "tuple set verify: wrong size %zd", size);
|
1675 | 1677 |
return -EINVAL;
|
1676 | 1678 |
}
|
1677 | 1679 |
|
|
1718 | 1720 |
|
1719 | 1721 |
va = bin;
|
1720 | 1722 |
if (size < sizeof(*va) || size < va->size) {
|
1721 | |
SNDERR("tuples: wrong size %d", size);
|
|
1723 |
SNDERR("tuples: wrong size %zd", size);
|
1722 | 1724 |
return -EINVAL;
|
1723 | 1725 |
}
|
1724 | 1726 |
|
|
1805 | 1807 |
int err;
|
1806 | 1808 |
|
1807 | 1809 |
if (size < sizeof(*va)) {
|
1808 | |
tplg_log(tplg, 'A', pos, "tuples: small size %d", size);
|
|
1810 |
tplg_log(tplg, 'A', pos, "tuples: small size %zd", size);
|
1809 | 1811 |
return -EINVAL;
|
1810 | 1812 |
}
|
1811 | 1813 |
|
1812 | 1814 |
next:
|
1813 | 1815 |
va = bin;
|
1814 | 1816 |
if (size < sizeof(*va)) {
|
1815 | |
tplg_log(tplg, 'A', pos, "tuples: unexpected vendor arry size %d", size);
|
|
1817 |
tplg_log(tplg, 'A', pos, "tuples: unexpected vendor arry size %zd", size);
|
1816 | 1818 |
return -EINVAL;
|
1817 | 1819 |
}
|
1818 | 1820 |
|
|
1841 | 1843 |
int err;
|
1842 | 1844 |
|
1843 | 1845 |
if (size < sizeof(*va)) {
|
1844 | |
SNDERR("tuples: small size %d", size);
|
|
1846 |
SNDERR("tuples: small size %zd", size);
|
1845 | 1847 |
return -EINVAL;
|
1846 | 1848 |
}
|
1847 | 1849 |
|
1848 | 1850 |
next:
|
1849 | 1851 |
va = bin;
|
1850 | 1852 |
if (size < sizeof(*va)) {
|
1851 | |
SNDERR("tuples: unexpected vendor arry size %d", size);
|
|
1853 |
SNDERR("tuples: unexpected vendor arry size %zd", size);
|
1852 | 1854 |
return -EINVAL;
|
1853 | 1855 |
}
|
1854 | 1856 |
|
|
1893 | 1895 |
next:
|
1894 | 1896 |
tp = bin;
|
1895 | 1897 |
if (off + size < tp->size) {
|
1896 | |
SNDERR("data: unexpected element size %d", size);
|
|
1898 |
SNDERR("data: unexpected element size %zd", size);
|
1897 | 1899 |
return -EINVAL;
|
1898 | 1900 |
}
|
1899 | 1901 |
|