Lines Matching refs:cell
439 struct snd_seq_event_cell *cell; in snd_seq_read() local
464 cell = NULL; in snd_seq_read()
478 err = snd_seq_fifo_cell_out(fifo, &cell, nonblock); in snd_seq_read()
481 if (!event_is_compatible(client, &cell->event)) { in snd_seq_read()
482 snd_seq_cell_free(cell); in snd_seq_read()
483 cell = NULL; in snd_seq_read()
486 if (snd_seq_ev_is_variable(&cell->event)) { in snd_seq_read()
489 memcpy(&tmpev, &cell->event, aligned_size); in snd_seq_read()
497 err = snd_seq_expand_var_event(&cell->event, count, in snd_seq_read()
506 if (copy_to_user(buf, &cell->event, aligned_size)) { in snd_seq_read()
513 snd_seq_cell_free(cell); in snd_seq_read()
514 cell = NULL; /* to be sure */ in snd_seq_read()
519 if (cell) in snd_seq_read()
520 snd_seq_fifo_cell_putback(fifo, cell); in snd_seq_read()
865 int snd_seq_dispatch_event(struct snd_seq_event_cell *cell, int atomic, int hop) in snd_seq_dispatch_event() argument
870 if (snd_BUG_ON(!cell)) in snd_seq_dispatch_event()
873 client = snd_seq_client_use_ptr(cell->event.source.client); in snd_seq_dispatch_event()
875 snd_seq_cell_free(cell); /* release this cell */ in snd_seq_dispatch_event()
879 if (!snd_seq_ev_is_ump(&cell->event) && in snd_seq_dispatch_event()
880 cell->event.type == SNDRV_SEQ_EVENT_NOTE) { in snd_seq_dispatch_event()
888 tmpev = cell->event; in snd_seq_dispatch_event()
897 ev = &cell->event; in snd_seq_dispatch_event()
904 cell->event.time.tick += ev->data.note.duration; in snd_seq_dispatch_event()
917 if (snd_seq_enqueue_event(cell, atomic, hop) < 0) in snd_seq_dispatch_event()
918 snd_seq_cell_free(cell); /* release this cell */ in snd_seq_dispatch_event()
925 result = snd_seq_deliver_event(client, &cell->event, atomic, hop); in snd_seq_dispatch_event()
926 snd_seq_cell_free(cell); in snd_seq_dispatch_event()
944 struct snd_seq_event_cell *cell; in snd_seq_client_enqueue_event() local
974 err = snd_seq_event_dup(client->pool, event, &cell, !blocking || atomic, in snd_seq_client_enqueue_event()
980 err = snd_seq_enqueue_event(cell, atomic, hop); in snd_seq_client_enqueue_event()
982 snd_seq_cell_free(cell); in snd_seq_client_enqueue_event()