Lines Matching refs:alg_region

611 	struct wm_adsp_alg_region alg_region;  member
939 const struct wm_adsp_alg_region *alg_region = &ctl->alg_region; in wm_coeff_base_reg() local
943 mem = wm_adsp_find_region(dsp, alg_region->type); in wm_coeff_base_reg()
946 alg_region->type); in wm_coeff_base_reg()
950 *reg = dsp->ops->region_to_reg(mem, ctl->alg_region.base + ctl->offset); in wm_coeff_base_reg()
992 event_id, ctl->alg_region.alg, in wm_coeff_write_acked_control()
993 wm_adsp_mem_region_name(ctl->alg_region.type), ctl->offset); in wm_coeff_write_acked_control()
1032 reg, ctl->alg_region.alg, in wm_coeff_write_acked_control()
1033 wm_adsp_mem_region_name(ctl->alg_region.type), in wm_coeff_write_acked_control()
1397 event, ctl->alg_region.alg, ret); in wm_adsp_signal_event_controls()
1420 const struct wm_adsp_alg_region *alg_region, in wm_adsp_create_control() argument
1431 region_name = wm_adsp_mem_region_name(alg_region->type); in wm_adsp_create_control()
1433 adsp_err(dsp, "Unknown region type: %d\n", alg_region->type); in wm_adsp_create_control()
1441 dsp->name, region_name, alg_region->alg); in wm_adsp_create_control()
1447 wm_adsp_fw_text[dsp->fw], alg_region->alg); in wm_adsp_create_control()
1452 wm_adsp_fw_text[dsp->fw], alg_region->alg); in wm_adsp_create_control()
1483 ctl->alg_region = *alg_region; in wm_adsp_create_control()
1699 struct wm_adsp_alg_region alg_region = {}; in wm_adsp_parse_coeff() local
1749 alg_region.type = coeff_blk.mem_type; in wm_adsp_parse_coeff()
1750 alg_region.alg = alg_blk.id; in wm_adsp_parse_coeff()
1752 ret = wm_adsp_create_control(dsp, &alg_region, in wm_adsp_parse_coeff()
2042 pos->alg_region.alg == alg && in wm_adsp_get_ctl()
2043 pos->alg_region.type == type) { in wm_adsp_get_ctl()
2111 const struct wm_adsp_alg_region *alg_region) in wm_adsp_ctl_fixup_base() argument
2117 alg_region->alg == ctl->alg_region.alg && in wm_adsp_ctl_fixup_base()
2118 alg_region->type == ctl->alg_region.type) { in wm_adsp_ctl_fixup_base()
2119 ctl->alg_region.base = alg_region->base; in wm_adsp_ctl_fixup_base()
2179 struct wm_adsp_alg_region *alg_region; in wm_adsp_find_alg_region() local
2181 list_for_each_entry(alg_region, &dsp->alg_regions, list) { in wm_adsp_find_alg_region()
2182 if (id == alg_region->alg && type == alg_region->type) in wm_adsp_find_alg_region()
2183 return alg_region; in wm_adsp_find_alg_region()
2193 struct wm_adsp_alg_region *alg_region; in wm_adsp_create_region() local
2195 alg_region = kzalloc(sizeof(*alg_region), GFP_KERNEL); in wm_adsp_create_region()
2196 if (!alg_region) in wm_adsp_create_region()
2199 alg_region->type = type; in wm_adsp_create_region()
2200 alg_region->alg = be32_to_cpu(id); in wm_adsp_create_region()
2201 alg_region->base = be32_to_cpu(base); in wm_adsp_create_region()
2203 list_add_tail(&alg_region->list, &dsp->alg_regions); in wm_adsp_create_region()
2206 wm_adsp_ctl_fixup_base(dsp, alg_region); in wm_adsp_create_region()
2208 return alg_region; in wm_adsp_create_region()
2213 struct wm_adsp_alg_region *alg_region; in wm_adsp_free_alg_regions() local
2216 alg_region = list_first_entry(&dsp->alg_regions, in wm_adsp_free_alg_regions()
2219 list_del(&alg_region->list); in wm_adsp_free_alg_regions()
2220 kfree(alg_region); in wm_adsp_free_alg_regions()
2253 struct wm_adsp_alg_region *alg_region; in wm_adsp_create_regions() local
2257 alg_region = wm_adsp_create_region(dsp, type[i], id, base[i]); in wm_adsp_create_regions()
2258 if (IS_ERR(alg_region)) in wm_adsp_create_regions()
2259 return PTR_ERR(alg_region); in wm_adsp_create_regions()
2269 struct wm_adsp_alg_region *alg_region; in wm_adsp1_setup_algs() local
2291 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, in wm_adsp1_setup_algs()
2293 if (IS_ERR(alg_region)) in wm_adsp1_setup_algs()
2294 return PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2296 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, in wm_adsp1_setup_algs()
2298 if (IS_ERR(alg_region)) in wm_adsp1_setup_algs()
2299 return PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2318 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, in wm_adsp1_setup_algs()
2321 if (IS_ERR(alg_region)) { in wm_adsp1_setup_algs()
2322 ret = PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2330 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp1_setup_algs()
2339 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, in wm_adsp1_setup_algs()
2342 if (IS_ERR(alg_region)) { in wm_adsp1_setup_algs()
2343 ret = PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2351 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp1_setup_algs()
2370 struct wm_adsp_alg_region *alg_region; in wm_adsp2_setup_algs() local
2392 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, in wm_adsp2_setup_algs()
2394 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2395 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2397 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, in wm_adsp2_setup_algs()
2399 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2400 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2402 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, in wm_adsp2_setup_algs()
2404 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2405 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2426 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, in wm_adsp2_setup_algs()
2429 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2430 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2438 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2447 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, in wm_adsp2_setup_algs()
2450 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2451 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2459 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2468 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, in wm_adsp2_setup_algs()
2471 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2472 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2480 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2575 struct wm_adsp_alg_region *alg_region; in wm_adsp_load_coeff() local
2687 alg_region = wm_adsp_find_alg_region(dsp, type, in wm_adsp_load_coeff()
2689 if (alg_region) { in wm_adsp_load_coeff()
2690 reg = alg_region->base; in wm_adsp_load_coeff()
3810 struct wm_adsp_alg_region *alg_region; in wm_adsp_buffer_parse_legacy() local
3815 alg_region = wm_adsp_find_alg_region(dsp, WMFW_ADSP2_XM, dsp->fw_id); in wm_adsp_buffer_parse_legacy()
3816 if (!alg_region) { in wm_adsp_buffer_parse_legacy()
3827 addr = alg_region->base + xmalg + ALG_XM_FIELD(magic); in wm_adsp_buffer_parse_legacy()
3835 addr = alg_region->base + xmalg + ALG_XM_FIELD(host_buf_ptr); in wm_adsp_buffer_parse_legacy()
3893 buf->host_buf_mem_type = ctl->alg_region.type; in wm_adsp_buffer_parse_coeff()