Lines Matching refs:cptr
1192 struct snd_seq_client *cptr; in snd_seq_ioctl_running_mode() local
1196 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_running_mode()
1197 if (cptr == NULL) in snd_seq_ioctl_running_mode()
1216 cptr->convert32 = (info->cpu_mode < sizeof(long)); in snd_seq_ioctl_running_mode()
1218 snd_seq_client_unlock(cptr); in snd_seq_ioctl_running_mode()
1223 static void get_client_info(struct snd_seq_client *cptr, in get_client_info() argument
1226 info->client = cptr->number; in get_client_info()
1229 info->type = cptr->type; in get_client_info()
1230 strcpy(info->name, cptr->name); in get_client_info()
1231 info->filter = cptr->filter; in get_client_info()
1232 info->event_lost = cptr->event_lost; in get_client_info()
1233 memcpy(info->event_filter, cptr->event_filter, 32); in get_client_info()
1234 info->num_ports = cptr->num_ports; in get_client_info()
1236 if (cptr->type == USER_CLIENT) in get_client_info()
1237 info->pid = pid_vnr(cptr->data.user.owner); in get_client_info()
1241 if (cptr->type == KERNEL_CLIENT) in get_client_info()
1242 info->card = cptr->data.kernel.card ? cptr->data.kernel.card->number : -1; in get_client_info()
1253 struct snd_seq_client *cptr; in snd_seq_ioctl_get_client_info() local
1256 cptr = snd_seq_client_use_ptr(client_info->client); in snd_seq_ioctl_get_client_info()
1257 if (cptr == NULL) in snd_seq_ioctl_get_client_info()
1260 get_client_info(cptr, client_info); in snd_seq_ioctl_get_client_info()
1261 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_client_info()
1365 struct snd_seq_client *cptr; in snd_seq_ioctl_get_port_info() local
1368 cptr = snd_seq_client_use_ptr(info->addr.client); in snd_seq_ioctl_get_port_info()
1369 if (cptr == NULL) in snd_seq_ioctl_get_port_info()
1372 port = snd_seq_port_use_ptr(cptr, info->addr.port); in snd_seq_ioctl_get_port_info()
1374 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_port_info()
1381 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_port_info()
1834 struct snd_seq_client *cptr; in snd_seq_ioctl_get_client_pool() local
1836 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_get_client_pool()
1837 if (cptr == NULL) in snd_seq_ioctl_get_client_pool()
1840 info->client = cptr->number; in snd_seq_ioctl_get_client_pool()
1841 info->output_pool = cptr->pool->size; in snd_seq_ioctl_get_client_pool()
1842 info->output_room = cptr->pool->room; in snd_seq_ioctl_get_client_pool()
1844 info->output_free = snd_seq_unused_cells(cptr->pool); in snd_seq_ioctl_get_client_pool()
1845 if (cptr->type == USER_CLIENT) { in snd_seq_ioctl_get_client_pool()
1846 info->input_pool = cptr->data.user.fifo_pool_size; in snd_seq_ioctl_get_client_pool()
1848 info->input_free = snd_seq_fifo_unused_cells(cptr->data.user.fifo); in snd_seq_ioctl_get_client_pool()
1853 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_client_pool()
1965 struct snd_seq_client *cptr = NULL; in snd_seq_ioctl_query_subs() local
1971 cptr = snd_seq_client_use_ptr(subs->root.client); in snd_seq_ioctl_query_subs()
1972 if (!cptr) in snd_seq_ioctl_query_subs()
1974 port = snd_seq_port_use_ptr(cptr, subs->root.port); in snd_seq_ioctl_query_subs()
2016 if (cptr) in snd_seq_ioctl_query_subs()
2017 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_subs()
2030 struct snd_seq_client *cptr = NULL; in snd_seq_ioctl_query_next_client() local
2038 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_query_next_client()
2039 if (cptr) in snd_seq_ioctl_query_next_client()
2042 if (cptr == NULL) in snd_seq_ioctl_query_next_client()
2045 get_client_info(cptr, info); in snd_seq_ioctl_query_next_client()
2046 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_client()
2058 struct snd_seq_client *cptr; in snd_seq_ioctl_query_next_port() local
2061 cptr = snd_seq_client_use_ptr(info->addr.client); in snd_seq_ioctl_query_next_port()
2062 if (cptr == NULL) in snd_seq_ioctl_query_next_port()
2067 port = snd_seq_port_query_nearest(cptr, info); in snd_seq_ioctl_query_next_port()
2069 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_port()
2077 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_port()
2271 struct snd_seq_client *cptr; in snd_seq_kernel_client_enqueue() local
2288 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_enqueue()
2289 if (cptr == NULL) in snd_seq_kernel_client_enqueue()
2292 if (!cptr->accept_output) { in snd_seq_kernel_client_enqueue()
2295 mutex_lock(&cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2296 result = snd_seq_client_enqueue_event(cptr, ev, file, blocking, in snd_seq_kernel_client_enqueue()
2298 &cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2299 mutex_unlock(&cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2302 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_enqueue()
2317 struct snd_seq_client *cptr; in snd_seq_kernel_client_dispatch() local
2330 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_dispatch()
2331 if (cptr == NULL) in snd_seq_kernel_client_dispatch()
2334 if (!cptr->accept_output) in snd_seq_kernel_client_dispatch()
2337 result = snd_seq_deliver_event(cptr, ev, atomic, hop); in snd_seq_kernel_client_dispatch()
2339 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_dispatch()