Lines Matching refs:cs_ctl
18 struct cs_dsp_coeff_ctl *cs_ctl; member
41 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in hda_cs_dsp_coeff_info() local
44 uinfo->count = cs_ctl->len; in hda_cs_dsp_coeff_info()
52 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in hda_cs_dsp_coeff_put() local
56 mutex_lock(&cs_ctl->dsp->pwr_lock); in hda_cs_dsp_coeff_put()
57 ret = cs_dsp_coeff_write_ctrl(cs_ctl, 0, p, cs_ctl->len); in hda_cs_dsp_coeff_put()
58 mutex_unlock(&cs_ctl->dsp->pwr_lock); in hda_cs_dsp_coeff_put()
66 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in hda_cs_dsp_coeff_get() local
70 mutex_lock(&cs_ctl->dsp->pwr_lock); in hda_cs_dsp_coeff_get()
71 ret = cs_dsp_coeff_read_ctrl(cs_ctl, 0, p, cs_ctl->len); in hda_cs_dsp_coeff_get()
72 mutex_unlock(&cs_ctl->dsp->pwr_lock); in hda_cs_dsp_coeff_get()
102 struct cs_dsp_coeff_ctl *cs_ctl = ctl->cs_ctl; in hda_cs_dsp_add_kcontrol() local
107 if (cs_ctl->len > ADSP_MAX_STD_CTRL_SIZE) { in hda_cs_dsp_add_kcontrol()
108 dev_err(cs_ctl->dsp->dev, "KControl %s: length %zu exceeds maximum %d\n", name, in hda_cs_dsp_add_kcontrol()
109 cs_ctl->len, ADSP_MAX_STD_CTRL_SIZE); in hda_cs_dsp_add_kcontrol()
116 kcontrol.access = wmfw_convert_flags(cs_ctl->flags); in hda_cs_dsp_add_kcontrol()
128 dev_err(cs_ctl->dsp->dev, "Failed to add KControl %s = %d\n", kcontrol.name, ret); in hda_cs_dsp_add_kcontrol()
132 dev_dbg(cs_ctl->dsp->dev, "Added KControl: %s\n", kcontrol.name); in hda_cs_dsp_add_kcontrol()
136 static void hda_cs_dsp_control_add(struct cs_dsp_coeff_ctl *cs_ctl, in hda_cs_dsp_control_add() argument
139 struct cs_dsp *cs_dsp = cs_ctl->dsp; in hda_cs_dsp_control_add()
145 region_name = cs_dsp_mem_region_name(cs_ctl->alg_region.type); in hda_cs_dsp_control_add()
147 dev_warn(cs_dsp->dev, "Unknown region type: %d\n", cs_ctl->alg_region.type); in hda_cs_dsp_control_add()
152 cs_dsp->name, hda_cs_dsp_fw_text[info->fw_type], cs_ctl->alg_region.alg); in hda_cs_dsp_control_add()
154 if (cs_ctl->subname) { in hda_cs_dsp_control_add()
159 if (cs_ctl->subname_len > avail) in hda_cs_dsp_control_add()
160 skip = cs_ctl->subname_len - avail; in hda_cs_dsp_control_add()
163 " %.*s", cs_ctl->subname_len - skip, cs_ctl->subname + skip); in hda_cs_dsp_control_add()
170 ctl->cs_ctl = cs_ctl; in hda_cs_dsp_control_add()
172 cs_ctl->priv = ctl; in hda_cs_dsp_control_add()
179 struct cs_dsp_coeff_ctl *cs_ctl; in hda_cs_dsp_add_controls() local
190 list_for_each_entry(cs_ctl, &dsp->ctl_list, list) { in hda_cs_dsp_add_controls()
191 if (cs_ctl->flags & WMFW_CTL_FLAG_SYS) in hda_cs_dsp_add_controls()
194 if (cs_ctl->priv) in hda_cs_dsp_add_controls()
197 hda_cs_dsp_control_add(cs_ctl, info); in hda_cs_dsp_add_controls()
202 void hda_cs_dsp_control_remove(struct cs_dsp_coeff_ctl *cs_ctl) in hda_cs_dsp_control_remove() argument
204 struct hda_cs_dsp_coeff_ctl *ctl = cs_ctl->priv; in hda_cs_dsp_control_remove()
213 struct cs_dsp_coeff_ctl *cs_ctl; in hda_cs_dsp_write_ctl() local
218 cs_ctl = cs_dsp_get_ctl(dsp, name, type, alg); in hda_cs_dsp_write_ctl()
219 ret = cs_dsp_coeff_write_ctrl(cs_ctl, 0, buf, len); in hda_cs_dsp_write_ctl()
224 if (cs_ctl->flags & WMFW_CTL_FLAG_SYS) in hda_cs_dsp_write_ctl()
227 ctl = cs_ctl->priv; in hda_cs_dsp_write_ctl()