Lines Matching refs:cs_ctl

314 	struct cs_dsp_coeff_ctl *cs_ctl;  member
381 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in wm_coeff_info() local
383 switch (cs_ctl->type) { in wm_coeff_info()
393 uinfo->count = cs_ctl->len; in wm_coeff_info()
406 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in wm_coeff_put() local
409 return cs_dsp_coeff_lock_and_write_ctrl(cs_ctl, 0, p, cs_ctl->len); in wm_coeff_put()
418 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in wm_coeff_tlv_put() local
424 return cs_dsp_coeff_lock_and_write_ctrl(cs_ctl, 0, scratch, size); in wm_coeff_tlv_put()
433 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in wm_coeff_put_acked() local
440 mutex_lock(&cs_ctl->dsp->pwr_lock); in wm_coeff_put_acked()
442 if (cs_ctl->enabled) in wm_coeff_put_acked()
443 ret = cs_dsp_coeff_write_acked_control(cs_ctl, val); in wm_coeff_put_acked()
447 mutex_unlock(&cs_ctl->dsp->pwr_lock); in wm_coeff_put_acked()
461 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in wm_coeff_get() local
464 return cs_dsp_coeff_lock_and_read_ctrl(cs_ctl, 0, p, cs_ctl->len); in wm_coeff_get()
473 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in wm_coeff_tlv_get() local
476 mutex_lock(&cs_ctl->dsp->pwr_lock); in wm_coeff_tlv_get()
478 ret = cs_dsp_coeff_read_ctrl(cs_ctl, 0, cs_ctl->cache, size); in wm_coeff_tlv_get()
480 if (!ret && copy_to_user(bytes, cs_ctl->cache, size)) in wm_coeff_tlv_get()
483 mutex_unlock(&cs_ctl->dsp->pwr_lock); in wm_coeff_tlv_get()
539 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in wm_adsp_ctl_work() local
540 struct wm_adsp *dsp = container_of(cs_ctl->dsp, in wm_adsp_ctl_work()
554 kcontrol->access = wmfw_convert_flags(cs_ctl->flags, cs_ctl->len); in wm_adsp_ctl_work()
556 switch (cs_ctl->type) { in wm_adsp_ctl_work()
563 ctl->bytes_ext.max = cs_ctl->len; in wm_adsp_ctl_work()
578 int wm_adsp_control_add(struct cs_dsp_coeff_ctl *cs_ctl) in wm_adsp_control_add() argument
580 struct wm_adsp *dsp = container_of(cs_ctl->dsp, struct wm_adsp, cs_dsp); in wm_adsp_control_add()
587 if (cs_ctl->flags & WMFW_CTL_FLAG_SYS) in wm_adsp_control_add()
590 region_name = cs_dsp_mem_region_name(cs_ctl->alg_region.type); in wm_adsp_control_add()
592 adsp_err(dsp, "Unknown region type: %d\n", cs_ctl->alg_region.type); in wm_adsp_control_add()
601 cs_ctl->alg_region.alg); in wm_adsp_control_add()
606 wm_adsp_fw_text[dsp->fw], cs_ctl->alg_region.alg); in wm_adsp_control_add()
611 wm_adsp_fw_text[dsp->fw], cs_ctl->alg_region.alg); in wm_adsp_control_add()
615 if (cs_ctl->subname) { in wm_adsp_control_add()
623 if (cs_ctl->subname_len > avail) in wm_adsp_control_add()
624 skip = cs_ctl->subname_len - avail; in wm_adsp_control_add()
627 " %.*s", cs_ctl->subname_len - skip, cs_ctl->subname + skip); in wm_adsp_control_add()
633 ctl->cs_ctl = cs_ctl; in wm_adsp_control_add()
641 cs_ctl->priv = ctl; in wm_adsp_control_add()
655 static int wm_adsp_control_add_cb(struct cs_dsp_coeff_ctl *cs_ctl) in wm_adsp_control_add_cb() argument
657 struct wm_adsp *dsp = container_of(cs_ctl->dsp, struct wm_adsp, cs_dsp); in wm_adsp_control_add_cb()
660 return (dsp->control_add)(dsp, cs_ctl); in wm_adsp_control_add_cb()
662 return wm_adsp_control_add(cs_ctl); in wm_adsp_control_add_cb()
665 static void wm_adsp_control_remove(struct cs_dsp_coeff_ctl *cs_ctl) in wm_adsp_control_remove() argument
667 struct wm_coeff_ctl *ctl = cs_ctl->priv; in wm_adsp_control_remove()
678 struct cs_dsp_coeff_ctl *cs_ctl; in wm_adsp_write_ctl() local
682 cs_ctl = cs_dsp_get_ctl(&dsp->cs_dsp, name, type, alg); in wm_adsp_write_ctl()
683 ret = cs_dsp_coeff_write_ctrl(cs_ctl, 0, buf, len); in wm_adsp_write_ctl()
1553 static int wm_adsp_buffer_parse_coeff(struct cs_dsp_coeff_ctl *cs_ctl) in wm_adsp_buffer_parse_coeff() argument
1557 struct wm_adsp *dsp = container_of(cs_ctl->dsp, struct wm_adsp, cs_dsp); in wm_adsp_buffer_parse_coeff()
1562 ret = cs_dsp_coeff_read_ctrl(cs_ctl, 0, &coeff_v1, in wm_adsp_buffer_parse_coeff()
1563 min(cs_ctl->len, sizeof(coeff_v1))); in wm_adsp_buffer_parse_coeff()
1582 buf->host_buf_mem_type = cs_ctl->alg_region.type; in wm_adsp_buffer_parse_coeff()
1593 if (cs_ctl->len == 4) in wm_adsp_buffer_parse_coeff()
1628 struct cs_dsp_coeff_ctl *cs_ctl; in wm_adsp_buffer_init() local
1631 list_for_each_entry(cs_ctl, &dsp->cs_dsp.ctl_list, list) { in wm_adsp_buffer_init()
1632 if (cs_ctl->type != WMFW_CTL_TYPE_HOST_BUFFER) in wm_adsp_buffer_init()
1635 if (!cs_ctl->enabled) in wm_adsp_buffer_init()
1638 ret = wm_adsp_buffer_parse_coeff(cs_ctl); in wm_adsp_buffer_init()