Lines Matching full:grp

99 static void port_subs_info_init(struct snd_seq_port_subs_info *grp)  in port_subs_info_init()  argument
101 INIT_LIST_HEAD(&grp->list_head); in port_subs_info_init()
102 grp->count = 0; in port_subs_info_init()
103 grp->exclusive = 0; in port_subs_info_init()
104 rwlock_init(&grp->list_lock); in port_subs_info_init()
105 init_rwsem(&grp->list_mutex); in port_subs_info_init()
106 grp->open = NULL; in port_subs_info_init()
107 grp->close = NULL; in port_subs_info_init()
170 struct snd_seq_port_subs_info *grp,
174 struct snd_seq_port_subs_info *grp,
214 struct snd_seq_port_subs_info *grp, in clear_subscriber_list() argument
219 list_for_each_safe(p, n, &grp->list_head) { in clear_subscriber_list()
428 struct snd_seq_port_subs_info *grp, in subscribe_port() argument
436 grp->count++; in subscribe_port()
437 if (grp->open && grp->count == 1) { in subscribe_port()
438 err = grp->open(port->private_data, info); in subscribe_port()
441 grp->count--; in subscribe_port()
453 struct snd_seq_port_subs_info *grp, in unsubscribe_port() argument
459 if (! grp->count) in unsubscribe_port()
461 grp->count--; in unsubscribe_port()
462 if (grp->close && grp->count == 0) in unsubscribe_port()
463 err = grp->close(port->private_data, info); in unsubscribe_port()
499 struct snd_seq_port_subs_info *grp; in check_and_subscribe_port() local
504 grp = is_src ? &port->c_src : &port->c_dest; in check_and_subscribe_port()
505 guard(rwsem_write)(&grp->list_mutex); in check_and_subscribe_port()
507 if (!list_empty(&grp->list_head)) in check_and_subscribe_port()
510 if (grp->exclusive) in check_and_subscribe_port()
513 list_for_each(p, &grp->list_head) { in check_and_subscribe_port()
520 err = subscribe_port(client, port, grp, &subs->info, ack); in check_and_subscribe_port()
522 grp->exclusive = 0; in check_and_subscribe_port()
527 guard(write_lock_irq)(&grp->list_lock); in check_and_subscribe_port()
529 list_add_tail(&subs->src_list, &grp->list_head); in check_and_subscribe_port()
531 list_add_tail(&subs->dest_list, &grp->list_head); in check_and_subscribe_port()
532 grp->exclusive = exclusive; in check_and_subscribe_port()
538 /* called with grp->list_mutex held */
544 struct snd_seq_port_subs_info *grp; in __delete_and_unsubscribe_port() local
548 grp = is_src ? &port->c_src : &port->c_dest; in __delete_and_unsubscribe_port()
550 scoped_guard(write_lock_irq, &grp->list_lock) { in __delete_and_unsubscribe_port()
554 grp->exclusive = 0; in __delete_and_unsubscribe_port()
558 unsubscribe_port(client, port, grp, &subs->info, ack); in __delete_and_unsubscribe_port()
566 struct snd_seq_port_subs_info *grp; in delete_and_unsubscribe_port() local
568 grp = is_src ? &port->c_src : &port->c_dest; in delete_and_unsubscribe_port()
569 guard(rwsem_write)(&grp->list_mutex); in delete_and_unsubscribe_port()