On ALSA library, events are buffered on both user- and kernel-space in order to reduce the number of system calls. Output events are once decoded to byte-stream and written on the user-space buffer. Once it's filled or flushed manually via snd_seq_flush_output, the events are transferred to sequencer core. Then sequencer puts the received events to scheduled queues, or deliver them directly to their destinations.
The input events, which are delivered from other clients either via queue or direct dispatch, are stored in FIFO of the sequencer on kernel space. Then they are transferred to FIFO of ALSA lib on user-space.
Application can deal with all these operations via the functions described below.