Lines Matching refs:cptr

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