Lines Matching full:ue
1238 struct user_element *ue = kcontrol->private_data; in snd_ctl_elem_user_info() local
1242 *uinfo = ue->info; in snd_ctl_elem_user_info()
1251 struct user_element *ue = kcontrol->private_data; in snd_ctl_elem_user_enum_info() local
1259 *uinfo = ue->info; in snd_ctl_elem_user_enum_info()
1265 names = ue->priv_data; in snd_ctl_elem_user_enum_info()
1276 struct user_element *ue = kcontrol->private_data; in snd_ctl_elem_user_get() local
1277 unsigned int size = ue->elem_data_size; in snd_ctl_elem_user_get()
1278 char *src = ue->elem_data + in snd_ctl_elem_user_get()
1289 struct user_element *ue = kcontrol->private_data; in snd_ctl_elem_user_put() local
1290 unsigned int size = ue->elem_data_size; in snd_ctl_elem_user_put()
1291 char *dst = ue->elem_data + in snd_ctl_elem_user_put()
1303 struct user_element *ue = kctl->private_data; in replace_user_tlv() local
1317 change = ue->tlv_data_size != size; in replace_user_tlv()
1319 change = memcmp(ue->tlv_data, container, size) != 0; in replace_user_tlv()
1325 if (ue->tlv_data == NULL) { in replace_user_tlv()
1332 kvfree(ue->tlv_data); in replace_user_tlv()
1333 ue->tlv_data = container; in replace_user_tlv()
1334 ue->tlv_data_size = size; in replace_user_tlv()
1339 snd_ctl_notify(ue->card, mask, &id); in replace_user_tlv()
1348 struct user_element *ue = kctl->private_data; in read_user_tlv() local
1350 if (ue->tlv_data_size == 0 || ue->tlv_data == NULL) in read_user_tlv()
1353 if (size < ue->tlv_data_size) in read_user_tlv()
1356 if (copy_to_user(buf, ue->tlv_data, ue->tlv_data_size)) in read_user_tlv()
1371 static int snd_ctl_elem_init_enum_names(struct user_element *ue) in snd_ctl_elem_init_enum_names() argument
1376 const uintptr_t user_ptrval = ue->info.value.enumerated.names_ptr; in snd_ctl_elem_init_enum_names()
1378 if (ue->info.value.enumerated.names_length > 64 * 1024) in snd_ctl_elem_init_enum_names()
1382 ue->info.value.enumerated.names_length); in snd_ctl_elem_init_enum_names()
1387 buf_len = ue->info.value.enumerated.names_length; in snd_ctl_elem_init_enum_names()
1389 for (i = 0; i < ue->info.value.enumerated.items; ++i) { in snd_ctl_elem_init_enum_names()
1399 ue->priv_data = names; in snd_ctl_elem_init_enum_names()
1400 ue->info.value.enumerated.names_ptr = 0; in snd_ctl_elem_init_enum_names()
1407 struct user_element *ue = kcontrol->private_data; in snd_ctl_elem_user_free() local
1409 kvfree(ue->tlv_data); in snd_ctl_elem_user_free()
1410 kvfree(ue->priv_data); in snd_ctl_elem_user_free()
1411 kfree(ue); in snd_ctl_elem_user_free()
1422 struct user_element *ue; in snd_ctl_elem_add() local
1496 ue = (struct user_element *)kctl->private_data; in snd_ctl_elem_add()
1497 ue->card = card; in snd_ctl_elem_add()
1498 ue->info = *info; in snd_ctl_elem_add()
1499 ue->info.access = 0; in snd_ctl_elem_add()
1500 ue->elem_data = (char *)ue + sizeof(*ue); in snd_ctl_elem_add()
1501 ue->elem_data_size = private_size; in snd_ctl_elem_add()
1502 if (ue->info.type == SNDRV_CTL_ELEM_TYPE_ENUMERATED) { in snd_ctl_elem_add()
1503 err = snd_ctl_elem_init_enum_names(ue); in snd_ctl_elem_add()