• Home
  • Raw
  • Download

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()
686 err = snd_seq_deliver_single_event(client, event, in deliver_to_subscribers()
708 static int port_broadcast_event(struct snd_seq_client *client, in port_broadcast_event() argument
741 static int broadcast_event(struct snd_seq_client *client, in broadcast_event() argument
752 if (dest == client->number) in broadcast_event()
754 event->dest.client = dest; in broadcast_event()
757 err = port_broadcast_event(client, event, atomic, hop); in broadcast_event()
773 static int multicast_event(struct snd_seq_client *client, struct snd_seq_event *event, in multicast_event() argument
790 static int snd_seq_deliver_event(struct snd_seq_client *client, struct snd_seq_event *event, in snd_seq_deliver_event() argument
798 event->source.client, event->source.port, in snd_seq_deliver_event()
799 event->dest.client, event->dest.port); in snd_seq_deliver_event()
804 event->dest.client == SNDRV_SEQ_ADDRESS_SUBSCRIBERS) in snd_seq_deliver_event()
805 result = deliver_to_subscribers(client, event, atomic, hop); in snd_seq_deliver_event()
808 event->dest.client == SNDRV_SEQ_ADDRESS_BROADCAST) in snd_seq_deliver_event()
809 result = broadcast_event(client, event, atomic, hop); in snd_seq_deliver_event()
810 else if (event->dest.client >= SNDRV_SEQ_MAX_CLIENTS) in snd_seq_deliver_event()
811 result = multicast_event(client, event, atomic, hop); in snd_seq_deliver_event()
813 result = port_broadcast_event(client, event, atomic, hop); in snd_seq_deliver_event()
816 result = snd_seq_deliver_single_event(client, event, 0, atomic, hop); in snd_seq_deliver_event()
833 struct snd_seq_client *client; in snd_seq_dispatch_event() local
839 client = snd_seq_client_use_ptr(cell->event.source.client); in snd_seq_dispatch_event()
840 if (client == NULL) { in snd_seq_dispatch_event()
855 result = snd_seq_deliver_event(client, &tmpev, atomic, hop); in snd_seq_dispatch_event()
890 result = snd_seq_deliver_event(client, &cell->event, atomic, hop); in snd_seq_dispatch_event()
894 snd_seq_client_unlock(client); in snd_seq_dispatch_event()
903 static int snd_seq_client_enqueue_event(struct snd_seq_client *client, in snd_seq_client_enqueue_event() argument
913 event->dest.client = SNDRV_SEQ_ADDRESS_SUBSCRIBERS; in snd_seq_client_enqueue_event()
918 event->dest.client = SNDRV_SEQ_ADDRESS_BROADCAST; in snd_seq_client_enqueue_event()
922 if (event->dest.client == SNDRV_SEQ_ADDRESS_SUBSCRIBERS) { in snd_seq_client_enqueue_event()
924 struct snd_seq_client_port *src_port = snd_seq_port_use_ptr(client, event->source.port); in snd_seq_client_enqueue_event()
934 return snd_seq_deliver_event(client, event, atomic, hop); in snd_seq_client_enqueue_event()
938 if (snd_seq_queue_is_used(event->queue, client->number) <= 0) in snd_seq_client_enqueue_event()
940 if (! snd_seq_write_pool_allocated(client)) in snd_seq_client_enqueue_event()
944 err = snd_seq_event_dup(client->pool, event, &cell, !blocking || atomic, file); in snd_seq_client_enqueue_event()
997 struct snd_seq_client *client = file->private_data; in snd_seq_write() local
1006 if (snd_BUG_ON(!client)) in snd_seq_write()
1009 if (!client->accept_output || client->pool == NULL) in snd_seq_write()
1013 if (client->pool->size > 0 && !snd_seq_write_pool_allocated(client)) { in snd_seq_write()
1014 if (snd_seq_pool_init(client->pool) < 0) in snd_seq_write()
1026 event.source.client = client->number; /* fill in client number */ in snd_seq_write()
1055 if (client->convert32 && snd_seq_ev_is_varusr(&event)) { in snd_seq_write()
1063 err = snd_seq_client_enqueue_event(client, &event, file, in snd_seq_write()
1085 struct snd_seq_client *client = file->private_data; in snd_seq_poll() local
1089 if (snd_BUG_ON(!client)) in snd_seq_poll()
1093 client->data.user.fifo) { in snd_seq_poll()
1096 if (snd_seq_fifo_poll_wait(client->data.user.fifo, file, wait)) in snd_seq_poll()
1103 if (!snd_seq_write_pool_allocated(client) || in snd_seq_poll()
1104 snd_seq_pool_poll_wait(client->pool, file, wait)) in snd_seq_poll()
1116 static int snd_seq_ioctl_system_info(struct snd_seq_client *client, void __user *arg) in snd_seq_ioctl_system_info() argument
1136 static int snd_seq_ioctl_running_mode(struct snd_seq_client *client, void __user *arg) in snd_seq_ioctl_running_mode() argument
1146 cptr = snd_seq_client_use_ptr(info.client); in snd_seq_ioctl_running_mode()
1176 info->client = cptr->number; in get_client_info()
1188 static int snd_seq_ioctl_get_client_info(struct snd_seq_client *client, in snd_seq_ioctl_get_client_info() argument
1198 cptr = snd_seq_client_use_ptr(client_info.client); in snd_seq_ioctl_get_client_info()
1212 static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client, in snd_seq_ioctl_set_client_info() argument
1221 if (client->number != client_info.client) in snd_seq_ioctl_set_client_info()
1224 if (client->type != client_info.type) in snd_seq_ioctl_set_client_info()
1229 strlcpy(client->name, client_info.name, sizeof(client->name)); in snd_seq_ioctl_set_client_info()
1231 client->filter = client_info.filter; in snd_seq_ioctl_set_client_info()
1232 client->event_lost = client_info.event_lost; in snd_seq_ioctl_set_client_info()
1233 memcpy(client->event_filter, client_info.event_filter, 32); in snd_seq_ioctl_set_client_info()
1242 static int snd_seq_ioctl_create_port(struct snd_seq_client *client, in snd_seq_ioctl_create_port() argument
1254 if (info.addr.client != client->number) in snd_seq_ioctl_create_port()
1257 …port = snd_seq_create_port(client, (info.flags & SNDRV_SEQ_PORT_FLG_GIVEN_PORT) ? info.addr.port :… in snd_seq_ioctl_create_port()
1261 if (client->type == USER_CLIENT && info.kernel) { in snd_seq_ioctl_create_port()
1264 snd_seq_delete_port(client, port_idx); in snd_seq_ioctl_create_port()
1267 if (client->type == KERNEL_CLIENT) { in snd_seq_ioctl_create_port()
1285 snd_seq_system_client_ev_port_start(port->addr.client, port->addr.port); in snd_seq_ioctl_create_port()
1297 static int snd_seq_ioctl_delete_port(struct snd_seq_client *client, in snd_seq_ioctl_delete_port() argument
1308 if (info.addr.client != client->number) in snd_seq_ioctl_delete_port()
1311 err = snd_seq_delete_port(client, info.addr.port); in snd_seq_ioctl_delete_port()
1313 snd_seq_system_client_ev_port_exit(client->number, info.addr.port); in snd_seq_ioctl_delete_port()
1321 static int snd_seq_ioctl_get_port_info(struct snd_seq_client *client, in snd_seq_ioctl_get_port_info() argument
1330 cptr = snd_seq_client_use_ptr(info.addr.client); in snd_seq_ioctl_get_port_info()
1354 static int snd_seq_ioctl_set_port_info(struct snd_seq_client *client, in snd_seq_ioctl_set_port_info() argument
1363 if (info.addr.client != client->number) /* only set our own ports ! */ in snd_seq_ioctl_set_port_info()
1365 port = snd_seq_port_use_ptr(client, info.addr.port); in snd_seq_ioctl_set_port_info()
1380 static int check_subscription_permission(struct snd_seq_client *client, in check_subscription_permission() argument
1385 if (client->number != subs->sender.client && in check_subscription_permission()
1386 client->number != subs->dest.client) { in check_subscription_permission()
1398 if (client->number != subs->sender.client) { in check_subscription_permission()
1403 if (client->number != subs->dest.client) { in check_subscription_permission()
1414 int snd_seq_client_notify_subscription(int client, int port, in snd_seq_client_notify_subscription() argument
1425 return snd_seq_system_notify(client, port, &event); /* non-atomic */ in snd_seq_client_notify_subscription()
1432 static int snd_seq_ioctl_subscribe_port(struct snd_seq_client *client, in snd_seq_ioctl_subscribe_port() argument
1443 if ((receiver = snd_seq_client_use_ptr(subs.dest.client)) == NULL) in snd_seq_ioctl_subscribe_port()
1445 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) in snd_seq_ioctl_subscribe_port()
1452 result = check_subscription_permission(client, sport, dport, &subs); in snd_seq_ioctl_subscribe_port()
1457 result = snd_seq_port_connect(client, sender, sport, receiver, dport, &subs); in snd_seq_ioctl_subscribe_port()
1477 static int snd_seq_ioctl_unsubscribe_port(struct snd_seq_client *client, in snd_seq_ioctl_unsubscribe_port() argument
1488 if ((receiver = snd_seq_client_use_ptr(subs.dest.client)) == NULL) in snd_seq_ioctl_unsubscribe_port()
1490 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) in snd_seq_ioctl_unsubscribe_port()
1497 result = check_subscription_permission(client, sport, dport, &subs); in snd_seq_ioctl_unsubscribe_port()
1501 result = snd_seq_port_disconnect(client, sender, sport, receiver, dport, &subs); in snd_seq_ioctl_unsubscribe_port()
1519 static int snd_seq_ioctl_create_queue(struct snd_seq_client *client, in snd_seq_ioctl_create_queue() argument
1529 result = snd_seq_queue_alloc(client->number, info.locked, info.flags); in snd_seq_ioctl_create_queue()
1554 static int snd_seq_ioctl_delete_queue(struct snd_seq_client *client, in snd_seq_ioctl_delete_queue() argument
1562 return snd_seq_queue_delete(client->number, info.queue); in snd_seq_ioctl_delete_queue()
1566 static int snd_seq_ioctl_get_queue_info(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_info() argument
1593 static int snd_seq_ioctl_set_queue_info(struct snd_seq_client *client, in snd_seq_ioctl_set_queue_info() argument
1602 if (info.owner != client->number) in snd_seq_ioctl_set_queue_info()
1606 if (snd_seq_queue_check_access(info.queue, client->number)) { in snd_seq_ioctl_set_queue_info()
1607 if (snd_seq_queue_set_owner(info.queue, client->number, info.locked) < 0) in snd_seq_ioctl_set_queue_info()
1610 snd_seq_queue_use(info.queue, client->number, 1); in snd_seq_ioctl_set_queue_info()
1618 if (q->owner != client->number) { in snd_seq_ioctl_set_queue_info()
1629 static int snd_seq_ioctl_get_named_queue(struct snd_seq_client *client, void __user *arg) in snd_seq_ioctl_get_named_queue() argument
1652 static int snd_seq_ioctl_get_queue_status(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_status() argument
1686 static int snd_seq_ioctl_get_queue_tempo(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_tempo() argument
1717 int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo) in snd_seq_set_queue_tempo() argument
1719 if (!snd_seq_queue_check_access(tempo->queue, client)) in snd_seq_set_queue_tempo()
1721 return snd_seq_queue_timer_set_tempo(tempo->queue, client, tempo); in snd_seq_set_queue_tempo()
1726 static int snd_seq_ioctl_set_queue_tempo(struct snd_seq_client *client, in snd_seq_ioctl_set_queue_tempo() argument
1735 result = snd_seq_set_queue_tempo(client->number, &tempo); in snd_seq_ioctl_set_queue_tempo()
1741 static int snd_seq_ioctl_get_queue_timer(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_timer() argument
1778 static int snd_seq_ioctl_set_queue_timer(struct snd_seq_client *client, in snd_seq_ioctl_set_queue_timer() argument
1790 if (snd_seq_queue_check_access(timer.queue, client->number)) { in snd_seq_ioctl_set_queue_timer()
1820 static int snd_seq_ioctl_get_queue_client(struct snd_seq_client *client, in snd_seq_ioctl_get_queue_client() argument
1829 used = snd_seq_queue_is_used(info.queue, client->number); in snd_seq_ioctl_get_queue_client()
1833 info.client = client->number; in snd_seq_ioctl_get_queue_client()
1842 static int snd_seq_ioctl_set_queue_client(struct snd_seq_client *client, in snd_seq_ioctl_set_queue_client() argument
1852 err = snd_seq_queue_use(info.queue, client->number, info.used); in snd_seq_ioctl_set_queue_client()
1857 return snd_seq_ioctl_get_queue_client(client, arg); in snd_seq_ioctl_set_queue_client()
1862 static int snd_seq_ioctl_get_client_pool(struct snd_seq_client *client, in snd_seq_ioctl_get_client_pool() argument
1871 cptr = snd_seq_client_use_ptr(info.client); in snd_seq_ioctl_get_client_pool()
1896 static int snd_seq_ioctl_set_client_pool(struct snd_seq_client *client, in snd_seq_ioctl_set_client_pool() argument
1905 if (client->number != info.client) in snd_seq_ioctl_set_client_pool()
1909 (! snd_seq_write_pool_allocated(client) || in snd_seq_ioctl_set_client_pool()
1910 info.output_pool != client->pool->size)) { in snd_seq_ioctl_set_client_pool()
1911 if (snd_seq_write_pool_allocated(client)) { in snd_seq_ioctl_set_client_pool()
1913 snd_seq_queue_client_leave_cells(client->number); in snd_seq_ioctl_set_client_pool()
1914 snd_seq_pool_done(client->pool); in snd_seq_ioctl_set_client_pool()
1916 client->pool->size = info.output_pool; in snd_seq_ioctl_set_client_pool()
1917 rc = snd_seq_pool_init(client->pool); in snd_seq_ioctl_set_client_pool()
1921 if (client->type == USER_CLIENT && client->data.user.fifo != NULL && in snd_seq_ioctl_set_client_pool()
1924 info.input_pool != client->data.user.fifo_pool_size) { in snd_seq_ioctl_set_client_pool()
1926 rc = snd_seq_fifo_resize(client->data.user.fifo, info.input_pool); in snd_seq_ioctl_set_client_pool()
1929 client->data.user.fifo_pool_size = info.input_pool; in snd_seq_ioctl_set_client_pool()
1932 info.output_room <= client->pool->size) { in snd_seq_ioctl_set_client_pool()
1933 client->pool->room = info.output_room; in snd_seq_ioctl_set_client_pool()
1936 return snd_seq_ioctl_get_client_pool(client, arg); in snd_seq_ioctl_set_client_pool()
1941 static int snd_seq_ioctl_remove_events(struct snd_seq_client *client, in snd_seq_ioctl_remove_events() argument
1957 if (client->type == USER_CLIENT) in snd_seq_ioctl_remove_events()
1958 snd_seq_fifo_clear(client->data.user.fifo); in snd_seq_ioctl_remove_events()
1962 snd_seq_queue_remove_cells(client->number, &info); in snd_seq_ioctl_remove_events()
1971 static int snd_seq_ioctl_get_subscription(struct snd_seq_client *client, in snd_seq_ioctl_get_subscription() argument
1984 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) in snd_seq_ioctl_get_subscription()
2011 static int snd_seq_ioctl_query_subs(struct snd_seq_client *client, in snd_seq_ioctl_query_subs() argument
2025 if ((cptr = snd_seq_client_use_ptr(subs.root.client)) == NULL) in snd_seq_ioctl_query_subs()
2081 static int snd_seq_ioctl_query_next_client(struct snd_seq_client *client, in snd_seq_ioctl_query_next_client() argument
2091 info.client++; in snd_seq_ioctl_query_next_client()
2092 if (info.client < 0) in snd_seq_ioctl_query_next_client()
2093 info.client = 0; in snd_seq_ioctl_query_next_client()
2094 for (; info.client < SNDRV_SEQ_MAX_CLIENTS; info.client++) { in snd_seq_ioctl_query_next_client()
2095 cptr = snd_seq_client_use_ptr(info.client); in snd_seq_ioctl_query_next_client()
2113 static int snd_seq_ioctl_query_next_port(struct snd_seq_client *client, in snd_seq_ioctl_query_next_port() argument
2122 cptr = snd_seq_client_use_ptr(info.addr.client); in snd_seq_ioctl_query_next_port()
2149 int (*func)(struct snd_seq_client *client, void __user * arg);
2183 static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd, in snd_seq_do_ioctl() argument
2194 return put_user(client->number, (int __user *)arg) ? -EFAULT : 0; in snd_seq_do_ioctl()
2201 return p->func(client, arg); in snd_seq_do_ioctl()
2211 struct snd_seq_client *client = file->private_data; in snd_seq_ioctl() local
2213 if (snd_BUG_ON(!client)) in snd_seq_ioctl()
2216 return snd_seq_do_ioctl(client, cmd, (void __user *) arg); in snd_seq_ioctl()
2232 struct snd_seq_client *client; in snd_seq_create_kernel_client() local
2254 client = seq_create_client1(client_index, 0); in snd_seq_create_kernel_client()
2255 if (client == NULL) { in snd_seq_create_kernel_client()
2261 client->accept_input = 1; in snd_seq_create_kernel_client()
2262 client->accept_output = 1; in snd_seq_create_kernel_client()
2265 vsnprintf(client->name, sizeof(client->name), name_fmt, args); in snd_seq_create_kernel_client()
2268 client->type = KERNEL_CLIENT; in snd_seq_create_kernel_client()
2272 snd_seq_system_client_ev_client_start(client->number); in snd_seq_create_kernel_client()
2275 return client->number; in snd_seq_create_kernel_client()
2281 int snd_seq_delete_kernel_client(int client) in snd_seq_delete_kernel_client() argument
2288 ptr = clientptr(client); in snd_seq_delete_kernel_client()
2302 static int kernel_client_enqueue(int client, struct snd_seq_event *ev, in kernel_client_enqueue() argument
2318 ev->source.client = client; in kernel_client_enqueue()
2323 cptr = snd_seq_client_use_ptr(client); in kernel_client_enqueue()
2341 int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event * ev, in snd_seq_kernel_client_enqueue() argument
2344 return kernel_client_enqueue(client, ev, NULL, 0, atomic, hop); in snd_seq_kernel_client_enqueue()
2354 int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev, in snd_seq_kernel_client_enqueue_blocking() argument
2358 return kernel_client_enqueue(client, ev, file, 1, atomic, hop); in snd_seq_kernel_client_enqueue_blocking()
2370 int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event * ev, in snd_seq_kernel_client_dispatch() argument
2381 ev->source.client = client; in snd_seq_kernel_client_dispatch()
2386 cptr = snd_seq_client_use_ptr(client); in snd_seq_kernel_client_dispatch()
2407 struct snd_seq_client *client; in snd_seq_kernel_client_ctl() local
2411 client = clientptr(clientid); in snd_seq_kernel_client_ctl()
2412 if (client == NULL) in snd_seq_kernel_client_ctl()
2415 result = snd_seq_do_ioctl(client, cmd, (void __force __user *)arg); in snd_seq_kernel_client_ctl()
2425 struct snd_seq_client *client; in snd_seq_kernel_client_write_poll() local
2427 client = clientptr(clientid); in snd_seq_kernel_client_write_poll()
2428 if (client == NULL) in snd_seq_kernel_client_write_poll()
2431 if (! snd_seq_write_pool_allocated(client)) in snd_seq_kernel_client_write_poll()
2433 if (snd_seq_pool_poll_wait(client->pool, file, wait)) in snd_seq_kernel_client_write_poll()
2468 is_src ? s->info.dest.client : s->info.sender.client, in snd_seq_info_dump_subscribers()
2486 struct snd_seq_client *client) in snd_seq_info_dump_ports() argument
2490 mutex_lock(&client->ports_mutex); in snd_seq_info_dump_ports()
2491 list_for_each_entry(p, &client->ports_list_head, list) { in snd_seq_info_dump_ports()
2501 mutex_unlock(&client->ports_mutex); in snd_seq_info_dump_ports()
2510 struct snd_seq_client *client; in snd_seq_info_clients_read() local
2520 client = snd_seq_client_use_ptr(c); in snd_seq_info_clients_read()
2521 if (client == NULL) in snd_seq_info_clients_read()
2523 if (client->type == NO_CLIENT) { in snd_seq_info_clients_read()
2524 snd_seq_client_unlock(client); in snd_seq_info_clients_read()
2529 c, client->name, in snd_seq_info_clients_read()
2530 client->type == USER_CLIENT ? "User" : "Kernel"); in snd_seq_info_clients_read()
2531 snd_seq_info_dump_ports(buffer, client); in snd_seq_info_clients_read()
2532 if (snd_seq_write_pool_allocated(client)) { in snd_seq_info_clients_read()
2534 snd_seq_info_pool(buffer, client->pool, " "); in snd_seq_info_clients_read()
2536 if (client->type == USER_CLIENT && client->data.user.fifo && in snd_seq_info_clients_read()
2537 client->data.user.fifo->pool) { in snd_seq_info_clients_read()
2539 snd_seq_info_pool(buffer, client->data.user.fifo->pool, " "); in snd_seq_info_clients_read()
2541 snd_seq_client_unlock(client); in snd_seq_info_clients_read()