Lines Matching refs:pos
1554 static int wm_coeff_parse_string(int bytes, const u8 **pos, const u8 **str) in wm_coeff_parse_string() argument
1560 length = **pos; in wm_coeff_parse_string()
1563 length = le16_to_cpu(*((__le16 *)*pos)); in wm_coeff_parse_string()
1570 *str = *pos + bytes; in wm_coeff_parse_string()
1572 *pos += ((length + bytes) + 3) & ~0x03; in wm_coeff_parse_string()
1577 static int wm_coeff_parse_int(int bytes, const u8 **pos) in wm_coeff_parse_int() argument
1583 val = le16_to_cpu(*((__le16 *)*pos)); in wm_coeff_parse_int()
1586 val = le32_to_cpu(*((__le32 *)*pos)); in wm_coeff_parse_int()
1592 *pos += bytes; in wm_coeff_parse_int()
1763 unsigned int pos, in wm_adsp1_parse_sizes() argument
1768 adsp1_sizes = (void *)&firmware->data[pos]; in wm_adsp1_parse_sizes()
1774 return pos + sizeof(*adsp1_sizes); in wm_adsp1_parse_sizes()
1779 unsigned int pos, in wm_adsp2_parse_sizes() argument
1784 adsp2_sizes = (void *)&firmware->data[pos]; in wm_adsp2_parse_sizes()
1790 return pos + sizeof(*adsp2_sizes); in wm_adsp2_parse_sizes()
1822 unsigned int pos = 0; in wm_adsp_load() local
1850 pos = sizeof(*header) + sizeof(*adsp1_sizes) + sizeof(*footer); in wm_adsp_load()
1851 if (pos >= firmware->size) { in wm_adsp_load()
1879 pos = sizeof(*header); in wm_adsp_load()
1880 pos = dsp->ops->parse_sizes(dsp, file, pos, firmware); in wm_adsp_load()
1882 footer = (void *)&firmware->data[pos]; in wm_adsp_load()
1883 pos += sizeof(*footer); in wm_adsp_load()
1885 if (le32_to_cpu(header->len) != pos) { in wm_adsp_load()
1894 while (pos < firmware->size && in wm_adsp_load()
1895 sizeof(*region) < firmware->size - pos) { in wm_adsp_load()
1896 region = (void *)&(firmware->data[pos]); in wm_adsp_load()
1945 file, regions, type, pos, pos); in wm_adsp_load()
1954 firmware->size - pos - sizeof(*region)) { in wm_adsp_load()
1992 pos += le32_to_cpu(region->len) + sizeof(*region); in wm_adsp_load()
2002 if (pos > firmware->size) in wm_adsp_load()
2004 file, regions, pos - firmware->size); in wm_adsp_load()
2027 struct wm_coeff_ctl *pos, *rslt = NULL; in wm_adsp_get_ctl() local
2030 list_for_each_entry(pos, &dsp->ctl_list, list) { in wm_adsp_get_ctl()
2031 if (!pos->subname) in wm_adsp_get_ctl()
2033 if (strncmp(pos->subname, name, pos->subname_len) == 0 && in wm_adsp_get_ctl()
2034 pos->fw_name == fw_txt && in wm_adsp_get_ctl()
2035 pos->alg_region.alg == alg && in wm_adsp_get_ctl()
2036 pos->alg_region.type == type) { in wm_adsp_get_ctl()
2037 rslt = pos; in wm_adsp_get_ctl()
2119 unsigned int pos, unsigned int len) in wm_adsp_read_algs() argument
2137 reg = dsp->ops->region_to_reg(mem, pos + len); in wm_adsp_read_algs()
2157 reg = dsp->ops->region_to_reg(mem, pos); in wm_adsp_read_algs()
2264 unsigned int pos, len; in wm_adsp1_setup_algs() local
2295 pos = sizeof(adsp1_id) / sizeof(u32); in wm_adsp1_setup_algs()
2298 adsp1_alg = wm_adsp_read_algs(dsp, n_algs, mem, pos, len); in wm_adsp1_setup_algs()
2365 unsigned int pos, len; in wm_adsp2_setup_algs() local
2401 pos = sizeof(adsp2_id) / sizeof(u32); in wm_adsp2_setup_algs()
2404 adsp2_alg = wm_adsp_read_algs(dsp, n_algs, mem, pos, len); in wm_adsp2_setup_algs()
2505 unsigned int pos, len; in wm_halo_setup_algs() local
2531 pos = sizeof(halo_id) / sizeof(u32); in wm_halo_setup_algs()
2534 halo_alg = wm_adsp_read_algs(dsp, n_algs, mem, pos, len); in wm_halo_setup_algs()
2570 int ret, pos, blocks, type, offset, reg; in wm_adsp_load_coeff() local
2617 pos = le32_to_cpu(hdr->len); in wm_adsp_load_coeff()
2620 while (pos < firmware->size && in wm_adsp_load_coeff()
2621 sizeof(*blk) < firmware->size - pos) { in wm_adsp_load_coeff()
2622 blk = (void *)(&firmware->data[pos]); in wm_adsp_load_coeff()
2694 file, blocks, type, pos); in wm_adsp_load_coeff()
2700 firmware->size - pos - sizeof(*blk)) { in wm_adsp_load_coeff()
2731 pos += (le32_to_cpu(blk->len) + sizeof(*blk) + 3) & ~0x03; in wm_adsp_load_coeff()
2739 if (pos > firmware->size) in wm_adsp_load_coeff()
2741 file, blocks, pos - firmware->size); in wm_adsp_load_coeff()