Lines Matching refs:alg_region
491 struct wm_adsp_alg_region alg_region; member
815 const struct wm_adsp_alg_region *alg_region = &ctl->alg_region; in wm_coeff_base_reg() local
819 mem = wm_adsp_find_region(dsp, alg_region->type); in wm_coeff_base_reg()
822 alg_region->type); in wm_coeff_base_reg()
826 *reg = wm_adsp_region_to_reg(mem, ctl->alg_region.base + ctl->offset); in wm_coeff_base_reg()
868 event_id, ctl->alg_region.alg, in wm_coeff_write_acked_control()
869 wm_adsp_mem_region_name(ctl->alg_region.type), ctl->offset); in wm_coeff_write_acked_control()
908 reg, ctl->alg_region.alg, in wm_coeff_write_acked_control()
909 wm_adsp_mem_region_name(ctl->alg_region.type), in wm_coeff_write_acked_control()
1270 event, ctl->alg_region.alg, ret); in wm_adsp_signal_event_controls()
1292 const struct wm_adsp_alg_region *alg_region, in wm_adsp_create_control() argument
1303 region_name = wm_adsp_mem_region_name(alg_region->type); in wm_adsp_create_control()
1305 adsp_err(dsp, "Unknown region type: %d\n", alg_region->type); in wm_adsp_create_control()
1313 dsp->name, region_name, alg_region->alg); in wm_adsp_create_control()
1318 wm_adsp_fw_text[dsp->fw], alg_region->alg); in wm_adsp_create_control()
1350 ctl->alg_region = *alg_region; in wm_adsp_create_control()
1554 struct wm_adsp_alg_region alg_region = {}; in wm_adsp_parse_coeff() local
1604 alg_region.type = coeff_blk.mem_type; in wm_adsp_parse_coeff()
1605 alg_region.alg = alg_blk.id; in wm_adsp_parse_coeff()
1607 ret = wm_adsp_create_control(dsp, &alg_region, in wm_adsp_parse_coeff()
1851 const struct wm_adsp_alg_region *alg_region) in wm_adsp_ctl_fixup_base() argument
1857 alg_region->alg == ctl->alg_region.alg && in wm_adsp_ctl_fixup_base()
1858 alg_region->type == ctl->alg_region.type) { in wm_adsp_ctl_fixup_base()
1859 ctl->alg_region.base = alg_region->base; in wm_adsp_ctl_fixup_base()
1919 struct wm_adsp_alg_region *alg_region; in wm_adsp_find_alg_region() local
1921 list_for_each_entry(alg_region, &dsp->alg_regions, list) { in wm_adsp_find_alg_region()
1922 if (id == alg_region->alg && type == alg_region->type) in wm_adsp_find_alg_region()
1923 return alg_region; in wm_adsp_find_alg_region()
1933 struct wm_adsp_alg_region *alg_region; in wm_adsp_create_region() local
1935 alg_region = kzalloc(sizeof(*alg_region), GFP_KERNEL); in wm_adsp_create_region()
1936 if (!alg_region) in wm_adsp_create_region()
1939 alg_region->type = type; in wm_adsp_create_region()
1940 alg_region->alg = be32_to_cpu(id); in wm_adsp_create_region()
1941 alg_region->base = be32_to_cpu(base); in wm_adsp_create_region()
1943 list_add_tail(&alg_region->list, &dsp->alg_regions); in wm_adsp_create_region()
1946 wm_adsp_ctl_fixup_base(dsp, alg_region); in wm_adsp_create_region()
1948 return alg_region; in wm_adsp_create_region()
1953 struct wm_adsp_alg_region *alg_region; in wm_adsp_free_alg_regions() local
1956 alg_region = list_first_entry(&dsp->alg_regions, in wm_adsp_free_alg_regions()
1959 list_del(&alg_region->list); in wm_adsp_free_alg_regions()
1960 kfree(alg_region); in wm_adsp_free_alg_regions()
1968 struct wm_adsp_alg_region *alg_region; in wm_adsp1_setup_algs() local
1995 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, in wm_adsp1_setup_algs()
1997 if (IS_ERR(alg_region)) in wm_adsp1_setup_algs()
1998 return PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2000 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, in wm_adsp1_setup_algs()
2002 if (IS_ERR(alg_region)) in wm_adsp1_setup_algs()
2003 return PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2022 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, in wm_adsp1_setup_algs()
2025 if (IS_ERR(alg_region)) { in wm_adsp1_setup_algs()
2026 ret = PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2034 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp1_setup_algs()
2043 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, in wm_adsp1_setup_algs()
2046 if (IS_ERR(alg_region)) { in wm_adsp1_setup_algs()
2047 ret = PTR_ERR(alg_region); in wm_adsp1_setup_algs()
2055 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp1_setup_algs()
2074 struct wm_adsp_alg_region *alg_region; in wm_adsp2_setup_algs() local
2102 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, in wm_adsp2_setup_algs()
2104 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2105 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2107 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, in wm_adsp2_setup_algs()
2109 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2110 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2112 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, in wm_adsp2_setup_algs()
2114 if (IS_ERR(alg_region)) in wm_adsp2_setup_algs()
2115 return PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2136 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, in wm_adsp2_setup_algs()
2139 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2140 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2148 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2157 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, in wm_adsp2_setup_algs()
2160 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2161 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2169 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2178 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, in wm_adsp2_setup_algs()
2181 if (IS_ERR(alg_region)) { in wm_adsp2_setup_algs()
2182 ret = PTR_ERR(alg_region); in wm_adsp2_setup_algs()
2190 wm_adsp_create_control(dsp, alg_region, 0, in wm_adsp2_setup_algs()
2213 struct wm_adsp_alg_region *alg_region; in wm_adsp_load_coeff() local
2321 alg_region = wm_adsp_find_alg_region(dsp, type, in wm_adsp_load_coeff()
2323 if (alg_region) { in wm_adsp_load_coeff()
2324 reg = alg_region->base; in wm_adsp_load_coeff()
3230 struct wm_adsp_alg_region *alg_region; in wm_adsp_legacy_host_buf_addr() local
3235 alg_region = wm_adsp_find_alg_region(dsp, WMFW_ADSP2_XM, dsp->fw_id); in wm_adsp_legacy_host_buf_addr()
3238 addr = alg_region->base + xmalg + ALG_XM_FIELD(magic); in wm_adsp_legacy_host_buf_addr()
3246 addr = alg_region->base + xmalg + ALG_XM_FIELD(host_buf_ptr); in wm_adsp_legacy_host_buf_addr()