Lines Matching refs:client
81 static int bounce_error_event(struct snd_seq_client *client,
84 static int snd_seq_deliver_single_event(struct snd_seq_client *client,
117 static inline int snd_seq_write_pool_allocated(struct snd_seq_client *client) in snd_seq_write_pool_allocated() argument
119 return snd_seq_total_cells(client->pool) > 0; in snd_seq_write_pool_allocated()
136 struct snd_seq_client *client; in snd_seq_client_use_ptr() local
144 client = clientptr(clientid); in snd_seq_client_use_ptr()
145 if (client) in snd_seq_client_use_ptr()
183 client = clientptr(clientid); in snd_seq_client_use_ptr()
184 if (client) in snd_seq_client_use_ptr()
192 snd_use_lock_use(&client->use_lock); in snd_seq_client_use_ptr()
194 return client; in snd_seq_client_use_ptr()
223 struct snd_seq_client *client; in seq_create_client1() local
226 client = kzalloc(sizeof(*client), GFP_KERNEL); in seq_create_client1()
227 if (client == NULL) in seq_create_client1()
229 client->pool = snd_seq_pool_new(poolsize); in seq_create_client1()
230 if (client->pool == NULL) { in seq_create_client1()
231 kfree(client); in seq_create_client1()
234 client->type = NO_CLIENT; in seq_create_client1()
235 snd_use_lock_init(&client->use_lock); in seq_create_client1()
236 rwlock_init(&client->ports_lock); in seq_create_client1()
237 mutex_init(&client->ports_mutex); in seq_create_client1()
238 INIT_LIST_HEAD(&client->ports_list_head); in seq_create_client1()
248 clienttab[client->number = c] = client; in seq_create_client1()
250 return client; in seq_create_client1()
254 clienttab[client->number = client_index] = client; in seq_create_client1()
256 return client; in seq_create_client1()
260 snd_seq_pool_delete(&client->pool); in seq_create_client1()
261 kfree(client); in seq_create_client1()
266 static int seq_free_client1(struct snd_seq_client *client) in seq_free_client1() argument
270 if (!client) in seq_free_client1()
272 snd_seq_delete_all_ports(client); in seq_free_client1()
273 snd_seq_queue_client_leave(client->number); in seq_free_client1()
275 clienttablock[client->number] = 1; in seq_free_client1()
276 clienttab[client->number] = NULL; in seq_free_client1()
278 snd_use_lock_sync(&client->use_lock); in seq_free_client1()
279 snd_seq_queue_client_termination(client->number); in seq_free_client1()
280 if (client->pool) in seq_free_client1()
281 snd_seq_pool_delete(&client->pool); in seq_free_client1()
283 clienttablock[client->number] = 0; in seq_free_client1()
289 static void seq_free_client(struct snd_seq_client * client) in seq_free_client() argument
292 switch (client->type) { in seq_free_client()
295 client->number); in seq_free_client()
299 seq_free_client1(client); in seq_free_client()
305 client->number, client->type); in seq_free_client()
309 snd_seq_system_client_ev_client_exit(client->number); in seq_free_client()
320 struct snd_seq_client *client; in snd_seq_open() local
330 client = seq_create_client1(-1, SNDRV_SEQ_DEFAULT_EVENTS); in snd_seq_open()
331 if (client == NULL) { in snd_seq_open()
338 client->accept_input = 1; in snd_seq_open()
340 client->accept_output = 1; in snd_seq_open()
342 user = &client->data.user; in snd_seq_open()
350 seq_free_client1(client); in snd_seq_open()
351 kfree(client); in snd_seq_open()
358 client->type = USER_CLIENT; in snd_seq_open()
361 c = client->number; in snd_seq_open()
362 file->private_data = client; in snd_seq_open()
366 sprintf(client->name, "Client-%d", c); in snd_seq_open()
377 struct snd_seq_client *client = file->private_data; in snd_seq_release() local
379 if (client) { in snd_seq_release()
380 seq_free_client(client); in snd_seq_release()
381 if (client->data.user.fifo) in snd_seq_release()
382 snd_seq_fifo_delete(&client->data.user.fifo); in snd_seq_release()
383 kfree(client); in snd_seq_release()
400 struct snd_seq_client *client = file->private_data; in snd_seq_read() local
413 if (snd_BUG_ON(!client)) in snd_seq_read()
416 if (!client->accept_input || (fifo = client->data.user.fifo) == NULL) in snd_seq_read()
500 dest = snd_seq_client_use_ptr(event->dest.client); in get_event_dest_client()
529 static int bounce_error_event(struct snd_seq_client *client, in bounce_error_event() argument
536 if (client == NULL || in bounce_error_event()
537 ! (client->filter & SNDRV_SEQ_FILTER_BOUNCE) || in bounce_error_event()
538 ! client->accept_input) in bounce_error_event()
546 bounce_ev.source.client = SNDRV_SEQ_CLIENT_SYSTEM; in bounce_error_event()
548 bounce_ev.dest.client = client->number; in bounce_error_event()
555 client->event_lost++; in bounce_error_event()
597 static int snd_seq_deliver_single_event(struct snd_seq_client *client, in snd_seq_deliver_single_event() argument
649 result = bounce_error_event(client, event, result, atomic, hop); in snd_seq_deliver_single_event()
658 static int deliver_to_subscribers(struct snd_seq_client *client, in deliver_to_subscribers() argument
668 src_port = snd_seq_port_use_ptr(client, event->source.port); in deliver_to_subscribers()
689 err = snd_seq_deliver_single_event(client, event, in deliver_to_subscribers()
715 static int port_broadcast_event(struct snd_seq_client *client, in port_broadcast_event() argument
752 static int broadcast_event(struct snd_seq_client *client, in broadcast_event() argument
763 if (dest == client->number) in broadcast_event()
765 event->dest.client = dest; in broadcast_event()
768 err = port_broadcast_event(client, event, atomic, hop); in broadcast_event()
788 static int multicast_event(struct snd_seq_client *client, struct snd_seq_event *event, in multicast_event() argument
805 static int snd_seq_deliver_event(struct snd_seq_client *client, struct snd_seq_event *event, in snd_seq_deliver_event() argument
813 event->source.client, event->source.port, in snd_seq_deliver_event()
814 event->dest.client, event->dest.port); in snd_seq_deliver_event()
819 event->dest.client == SNDRV_SEQ_ADDRESS_SUBSCRIBERS) in snd_seq_deliver_event()
820 result = deliver_to_subscribers(client, event, atomic, hop); in snd_seq_deliver_event()
823 event->dest.client == SNDRV_SEQ_ADDRESS_BROADCAST) in snd_seq_deliver_event()
824 result = broadcast_event(client, event, atomic, hop); in snd_seq_deliver_event()
825 else if (event->dest.client >= SNDRV_SEQ_MAX_CLIENTS) in snd_seq_deliver_event()
826 result = multicast_event(client, event, atomic, hop); in snd_seq_deliver_event()
828 result = port_broadcast_event(client, event, atomic, hop); in snd_seq_deliver_event()
831 result = snd_seq_deliver_single_event(client, event, 0, atomic, hop); in snd_seq_deliver_event()
848 struct snd_seq_client *client; in snd_seq_dispatch_event() local
854 client = snd_seq_client_use_ptr(cell->event.source.client); in snd_seq_dispatch_event()
855 if (client == NULL) { in snd_seq_dispatch_event()
870 result = snd_seq_deliver_event(client, &tmpev, atomic, hop); in snd_seq_dispatch_event()
905 result = snd_seq_deliver_event(client, &cell->event, atomic, hop); in snd_seq_dispatch_event()
909 snd_seq_client_unlock(client); in snd_seq_dispatch_event()
918 static int snd_seq_client_enqueue_event(struct snd_seq_client *client, in snd_seq_client_enqueue_event() argument
928 event->dest.client = SNDRV_SEQ_ADDRESS_SUBSCRIBERS; in snd_seq_client_enqueue_event()
933 event->dest.client = SNDRV_SEQ_ADDRESS_BROADCAST; in snd_seq_client_enqueue_event()
937 if (event->dest.client == SNDRV_SEQ_ADDRESS_SUBSCRIBERS) { in snd_seq_client_enqueue_event()
939 struct snd_seq_client_port *src_port = snd_seq_port_use_ptr(client, event->source.port); in snd_seq_client_enqueue_event()
949 return snd_seq_deliver_event(client, event, atomic, hop); in snd_seq_client_enqueue_event()
953 if (snd_seq_queue_is_used(event->queue, client->number) <= 0) in snd_seq_client_enqueue_event()
955 if (! snd_seq_write_pool_allocated(client)) in snd_seq_client_enqueue_event()
959 err = snd_seq_event_dup(client->pool, event, &cell, !blocking || atomic, file); in snd_seq_client_enqueue_event()
1012 struct snd_seq_client *client = file->private_data; in snd_seq_write() local
1021 if (snd_BUG_ON(!client)) in snd_seq_write()
1024 if (!client->accept_output || client->pool == NULL) in snd_seq_write()
1028 if (client->pool->size > 0 && !snd_seq_write_pool_allocated(client)) { in snd_seq_write()
1029 if (snd_seq_pool_init(client->pool) < 0) in snd_seq_write()
1041 event.source.client = client->number; /* fill in client number */ in snd_seq_write()
1070 if (client->convert32 && snd_seq_ev_is_varusr(&event)) { in snd_seq_write()
1078 err = snd_seq_client_enqueue_event(client, &event, file, in snd_seq_write()
1100 struct snd_seq_client *client = file->private_data; in snd_seq_poll() local
1104 if (snd_BUG_ON(!client)) in snd_seq_poll()
1108 client->data.user.fifo) { in snd_seq_poll()
1111 if (snd_seq_fifo_poll_wait(client->data.user.fifo, file, wait)) in snd_seq_poll()
1118 if (!snd_seq_write_pool_allocated(client) || in snd_seq_poll()
1119 snd_seq_pool_poll_wait(client->pool, file, wait)) in snd_seq_poll()
1131 static int snd_seq_ioctl_system_info(struct snd_seq_client *client, void __user *arg) in snd_seq_ioctl_system_info() argument
1151 static int snd_seq_ioctl_running_mode(struct snd_seq_client *client, void __user *arg) in snd_seq_ioctl_running_mode() argument
1161 cptr = snd_seq_client_use_ptr(info.client); in snd_seq_ioctl_running_mode()
1191 info->client = cptr->number; in get_client_info()
1203 static int snd_seq_ioctl_get_client_info(struct snd_seq_client *client, in snd_seq_ioctl_get_client_info() argument
1213 cptr = snd_seq_client_use_ptr(client_info.client); in snd_seq_ioctl_get_client_info()
1227 static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client, in snd_seq_ioctl_set_client_info() argument
1236 if (client->number != client_info.client) in snd_seq_ioctl_set_client_info()
1239 if (client->type != client_info.type) in snd_seq_ioctl_set_client_info()
1244 strlcpy(client->name, client_info.name, sizeof(client->name)); in snd_seq_ioctl_set_client_info()
1246 client->filter = client_info.filter; in snd_seq_ioctl_set_client_info()
1247 client->event_lost = client_info.event_lost; in snd_seq_ioctl_set_client_info()
1248 memcpy(client->event_filter, client_info.event_filter, 32); in snd_seq_ioctl_set_client_info()
1257 static int snd_seq_ioctl_create_port(struct snd_seq_client *client, in snd_seq_ioctl_create_port() argument
1268 if (info.addr.client != client->number) in snd_seq_ioctl_create_port()
1271 …port = snd_seq_create_port(client, (info.flags & SNDRV_SEQ_PORT_FLG_GIVEN_PORT) ? info.addr.port :… in snd_seq_ioctl_create_port()
1275 if (client->type == USER_CLIENT && info.kernel) { in snd_seq_ioctl_create_port()
1276 snd_seq_delete_port(client, port->addr.port); in snd_seq_ioctl_create_port()
1279 if (client->type == KERNEL_CLIENT) { in snd_seq_ioctl_create_port()
1296 snd_seq_system_client_ev_port_start(port->addr.client, port->addr.port); in snd_seq_ioctl_create_port()
1307 static int snd_seq_ioctl_delete_port(struct snd_seq_client *client, in snd_seq_ioctl_delete_port() argument
1318 if (info.addr.client != client->number) in snd_seq_ioctl_delete_port()
1321 err = snd_seq_delete_port(client, info.addr.port); in snd_seq_ioctl_delete_port()
1323 snd_seq_system_client_ev_port_exit(client->number, info.addr.port); in snd_seq_ioctl_delete_port()
1331 static int snd_seq_ioctl_get_port_info(struct snd_seq_client *client, in snd_seq_ioctl_get_port_info() argument
1340 cptr = snd_seq_client_use_ptr(info.addr.client); in snd_seq_ioctl_get_port_info()
1364 static int snd_seq_ioctl_set_port_info(struct snd_seq_client *client, in snd_seq_ioctl_set_port_info() argument
1373 if (info.addr.client != client->number) /* only set our own ports ! */ in snd_seq_ioctl_set_port_info()
1375 port = snd_seq_port_use_ptr(client, info.addr.port); in snd_seq_ioctl_set_port_info()
1390 static int check_subscription_permission(struct snd_seq_client *client, in check_subscription_permission() argument
1395 if (client->number != subs->sender.client && in check_subscription_permission()
1396 client->number != subs->dest.client) { in check_subscription_permission()
1408 if (client->number != subs->sender.client) { in check_subscription_permission()
1413 if (client->number != subs->dest.client) { in check_subscription_permission()
1424 int snd_seq_client_notify_subscription(int client, int port, in snd_seq_client_notify_subscription() argument
1435 return snd_seq_system_notify(client, port, &event); /* non-atomic */ in snd_seq_client_notify_subscription()
1442 static int snd_seq_ioctl_subscribe_port(struct snd_seq_client *client, in snd_seq_ioctl_subscribe_port() argument
1453 if ((receiver = snd_seq_client_use_ptr(subs.dest.client)) == NULL) in snd_seq_ioctl_subscribe_port()
1455 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) in snd_seq_ioctl_subscribe_port()
1462 result = check_subscription_permission(client, sport, dport, &subs); in snd_seq_ioctl_subscribe_port()
1467 result = snd_seq_port_connect(client, sender, sport, receiver, dport, &subs); in snd_seq_ioctl_subscribe_port()
1487 static int snd_seq_ioctl_unsubscribe_port(struct snd_seq_client *client, in snd_seq_ioctl_unsubscribe_port() argument
1498 if ((receiver = snd_seq_client_use_ptr(subs.dest.client)) == NULL) in snd_seq_ioctl_unsubscribe_port()
1500 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) in snd_seq_ioctl_unsubscribe_port()
1507 result = check_subscription_permission(client, sport, dport, &subs); in snd_seq_ioctl_unsubscribe_port()
1511 result = snd_seq_port_disconnect(client, sender, sport, receiver, dport, &subs); in snd_seq_ioctl_unsubscribe_port()
1529 static int snd_seq_ioctl_create_queue(struct snd_seq_client *client, in snd_seq_ioctl_create_queue() argument
1539 result = snd_seq_queue_alloc(client->number, info.locked, info.flags); in snd_seq_ioctl_create_queue()
1564 static int snd_seq_ioctl_delete_queue(struct snd_seq_client *client, in snd_seq_ioctl_delete_queue() argument
1572 return snd_seq_queue_delete(client->number, info.queue); in snd_seq_ioctl_delete_queue()
1576 static int snd_seq_ioctl_get_queue_info(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_info() argument
1603 static int snd_seq_ioctl_set_queue_info(struct snd_seq_client *client, in snd_seq_ioctl_set_queue_info() argument
1612 if (info.owner != client->number) in snd_seq_ioctl_set_queue_info()
1616 if (snd_seq_queue_check_access(info.queue, client->number)) { in snd_seq_ioctl_set_queue_info()
1617 if (snd_seq_queue_set_owner(info.queue, client->number, info.locked) < 0) in snd_seq_ioctl_set_queue_info()
1620 snd_seq_queue_use(info.queue, client->number, 1); in snd_seq_ioctl_set_queue_info()
1628 if (q->owner != client->number) { in snd_seq_ioctl_set_queue_info()
1639 static int snd_seq_ioctl_get_named_queue(struct snd_seq_client *client, void __user *arg) in snd_seq_ioctl_get_named_queue() argument
1662 static int snd_seq_ioctl_get_queue_status(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_status() argument
1696 static int snd_seq_ioctl_get_queue_tempo(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_tempo() argument
1727 int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo) in snd_seq_set_queue_tempo() argument
1729 if (!snd_seq_queue_check_access(tempo->queue, client)) in snd_seq_set_queue_tempo()
1731 return snd_seq_queue_timer_set_tempo(tempo->queue, client, tempo); in snd_seq_set_queue_tempo()
1736 static int snd_seq_ioctl_set_queue_tempo(struct snd_seq_client *client, in snd_seq_ioctl_set_queue_tempo() argument
1745 result = snd_seq_set_queue_tempo(client->number, &tempo); in snd_seq_ioctl_set_queue_tempo()
1751 static int snd_seq_ioctl_get_queue_timer(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_timer() argument
1788 static int snd_seq_ioctl_set_queue_timer(struct snd_seq_client *client, in snd_seq_ioctl_set_queue_timer() argument
1800 if (snd_seq_queue_check_access(timer.queue, client->number)) { in snd_seq_ioctl_set_queue_timer()
1830 static int snd_seq_ioctl_get_queue_client(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_client() argument
1839 used = snd_seq_queue_is_used(info.queue, client->number); in snd_seq_ioctl_get_queue_client()
1843 info.client = client->number; in snd_seq_ioctl_get_queue_client()
1852 static int snd_seq_ioctl_set_queue_client(struct snd_seq_client *client, in snd_seq_ioctl_set_queue_client() argument
1862 err = snd_seq_queue_use(info.queue, client->number, info.used); in snd_seq_ioctl_set_queue_client()
1867 return snd_seq_ioctl_get_queue_client(client, arg); in snd_seq_ioctl_set_queue_client()
1872 static int snd_seq_ioctl_get_client_pool(struct snd_seq_client *client, in snd_seq_ioctl_get_client_pool() argument
1881 cptr = snd_seq_client_use_ptr(info.client); in snd_seq_ioctl_get_client_pool()
1885 info.client = cptr->number; in snd_seq_ioctl_get_client_pool()
1907 static int snd_seq_ioctl_set_client_pool(struct snd_seq_client *client, in snd_seq_ioctl_set_client_pool() argument
1916 if (client->number != info.client) in snd_seq_ioctl_set_client_pool()
1920 (! snd_seq_write_pool_allocated(client) || in snd_seq_ioctl_set_client_pool()
1921 info.output_pool != client->pool->size)) { in snd_seq_ioctl_set_client_pool()
1922 if (snd_seq_write_pool_allocated(client)) { in snd_seq_ioctl_set_client_pool()
1924 snd_seq_queue_client_leave_cells(client->number); in snd_seq_ioctl_set_client_pool()
1925 snd_seq_pool_done(client->pool); in snd_seq_ioctl_set_client_pool()
1927 client->pool->size = info.output_pool; in snd_seq_ioctl_set_client_pool()
1928 rc = snd_seq_pool_init(client->pool); in snd_seq_ioctl_set_client_pool()
1932 if (client->type == USER_CLIENT && client->data.user.fifo != NULL && in snd_seq_ioctl_set_client_pool()
1935 info.input_pool != client->data.user.fifo_pool_size) { in snd_seq_ioctl_set_client_pool()
1937 rc = snd_seq_fifo_resize(client->data.user.fifo, info.input_pool); in snd_seq_ioctl_set_client_pool()
1940 client->data.user.fifo_pool_size = info.input_pool; in snd_seq_ioctl_set_client_pool()
1943 info.output_room <= client->pool->size) { in snd_seq_ioctl_set_client_pool()
1944 client->pool->room = info.output_room; in snd_seq_ioctl_set_client_pool()
1947 return snd_seq_ioctl_get_client_pool(client, arg); in snd_seq_ioctl_set_client_pool()
1952 static int snd_seq_ioctl_remove_events(struct snd_seq_client *client, in snd_seq_ioctl_remove_events() argument
1968 if (client->type == USER_CLIENT && client->data.user.fifo) in snd_seq_ioctl_remove_events()
1969 snd_seq_fifo_clear(client->data.user.fifo); in snd_seq_ioctl_remove_events()
1973 snd_seq_queue_remove_cells(client->number, &info); in snd_seq_ioctl_remove_events()
1982 static int snd_seq_ioctl_get_subscription(struct snd_seq_client *client, in snd_seq_ioctl_get_subscription() argument
1995 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) in snd_seq_ioctl_get_subscription()
2022 static int snd_seq_ioctl_query_subs(struct snd_seq_client *client, in snd_seq_ioctl_query_subs() argument
2036 if ((cptr = snd_seq_client_use_ptr(subs.root.client)) == NULL) in snd_seq_ioctl_query_subs()
2092 static int snd_seq_ioctl_query_next_client(struct snd_seq_client *client, in snd_seq_ioctl_query_next_client() argument
2102 info.client++; in snd_seq_ioctl_query_next_client()
2103 if (info.client < 0) in snd_seq_ioctl_query_next_client()
2104 info.client = 0; in snd_seq_ioctl_query_next_client()
2105 for (; info.client < SNDRV_SEQ_MAX_CLIENTS; info.client++) { in snd_seq_ioctl_query_next_client()
2106 cptr = snd_seq_client_use_ptr(info.client); in snd_seq_ioctl_query_next_client()
2124 static int snd_seq_ioctl_query_next_port(struct snd_seq_client *client, in snd_seq_ioctl_query_next_port() argument
2133 cptr = snd_seq_client_use_ptr(info.addr.client); in snd_seq_ioctl_query_next_port()
2160 int (*func)(struct snd_seq_client *client, void __user * arg);
2194 static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd, in snd_seq_do_ioctl() argument
2205 return put_user(client->number, (int __user *)arg) ? -EFAULT : 0; in snd_seq_do_ioctl()
2212 return p->func(client, arg); in snd_seq_do_ioctl()
2222 struct snd_seq_client *client = file->private_data; in snd_seq_ioctl() local
2224 if (snd_BUG_ON(!client)) in snd_seq_ioctl()
2227 return snd_seq_do_ioctl(client, cmd, (void __user *) arg); in snd_seq_ioctl()
2243 struct snd_seq_client *client; in snd_seq_create_kernel_client() local
2265 client = seq_create_client1(client_index, 0); in snd_seq_create_kernel_client()
2266 if (client == NULL) { in snd_seq_create_kernel_client()
2272 client->accept_input = 1; in snd_seq_create_kernel_client()
2273 client->accept_output = 1; in snd_seq_create_kernel_client()
2276 vsnprintf(client->name, sizeof(client->name), name_fmt, args); in snd_seq_create_kernel_client()
2279 client->type = KERNEL_CLIENT; in snd_seq_create_kernel_client()
2283 snd_seq_system_client_ev_client_start(client->number); in snd_seq_create_kernel_client()
2286 return client->number; in snd_seq_create_kernel_client()
2292 int snd_seq_delete_kernel_client(int client) in snd_seq_delete_kernel_client() argument
2299 ptr = clientptr(client); in snd_seq_delete_kernel_client()
2313 static int kernel_client_enqueue(int client, struct snd_seq_event *ev, in kernel_client_enqueue() argument
2329 ev->source.client = client; in kernel_client_enqueue()
2334 cptr = snd_seq_client_use_ptr(client); in kernel_client_enqueue()
2352 int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event * ev, in snd_seq_kernel_client_enqueue() argument
2355 return kernel_client_enqueue(client, ev, NULL, 0, atomic, hop); in snd_seq_kernel_client_enqueue()
2365 int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev, in snd_seq_kernel_client_enqueue_blocking() argument
2369 return kernel_client_enqueue(client, ev, file, 1, atomic, hop); in snd_seq_kernel_client_enqueue_blocking()
2381 int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event * ev, in snd_seq_kernel_client_dispatch() argument
2392 ev->source.client = client; in snd_seq_kernel_client_dispatch()
2397 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_dispatch()
2418 struct snd_seq_client *client; in snd_seq_kernel_client_ctl() local
2422 client = clientptr(clientid); in snd_seq_kernel_client_ctl()
2423 if (client == NULL) in snd_seq_kernel_client_ctl()
2426 result = snd_seq_do_ioctl(client, cmd, (void __force __user *)arg); in snd_seq_kernel_client_ctl()
2436 struct snd_seq_client *client; in snd_seq_kernel_client_write_poll() local
2438 client = clientptr(clientid); in snd_seq_kernel_client_write_poll()
2439 if (client == NULL) in snd_seq_kernel_client_write_poll()
2442 if (! snd_seq_write_pool_allocated(client)) in snd_seq_kernel_client_write_poll()
2444 if (snd_seq_pool_poll_wait(client->pool, file, wait)) in snd_seq_kernel_client_write_poll()
2479 is_src ? s->info.dest.client : s->info.sender.client, in snd_seq_info_dump_subscribers()
2497 struct snd_seq_client *client) in snd_seq_info_dump_ports() argument
2501 mutex_lock(&client->ports_mutex); in snd_seq_info_dump_ports()
2502 list_for_each_entry(p, &client->ports_list_head, list) { in snd_seq_info_dump_ports()
2512 mutex_unlock(&client->ports_mutex); in snd_seq_info_dump_ports()
2521 struct snd_seq_client *client; in snd_seq_info_clients_read() local
2531 client = snd_seq_client_use_ptr(c); in snd_seq_info_clients_read()
2532 if (client == NULL) in snd_seq_info_clients_read()
2534 if (client->type == NO_CLIENT) { in snd_seq_info_clients_read()
2535 snd_seq_client_unlock(client); in snd_seq_info_clients_read()
2540 c, client->name, in snd_seq_info_clients_read()
2541 client->type == USER_CLIENT ? "User" : "Kernel"); in snd_seq_info_clients_read()
2542 snd_seq_info_dump_ports(buffer, client); in snd_seq_info_clients_read()
2543 if (snd_seq_write_pool_allocated(client)) { in snd_seq_info_clients_read()
2545 snd_seq_info_pool(buffer, client->pool, " "); in snd_seq_info_clients_read()
2547 if (client->type == USER_CLIENT && client->data.user.fifo && in snd_seq_info_clients_read()
2548 client->data.user.fifo->pool) { in snd_seq_info_clients_read()
2550 snd_seq_info_pool(buffer, client->data.user.fifo->pool, " "); in snd_seq_info_clients_read()
2552 snd_seq_client_unlock(client); in snd_seq_info_clients_read()