Lines Matching refs:grp

102 static void port_subs_info_init(struct snd_seq_port_subs_info *grp)  in port_subs_info_init()  argument
104 INIT_LIST_HEAD(&grp->list_head); in port_subs_info_init()
105 grp->count = 0; in port_subs_info_init()
106 grp->exclusive = 0; in port_subs_info_init()
107 rwlock_init(&grp->list_lock); in port_subs_info_init()
108 init_rwsem(&grp->list_mutex); in port_subs_info_init()
109 grp->open = NULL; in port_subs_info_init()
110 grp->close = NULL; in port_subs_info_init()
177 struct snd_seq_port_subs_info *grp,
181 struct snd_seq_port_subs_info *grp,
221 struct snd_seq_port_subs_info *grp, in clear_subscriber_list() argument
226 list_for_each_safe(p, n, &grp->list_head) { in clear_subscriber_list()
432 struct snd_seq_port_subs_info *grp, in subscribe_port() argument
440 grp->count++; in subscribe_port()
441 if (grp->open && grp->count == 1) { in subscribe_port()
442 err = grp->open(port->private_data, info); in subscribe_port()
445 grp->count--; in subscribe_port()
457 struct snd_seq_port_subs_info *grp, in unsubscribe_port() argument
463 if (! grp->count) in unsubscribe_port()
465 grp->count--; in unsubscribe_port()
466 if (grp->close && grp->count == 0) in unsubscribe_port()
467 err = grp->close(port->private_data, info); in unsubscribe_port()
503 struct snd_seq_port_subs_info *grp; in check_and_subscribe_port() local
508 grp = is_src ? &port->c_src : &port->c_dest; in check_and_subscribe_port()
510 down_write(&grp->list_mutex); in check_and_subscribe_port()
512 if (!list_empty(&grp->list_head)) in check_and_subscribe_port()
515 if (grp->exclusive) in check_and_subscribe_port()
518 list_for_each(p, &grp->list_head) { in check_and_subscribe_port()
525 err = subscribe_port(client, port, grp, &subs->info, ack); in check_and_subscribe_port()
527 grp->exclusive = 0; in check_and_subscribe_port()
532 write_lock_irq(&grp->list_lock); in check_and_subscribe_port()
534 list_add_tail(&subs->src_list, &grp->list_head); in check_and_subscribe_port()
536 list_add_tail(&subs->dest_list, &grp->list_head); in check_and_subscribe_port()
537 grp->exclusive = exclusive; in check_and_subscribe_port()
539 write_unlock_irq(&grp->list_lock); in check_and_subscribe_port()
543 up_write(&grp->list_mutex); in check_and_subscribe_port()
553 struct snd_seq_port_subs_info *grp; in __delete_and_unsubscribe_port() local
557 grp = is_src ? &port->c_src : &port->c_dest; in __delete_and_unsubscribe_port()
559 write_lock_irq(&grp->list_lock); in __delete_and_unsubscribe_port()
563 grp->exclusive = 0; in __delete_and_unsubscribe_port()
564 write_unlock_irq(&grp->list_lock); in __delete_and_unsubscribe_port()
567 unsubscribe_port(client, port, grp, &subs->info, ack); in __delete_and_unsubscribe_port()
575 struct snd_seq_port_subs_info *grp; in delete_and_unsubscribe_port() local
577 grp = is_src ? &port->c_src : &port->c_dest; in delete_and_unsubscribe_port()
578 down_write(&grp->list_mutex); in delete_and_unsubscribe_port()
580 up_write(&grp->list_mutex); in delete_and_unsubscribe_port()