Lines Matching refs:cdata
70 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_refresh_control() local
87 cdata->data->magic = SOF_ABI_MAGIC; in snd_sof_refresh_control()
88 cdata->data->abi = SOF_ABI_VERSION; in snd_sof_refresh_control()
108 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_volume_get() local
116 ipc_to_mixer(cdata->chanv[i].value, in snd_sof_volume_get()
129 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_volume_put() local
138 change = change || (value != cdata->chanv[i].value); in snd_sof_volume_put()
139 cdata->chanv[i].channel = i; in snd_sof_volume_put()
140 cdata->chanv[i].value = value; in snd_sof_volume_put()
181 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_switch_get() local
188 ucontrol->value.integer.value[i] = cdata->chanv[i].value; in snd_sof_switch_get()
200 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_switch_put() local
208 change = change || (value != cdata->chanv[i].value); in snd_sof_switch_put()
209 cdata->chanv[i].channel = i; in snd_sof_switch_put()
210 cdata->chanv[i].value = value; in snd_sof_switch_put()
233 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_enum_get() local
240 ucontrol->value.enumerated.item[i] = cdata->chanv[i].value; in snd_sof_enum_get()
252 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_enum_put() local
260 change = change || (value != cdata->chanv[i].value); in snd_sof_enum_put()
261 cdata->chanv[i].channel = i; in snd_sof_enum_put()
262 cdata->chanv[i].value = value; in snd_sof_enum_put()
283 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_bytes_get() local
284 struct sof_abi_hdr *data = cdata->data; in snd_sof_bytes_get()
319 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_bytes_put() local
320 struct sof_abi_hdr *data = cdata->data; in snd_sof_bytes_put()
362 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_bytes_ext_put() local
401 if (copy_from_user(cdata->data, tlvd->tlv, header.length)) in snd_sof_bytes_ext_put()
404 if (cdata->data->magic != SOF_ABI_MAGIC) { in snd_sof_bytes_ext_put()
407 cdata->data->magic); in snd_sof_bytes_ext_put()
411 if (SOF_ABI_VERSION_INCOMPATIBLE(SOF_ABI_VERSION, cdata->data->abi)) { in snd_sof_bytes_ext_put()
413 cdata->data->abi); in snd_sof_bytes_ext_put()
418 if (cdata->data->size > be->max - sizeof(struct sof_abi_hdr)) { in snd_sof_bytes_ext_put()
440 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_bytes_ext_volatile_get() local
463 cdata->data->magic = SOF_ABI_MAGIC; in snd_sof_bytes_ext_volatile_get()
464 cdata->data->abi = SOF_ABI_VERSION; in snd_sof_bytes_ext_volatile_get()
472 if (cdata->data->size > be->max - sizeof(struct sof_abi_hdr)) { in snd_sof_bytes_ext_volatile_get()
474 cdata->data->size, in snd_sof_bytes_ext_volatile_get()
480 data_size = cdata->data->size + sizeof(struct sof_abi_hdr); in snd_sof_bytes_ext_volatile_get()
495 if (copy_to_user(tlvd->tlv, cdata->data, data_size)) in snd_sof_bytes_ext_volatile_get()
514 struct sof_ipc_ctrl_data *cdata = scontrol->control_data; in snd_sof_bytes_ext_get() local
531 cdata->data->magic = SOF_ABI_MAGIC; in snd_sof_bytes_ext_get()
532 cdata->data->abi = SOF_ABI_VERSION; in snd_sof_bytes_ext_get()
535 if (cdata->data->size > be->max - sizeof(struct sof_abi_hdr)) { in snd_sof_bytes_ext_get()
537 cdata->data->size, in snd_sof_bytes_ext_get()
542 data_size = cdata->data->size + sizeof(struct sof_abi_hdr); in snd_sof_bytes_ext_get()
553 if (copy_to_user(tlvd->tlv, cdata->data, data_size)) in snd_sof_bytes_ext_get()
560 struct sof_ipc_ctrl_data *cdata) in snd_sof_update_control() argument
568 if (cdata->cmd == SOF_CTRL_CMD_BINARY) { in snd_sof_update_control()
569 if (cdata->num_elems != local_cdata->data->size) { in snd_sof_update_control()
572 cdata->num_elems, local_cdata->data->size); in snd_sof_update_control()
577 memcpy(local_cdata->data, cdata->data, cdata->num_elems); in snd_sof_update_control()
578 } else if (cdata->num_elems != scontrol->num_channels) { in snd_sof_update_control()
581 cdata->num_elems, scontrol->num_channels); in snd_sof_update_control()
584 for (i = 0; i < cdata->num_elems; i++) in snd_sof_update_control()
585 local_cdata->chanv[i].value = cdata->chanv[i].value; in snd_sof_update_control()
590 struct sof_ipc_ctrl_data *cdata) in snd_sof_control_notify() argument
605 if (swidget->comp_id == cdata->comp_id) { in snd_sof_control_notify()
615 switch (cdata->cmd) { in snd_sof_control_notify()
627 dev_err(sdev->dev, "error: unknown cmd %u\n", cdata->cmd); in snd_sof_control_notify()
635 widget->kcontrol_news[i].index == cdata->index) { in snd_sof_control_notify()
644 switch (cdata->cmd) { in snd_sof_control_notify()
663 switch (cdata->type) { in snd_sof_control_notify()
666 expected_size += cdata->num_elems * in snd_sof_control_notify()
671 expected_size += cdata->num_elems * in snd_sof_control_notify()
676 expected_size += cdata->num_elems + sizeof(struct sof_abi_hdr); in snd_sof_control_notify()
682 if (cdata->rhdr.hdr.size != expected_size) { in snd_sof_control_notify()
687 if (cdata->num_elems) in snd_sof_control_notify()
692 snd_sof_update_control(scontrol, cdata); in snd_sof_control_notify()