162306a36Sopenharmony_ci===============================
262306a36Sopenharmony_ciOSS Sequencer Emulation on ALSA
362306a36Sopenharmony_ci===============================
462306a36Sopenharmony_ci
562306a36Sopenharmony_ciCopyright (c) 1998,1999 by Takashi Iwai
662306a36Sopenharmony_ci
762306a36Sopenharmony_civer.0.1.8; Nov. 16, 1999
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciDescription
1062306a36Sopenharmony_ci===========
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciThis directory contains the OSS sequencer emulation driver on ALSA. Note
1362306a36Sopenharmony_cithat this program is still in the development state.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciWhat this does - it provides the emulation of the OSS sequencer, access
1662306a36Sopenharmony_civia ``/dev/sequencer`` and ``/dev/music`` devices.
1762306a36Sopenharmony_ciThe most of applications using OSS can run if the appropriate ALSA
1862306a36Sopenharmony_cisequencer is prepared.
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciThe following features are emulated by this driver:
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci* Normal sequencer and MIDI events:
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci    They are converted to the ALSA sequencer events, and sent to the
2562306a36Sopenharmony_ci    corresponding port.
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci* Timer events:
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci    The timer is not selectable by ioctl. The control rate is fixed to
3062306a36Sopenharmony_ci    100 regardless of HZ. That is, even on Alpha system, a tick is always
3162306a36Sopenharmony_ci    1/100 second. The base rate and tempo can be changed in ``/dev/music``.
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci* Patch loading:
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci    It purely depends on the synth drivers whether it's supported since
3662306a36Sopenharmony_ci    the patch loading is realized by callback to the synth driver.
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci* I/O controls:
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci    Most of controls are accepted. Some controls
4162306a36Sopenharmony_ci    are dependent on the synth driver, as well as even on original OSS.
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ciFurthermore, you can find the following advanced features:
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci* Better queue mechanism:
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci    The events are queued before processing them.
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci* Multiple applications:
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci    You can run two or more applications simultaneously (even for OSS
5262306a36Sopenharmony_ci    sequencer)!
5362306a36Sopenharmony_ci    However, each MIDI device is exclusive - that is, if a MIDI device
5462306a36Sopenharmony_ci    is opened once by some application, other applications can't use
5562306a36Sopenharmony_ci    it. No such a restriction in synth devices.
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci* Real-time event processing:
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci    The events can be processed in real time without using out of bound
6062306a36Sopenharmony_ci    ioctl. To switch to real-time mode, send ABSTIME 0 event. The followed
6162306a36Sopenharmony_ci    events will be processed in real-time without queued. To switch off the
6262306a36Sopenharmony_ci    real-time mode, send RELTIME 0 event.
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci* ``/proc`` interface:
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci    The status of applications and devices can be shown via
6762306a36Sopenharmony_ci    ``/proc/asound/seq/oss`` at any time. In the later version,
6862306a36Sopenharmony_ci    configuration will be changed via ``/proc`` interface, too.
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ciInstallation
7262306a36Sopenharmony_ci============
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ciRun configure script with both sequencer support (``--with-sequencer=yes``)
7562306a36Sopenharmony_ciand OSS emulation (``--with-oss=yes``) options. A module ``snd-seq-oss.o``
7662306a36Sopenharmony_ciwill be created. If the synth module of your sound card supports for OSS
7762306a36Sopenharmony_ciemulation (so far, only Emu8000 driver), this module will be loaded
7862306a36Sopenharmony_ciautomatically.
7962306a36Sopenharmony_ciOtherwise, you need to load this module manually.
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ciAt beginning, this module probes all the MIDI ports which have been
8262306a36Sopenharmony_cialready connected to the sequencer. Once after that, the creation and deletion
8362306a36Sopenharmony_ciof ports are watched by announcement mechanism of ALSA sequencer.
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ciThe available synth and MIDI devices can be found in proc interface.
8662306a36Sopenharmony_ciRun ``cat /proc/asound/seq/oss``, and check the devices. For example,
8762306a36Sopenharmony_ciif you use an AWE64 card, you'll see like the following:
8862306a36Sopenharmony_ci::
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci    OSS sequencer emulation version 0.1.8
9162306a36Sopenharmony_ci    ALSA client number 63
9262306a36Sopenharmony_ci    ALSA receiver port 0
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_ci    Number of applications: 0
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ci    Number of synth devices: 1
9762306a36Sopenharmony_ci    synth 0: [EMU8000]
9862306a36Sopenharmony_ci      type 0x1 : subtype 0x20 : voices 32
9962306a36Sopenharmony_ci      capabilities : ioctl enabled / load_patch enabled
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ci    Number of MIDI devices: 3
10262306a36Sopenharmony_ci    midi 0: [Emu8000 Port-0] ALSA port 65:0
10362306a36Sopenharmony_ci      capability write / opened none
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci    midi 1: [Emu8000 Port-1] ALSA port 65:1
10662306a36Sopenharmony_ci      capability write / opened none
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci    midi 2: [0: MPU-401 (UART)] ALSA port 64:0
10962306a36Sopenharmony_ci      capability read/write / opened none
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ciNote that the device number may be different from the information of
11262306a36Sopenharmony_ci``/proc/asound/oss-devices`` or ones of the original OSS driver.
11362306a36Sopenharmony_ciUse the device number listed in ``/proc/asound/seq/oss``
11462306a36Sopenharmony_cito play via OSS sequencer emulation.
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ciUsing Synthesizer Devices
11762306a36Sopenharmony_ci=========================
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ciRun your favorite program. I've tested playmidi-2.4, awemidi-0.4.3, gmod-3.1
12062306a36Sopenharmony_ciand xmp-1.1.5. You can load samples via ``/dev/sequencer`` like sfxload,
12162306a36Sopenharmony_citoo.
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ciIf the lowlevel driver supports multiple access to synth devices (like
12462306a36Sopenharmony_ciEmu8000 driver), two or more applications are allowed to run at the same
12562306a36Sopenharmony_citime.
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ciUsing MIDI Devices
12862306a36Sopenharmony_ci==================
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ciSo far, only MIDI output was tested. MIDI input was not checked at all,
13162306a36Sopenharmony_cibut hopefully it will work. Use the device number listed in
13262306a36Sopenharmony_ci``/proc/asound/seq/oss``.
13362306a36Sopenharmony_ciBe aware that these numbers are mostly different from the list in
13462306a36Sopenharmony_ci``/proc/asound/oss-devices``.
13562306a36Sopenharmony_ci
13662306a36Sopenharmony_ciModule Options
13762306a36Sopenharmony_ci==============
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ciThe following module options are available:
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_cimaxqlen
14262306a36Sopenharmony_ci  specifies the maximum read/write queue length. This queue is private
14362306a36Sopenharmony_ci  for OSS sequencer, so that it is independent from the queue length of ALSA
14462306a36Sopenharmony_ci  sequencer. Default value is 1024.
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ciseq_oss_debug
14762306a36Sopenharmony_ci  specifies the debug level and accepts zero (= no debug message) or
14862306a36Sopenharmony_ci  positive integer. Default value is 0.
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ciQueue Mechanism
15162306a36Sopenharmony_ci===============
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ciOSS sequencer emulation uses an ALSA priority queue. The
15462306a36Sopenharmony_cievents from ``/dev/sequencer`` are processed and put onto the queue
15562306a36Sopenharmony_cispecified by module option.
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_ciAll the events from ``/dev/sequencer`` are parsed at beginning.
15862306a36Sopenharmony_ciThe timing events are also parsed at this moment, so that the events may
15962306a36Sopenharmony_cibe processed in real-time. Sending an event ABSTIME 0 switches the operation
16062306a36Sopenharmony_cimode to real-time mode, and sending an event RELTIME 0 switches it off.
16162306a36Sopenharmony_ciIn the real-time mode, all events are dispatched immediately.
16262306a36Sopenharmony_ci
16362306a36Sopenharmony_ciThe queued events are dispatched to the corresponding ALSA sequencer
16462306a36Sopenharmony_ciports after scheduled time by ALSA sequencer dispatcher.
16562306a36Sopenharmony_ci
16662306a36Sopenharmony_ciIf the write-queue is full, the application sleeps until a certain amount
16762306a36Sopenharmony_ci(as default one half) becomes empty in blocking mode. The synchronization
16862306a36Sopenharmony_cito write timing was implemented, too.
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ciThe input from MIDI devices or echo-back events are stored on read FIFO
17162306a36Sopenharmony_ciqueue. If application reads ``/dev/sequencer`` in blocking mode, the
17262306a36Sopenharmony_ciprocess will be awaked.
17362306a36Sopenharmony_ci
17462306a36Sopenharmony_ciInterface to Synthesizer Device
17562306a36Sopenharmony_ci===============================
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ciRegistration
17862306a36Sopenharmony_ci------------
17962306a36Sopenharmony_ci
18062306a36Sopenharmony_ciTo register an OSS synthesizer device, use snd_seq_oss_synth_register()
18162306a36Sopenharmony_cifunction:
18262306a36Sopenharmony_ci::
18362306a36Sopenharmony_ci
18462306a36Sopenharmony_ci  int snd_seq_oss_synth_register(char *name, int type, int subtype, int nvoices,
18562306a36Sopenharmony_ci          snd_seq_oss_callback_t *oper, void *private_data)
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ciThe arguments ``name``, ``type``, ``subtype`` and ``nvoices``
18862306a36Sopenharmony_ciare used for making the appropriate synth_info structure for ioctl. The
18962306a36Sopenharmony_cireturn value is an index number of this device. This index must be remembered
19062306a36Sopenharmony_cifor unregister. If registration is failed, -errno will be returned.
19162306a36Sopenharmony_ci
19262306a36Sopenharmony_ciTo release this device, call snd_seq_oss_synth_unregister() function:
19362306a36Sopenharmony_ci::
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_ci  int snd_seq_oss_synth_unregister(int index)
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ciwhere the ``index`` is the index number returned by register function.
19862306a36Sopenharmony_ci
19962306a36Sopenharmony_ciCallbacks
20062306a36Sopenharmony_ci---------
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_ciOSS synthesizer devices have capability for sample downloading and ioctls
20362306a36Sopenharmony_cilike sample reset. In OSS emulation, these special features are realized
20462306a36Sopenharmony_ciby using callbacks. The registration argument oper is used to specify these
20562306a36Sopenharmony_cicallbacks. The following callback functions must be defined:
20662306a36Sopenharmony_ci::
20762306a36Sopenharmony_ci
20862306a36Sopenharmony_ci  snd_seq_oss_callback_t:
20962306a36Sopenharmony_ci   int (*open)(snd_seq_oss_arg_t *p, void *closure);
21062306a36Sopenharmony_ci   int (*close)(snd_seq_oss_arg_t *p);
21162306a36Sopenharmony_ci   int (*ioctl)(snd_seq_oss_arg_t *p, unsigned int cmd, unsigned long arg);
21262306a36Sopenharmony_ci   int (*load_patch)(snd_seq_oss_arg_t *p, int format, const char *buf, int offs, int count);
21362306a36Sopenharmony_ci   int (*reset)(snd_seq_oss_arg_t *p);
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ciExcept for ``open`` and ``close`` callbacks, they are allowed to be NULL.
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_ciEach callback function takes the argument type ``snd_seq_oss_arg_t`` as the
21862306a36Sopenharmony_cifirst argument.
21962306a36Sopenharmony_ci::
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ci  struct snd_seq_oss_arg_t {
22262306a36Sopenharmony_ci      int app_index;
22362306a36Sopenharmony_ci      int file_mode;
22462306a36Sopenharmony_ci      int seq_mode;
22562306a36Sopenharmony_ci      snd_seq_addr_t addr;
22662306a36Sopenharmony_ci      void *private_data;
22762306a36Sopenharmony_ci      int event_passing;
22862306a36Sopenharmony_ci  };
22962306a36Sopenharmony_ci
23062306a36Sopenharmony_ciThe first three fields, ``app_index``, ``file_mode`` and ``seq_mode``
23162306a36Sopenharmony_ciare initialized by OSS sequencer. The ``app_index`` is the application
23262306a36Sopenharmony_ciindex which is unique to each application opening OSS sequencer. The
23362306a36Sopenharmony_ci``file_mode`` is bit-flags indicating the file operation mode. See
23462306a36Sopenharmony_ci``seq_oss.h`` for its meaning. The ``seq_mode`` is sequencer operation
23562306a36Sopenharmony_cimode. In the current version, only ``SND_OSSSEQ_MODE_SYNTH`` is used.
23662306a36Sopenharmony_ci
23762306a36Sopenharmony_ciThe next two fields, ``addr`` and ``private_data``, must be
23862306a36Sopenharmony_cifilled by the synth driver at open callback. The ``addr`` contains
23962306a36Sopenharmony_cithe address of ALSA sequencer port which is assigned to this device. If
24062306a36Sopenharmony_cithe driver allocates memory for ``private_data``, it must be released
24162306a36Sopenharmony_ciin close callback by itself.
24262306a36Sopenharmony_ci
24362306a36Sopenharmony_ciThe last field, ``event_passing``, indicates how to translate note-on
24462306a36Sopenharmony_ci/ off events. In ``PROCESS_EVENTS`` mode, the note 255 is regarded
24562306a36Sopenharmony_cias velocity change, and key pressure event is passed to the port. In
24662306a36Sopenharmony_ci``PASS_EVENTS`` mode, all note on/off events are passed to the port
24762306a36Sopenharmony_ciwithout modified. ``PROCESS_KEYPRESS`` mode checks the note above 128
24862306a36Sopenharmony_ciand regards it as key pressure event (mainly for Emu8000 driver).
24962306a36Sopenharmony_ci
25062306a36Sopenharmony_ciOpen Callback
25162306a36Sopenharmony_ci-------------
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_ciThe ``open`` is called at each time this device is opened by an application
25462306a36Sopenharmony_ciusing OSS sequencer. This must not be NULL. Typically, the open callback
25562306a36Sopenharmony_cidoes the following procedure:
25662306a36Sopenharmony_ci
25762306a36Sopenharmony_ci#. Allocate private data record.
25862306a36Sopenharmony_ci#. Create an ALSA sequencer port.
25962306a36Sopenharmony_ci#. Set the new port address on ``arg->addr``.
26062306a36Sopenharmony_ci#. Set the private data record pointer on ``arg->private_data``.
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_ciNote that the type bit-flags in port_info of this synth port must NOT contain
26362306a36Sopenharmony_ci``TYPE_MIDI_GENERIC``
26462306a36Sopenharmony_cibit. Instead, ``TYPE_SPECIFIC`` should be used. Also, ``CAP_SUBSCRIPTION``
26562306a36Sopenharmony_cibit should NOT be included, too. This is necessary to tell it from other
26662306a36Sopenharmony_cinormal MIDI devices. If the open procedure succeeded, return zero. Otherwise,
26762306a36Sopenharmony_cireturn -errno.
26862306a36Sopenharmony_ci
26962306a36Sopenharmony_ciIoctl Callback
27062306a36Sopenharmony_ci--------------
27162306a36Sopenharmony_ci
27262306a36Sopenharmony_ciThe ``ioctl`` callback is called when the sequencer receives device-specific
27362306a36Sopenharmony_ciioctls. The following two ioctls should be processed by this callback:
27462306a36Sopenharmony_ci
27562306a36Sopenharmony_ciIOCTL_SEQ_RESET_SAMPLES
27662306a36Sopenharmony_ci    reset all samples on memory -- return 0
27762306a36Sopenharmony_ci
27862306a36Sopenharmony_ciIOCTL_SYNTH_MEMAVL
27962306a36Sopenharmony_ci    return the available memory size
28062306a36Sopenharmony_ci
28162306a36Sopenharmony_ciFM_4OP_ENABLE
28262306a36Sopenharmony_ci    can be ignored usually
28362306a36Sopenharmony_ci
28462306a36Sopenharmony_ciThe other ioctls are processed inside the sequencer without passing to
28562306a36Sopenharmony_cithe lowlevel driver.
28662306a36Sopenharmony_ci
28762306a36Sopenharmony_ciLoad_Patch Callback
28862306a36Sopenharmony_ci-------------------
28962306a36Sopenharmony_ci
29062306a36Sopenharmony_ciThe ``load_patch`` callback is used for sample-downloading. This callback
29162306a36Sopenharmony_cimust read the data on user-space and transfer to each device. Return 0
29262306a36Sopenharmony_ciif succeeded, and -errno if failed. The format argument is the patch key
29362306a36Sopenharmony_ciin patch_info record. The buf is user-space pointer where patch_info record
29462306a36Sopenharmony_ciis stored. The offs can be ignored. The count is total data size of this
29562306a36Sopenharmony_cisample data.
29662306a36Sopenharmony_ci
29762306a36Sopenharmony_ciClose Callback
29862306a36Sopenharmony_ci--------------
29962306a36Sopenharmony_ci
30062306a36Sopenharmony_ciThe ``close`` callback is called when this device is closed by the
30162306a36Sopenharmony_ciapplication. If any private data was allocated in open callback, it must
30262306a36Sopenharmony_cibe released in the close callback. The deletion of ALSA port should be
30362306a36Sopenharmony_cidone here, too. This callback must not be NULL.
30462306a36Sopenharmony_ci
30562306a36Sopenharmony_ciReset Callback
30662306a36Sopenharmony_ci--------------
30762306a36Sopenharmony_ci
30862306a36Sopenharmony_ciThe ``reset`` callback is called when sequencer device is reset or
30962306a36Sopenharmony_ciclosed by applications. The callback should turn off the sounds on the
31062306a36Sopenharmony_cirelevant port immediately, and initialize the status of the port. If this
31162306a36Sopenharmony_cicallback is undefined, OSS seq sends a ``HEARTBEAT`` event to the
31262306a36Sopenharmony_ciport.
31362306a36Sopenharmony_ci
31462306a36Sopenharmony_ciEvents
31562306a36Sopenharmony_ci======
31662306a36Sopenharmony_ci
31762306a36Sopenharmony_ciMost of the events are processed by sequencer and translated to the adequate
31862306a36Sopenharmony_ciALSA sequencer events, so that each synth device can receive by input_event
31962306a36Sopenharmony_cicallback of ALSA sequencer port. The following ALSA events should be
32062306a36Sopenharmony_ciimplemented by the driver:
32162306a36Sopenharmony_ci
32262306a36Sopenharmony_ci=============	===================
32362306a36Sopenharmony_ciALSA event	Original OSS events
32462306a36Sopenharmony_ci=============	===================
32562306a36Sopenharmony_ciNOTEON		SEQ_NOTEON, MIDI_NOTEON
32662306a36Sopenharmony_ciNOTE		SEQ_NOTEOFF, MIDI_NOTEOFF
32762306a36Sopenharmony_ciKEYPRESS	MIDI_KEY_PRESSURE
32862306a36Sopenharmony_ciCHANPRESS	SEQ_AFTERTOUCH, MIDI_CHN_PRESSURE
32962306a36Sopenharmony_ciPGMCHANGE	SEQ_PGMCHANGE, MIDI_PGM_CHANGE
33062306a36Sopenharmony_ciPITCHBEND	SEQ_CONTROLLER(CTRL_PITCH_BENDER),
33162306a36Sopenharmony_ci		MIDI_PITCH_BEND
33262306a36Sopenharmony_ciCONTROLLER	MIDI_CTL_CHANGE,
33362306a36Sopenharmony_ci		SEQ_BALANCE (with CTL_PAN)
33462306a36Sopenharmony_ciCONTROL14	SEQ_CONTROLLER
33562306a36Sopenharmony_ciREGPARAM	SEQ_CONTROLLER(CTRL_PITCH_BENDER_RANGE)
33662306a36Sopenharmony_ciSYSEX		SEQ_SYSEX
33762306a36Sopenharmony_ci=============	===================
33862306a36Sopenharmony_ci
33962306a36Sopenharmony_ciThe most of these behavior can be realized by MIDI emulation driver
34062306a36Sopenharmony_ciincluded in the Emu8000 lowlevel driver. In the future release, this module
34162306a36Sopenharmony_ciwill be independent.
34262306a36Sopenharmony_ci
34362306a36Sopenharmony_ciSome OSS events (``SEQ_PRIVATE`` and ``SEQ_VOLUME`` events) are passed as event
34462306a36Sopenharmony_citype SND_SEQ_OSS_PRIVATE.  The OSS sequencer passes these event 8 byte
34562306a36Sopenharmony_cipackets without any modification. The lowlevel driver should process these
34662306a36Sopenharmony_cievents appropriately.
34762306a36Sopenharmony_ci
34862306a36Sopenharmony_ciInterface to MIDI Device
34962306a36Sopenharmony_ci========================
35062306a36Sopenharmony_ci
35162306a36Sopenharmony_ciSince the OSS emulation probes the creation and deletion of ALSA MIDI
35262306a36Sopenharmony_cisequencer ports automatically by receiving announcement from ALSA
35362306a36Sopenharmony_cisequencer, the MIDI devices don't need to be registered explicitly
35462306a36Sopenharmony_cilike synth devices.
35562306a36Sopenharmony_ciHowever, the MIDI port_info registered to ALSA sequencer must include
35662306a36Sopenharmony_cia group name ``SND_SEQ_GROUP_DEVICE`` and a capability-bit
35762306a36Sopenharmony_ci``CAP_READ`` or ``CAP_WRITE``. Also, subscription capabilities,
35862306a36Sopenharmony_ci``CAP_SUBS_READ`` or ``CAP_SUBS_WRITE``, must be defined, too. If
35962306a36Sopenharmony_cithese conditions are not satisfied, the port is not registered as OSS
36062306a36Sopenharmony_cisequencer MIDI device.
36162306a36Sopenharmony_ci
36262306a36Sopenharmony_ciThe events via MIDI devices are parsed in OSS sequencer and converted
36362306a36Sopenharmony_cito the corresponding ALSA sequencer events. The input from MIDI sequencer
36462306a36Sopenharmony_ciis also converted to MIDI byte events by OSS sequencer. This works just
36562306a36Sopenharmony_cia reverse way of seq_midi module.
36662306a36Sopenharmony_ci
36762306a36Sopenharmony_ciKnown Problems / TODO's
36862306a36Sopenharmony_ci=======================
36962306a36Sopenharmony_ci
37062306a36Sopenharmony_ci* Patch loading via ALSA instrument layer is not implemented yet.
37162306a36Sopenharmony_ci
372