Lines Matching refs:vd
127 if (control->vd[idx].owner == ctl) in snd_ctl_release()
128 control->vd[idx].owner = NULL; in snd_ctl_release()
238 *kctl = kzalloc(struct_size(*kctl, vd, count), GFP_KERNEL); in snd_ctl_new()
243 (*kctl)->vd[idx].access = access; in snd_ctl_new()
244 (*kctl)->vd[idx].owner = file; in snd_ctl_new()
659 if (!(kctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_USER)) { in snd_ctl_remove_user_ctl()
664 if (kctl->vd[idx].owner != NULL && kctl->vd[idx].owner != file) { in snd_ctl_remove_user_ctl()
690 struct snd_kcontrol_volatile *vd; in snd_ctl_activate_id() local
701 vd = &kctl->vd[index_offset]; in snd_ctl_activate_id()
704 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_INACTIVE)) in snd_ctl_activate_id()
706 vd->access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; in snd_ctl_activate_id()
708 if (vd->access & SNDRV_CTL_ELEM_ACCESS_INACTIVE) in snd_ctl_activate_id()
710 vd->access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; in snd_ctl_activate_id()
1128 struct snd_kcontrol_volatile *vd; in __snd_ctl_elem_info() local
1142 vd = &kctl->vd[index_offset]; in __snd_ctl_elem_info()
1144 info->access = vd->access; in __snd_ctl_elem_info()
1145 if (vd->owner) { in __snd_ctl_elem_info()
1147 if (vd->owner == ctl) in __snd_ctl_elem_info()
1149 info->owner = pid_vnr(vd->owner->pid); in __snd_ctl_elem_info()
1200 struct snd_kcontrol_volatile *vd; in snd_ctl_elem_read() local
1214 vd = &kctl->vd[index_offset]; in snd_ctl_elem_read()
1215 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_READ) || kctl->get == NULL) { in snd_ctl_elem_read()
1279 struct snd_kcontrol_volatile *vd; in snd_ctl_elem_write() local
1291 vd = &kctl->vd[index_offset]; in snd_ctl_elem_write()
1292 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_WRITE) || kctl->put == NULL || in snd_ctl_elem_write()
1293 (file && vd->owner && vd->owner != file)) { in snd_ctl_elem_write()
1359 struct snd_kcontrol_volatile *vd; in snd_ctl_elem_lock() local
1369 vd = &kctl->vd[snd_ctl_get_ioff(kctl, &id)]; in snd_ctl_elem_lock()
1370 if (vd->owner != NULL) in snd_ctl_elem_lock()
1373 vd->owner = file; in snd_ctl_elem_lock()
1387 struct snd_kcontrol_volatile *vd; in snd_ctl_elem_unlock() local
1397 vd = &kctl->vd[snd_ctl_get_ioff(kctl, &id)]; in snd_ctl_elem_unlock()
1398 if (vd->owner == NULL) in snd_ctl_elem_unlock()
1400 else if (vd->owner != file) in snd_ctl_elem_unlock()
1403 vd->owner = NULL; in snd_ctl_elem_unlock()
1524 kctl->vd[i].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; in replace_user_tlv()
1823 struct snd_kcontrol_volatile *vd = &kctl->vd[snd_ctl_get_ioff(kctl, id)]; in call_tlv_handler() local
1828 if (op_flag == pairs[i].op && (vd->access & pairs[i].perm)) in call_tlv_handler()
1839 vd->owner != NULL && vd->owner != file) in call_tlv_handler()
1852 struct snd_kcontrol_volatile *vd = &kctl->vd[snd_ctl_get_ioff(kctl, id)]; in read_tlv_buf() local
1855 if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_TLV_READ)) in read_tlv_buf()
1880 struct snd_kcontrol_volatile *vd; in snd_ctl_tlv_ioctl() local
1902 vd = &kctl->vd[snd_ctl_get_ioff(kctl, &id)]; in snd_ctl_tlv_ioctl()
1904 if (vd->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) { in snd_ctl_tlv_ioctl()