Lines Matching refs:alg_region

605 	struct wm_adsp_alg_region alg_region;  member
933 const struct wm_adsp_alg_region *alg_region = &ctl->alg_region; in wm_coeff_base_reg() local
937 mem = wm_adsp_find_region(dsp, alg_region->type); in wm_coeff_base_reg()
940 alg_region->type); in wm_coeff_base_reg()
944 *reg = dsp->ops->region_to_reg(mem, ctl->alg_region.base + ctl->offset); in wm_coeff_base_reg()
986 event_id, ctl->alg_region.alg, in wm_coeff_write_acked_control()
987 wm_adsp_mem_region_name(ctl->alg_region.type), ctl->offset); in wm_coeff_write_acked_control()
1026 reg, ctl->alg_region.alg, in wm_coeff_write_acked_control()
1027 wm_adsp_mem_region_name(ctl->alg_region.type), in wm_coeff_write_acked_control()
1391 event, ctl->alg_region.alg, ret); in wm_adsp_signal_event_controls()
1414 const struct wm_adsp_alg_region *alg_region, in wm_adsp_create_control() argument
1425 region_name = wm_adsp_mem_region_name(alg_region->type); in wm_adsp_create_control()
1427 adsp_err(dsp, "Unknown region type: %d\n", alg_region->type); in wm_adsp_create_control()
1435 dsp->name, region_name, alg_region->alg); in wm_adsp_create_control()
1441 wm_adsp_fw_text[dsp->fw], alg_region->alg); in wm_adsp_create_control()
1446 wm_adsp_fw_text[dsp->fw], alg_region->alg); in wm_adsp_create_control()
1477 ctl->alg_region = *alg_region; in wm_adsp_create_control()
1693 struct wm_adsp_alg_region alg_region = {}; in wm_adsp_parse_coeff() local
1743 alg_region.type = coeff_blk.mem_type; in wm_adsp_parse_coeff()
1744 alg_region.alg = alg_blk.id; in wm_adsp_parse_coeff()
1746 ret = wm_adsp_create_control(dsp, &alg_region, in wm_adsp_parse_coeff()
2035 pos->alg_region.alg == alg && in wm_adsp_get_ctl()
2036 pos->alg_region.type == type) { in wm_adsp_get_ctl()
2104 const struct wm_adsp_alg_region *alg_region) in wm_adsp_ctl_fixup_base() argument
2110 alg_region->alg == ctl->alg_region.alg && in wm_adsp_ctl_fixup_base()
2111 alg_region->type == ctl->alg_region.type) { in wm_adsp_ctl_fixup_base()
2112 ctl->alg_region.base = alg_region->base; in wm_adsp_ctl_fixup_base()
2172 struct wm_adsp_alg_region *alg_region; in wm_adsp_find_alg_region() local
2174 list_for_each_entry(alg_region, &dsp->alg_regions, list) { in wm_adsp_find_alg_region()
2175 if (id == alg_region->alg && type == alg_region->type) in wm_adsp_find_alg_region()
2176 return alg_region; in wm_adsp_find_alg_region()
2186 struct wm_adsp_alg_region *alg_region; in wm_adsp_create_region() local
2188 alg_region = kzalloc(sizeof(*alg_region), GFP_KERNEL); in wm_adsp_create_region()
2189 if (!alg_region) in wm_adsp_create_region()
2192 alg_region->type = type; in wm_adsp_create_region()
2193 alg_region->alg = be32_to_cpu(id); in wm_adsp_create_region()
2194 alg_region->base = be32_to_cpu(base); in wm_adsp_create_region()
2196 list_add_tail(&alg_region->list, &dsp->alg_regions); in wm_adsp_create_region()
2199 wm_adsp_ctl_fixup_base(dsp, alg_region); in wm_adsp_create_region()
2201 return alg_region; in wm_adsp_create_region()
2206 struct wm_adsp_alg_region *alg_region; in wm_adsp_free_alg_regions() local
2209 alg_region = list_first_entry(&dsp->alg_regions, in wm_adsp_free_alg_regions()
2212 list_del(&alg_region->list); in wm_adsp_free_alg_regions()
2213 kfree(alg_region); in wm_adsp_free_alg_regions()
2246 struct wm_adsp_alg_region *alg_region; in wm_adsp_create_regions() local
2250 alg_region = wm_adsp_create_region(dsp, type[i], id, base[i]); in wm_adsp_create_regions()
2251 if (IS_ERR(alg_region)) in wm_adsp_create_regions()
2252 return PTR_ERR(alg_region); in wm_adsp_create_regions()
2262 struct wm_adsp_alg_region *alg_region; in wm_adsp1_setup_algs() local
2284 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, in wm_adsp1_setup_algs()
2286 if (IS_ERR(alg_region)) in wm_adsp1_setup_algs()
2287 return PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2289 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, in wm_adsp1_setup_algs()
2291 if (IS_ERR(alg_region)) in wm_adsp1_setup_algs()
2292 return PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2311 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, in wm_adsp1_setup_algs()
2314 if (IS_ERR(alg_region)) { in wm_adsp1_setup_algs()
2315 ret = PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2323 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp1_setup_algs()
2332 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, in wm_adsp1_setup_algs()
2335 if (IS_ERR(alg_region)) { in wm_adsp1_setup_algs()
2336 ret = PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2344 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp1_setup_algs()
2363 struct wm_adsp_alg_region *alg_region; in wm_adsp2_setup_algs() local
2385 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, in wm_adsp2_setup_algs()
2387 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2388 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2390 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, in wm_adsp2_setup_algs()
2392 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2393 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2395 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, in wm_adsp2_setup_algs()
2397 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2398 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2419 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, in wm_adsp2_setup_algs()
2422 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2423 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2431 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2440 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, in wm_adsp2_setup_algs()
2443 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2444 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2452 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2461 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, in wm_adsp2_setup_algs()
2464 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2465 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2473 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2568 struct wm_adsp_alg_region *alg_region; in wm_adsp_load_coeff() local
2680 alg_region = wm_adsp_find_alg_region(dsp, type, in wm_adsp_load_coeff()
2682 if (alg_region) { in wm_adsp_load_coeff()
2683 reg = alg_region->base; in wm_adsp_load_coeff()
3813 struct wm_adsp_alg_region *alg_region; in wm_adsp_buffer_parse_legacy() local
3818 alg_region = wm_adsp_find_alg_region(dsp, WMFW_ADSP2_XM, dsp->fw_id); in wm_adsp_buffer_parse_legacy()
3819 if (!alg_region) { in wm_adsp_buffer_parse_legacy()
3830 addr = alg_region->base + xmalg + ALG_XM_FIELD(magic); in wm_adsp_buffer_parse_legacy()
3838 addr = alg_region->base + xmalg + ALG_XM_FIELD(host_buf_ptr); in wm_adsp_buffer_parse_legacy()
3897 buf->host_buf_mem_type = ctl->alg_region.type; in wm_adsp_buffer_parse_coeff()