Lines Matching refs:subs
663 struct snd_seq_subscribers *subs; in deliver_to_subscribers() local
681 list_for_each_entry(subs, &grp->list_head, src_list) { in deliver_to_subscribers()
683 if (atomic_read(&subs->ref_count) != 2) in deliver_to_subscribers()
685 event->dest = subs->info.dest; in deliver_to_subscribers()
686 if (subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIMESTAMP) in deliver_to_subscribers()
688 update_timestamp_of_queue(event, subs->info.queue, in deliver_to_subscribers()
689 subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIME_REAL); in deliver_to_subscribers()
1399 struct snd_seq_port_subscribe *subs) in check_subscription_permission() argument
1401 if (client->number != subs->sender.client && in check_subscription_permission()
1402 client->number != subs->dest.client) { in check_subscription_permission()
1414 if (client->number != subs->sender.client) { in check_subscription_permission()
1419 if (client->number != subs->dest.client) { in check_subscription_permission()
1454 struct snd_seq_port_subscribe subs; in snd_seq_ioctl_subscribe_port() local
1456 if (copy_from_user(&subs, arg, sizeof(subs))) in snd_seq_ioctl_subscribe_port()
1459 if ((receiver = snd_seq_client_use_ptr(subs.dest.client)) == NULL) in snd_seq_ioctl_subscribe_port()
1461 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) in snd_seq_ioctl_subscribe_port()
1463 if ((sport = snd_seq_port_use_ptr(sender, subs.sender.port)) == NULL) in snd_seq_ioctl_subscribe_port()
1465 if ((dport = snd_seq_port_use_ptr(receiver, subs.dest.port)) == NULL) in snd_seq_ioctl_subscribe_port()
1468 result = check_subscription_permission(client, sport, dport, &subs); in snd_seq_ioctl_subscribe_port()
1473 result = snd_seq_port_connect(client, sender, sport, receiver, dport, &subs); in snd_seq_ioctl_subscribe_port()
1476 &subs, SNDRV_SEQ_EVENT_PORT_SUBSCRIBED); in snd_seq_ioctl_subscribe_port()
1499 struct snd_seq_port_subscribe subs; in snd_seq_ioctl_unsubscribe_port() local
1501 if (copy_from_user(&subs, arg, sizeof(subs))) in snd_seq_ioctl_unsubscribe_port()
1504 if ((receiver = snd_seq_client_use_ptr(subs.dest.client)) == NULL) in snd_seq_ioctl_unsubscribe_port()
1506 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) in snd_seq_ioctl_unsubscribe_port()
1508 if ((sport = snd_seq_port_use_ptr(sender, subs.sender.port)) == NULL) in snd_seq_ioctl_unsubscribe_port()
1510 if ((dport = snd_seq_port_use_ptr(receiver, subs.dest.port)) == NULL) in snd_seq_ioctl_unsubscribe_port()
1513 result = check_subscription_permission(client, sport, dport, &subs); in snd_seq_ioctl_unsubscribe_port()
1517 result = snd_seq_port_disconnect(client, sender, sport, receiver, dport, &subs); in snd_seq_ioctl_unsubscribe_port()
1520 &subs, SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED); in snd_seq_ioctl_unsubscribe_port()
1994 struct snd_seq_port_subscribe subs; in snd_seq_ioctl_get_subscription() local
1997 if (copy_from_user(&subs, arg, sizeof(subs))) in snd_seq_ioctl_get_subscription()
2001 if ((sender = snd_seq_client_use_ptr(subs.sender.client)) == NULL) in snd_seq_ioctl_get_subscription()
2003 if ((sport = snd_seq_port_use_ptr(sender, subs.sender.port)) == NULL) in snd_seq_ioctl_get_subscription()
2005 p = snd_seq_port_get_subscription(&sport->c_src, &subs.dest); in snd_seq_ioctl_get_subscription()
2008 subs = p->info; in snd_seq_ioctl_get_subscription()
2018 if (copy_to_user(arg, &subs, sizeof(subs))) in snd_seq_ioctl_get_subscription()
2034 struct snd_seq_query_subs subs; in snd_seq_ioctl_query_subs() local
2039 if (copy_from_user(&subs, arg, sizeof(subs))) in snd_seq_ioctl_query_subs()
2042 if ((cptr = snd_seq_client_use_ptr(subs.root.client)) == NULL) in snd_seq_ioctl_query_subs()
2044 if ((port = snd_seq_port_use_ptr(cptr, subs.root.port)) == NULL) in snd_seq_ioctl_query_subs()
2047 switch (subs.type) { in snd_seq_ioctl_query_subs()
2060 subs.num_subs = group->count; in snd_seq_ioctl_query_subs()
2064 if (i++ == subs.index) { in snd_seq_ioctl_query_subs()
2067 if (subs.type == SNDRV_SEQ_QUERY_SUBS_READ) { in snd_seq_ioctl_query_subs()
2069 subs.addr = s->info.dest; in snd_seq_ioctl_query_subs()
2072 subs.addr = s->info.sender; in snd_seq_ioctl_query_subs()
2074 subs.flags = s->info.flags; in snd_seq_ioctl_query_subs()
2075 subs.queue = s->info.queue; in snd_seq_ioctl_query_subs()
2088 if (copy_to_user(arg, &subs, sizeof(subs))) in snd_seq_ioctl_query_subs()