Lines Matching refs:cptr
1190 struct snd_seq_client *cptr; in snd_seq_ioctl_running_mode() local
1194 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_running_mode()
1195 if (cptr == NULL) in snd_seq_ioctl_running_mode()
1214 cptr->convert32 = (info->cpu_mode < sizeof(long)); in snd_seq_ioctl_running_mode()
1216 snd_seq_client_unlock(cptr); in snd_seq_ioctl_running_mode()
1221 static void get_client_info(struct snd_seq_client *cptr, in get_client_info() argument
1224 info->client = cptr->number; in get_client_info()
1227 info->type = cptr->type; in get_client_info()
1228 strcpy(info->name, cptr->name); in get_client_info()
1229 info->filter = cptr->filter; in get_client_info()
1230 info->event_lost = cptr->event_lost; in get_client_info()
1231 memcpy(info->event_filter, cptr->event_filter, 32); in get_client_info()
1232 info->group_filter = cptr->group_filter; in get_client_info()
1233 info->num_ports = cptr->num_ports; in get_client_info()
1235 if (cptr->type == USER_CLIENT) in get_client_info()
1236 info->pid = pid_vnr(cptr->data.user.owner); in get_client_info()
1240 if (cptr->type == KERNEL_CLIENT) in get_client_info()
1241 info->card = cptr->data.kernel.card ? cptr->data.kernel.card->number : -1; in get_client_info()
1245 info->midi_version = cptr->midi_version; 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()
1382 struct snd_seq_client *cptr; in snd_seq_ioctl_get_port_info() local
1385 cptr = snd_seq_client_use_ptr(info->addr.client); in snd_seq_ioctl_get_port_info()
1386 if (cptr == NULL) in snd_seq_ioctl_get_port_info()
1389 port = snd_seq_port_use_ptr(cptr, info->addr.port); in snd_seq_ioctl_get_port_info()
1391 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_port_info()
1398 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_port_info()
1851 struct snd_seq_client *cptr; in snd_seq_ioctl_get_client_pool() local
1853 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_get_client_pool()
1854 if (cptr == NULL) in snd_seq_ioctl_get_client_pool()
1857 info->client = cptr->number; in snd_seq_ioctl_get_client_pool()
1858 info->output_pool = cptr->pool->size; in snd_seq_ioctl_get_client_pool()
1859 info->output_room = cptr->pool->room; in snd_seq_ioctl_get_client_pool()
1861 info->output_free = snd_seq_unused_cells(cptr->pool); in snd_seq_ioctl_get_client_pool()
1862 if (cptr->type == USER_CLIENT) { in snd_seq_ioctl_get_client_pool()
1863 info->input_pool = cptr->data.user.fifo_pool_size; in snd_seq_ioctl_get_client_pool()
1865 info->input_free = snd_seq_fifo_unused_cells(cptr->data.user.fifo); in snd_seq_ioctl_get_client_pool()
1870 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_client_pool()
1982 struct snd_seq_client *cptr = NULL; in snd_seq_ioctl_query_subs() local
1988 cptr = snd_seq_client_use_ptr(subs->root.client); in snd_seq_ioctl_query_subs()
1989 if (!cptr) in snd_seq_ioctl_query_subs()
1991 port = snd_seq_port_use_ptr(cptr, subs->root.port); in snd_seq_ioctl_query_subs()
2033 if (cptr) in snd_seq_ioctl_query_subs()
2034 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_subs()
2047 struct snd_seq_client *cptr = NULL; in snd_seq_ioctl_query_next_client() local
2055 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_query_next_client()
2056 if (cptr) in snd_seq_ioctl_query_next_client()
2059 if (cptr == NULL) in snd_seq_ioctl_query_next_client()
2062 get_client_info(cptr, info); in snd_seq_ioctl_query_next_client()
2063 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_client()
2075 struct snd_seq_client *cptr; in snd_seq_ioctl_query_next_port() local
2078 cptr = snd_seq_client_use_ptr(info->addr.client); in snd_seq_ioctl_query_next_port()
2079 if (cptr == NULL) in snd_seq_ioctl_query_next_port()
2084 port = snd_seq_port_query_nearest(cptr, info); in snd_seq_ioctl_query_next_port()
2086 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_port()
2094 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_port()
2159 struct snd_seq_client *cptr; in snd_seq_ioctl_client_ump_info() local
2175 cptr = snd_seq_client_use_ptr(client); in snd_seq_ioctl_client_ump_info()
2176 if (!cptr) in snd_seq_ioctl_client_ump_info()
2179 mutex_lock(&cptr->ioctl_mutex); in snd_seq_ioctl_client_ump_info()
2180 if (!cptr->midi_version) { in snd_seq_ioctl_client_ump_info()
2186 if (!cptr->ump_info) in snd_seq_ioctl_client_ump_info()
2189 p = cptr->ump_info[type]; in snd_seq_ioctl_client_ump_info()
2199 if (cptr->type != USER_CLIENT) { in snd_seq_ioctl_client_ump_info()
2203 if (!cptr->ump_info) { in snd_seq_ioctl_client_ump_info()
2204 cptr->ump_info = kcalloc(NUM_UMP_INFOS, in snd_seq_ioctl_client_ump_info()
2206 if (!cptr->ump_info) { in snd_seq_ioctl_client_ump_info()
2216 kfree(cptr->ump_info[type]); in snd_seq_ioctl_client_ump_info()
2218 cptr->ump_info[type] = p; in snd_seq_ioctl_client_ump_info()
2222 mutex_unlock(&cptr->ioctl_mutex); in snd_seq_ioctl_client_ump_info()
2223 snd_seq_client_unlock(cptr); in snd_seq_ioctl_client_ump_info()
2428 struct snd_seq_client *cptr; in snd_seq_kernel_client_enqueue() local
2447 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_enqueue()
2448 if (cptr == NULL) in snd_seq_kernel_client_enqueue()
2451 if (!cptr->accept_output) { in snd_seq_kernel_client_enqueue()
2454 mutex_lock(&cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2455 result = snd_seq_client_enqueue_event(cptr, ev, file, blocking, in snd_seq_kernel_client_enqueue()
2457 &cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2458 mutex_unlock(&cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2461 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_enqueue()
2476 struct snd_seq_client *cptr; in snd_seq_kernel_client_dispatch() local
2489 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_dispatch()
2490 if (cptr == NULL) in snd_seq_kernel_client_dispatch()
2493 if (!cptr->accept_output) in snd_seq_kernel_client_dispatch()
2496 result = snd_seq_deliver_event(cptr, ev, atomic, hop); in snd_seq_kernel_client_dispatch()
2498 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_dispatch()
2560 void snd_seq_kernel_client_put(struct snd_seq_client *cptr) in snd_seq_kernel_client_put() argument
2562 if (cptr) in snd_seq_kernel_client_put()
2563 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_put()