Lines Matching refs:vd
130 if (control->vd[idx].owner == ctl) in snd_ctl_release()
131 control->vd[idx].owner = NULL; in snd_ctl_release()
241 *kctl = kzalloc(struct_size(*kctl, vd, count), GFP_KERNEL); in snd_ctl_new()
246 (*kctl)->vd[idx].access = access; in snd_ctl_new()
247 (*kctl)->vd[idx].owner = file; in snd_ctl_new()
678 if (!(kctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_USER)) { in snd_ctl_remove_user_ctl()
683 if (kctl->vd[idx].owner != NULL && kctl->vd[idx].owner != file) { in snd_ctl_remove_user_ctl()
709 struct snd_kcontrol_volatile *vd; in snd_ctl_activate_id() local
720 vd = &kctl->vd[index_offset]; in snd_ctl_activate_id()
723 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_INACTIVE)) in snd_ctl_activate_id()
725 vd->access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; in snd_ctl_activate_id()
727 if (vd->access & SNDRV_CTL_ELEM_ACCESS_INACTIVE) in snd_ctl_activate_id()
729 vd->access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; in snd_ctl_activate_id()
1204 struct snd_kcontrol_volatile *vd; in __snd_ctl_elem_info() local
1218 vd = &kctl->vd[index_offset]; in __snd_ctl_elem_info()
1220 info->access = vd->access; in __snd_ctl_elem_info()
1221 if (vd->owner) { in __snd_ctl_elem_info()
1223 if (vd->owner == ctl) in __snd_ctl_elem_info()
1225 info->owner = pid_vnr(vd->owner->pid); in __snd_ctl_elem_info()
1276 struct snd_kcontrol_volatile *vd; in snd_ctl_elem_read() local
1290 vd = &kctl->vd[index_offset]; in snd_ctl_elem_read()
1291 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_READ) || kctl->get == NULL) { in snd_ctl_elem_read()
1355 struct snd_kcontrol_volatile *vd; in snd_ctl_elem_write() local
1367 vd = &kctl->vd[index_offset]; in snd_ctl_elem_write()
1368 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_WRITE) || kctl->put == NULL || in snd_ctl_elem_write()
1369 (file && vd->owner && vd->owner != file)) { in snd_ctl_elem_write()
1435 struct snd_kcontrol_volatile *vd; in snd_ctl_elem_lock() local
1445 vd = &kctl->vd[snd_ctl_get_ioff(kctl, &id)]; in snd_ctl_elem_lock()
1446 if (vd->owner != NULL) in snd_ctl_elem_lock()
1449 vd->owner = file; in snd_ctl_elem_lock()
1463 struct snd_kcontrol_volatile *vd; in snd_ctl_elem_unlock() local
1473 vd = &kctl->vd[snd_ctl_get_ioff(kctl, &id)]; in snd_ctl_elem_unlock()
1474 if (vd->owner == NULL) in snd_ctl_elem_unlock()
1476 else if (vd->owner != file) in snd_ctl_elem_unlock()
1479 vd->owner = NULL; in snd_ctl_elem_unlock()
1602 kctl->vd[i].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; in replace_user_tlv()
1903 struct snd_kcontrol_volatile *vd = &kctl->vd[snd_ctl_get_ioff(kctl, id)]; in call_tlv_handler() local
1908 if (op_flag == pairs[i].op && (vd->access & pairs[i].perm)) in call_tlv_handler()
1919 vd->owner != NULL && vd->owner != file) in call_tlv_handler()
1932 struct snd_kcontrol_volatile *vd = &kctl->vd[snd_ctl_get_ioff(kctl, id)]; in read_tlv_buf() local
1935 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_TLV_READ)) in read_tlv_buf()
1960 struct snd_kcontrol_volatile *vd; in snd_ctl_tlv_ioctl() local
1984 vd = &kctl->vd[snd_ctl_get_ioff(kctl, &id)]; in snd_ctl_tlv_ioctl()
1986 if (vd->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) { in snd_ctl_tlv_ioctl()