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()
1698 struct wm_adsp_alg_region alg_region = {}; in wm_adsp_parse_coeff() local
1748 alg_region.type = coeff_blk.mem_type; in wm_adsp_parse_coeff()
1749 alg_region.alg = alg_blk.id; in wm_adsp_parse_coeff()
1751 ret = wm_adsp_create_control(dsp, &alg_region, in wm_adsp_parse_coeff()
2038 pos->alg_region.alg == alg && in wm_adsp_get_ctl()
2039 pos->alg_region.type == type) { in wm_adsp_get_ctl()
2107 const struct wm_adsp_alg_region *alg_region) in wm_adsp_ctl_fixup_base() argument
2113 alg_region->alg == ctl->alg_region.alg && in wm_adsp_ctl_fixup_base()
2114 alg_region->type == ctl->alg_region.type) { in wm_adsp_ctl_fixup_base()
2115 ctl->alg_region.base = alg_region->base; in wm_adsp_ctl_fixup_base()
2175 struct wm_adsp_alg_region *alg_region; in wm_adsp_find_alg_region() local
2177 list_for_each_entry(alg_region, &dsp->alg_regions, list) { in wm_adsp_find_alg_region()
2178 if (id == alg_region->alg && type == alg_region->type) in wm_adsp_find_alg_region()
2179 return alg_region; in wm_adsp_find_alg_region()
2189 struct wm_adsp_alg_region *alg_region; in wm_adsp_create_region() local
2191 alg_region = kzalloc(sizeof(*alg_region), GFP_KERNEL); in wm_adsp_create_region()
2192 if (!alg_region) in wm_adsp_create_region()
2195 alg_region->type = type; in wm_adsp_create_region()
2196 alg_region->alg = be32_to_cpu(id); in wm_adsp_create_region()
2197 alg_region->base = be32_to_cpu(base); in wm_adsp_create_region()
2199 list_add_tail(&alg_region->list, &dsp->alg_regions); in wm_adsp_create_region()
2202 wm_adsp_ctl_fixup_base(dsp, alg_region); in wm_adsp_create_region()
2204 return alg_region; in wm_adsp_create_region()
2209 struct wm_adsp_alg_region *alg_region; in wm_adsp_free_alg_regions() local
2212 alg_region = list_first_entry(&dsp->alg_regions, in wm_adsp_free_alg_regions()
2215 list_del(&alg_region->list); in wm_adsp_free_alg_regions()
2216 kfree(alg_region); in wm_adsp_free_alg_regions()
2249 struct wm_adsp_alg_region *alg_region; in wm_adsp_create_regions() local
2253 alg_region = wm_adsp_create_region(dsp, type[i], id, base[i]); in wm_adsp_create_regions()
2254 if (IS_ERR(alg_region)) in wm_adsp_create_regions()
2255 return PTR_ERR(alg_region); in wm_adsp_create_regions()
2265 struct wm_adsp_alg_region *alg_region; in wm_adsp1_setup_algs() local
2287 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, in wm_adsp1_setup_algs()
2289 if (IS_ERR(alg_region)) in wm_adsp1_setup_algs()
2290 return PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2292 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, in wm_adsp1_setup_algs()
2294 if (IS_ERR(alg_region)) in wm_adsp1_setup_algs()
2295 return PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2314 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, in wm_adsp1_setup_algs()
2317 if (IS_ERR(alg_region)) { in wm_adsp1_setup_algs()
2318 ret = PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2326 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp1_setup_algs()
2335 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, in wm_adsp1_setup_algs()
2338 if (IS_ERR(alg_region)) { in wm_adsp1_setup_algs()
2339 ret = PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2347 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp1_setup_algs()
2366 struct wm_adsp_alg_region *alg_region; in wm_adsp2_setup_algs() local
2388 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, in wm_adsp2_setup_algs()
2390 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2391 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2393 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, in wm_adsp2_setup_algs()
2395 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2396 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2398 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, in wm_adsp2_setup_algs()
2400 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2401 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2422 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, in wm_adsp2_setup_algs()
2425 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2426 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2434 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2443 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, in wm_adsp2_setup_algs()
2446 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2447 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2455 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2464 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, in wm_adsp2_setup_algs()
2467 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2468 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2476 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2571 struct wm_adsp_alg_region *alg_region; in wm_adsp_load_coeff() local
2683 alg_region = wm_adsp_find_alg_region(dsp, type, in wm_adsp_load_coeff()
2685 if (alg_region) { in wm_adsp_load_coeff()
2686 reg = alg_region->base; in wm_adsp_load_coeff()
3806 struct wm_adsp_alg_region *alg_region; in wm_adsp_buffer_parse_legacy() local
3811 alg_region = wm_adsp_find_alg_region(dsp, WMFW_ADSP2_XM, dsp->fw_id); in wm_adsp_buffer_parse_legacy()
3812 if (!alg_region) { in wm_adsp_buffer_parse_legacy()
3823 addr = alg_region->base + xmalg + ALG_XM_FIELD(magic); in wm_adsp_buffer_parse_legacy()
3831 addr = alg_region->base + xmalg + ALG_XM_FIELD(host_buf_ptr); in wm_adsp_buffer_parse_legacy()
3889 buf->host_buf_mem_type = ctl->alg_region.type; in wm_adsp_buffer_parse_coeff()