Lines Matching refs:cptr
1189 struct snd_seq_client *cptr; in snd_seq_ioctl_running_mode() local
1193 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_running_mode()
1194 if (cptr == NULL) in snd_seq_ioctl_running_mode()
1213 cptr->convert32 = (info->cpu_mode < sizeof(long)); in snd_seq_ioctl_running_mode()
1215 snd_seq_client_unlock(cptr); in snd_seq_ioctl_running_mode()
1220 static void get_client_info(struct snd_seq_client *cptr, in get_client_info() argument
1223 info->client = cptr->number; in get_client_info()
1226 info->type = cptr->type; in get_client_info()
1227 strcpy(info->name, cptr->name); in get_client_info()
1228 info->filter = cptr->filter; in get_client_info()
1229 info->event_lost = cptr->event_lost; in get_client_info()
1230 memcpy(info->event_filter, cptr->event_filter, 32); in get_client_info()
1231 info->num_ports = cptr->num_ports; in get_client_info()
1233 if (cptr->type == USER_CLIENT) in get_client_info()
1234 info->pid = pid_vnr(cptr->data.user.owner); in get_client_info()
1238 if (cptr->type == KERNEL_CLIENT) in get_client_info()
1239 info->card = cptr->data.kernel.card ? cptr->data.kernel.card->number : -1; in get_client_info()
1250 struct snd_seq_client *cptr; in snd_seq_ioctl_get_client_info() local
1253 cptr = snd_seq_client_use_ptr(client_info->client); in snd_seq_ioctl_get_client_info()
1254 if (cptr == NULL) in snd_seq_ioctl_get_client_info()
1257 get_client_info(cptr, client_info); in snd_seq_ioctl_get_client_info()
1258 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_client_info()
1361 struct snd_seq_client *cptr; in snd_seq_ioctl_get_port_info() local
1364 cptr = snd_seq_client_use_ptr(info->addr.client); in snd_seq_ioctl_get_port_info()
1365 if (cptr == NULL) in snd_seq_ioctl_get_port_info()
1368 port = snd_seq_port_use_ptr(cptr, info->addr.port); in snd_seq_ioctl_get_port_info()
1370 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_port_info()
1377 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_port_info()
1822 struct snd_seq_client *cptr; in snd_seq_ioctl_get_client_pool() local
1824 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_get_client_pool()
1825 if (cptr == NULL) in snd_seq_ioctl_get_client_pool()
1828 info->client = cptr->number; in snd_seq_ioctl_get_client_pool()
1829 info->output_pool = cptr->pool->size; in snd_seq_ioctl_get_client_pool()
1830 info->output_room = cptr->pool->room; in snd_seq_ioctl_get_client_pool()
1832 info->output_free = snd_seq_unused_cells(cptr->pool); in snd_seq_ioctl_get_client_pool()
1833 if (cptr->type == USER_CLIENT) { in snd_seq_ioctl_get_client_pool()
1834 info->input_pool = cptr->data.user.fifo_pool_size; in snd_seq_ioctl_get_client_pool()
1836 info->input_free = snd_seq_fifo_unused_cells(cptr->data.user.fifo); in snd_seq_ioctl_get_client_pool()
1841 snd_seq_client_unlock(cptr); in snd_seq_ioctl_get_client_pool()
1951 struct snd_seq_client *cptr = NULL; in snd_seq_ioctl_query_subs() local
1957 if ((cptr = snd_seq_client_use_ptr(subs->root.client)) == NULL) in snd_seq_ioctl_query_subs()
1959 if ((port = snd_seq_port_use_ptr(cptr, subs->root.port)) == NULL) in snd_seq_ioctl_query_subs()
2000 if (cptr) in snd_seq_ioctl_query_subs()
2001 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_subs()
2014 struct snd_seq_client *cptr = NULL; in snd_seq_ioctl_query_next_client() local
2022 cptr = snd_seq_client_use_ptr(info->client); in snd_seq_ioctl_query_next_client()
2023 if (cptr) in snd_seq_ioctl_query_next_client()
2026 if (cptr == NULL) in snd_seq_ioctl_query_next_client()
2029 get_client_info(cptr, info); in snd_seq_ioctl_query_next_client()
2030 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_client()
2042 struct snd_seq_client *cptr; in snd_seq_ioctl_query_next_port() local
2045 cptr = snd_seq_client_use_ptr(info->addr.client); in snd_seq_ioctl_query_next_port()
2046 if (cptr == NULL) in snd_seq_ioctl_query_next_port()
2051 port = snd_seq_port_query_nearest(cptr, info); in snd_seq_ioctl_query_next_port()
2053 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_port()
2061 snd_seq_client_unlock(cptr); in snd_seq_ioctl_query_next_port()
2255 struct snd_seq_client *cptr; in snd_seq_kernel_client_enqueue() local
2272 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_enqueue()
2273 if (cptr == NULL) in snd_seq_kernel_client_enqueue()
2276 if (!cptr->accept_output) { in snd_seq_kernel_client_enqueue()
2279 mutex_lock(&cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2280 result = snd_seq_client_enqueue_event(cptr, ev, file, blocking, in snd_seq_kernel_client_enqueue()
2282 &cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2283 mutex_unlock(&cptr->ioctl_mutex); in snd_seq_kernel_client_enqueue()
2286 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_enqueue()
2301 struct snd_seq_client *cptr; in snd_seq_kernel_client_dispatch() local
2314 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_dispatch()
2315 if (cptr == NULL) in snd_seq_kernel_client_dispatch()
2318 if (!cptr->accept_output) in snd_seq_kernel_client_dispatch()
2321 result = snd_seq_deliver_event(cptr, ev, atomic, hop); in snd_seq_kernel_client_dispatch()
2323 snd_seq_client_unlock(cptr); in snd_seq_kernel_client_dispatch()