Lines Matching refs:client
69 static struct snd_seq_queue *queue_list_remove(int id, int client) in queue_list_remove() argument
78 if (q->owner == client) { in queue_list_remove()
161 static void queue_use(struct snd_seq_queue *queue, int client, int use);
168 struct snd_seq_queue *snd_seq_queue_alloc(int client, int locked, unsigned int info_flags) in snd_seq_queue_alloc() argument
172 q = queue_new(client, locked); in snd_seq_queue_alloc()
176 queue_use(q, client, 1); in snd_seq_queue_alloc()
187 int snd_seq_queue_delete(int client, int queueid) in snd_seq_queue_delete() argument
193 q = queue_list_remove(queueid, client); in snd_seq_queue_delete()
353 static inline int check_access(struct snd_seq_queue *q, int client) in check_access() argument
355 return (q->owner == client) || (!q->locked && !q->klocked); in check_access()
361 static int queue_access_lock(struct snd_seq_queue *q, int client) in queue_access_lock() argument
367 access_ok = check_access(q, client); in queue_access_lock()
385 int snd_seq_queue_check_access(int queueid, int client) in snd_seq_queue_check_access() argument
394 access_ok = check_access(q, client); in snd_seq_queue_check_access()
405 int snd_seq_queue_set_owner(int queueid, int client, int locked) in snd_seq_queue_set_owner() argument
413 if (! queue_access_lock(q, client)) { in snd_seq_queue_set_owner()
420 q->owner = client; in snd_seq_queue_set_owner()
470 int snd_seq_queue_timer_set_tempo(int queueid, int client, in snd_seq_queue_timer_set_tempo() argument
478 if (! queue_access_lock(q, client)) { in snd_seq_queue_timer_set_tempo()
493 static void queue_use(struct snd_seq_queue *queue, int client, int use) in queue_use() argument
496 if (!test_and_set_bit(client, queue->clients_bitmap)) in queue_use()
499 if (test_and_clear_bit(client, queue->clients_bitmap)) in queue_use()
515 int snd_seq_queue_use(int queueid, int client, int use) in snd_seq_queue_use() argument
523 queue_use(queue, client, use); in snd_seq_queue_use()
534 int snd_seq_queue_is_used(int queueid, int client) in snd_seq_queue_is_used() argument
542 result = test_bit(client, q->clients_bitmap) ? 1 : 0; in snd_seq_queue_is_used()
553 void snd_seq_queue_client_termination(int client) in snd_seq_queue_client_termination() argument
564 matched = (q->owner == client); in snd_seq_queue_client_termination()
581 void snd_seq_queue_client_leave(int client) in snd_seq_queue_client_leave() argument
588 if ((q = queue_list_remove(i, client)) != NULL) in snd_seq_queue_client_leave()
598 if (test_bit(client, q->clients_bitmap)) { in snd_seq_queue_client_leave()
599 snd_seq_prioq_leave(q->tickq, client, 0); in snd_seq_queue_client_leave()
600 snd_seq_prioq_leave(q->timeq, client, 0); in snd_seq_queue_client_leave()
601 snd_seq_queue_use(q->queue, client, 0); in snd_seq_queue_client_leave()
612 void snd_seq_queue_client_leave_cells(int client) in snd_seq_queue_client_leave_cells() argument
620 snd_seq_prioq_leave(q->tickq, client, 0); in snd_seq_queue_client_leave_cells()
621 snd_seq_prioq_leave(q->timeq, client, 0); in snd_seq_queue_client_leave_cells()
627 void snd_seq_queue_remove_cells(int client, struct snd_seq_remove_events *info) in snd_seq_queue_remove_cells() argument
635 if (test_bit(client, q->clients_bitmap) && in snd_seq_queue_remove_cells()
638 snd_seq_prioq_remove_events(q->tickq, client, info); in snd_seq_queue_remove_cells()
639 snd_seq_prioq_remove_events(q->timeq, client, info); in snd_seq_queue_remove_cells()
663 sev.source.client = SNDRV_SEQ_CLIENT_SYSTEM; in queue_broadcast_event()
665 sev.dest.client = SNDRV_SEQ_ADDRESS_SUBSCRIBERS; in queue_broadcast_event()
679 snd_seq_prioq_leave(q->tickq, ev->source.client, 1); in snd_seq_queue_process_event()
680 snd_seq_prioq_leave(q->timeq, ev->source.client, 1); in snd_seq_queue_process_event()
737 if (! queue_access_lock(q, ev->source.client)) { in snd_seq_control_queue()