Lines Matching refs:cptr
1193 struct snd_seq_client *cptr; in snd_seq_ioctl_running_mode() local
1197 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_running_mode()
1198 if (cptr == NULL) in snd_seq_ioctl_running_mode()
1217 cptr->convert32 = (info->cpu_mode < sizeof(long)); in snd_seq_ioctl_running_mode()
1219 snd_seq_client_unlock(cptr); in snd_seq_ioctl_running_mode()
1224 static void get_client_info(struct snd_seq_client *cptr, in get_client_info() argument
1227 info->client = cptr->number; in get_client_info()
1230 info->type = cptr->type; in get_client_info()
1231 strcpy(info->name, cptr->name); in get_client_info()
1232 info->filter = cptr->filter; in get_client_info()
1233 info->event_lost = cptr->event_lost; in get_client_info()
1234 memcpy(info->event_filter, cptr->event_filter, 32); in get_client_info()
1235 info->group_filter = cptr->group_filter; in get_client_info()
1236 info->num_ports = cptr->num_ports; in get_client_info()
1238 if (cptr->type == USER_CLIENT) in get_client_info()
1239 info->pid = pid_vnr(cptr->data.user.owner); in get_client_info()
1243 if (cptr->type == KERNEL_CLIENT) in get_client_info()
1244 info->card = cptr->data.kernel.card ? cptr->data.kernel.card->number : -1; in get_client_info()
1248 info->midi_version = cptr->midi_version; in get_client_info()
1256 struct snd_seq_client *cptr; in snd_seq_ioctl_get_client_info() local
1259 cptr = snd_seq_client_use_ptr(client_info->client); in snd_seq_ioctl_get_client_info()
1260 if (cptr == NULL) in snd_seq_ioctl_get_client_info()
1263 get_client_info(cptr, client_info); in snd_seq_ioctl_get_client_info()
1264 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_client_info()
1385 struct snd_seq_client *cptr; in snd_seq_ioctl_get_port_info() local
1388 cptr = snd_seq_client_use_ptr(info->addr.client); in snd_seq_ioctl_get_port_info()
1389 if (cptr == NULL) in snd_seq_ioctl_get_port_info()
1392 port = snd_seq_port_use_ptr(cptr, info->addr.port); in snd_seq_ioctl_get_port_info()
1394 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_port_info()
1401 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_port_info()
1854 struct snd_seq_client *cptr; in snd_seq_ioctl_get_client_pool() local
1856 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_get_client_pool()
1857 if (cptr == NULL) in snd_seq_ioctl_get_client_pool()
1860 info->client = cptr->number; in snd_seq_ioctl_get_client_pool()
1861 info->output_pool = cptr->pool->size; in snd_seq_ioctl_get_client_pool()
1862 info->output_room = cptr->pool->room; in snd_seq_ioctl_get_client_pool()
1864 info->output_free = snd_seq_unused_cells(cptr->pool); in snd_seq_ioctl_get_client_pool()
1865 if (cptr->type == USER_CLIENT) { in snd_seq_ioctl_get_client_pool()
1866 info->input_pool = cptr->data.user.fifo_pool_size; in snd_seq_ioctl_get_client_pool()
1868 info->input_free = snd_seq_fifo_unused_cells(cptr->data.user.fifo); in snd_seq_ioctl_get_client_pool()
1873 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_client_pool()
1985 struct snd_seq_client *cptr = NULL; in snd_seq_ioctl_query_subs() local
1991 cptr = snd_seq_client_use_ptr(subs->root.client); in snd_seq_ioctl_query_subs()
1992 if (!cptr) in snd_seq_ioctl_query_subs()
1994 port = snd_seq_port_use_ptr(cptr, subs->root.port); in snd_seq_ioctl_query_subs()
2036 if (cptr) in snd_seq_ioctl_query_subs()
2037 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_subs()
2050 struct snd_seq_client *cptr = NULL; in snd_seq_ioctl_query_next_client() local
2058 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_query_next_client()
2059 if (cptr) in snd_seq_ioctl_query_next_client()
2062 if (cptr == NULL) in snd_seq_ioctl_query_next_client()
2065 get_client_info(cptr, info); in snd_seq_ioctl_query_next_client()
2066 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_client()
2078 struct snd_seq_client *cptr; in snd_seq_ioctl_query_next_port() local
2081 cptr = snd_seq_client_use_ptr(info->addr.client); in snd_seq_ioctl_query_next_port()
2082 if (cptr == NULL) in snd_seq_ioctl_query_next_port()
2087 port = snd_seq_port_query_nearest(cptr, info); in snd_seq_ioctl_query_next_port()
2089 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_port()
2097 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_port()
2162 struct snd_seq_client *cptr; in snd_seq_ioctl_client_ump_info() local
2178 cptr = snd_seq_client_use_ptr(client); in snd_seq_ioctl_client_ump_info()
2179 if (!cptr) in snd_seq_ioctl_client_ump_info()
2182 mutex_lock(&cptr->ioctl_mutex); in snd_seq_ioctl_client_ump_info()
2183 if (!cptr->midi_version) { in snd_seq_ioctl_client_ump_info()
2189 if (!cptr->ump_info) in snd_seq_ioctl_client_ump_info()
2192 p = cptr->ump_info[type]; in snd_seq_ioctl_client_ump_info()
2202 if (cptr->type != USER_CLIENT) { in snd_seq_ioctl_client_ump_info()
2206 if (!cptr->ump_info) { in snd_seq_ioctl_client_ump_info()
2207 cptr->ump_info = kcalloc(NUM_UMP_INFOS, in snd_seq_ioctl_client_ump_info()
2209 if (!cptr->ump_info) { in snd_seq_ioctl_client_ump_info()
2219 kfree(cptr->ump_info[type]); in snd_seq_ioctl_client_ump_info()
2221 cptr->ump_info[type] = p; in snd_seq_ioctl_client_ump_info()
2225 mutex_unlock(&cptr->ioctl_mutex); in snd_seq_ioctl_client_ump_info()
2226 snd_seq_client_unlock(cptr); in snd_seq_ioctl_client_ump_info()
2431 struct snd_seq_client *cptr; in snd_seq_kernel_client_enqueue() local
2450 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_enqueue()
2451 if (cptr == NULL) in snd_seq_kernel_client_enqueue()
2454 if (!cptr->accept_output) { in snd_seq_kernel_client_enqueue()
2457 mutex_lock(&cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2458 result = snd_seq_client_enqueue_event(cptr, ev, file, blocking, in snd_seq_kernel_client_enqueue()
2460 &cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2461 mutex_unlock(&cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2464 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_enqueue()
2479 struct snd_seq_client *cptr; in snd_seq_kernel_client_dispatch() local
2492 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_dispatch()
2493 if (cptr == NULL) in snd_seq_kernel_client_dispatch()
2496 if (!cptr->accept_output) in snd_seq_kernel_client_dispatch()
2499 result = snd_seq_deliver_event(cptr, ev, atomic, hop); in snd_seq_kernel_client_dispatch()
2501 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_dispatch()
2563 void snd_seq_kernel_client_put(struct snd_seq_client *cptr) in snd_seq_kernel_client_put() argument
2565 if (cptr) in snd_seq_kernel_client_put()
2566 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_put()