Lines Matching refs:id
156 struct snd_ctl_elem_id *id) in snd_ctl_notify() argument
162 if (snd_BUG_ON(!card || !id)) in snd_ctl_notify()
175 if (ev->id.numid == id->numid) { in snd_ctl_notify()
182 ev->id = *id; in snd_ctl_notify()
276 kctl->id.iface = ncontrol->iface; in snd_ctl_new1()
277 kctl->id.device = ncontrol->device; in snd_ctl_new1()
278 kctl->id.subdevice = ncontrol->subdevice; in snd_ctl_new1()
280 strlcpy(kctl->id.name, ncontrol->name, sizeof(kctl->id.name)); in snd_ctl_new1()
281 if (strcmp(ncontrol->name, kctl->id.name) != 0) in snd_ctl_new1()
283 ncontrol->name, kctl->id.name); in snd_ctl_new1()
285 kctl->id.index = ncontrol->index; in snd_ctl_new1()
327 if (kctl->id.numid < card->last_numid + 1 + count && in snd_ctl_remove_numid_conflict()
328 kctl->id.numid + kctl->count > card->last_numid + 1) { in snd_ctl_remove_numid_conflict()
329 card->last_numid = kctl->id.numid + kctl->count - 1; in snd_ctl_remove_numid_conflict()
353 struct snd_ctl_elem_id id; in __snd_ctl_add() local
357 id = kcontrol->id; in __snd_ctl_add()
358 if (id.index > UINT_MAX - kcontrol->count) in __snd_ctl_add()
361 if (snd_ctl_find_id(card, &id)) { in __snd_ctl_add()
364 id.iface, id.device, id.subdevice, id.name, id.index); in __snd_ctl_add()
373 kcontrol->id.numid = card->last_numid + 1; in __snd_ctl_add()
376 id = kcontrol->id; in __snd_ctl_add()
378 for (idx = 0; idx < count; idx++, id.index++, id.numid++) in __snd_ctl_add()
379 snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_ADD, &id); in __snd_ctl_add()
437 struct snd_ctl_elem_id id; in snd_ctl_replace() local
449 id = kcontrol->id; in snd_ctl_replace()
451 old = snd_ctl_find_id(card, &id); in snd_ctl_replace()
472 kcontrol->id.numid = card->last_numid + 1; in snd_ctl_replace()
474 id = kcontrol->id; in snd_ctl_replace()
477 for (idx = 0; idx < count; idx++, id.index++, id.numid++) in snd_ctl_replace()
478 snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_ADD, &id); in snd_ctl_replace()
500 struct snd_ctl_elem_id id; in snd_ctl_remove() local
507 id = kcontrol->id; in snd_ctl_remove()
508 for (idx = 0; idx < kcontrol->count; idx++, id.index++, id.numid++) in snd_ctl_remove()
509 snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_REMOVE, &id); in snd_ctl_remove()
525 int snd_ctl_remove_id(struct snd_card *card, struct snd_ctl_elem_id *id) in snd_ctl_remove_id() argument
531 kctl = snd_ctl_find_id(card, id); in snd_ctl_remove_id()
553 struct snd_ctl_elem_id *id) in snd_ctl_remove_user_ctl() argument
560 kctl = snd_ctl_find_id(card, id); in snd_ctl_remove_user_ctl()
595 int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, in snd_ctl_activate_id() argument
604 kctl = snd_ctl_find_id(card, id); in snd_ctl_activate_id()
609 index_offset = snd_ctl_get_ioff(kctl, id); in snd_ctl_activate_id()
621 snd_ctl_build_ioff(id, kctl, index_offset); in snd_ctl_activate_id()
626 snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_INFO, id); in snd_ctl_activate_id()
653 kctl->id = *dst_id; in snd_ctl_rename_id()
654 kctl->id.numid = card->last_numid + 1; in snd_ctl_rename_id()
681 if (kctl->id.numid <= numid && kctl->id.numid + kctl->count > numid) in snd_ctl_find_numid()
702 struct snd_ctl_elem_id *id) in snd_ctl_find_id() argument
706 if (snd_BUG_ON(!card || !id)) in snd_ctl_find_id()
708 if (id->numid != 0) in snd_ctl_find_id()
709 return snd_ctl_find_numid(card, id->numid); in snd_ctl_find_id()
711 if (kctl->id.iface != id->iface) in snd_ctl_find_id()
713 if (kctl->id.device != id->device) in snd_ctl_find_id()
715 if (kctl->id.subdevice != id->subdevice) in snd_ctl_find_id()
717 if (strncmp(kctl->id.name, id->name, sizeof(kctl->id.name))) in snd_ctl_find_id()
719 if (kctl->id.index > id->index) in snd_ctl_find_id()
721 if (kctl->id.index + kctl->count <= id->index) in snd_ctl_find_id()
739 strlcpy(info->id, card->id, sizeof(info->id)); in snd_ctl_card_info()
759 struct snd_ctl_elem_id id; in snd_ctl_elem_list() local
778 snd_ctl_build_ioff(&id, kctl, jidx); in snd_ctl_elem_list()
779 if (copy_to_user(list.pids + list.used, &id, in snd_ctl_elem_list()
780 sizeof(id))) { in snd_ctl_elem_list()
838 kctl = snd_ctl_find_id(card, &info->id); in snd_ctl_elem_info()
849 index_offset = snd_ctl_get_ioff(kctl, &info->id); in snd_ctl_elem_info()
851 snd_ctl_build_ioff(&info->id, kctl, index_offset); in snd_ctl_elem_info()
892 kctl = snd_ctl_find_id(card, &control->id); in snd_ctl_elem_read()
896 index_offset = snd_ctl_get_ioff(kctl, &control->id); in snd_ctl_elem_read()
901 snd_ctl_build_ioff(&control->id, kctl, index_offset); in snd_ctl_elem_read()
940 kctl = snd_ctl_find_id(card, &control->id); in snd_ctl_elem_write()
944 index_offset = snd_ctl_get_ioff(kctl, &control->id); in snd_ctl_elem_write()
951 snd_ctl_build_ioff(&control->id, kctl, index_offset); in snd_ctl_elem_write()
957 struct snd_ctl_elem_id id = control->id; in snd_ctl_elem_write() local
958 snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &id); in snd_ctl_elem_write()
997 struct snd_ctl_elem_id id; in snd_ctl_elem_lock() local
1002 if (copy_from_user(&id, _id, sizeof(id))) in snd_ctl_elem_lock()
1005 kctl = snd_ctl_find_id(card, &id); in snd_ctl_elem_lock()
1009 vd = &kctl->vd[snd_ctl_get_ioff(kctl, &id)]; in snd_ctl_elem_lock()
1025 struct snd_ctl_elem_id id; in snd_ctl_elem_unlock() local
1030 if (copy_from_user(&id, _id, sizeof(id))) in snd_ctl_elem_unlock()
1033 kctl = snd_ctl_find_id(card, &id); in snd_ctl_elem_unlock()
1037 vd = &kctl->vd[snd_ctl_get_ioff(kctl, &id)]; in snd_ctl_elem_unlock()
1067 offset = snd_ctl_get_ioff(kcontrol, &uinfo->id); in snd_ctl_elem_user_info()
1069 snd_ctl_build_ioff(&uinfo->id, kcontrol, offset); in snd_ctl_elem_user_info()
1084 offset = snd_ctl_get_ioff(kcontrol, &uinfo->id); in snd_ctl_elem_user_enum_info()
1086 snd_ctl_build_ioff(&uinfo->id, kcontrol, offset); in snd_ctl_elem_user_enum_info()
1105 snd_ctl_get_ioff(kcontrol, &ucontrol->id) * size; in snd_ctl_elem_user_get()
1118 snd_ctl_get_ioff(kcontrol, &ucontrol->id) * size; in snd_ctl_elem_user_put()
1131 struct snd_ctl_elem_id id; in replace_user_tlv() local
1164 snd_ctl_build_ioff(&id, kctl, i); in replace_user_tlv()
1165 snd_ctl_notify(ue->card, mask, &id); in replace_user_tlv()
1269 if (!*info->id.name) in snd_ctl_elem_add()
1271 if (strnlen(info->id.name, sizeof(info->id.name)) >= sizeof(info->id.name)) in snd_ctl_elem_add()
1276 info->id.numid = 0; in snd_ctl_elem_add()
1277 err = snd_ctl_remove_user_ctl(file, &info->id); in snd_ctl_elem_add()
1333 memcpy(&kctl->id, &info->id, sizeof(kctl->id)); in snd_ctl_elem_add()
1376 offset = snd_ctl_get_ioff(kctl, &info->id); in snd_ctl_elem_add()
1377 snd_ctl_build_ioff(&info->id, kctl, offset); in snd_ctl_elem_add()
1405 snd_ctl_remove_user_ctl(file, &info.id); in snd_ctl_elem_add_user()
1415 struct snd_ctl_elem_id id; in snd_ctl_elem_remove() local
1417 if (copy_from_user(&id, _id, sizeof(id))) in snd_ctl_elem_remove()
1419 return snd_ctl_remove_user_ctl(file, &id); in snd_ctl_elem_remove()
1445 struct snd_ctl_elem_id *id, in call_tlv_handler() argument
1456 struct snd_kcontrol_volatile *vd = &kctl->vd[snd_ctl_get_ioff(kctl, id)]; in call_tlv_handler()
1478 static int read_tlv_buf(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id, in read_tlv_buf() argument
1481 struct snd_kcontrol_volatile *vd = &kctl->vd[snd_ctl_get_ioff(kctl, id)]; in read_tlv_buf()
1508 struct snd_ctl_elem_id id; in snd_ctl_tlv_ioctl() local
1529 id = kctl->id; in snd_ctl_tlv_ioctl()
1530 snd_ctl_build_ioff(&id, kctl, header.numid - id.numid); in snd_ctl_tlv_ioctl()
1531 vd = &kctl->vd[snd_ctl_get_ioff(kctl, &id)]; in snd_ctl_tlv_ioctl()
1534 return call_tlv_handler(file, op_flag, kctl, &id, container, in snd_ctl_tlv_ioctl()
1538 return read_tlv_buf(kctl, &id, container, in snd_ctl_tlv_ioctl()
1661 ev.data.elem.id = kev->id; in snd_ctl_read()