Lines Matching refs:control
113 struct snd_kcontrol *control; in snd_ctl_release() local
124 list_for_each_entry(control, &card->controls, list) in snd_ctl_release()
125 for (idx = 0; idx < control->count; idx++) in snd_ctl_release()
126 if (control->vd[idx].owner == ctl) in snd_ctl_release()
127 control->vd[idx].owner = NULL; in snd_ctl_release()
996 static void fill_remaining_elem_value(struct snd_ctl_elem_value *control, in fill_remaining_elem_value() argument
1003 memset32((u32 *)control->value.bytes.data + offset, pattern, in fill_remaining_elem_value()
1004 sizeof(control->value) / sizeof(u32) - offset); in fill_remaining_elem_value()
1009 const struct snd_ctl_elem_value *control, in sanity_check_int_value() argument
1019 lval = control->value.integer.value[i]; in sanity_check_int_value()
1025 lval = control->value.integer.value[i]; in sanity_check_int_value()
1031 lval = control->value.integer64.value[i]; in sanity_check_int_value()
1037 lval = control->value.enumerated.item[i]; in sanity_check_int_value()
1048 control->id.iface, control->id.device, in sanity_check_int_value()
1049 control->id.subdevice, control->id.name, in sanity_check_int_value()
1050 control->id.index, lval, lmin, lmax, i); in sanity_check_int_value()
1059 control->id.iface, control->id.device, in sanity_check_int_value()
1060 control->id.subdevice, control->id.name, in sanity_check_int_value()
1061 control->id.index, lval, lstep, i); in sanity_check_int_value()
1071 const struct snd_ctl_elem_value *control, in sanity_check_input_values() argument
1083 ret = sanity_check_int_value(card, control, info, i, in sanity_check_input_values()
1098 const struct snd_ctl_elem_value *control, in sanity_check_elem_value() argument
1106 ret = sanity_check_input_values(card, control, info, true); in sanity_check_elem_value()
1113 p = (u32 *)control->value.bytes.data + offset; in sanity_check_elem_value()
1114 for (; offset < sizeof(control->value) / sizeof(u32); offset++, p++) { in sanity_check_elem_value()
1197 struct snd_ctl_elem_value *control) in snd_ctl_elem_read() argument
1207 kctl = snd_ctl_find_id(card, &control->id); in snd_ctl_elem_read()
1211 index_offset = snd_ctl_get_ioff(kctl, &control->id); in snd_ctl_elem_read()
1216 snd_ctl_build_ioff(&control->id, kctl, index_offset); in snd_ctl_elem_read()
1221 info.id = control->id; in snd_ctl_elem_read()
1228 fill_remaining_elem_value(control, &info, pattern); in snd_ctl_elem_read()
1229 ret = kctl->get(kctl, control); in snd_ctl_elem_read()
1233 sanity_check_elem_value(card, control, &info, pattern) < 0) { in snd_ctl_elem_read()
1236 control->id.iface, control->id.device, in snd_ctl_elem_read()
1237 control->id.subdevice, control->id.name, in snd_ctl_elem_read()
1238 control->id.index); in snd_ctl_elem_read()
1247 struct snd_ctl_elem_value *control __free(kfree) = NULL; in snd_ctl_elem_read_user()
1250 control = memdup_user(_control, sizeof(*control)); in snd_ctl_elem_read_user()
1251 if (IS_ERR(control)) in snd_ctl_elem_read_user()
1252 return PTR_ERR(control); in snd_ctl_elem_read_user()
1257 result = snd_ctl_elem_read(card, control); in snd_ctl_elem_read_user()
1262 if (copy_to_user(_control, control, sizeof(*control))) in snd_ctl_elem_read_user()
1268 struct snd_ctl_elem_value *control) in snd_ctl_elem_write() argument
1276 kctl = snd_ctl_find_id(card, &control->id); in snd_ctl_elem_write()
1282 index_offset = snd_ctl_get_ioff(kctl, &control->id); in snd_ctl_elem_write()
1290 snd_ctl_build_ioff(&control->id, kctl, index_offset); in snd_ctl_elem_write()
1296 info.id = control->id; in snd_ctl_elem_write()
1299 result = sanity_check_input_values(card, control, &info, in snd_ctl_elem_write()
1303 result = kctl->put(kctl, control); in snd_ctl_elem_write()
1323 struct snd_ctl_elem_value *control __free(kfree) = NULL; in snd_ctl_elem_write_user()
1327 control = memdup_user(_control, sizeof(*control)); in snd_ctl_elem_write_user()
1328 if (IS_ERR(control)) in snd_ctl_elem_write_user()
1329 return PTR_ERR(control); in snd_ctl_elem_write_user()
1335 result = snd_ctl_elem_write(card, file, control); in snd_ctl_elem_write_user()
1340 if (copy_to_user(_control, control, sizeof(*control))) in snd_ctl_elem_write_user()
2329 struct snd_kcontrol *control; in snd_ctl_dev_free() local
2333 control = snd_kcontrol(card->controls.next); in snd_ctl_dev_free()
2334 __snd_ctl_remove(card, control, false); in snd_ctl_dev_free()