>sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget)/translations/zh_CN/sound/designs/seq-ossmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/zh_TW/sound/designs/seq-ossmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/it_IT/sound/designs/seq-ossmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ja_JP/sound/designs/seq-ossmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ko_KR/sound/designs/seq-ossmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/pt_BR/sound/designs/seq-ossmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/sp_SP/sound/designs/seq-ossmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hOSS Sequencer Emulation on ALSAh]hOSS Sequencer Emulation on ALSA}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhC/var/lib/git/docbuild/linux/Documentation/sound/designs/seq-oss.rsthKubh paragraph)}(h'Copyright (c) 1998,1999 by Takashi Iwaih]h'Copyright (c) 1998,1999 by Takashi Iwai}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hver.0.1.8; Nov. 16, 1999h]hver.0.1.8; Nov. 16, 1999}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Descriptionh]h Description}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(h}This directory contains the OSS sequencer emulation driver on ALSA. Note that this program is still in the development state.h]h}This directory contains the OSS sequencer emulation driver on ALSA. Note that this program is still in the development state.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hWhat this does - it provides the emulation of the OSS sequencer, access via ``/dev/sequencer`` and ``/dev/music`` devices. The most of applications using OSS can run if the appropriate ALSA sequencer is prepared.h](hLWhat this does - it provides the emulation of the OSS sequencer, access via }(hjhhhNhNubhliteral)}(h``/dev/sequencer``h]h/dev/sequencer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``/dev/music``h]h /dev/music}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhc devices. The most of applications using OSS can run if the appropriate ALSA sequencer is prepared.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h3The following features are emulated by this driver:h]h3The following features are emulated by this driver:}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh bullet_list)}(hhh](h list_item)}(h|Normal sequencer and MIDI events: They are converted to the ALSA sequencer events, and sent to the corresponding port. h](h)}(h!Normal sequencer and MIDI events:h]h!Normal sequencer and MIDI events:}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQubh block_quote)}(hUThey are converted to the ALSA sequencer events, and sent to the corresponding port. h]h)}(hTThey are converted to the ALSA sequencer events, and sent to the corresponding port.h]hTThey are converted to the ALSA sequencer events, and sent to the corresponding port.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjeubah}(h]h ]h"]h$]h&]uh1jchhhKhjQubeh}(h]h ]h"]h$]h&]uh1jOhjLhhhhhNubjP)}(hTimer events: The timer is not selectable by ioctl. The control rate is fixed to 100 regardless of HZ. That is, even on Alpha system, a tick is always 1/100 second. The base rate and tempo can be changed in ``/dev/music``. h](h)}(h Timer events:h]h Timer events:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubjd)}(hThe timer is not selectable by ioctl. The control rate is fixed to 100 regardless of HZ. That is, even on Alpha system, a tick is always 1/100 second. The base rate and tempo can be changed in ``/dev/music``. h]h)}(hThe timer is not selectable by ioctl. The control rate is fixed to 100 regardless of HZ. That is, even on Alpha system, a tick is always 1/100 second. The base rate and tempo can be changed in ``/dev/music``.h](hThe timer is not selectable by ioctl. The control rate is fixed to 100 regardless of HZ. That is, even on Alpha system, a tick is always 1/100 second. The base rate and tempo can be changed in }(hjhhhNhNubj)}(h``/dev/music``h]h /dev/music}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchhhKhjubeh}(h]h ]h"]h$]h&]uh1jOhjLhhhhhNubjP)}(hPatch loading: It purely depends on the synth drivers whether it's supported since the patch loading is realized by callback to the synth driver. h](h)}(hPatch loading:h]hPatch loading:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjubjd)}(hIt purely depends on the synth drivers whether it's supported since the patch loading is realized by callback to the synth driver. h]h)}(hIt purely depends on the synth drivers whether it's supported since the patch loading is realized by callback to the synth driver.h]hIt purely depends on the synth drivers whether it’s supported since the patch loading is realized by callback to the synth driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jchhhK#hjubeh}(h]h ]h"]h$]h&]uh1jOhjLhhhhhNubjP)}(hI/O controls: Most of controls are accepted. Some controls are dependent on the synth driver, as well as even on original OSS. h](h)}(h I/O controls:h]h I/O controls:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubjd)}(hqMost of controls are accepted. Some controls are dependent on the synth driver, as well as even on original OSS. h]h)}(hpMost of controls are accepted. Some controls are dependent on the synth driver, as well as even on original OSS.h]hpMost of controls are accepted. Some controls are dependent on the synth driver, as well as even on original OSS.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jchhhK(hjubeh}(h]h ]h"]h$]h&]uh1jOhjLhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1jJhhhKhhhhubh)}(h:Furthermore, you can find the following advanced features:h]h:Furthermore, you can find the following advanced features:}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hhhhubjK)}(hhh](jP)}(hIBetter queue mechanism: The events are queued before processing them. h](h)}(hBetter queue mechanism:h]hBetter queue mechanism:}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hj>ubjd)}(h.The events are queued before processing them. h]h)}(h-The events are queued before processing them.h]h-The events are queued before processing them.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjPubah}(h]h ]h"]h$]h&]uh1jchhhK/hj>ubeh}(h]h ]h"]h$]h&]uh1jOhj;hhhhhNubjP)}(hX Multiple applications: You can run two or more applications simultaneously (even for OSS sequencer)! However, each MIDI device is exclusive - that is, if a MIDI device is opened once by some application, other applications can't use it. No such a restriction in synth devices. h](h)}(hMultiple applications:h]hMultiple applications:}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjnubjd)}(hYou can run two or more applications simultaneously (even for OSS sequencer)! However, each MIDI device is exclusive - that is, if a MIDI device is opened once by some application, other applications can't use it. No such a restriction in synth devices. h]h)}(hYou can run two or more applications simultaneously (even for OSS sequencer)! However, each MIDI device is exclusive - that is, if a MIDI device is opened once by some application, other applications can't use it. No such a restriction in synth devices.h]hYou can run two or more applications simultaneously (even for OSS sequencer)! However, each MIDI device is exclusive - that is, if a MIDI device is opened once by some application, other applications can’t use it. No such a restriction in synth devices.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jchhhK3hjnubeh}(h]h ]h"]h$]h&]uh1jOhj;hhhhhNubjP)}(hXReal-time event processing: The events can be processed in real time without using out of bound ioctl. To switch to real-time mode, send ABSTIME 0 event. The followed events will be processed in real-time without queued. To switch off the real-time mode, send RELTIME 0 event. h](h)}(hReal-time event processing:h]hReal-time event processing:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjubjd)}(hThe events can be processed in real time without using out of bound ioctl. To switch to real-time mode, send ABSTIME 0 event. The followed events will be processed in real-time without queued. To switch off the real-time mode, send RELTIME 0 event. h]h)}(hThe events can be processed in real time without using out of bound ioctl. To switch to real-time mode, send ABSTIME 0 event. The followed events will be processed in real-time without queued. To switch off the real-time mode, send RELTIME 0 event.h]hThe events can be processed in real time without using out of bound ioctl. To switch to real-time mode, send ABSTIME 0 event. The followed events will be processed in real-time without queued. To switch off the real-time mode, send RELTIME 0 event.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1jchhhK;hjubeh}(h]h ]h"]h$]h&]uh1jOhj;hhhhhNubjP)}(h``/proc`` interface: The status of applications and devices can be shown via ``/proc/asound/seq/oss`` at any time. In the later version, configuration will be changed via ``/proc`` interface, too. h](h)}(h``/proc`` interface:h](j)}(h ``/proc``h]h/proc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh interface:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK@hjubjd)}(hThe status of applications and devices can be shown via ``/proc/asound/seq/oss`` at any time. In the later version, configuration will be changed via ``/proc`` interface, too. h]h)}(hThe status of applications and devices can be shown via ``/proc/asound/seq/oss`` at any time. In the later version, configuration will be changed via ``/proc`` interface, too.h](h8The status of applications and devices can be shown via }(hjhhhNhNubj)}(h``/proc/asound/seq/oss``h]h/proc/asound/seq/oss}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhF at any time. In the later version, configuration will be changed via }(hjhhhNhNubj)}(h ``/proc``h]h/proc}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh interface, too.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKBhjubah}(h]h ]h"]h$]h&]uh1jchhhKBhjubeh}(h]h ]h"]h$]h&]uh1jOhj;hhhhhNubeh}(h]h ]h"]h$]h&]j+j,uh1jJhhhK-hhhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Installationh]h Installation}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhKHubh)}(hXdRun configure script with both sequencer support (``--with-sequencer=yes``) and OSS emulation (``--with-oss=yes``) options. A module ``snd-seq-oss.o`` will be created. If the synth module of your sound card supports for OSS emulation (so far, only Emu8000 driver), this module will be loaded automatically. Otherwise, you need to load this module manually.h](h2Run configure script with both sequencer support (}(hjOhhhNhNubj)}(h``--with-sequencer=yes``h]h--with-sequencer=yes}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubh) and OSS emulation (}(hjOhhhNhNubj)}(h``--with-oss=yes``h]h--with-oss=yes}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubh) options. A module }(hjOhhhNhNubj)}(h``snd-seq-oss.o``h]h snd-seq-oss.o}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubh will be created. If the synth module of your sound card supports for OSS emulation (so far, only Emu8000 driver), this module will be loaded automatically. Otherwise, you need to load this module manually.}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKJhj>hhubh)}(hAt beginning, this module probes all the MIDI ports which have been already connected to the sequencer. Once after that, the creation and deletion of ports are watched by announcement mechanism of ALSA sequencer.h]hAt beginning, this module probes all the MIDI ports which have been already connected to the sequencer. Once after that, the creation and deletion of ports are watched by announcement mechanism of ALSA sequencer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhj>hhubh)}(hThe available synth and MIDI devices can be found in proc interface. Run ``cat /proc/asound/seq/oss``, and check the devices. For example, if you use an AWE64 card, you'll see like the following: ::h](hIThe available synth and MIDI devices can be found in proc interface. Run }(hjhhhNhNubj)}(h``cat /proc/asound/seq/oss``h]hcat /proc/asound/seq/oss}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh`, and check the devices. For example, if you use an AWE64 card, you’ll see like the following:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKUhj>hhubh literal_block)}(hXOSS sequencer emulation version 0.1.8 ALSA client number 63 ALSA receiver port 0 Number of applications: 0 Number of synth devices: 1 synth 0: [EMU8000] type 0x1 : subtype 0x20 : voices 32 capabilities : ioctl enabled / load_patch enabled Number of MIDI devices: 3 midi 0: [Emu8000 Port-0] ALSA port 65:0 capability write / opened none midi 1: [Emu8000 Port-1] ALSA port 65:1 capability write / opened none midi 2: [0: MPU-401 (UART)] ALSA port 64:0 capability read/write / opened noneh]hXOSS sequencer emulation version 0.1.8 ALSA client number 63 ALSA receiver port 0 Number of applications: 0 Number of synth devices: 1 synth 0: [EMU8000] type 0x1 : subtype 0x20 : voices 32 capabilities : ioctl enabled / load_patch enabled Number of MIDI devices: 3 midi 0: [Emu8000 Port-0] ALSA port 65:0 capability write / opened none midi 1: [Emu8000 Port-1] ALSA port 65:1 capability write / opened none midi 2: [0: MPU-401 (UART)] ALSA port 64:0 capability read/write / opened none}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhKZhj>hhubh)}(hNote that the device number may be different from the information of ``/proc/asound/oss-devices`` or ones of the original OSS driver. Use the device number listed in ``/proc/asound/seq/oss`` to play via OSS sequencer emulation.h](hENote that the device number may be different from the information of }(hjhhhNhNubj)}(h``/proc/asound/oss-devices``h]h/proc/asound/oss-devices}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhE or ones of the original OSS driver. Use the device number listed in }(hjhhhNhNubj)}(h``/proc/asound/seq/oss``h]h/proc/asound/seq/oss}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh% to play via OSS sequencer emulation.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKohj>hhubeh}(h] installationah ]h"] installationah$]h&]uh1hhhhhhhhKHubh)}(hhh](h)}(hUsing Synthesizer Devicesh]hUsing Synthesizer Devices}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKuubh)}(hRun your favorite program. I've tested playmidi-2.4, awemidi-0.4.3, gmod-3.1 and xmp-1.1.5. You can load samples via ``/dev/sequencer`` like sfxload, too.h](hwRun your favorite program. I’ve tested playmidi-2.4, awemidi-0.4.3, gmod-3.1 and xmp-1.1.5. You can load samples via }(hjhhhNhNubj)}(h``/dev/sequencer``h]h/dev/sequencer}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh like sfxload, too.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKwhj hhubh)}(hIf the lowlevel driver supports multiple access to synth devices (like Emu8000 driver), two or more applications are allowed to run at the same time.h]hIf the lowlevel driver supports multiple access to synth devices (like Emu8000 driver), two or more applications are allowed to run at the same time.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hj hhubeh}(h]using-synthesizer-devicesah ]h"]using synthesizer devicesah$]h&]uh1hhhhhhhhKuubh)}(hhh](h)}(hUsing MIDI Devicesh]hUsing MIDI Devices}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThhhhhKubh)}(hSo far, only MIDI output was tested. MIDI input was not checked at all, but hopefully it will work. Use the device number listed in ``/proc/asound/seq/oss``. Be aware that these numbers are mostly different from the list in ``/proc/asound/oss-devices``.h](hSo far, only MIDI output was tested. MIDI input was not checked at all, but hopefully it will work. Use the device number listed in }(hjehhhNhNubj)}(h``/proc/asound/seq/oss``h]h/proc/asound/seq/oss}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubhD. Be aware that these numbers are mostly different from the list in }(hjehhhNhNubj)}(h``/proc/asound/oss-devices``h]h/proc/asound/oss-devices}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubh.}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjThhubeh}(h]using-midi-devicesah ]h"]using midi devicesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hModule Optionsh]hModule Options}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h+The following module options are available:h]h+The following module options are available:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhdefinition_list)}(hhh](hdefinition_list_item)}(hmaxqlen specifies the maximum read/write queue length. This queue is private for OSS sequencer, so that it is independent from the queue length of ALSA sequencer. Default value is 1024. h](hterm)}(hmaxqlenh]hmaxqlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(hspecifies the maximum read/write queue length. This queue is private for OSS sequencer, so that it is independent from the queue length of ALSA sequencer. Default value is 1024.h]hspecifies the maximum read/write queue length. This queue is private for OSS sequencer, so that it is independent from the queue length of ALSA sequencer. Default value is 1024.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hwseq_oss_debug specifies the debug level and accepts zero (= no debug message) or positive integer. Default value is 0. h](j)}(h seq_oss_debugh]h seq_oss_debug}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hhspecifies the debug level and accepts zero (= no debug message) or positive integer. Default value is 0.h]hhspecifies the debug level and accepts zero (= no debug message) or positive integer. Default value is 0.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]module-optionsah ]h"]module optionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hQueue Mechanismh]hQueue Mechanism}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hhhhhKubh)}(hOSS sequencer emulation uses an ALSA priority queue. The events from ``/dev/sequencer`` are processed and put onto the queue specified by module option.h](hEOSS sequencer emulation uses an ALSA priority queue. The events from }(hjFhhhNhNubj)}(h``/dev/sequencer``h]h/dev/sequencer}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubhA are processed and put onto the queue specified by module option.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj5hhubh)}(hX[All the events from ``/dev/sequencer`` are parsed at beginning. The timing events are also parsed at this moment, so that the events may be processed in real-time. Sending an event ABSTIME 0 switches the operation mode to real-time mode, and sending an event RELTIME 0 switches it off. In the real-time mode, all events are dispatched immediately.h](hAll the events from }(hjfhhhNhNubj)}(h``/dev/sequencer``h]h/dev/sequencer}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubhX5 are parsed at beginning. The timing events are also parsed at this moment, so that the events may be processed in real-time. Sending an event ABSTIME 0 switches the operation mode to real-time mode, and sending an event RELTIME 0 switches it off. In the real-time mode, all events are dispatched immediately.}(hjfhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj5hhubh)}(h}The queued events are dispatched to the corresponding ALSA sequencer ports after scheduled time by ALSA sequencer dispatcher.h]h}The queued events are dispatched to the corresponding ALSA sequencer ports after scheduled time by ALSA sequencer dispatcher.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj5hhubh)}(hIf the write-queue is full, the application sleeps until a certain amount (as default one half) becomes empty in blocking mode. The synchronization to write timing was implemented, too.h]hIf the write-queue is full, the application sleeps until a certain amount (as default one half) becomes empty in blocking mode. The synchronization to write timing was implemented, too.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj5hhubh)}(hThe input from MIDI devices or echo-back events are stored on read FIFO queue. If application reads ``/dev/sequencer`` in blocking mode, the process will be awaked.h](hdThe input from MIDI devices or echo-back events are stored on read FIFO queue. If application reads }(hjhhhNhNubj)}(h``/dev/sequencer``h]h/dev/sequencer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. in blocking mode, the process will be awaked.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj5hhubeh}(h]queue-mechanismah ]h"]queue mechanismah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hInterface to Synthesizer Deviceh]hInterface to Synthesizer Device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h Registrationh]h Registration}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hTTo register an OSS synthesizer device, use snd_seq_oss_synth_register() function: ::h]hQTo register an OSS synthesizer device, use snd_seq_oss_synth_register() function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hint snd_seq_oss_synth_register(char *name, int type, int subtype, int nvoices, snd_seq_oss_callback_t *oper, void *private_data)h]hint snd_seq_oss_synth_register(char *name, int type, int subtype, int nvoices, snd_seq_oss_callback_t *oper, void *private_data)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hXThe arguments ``name``, ``type``, ``subtype`` and ``nvoices`` are used for making the appropriate synth_info structure for ioctl. The return value is an index number of this device. This index must be remembered for unregister. If registration is failed, -errno will be returned.h](hThe arguments }(hjhhhNhNubj)}(h``name``h]hname}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``type``h]htype}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h ``subtype``h]hsubtype}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h ``nvoices``h]hnvoices}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh are used for making the appropriate synth_info structure for ioctl. The return value is an index number of this device. This index must be remembered for unregister. If registration is failed, -errno will be returned.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hHTo release this device, call snd_seq_oss_synth_unregister() function: ::h]hETo release this device, call snd_seq_oss_synth_unregister() function:}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h+int snd_seq_oss_synth_unregister(int index)h]h+int snd_seq_oss_synth_unregister(int index)}hjlsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hFwhere the ``index`` is the index number returned by register function.h](h where the }(hjzhhhNhNubj)}(h ``index``h]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh3 is the index number returned by register function.}(hjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] registrationah ]h"] registrationah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h Callbacksh]h Callbacks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXOSS synthesizer devices have capability for sample downloading and ioctls like sample reset. In OSS emulation, these special features are realized by using callbacks. The registration argument oper is used to specify these callbacks. The following callback functions must be defined: ::h]hXOSS synthesizer devices have capability for sample downloading and ioctls like sample reset. In OSS emulation, these special features are realized by using callbacks. The registration argument oper is used to specify these callbacks. The following callback functions must be defined:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hX:snd_seq_oss_callback_t: int (*open)(snd_seq_oss_arg_t *p, void *closure); int (*close)(snd_seq_oss_arg_t *p); int (*ioctl)(snd_seq_oss_arg_t *p, unsigned int cmd, unsigned long arg); int (*load_patch)(snd_seq_oss_arg_t *p, int format, const char *buf, int offs, int count); int (*reset)(snd_seq_oss_arg_t *p);h]hX:snd_seq_oss_callback_t: int (*open)(snd_seq_oss_arg_t *p, void *closure); int (*close)(snd_seq_oss_arg_t *p); int (*ioctl)(snd_seq_oss_arg_t *p, unsigned int cmd, unsigned long arg); int (*load_patch)(snd_seq_oss_arg_t *p, int format, const char *buf, int offs, int count); int (*reset)(snd_seq_oss_arg_t *p);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hIExcept for ``open`` and ``close`` callbacks, they are allowed to be NULL.h](h Except for }(hjhhhNhNubj)}(h``open``h]hopen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h ``close``h]hclose}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh( callbacks, they are allowed to be NULL.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h^Each callback function takes the argument type ``snd_seq_oss_arg_t`` as the first argument. ::h](h/Each callback function takes the argument type }(hjhhhNhNubj)}(h``snd_seq_oss_arg_t``h]hsnd_seq_oss_arg_t}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh as the first argument.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hstruct snd_seq_oss_arg_t { int app_index; int file_mode; int seq_mode; snd_seq_addr_t addr; void *private_data; int event_passing; };h]hstruct snd_seq_oss_arg_t { int app_index; int file_mode; int seq_mode; snd_seq_addr_t addr; void *private_data; int event_passing; };}hj!sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hXThe first three fields, ``app_index``, ``file_mode`` and ``seq_mode`` are initialized by OSS sequencer. The ``app_index`` is the application index which is unique to each application opening OSS sequencer. The ``file_mode`` is bit-flags indicating the file operation mode. See ``seq_oss.h`` for its meaning. The ``seq_mode`` is sequencer operation mode. In the current version, only ``SND_OSSSEQ_MODE_SYNTH`` is used.h](hThe first three fields, }(hj/hhhNhNubj)}(h ``app_index``h]h app_index}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh, }(hj/hhhNhNubj)}(h ``file_mode``h]h file_mode}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh and }(hj/hhhNhNubj)}(h ``seq_mode``h]hseq_mode}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh' are initialized by OSS sequencer. The }(hj/hhhNhNubj)}(h ``app_index``h]h app_index}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubhY is the application index which is unique to each application opening OSS sequencer. The }(hj/hhhNhNubj)}(h ``file_mode``h]h file_mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh6 is bit-flags indicating the file operation mode. See }(hj/hhhNhNubj)}(h ``seq_oss.h``h]h seq_oss.h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh for its meaning. The }(hj/hhhNhNubj)}(h ``seq_mode``h]hseq_mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh; is sequencer operation mode. In the current version, only }(hj/hhhNhNubj)}(h``SND_OSSSEQ_MODE_SYNTH``h]hSND_OSSSEQ_MODE_SYNTH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh is used.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hX)The next two fields, ``addr`` and ``private_data``, must be filled by the synth driver at open callback. The ``addr`` contains the address of ALSA sequencer port which is assigned to this device. If the driver allocates memory for ``private_data``, it must be released in close callback by itself.h](hThe next two fields, }(hjhhhNhNubj)}(h``addr``h]haddr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``private_data``h]h private_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh;, must be filled by the synth driver at open callback. The }(hjhhhNhNubj)}(h``addr``h]haddr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhr contains the address of ALSA sequencer port which is assigned to this device. If the driver allocates memory for }(hjhhhNhNubj)}(h``private_data``h]h private_data}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh2, it must be released in close callback by itself.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXThe last field, ``event_passing``, indicates how to translate note-on / off events. In ``PROCESS_EVENTS`` mode, the note 255 is regarded as velocity change, and key pressure event is passed to the port. In ``PASS_EVENTS`` mode, all note on/off events are passed to the port without modified. ``PROCESS_KEYPRESS`` mode checks the note above 128 and regards it as key pressure event (mainly for Emu8000 driver).h](hThe last field, }(hj#hhhNhNubj)}(h``event_passing``h]h event_passing}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh6, indicates how to translate note-on / off events. In }(hj#hhhNhNubj)}(h``PROCESS_EVENTS``h]hPROCESS_EVENTS}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubhe mode, the note 255 is regarded as velocity change, and key pressure event is passed to the port. In }(hj#hhhNhNubj)}(h``PASS_EVENTS``h]h PASS_EVENTS}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubhG mode, all note on/off events are passed to the port without modified. }(hj#hhhNhNubj)}(h``PROCESS_KEYPRESS``h]hPROCESS_KEYPRESS}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubha mode checks the note above 128 and regards it as key pressure event (mainly for Emu8000 driver).}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] callbacksah ]h"] callbacksah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h Open Callbackh]h Open Callback}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThe ``open`` is called at each time this device is opened by an application using OSS sequencer. This must not be NULL. Typically, the open callback does the following procedure:h](hThe }(hjhhhNhNubj)}(h``open``h]hopen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is called at each time this device is opened by an application using OSS sequencer. This must not be NULL. Typically, the open callback does the following procedure:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhenumerated_list)}(hhh](jP)}(hAllocate private data record.h]h)}(hjh]hAllocate private data record.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jOhjhhhhhNubjP)}(hCreate an ALSA sequencer port.h]h)}(hjh]hCreate an ALSA sequencer port.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jOhjhhhhhNubjP)}(h*Set the new port address on ``arg->addr``.h]h)}(hjh](hSet the new port address on }(hjhhhNhNubj)}(h ``arg->addr``h]h arg->addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jOhjhhhhhNubjP)}(h>Set the private data record pointer on ``arg->private_data``. h]h)}(h=Set the private data record pointer on ``arg->private_data``.h](h'Set the private data record pointer on }(hj hhhNhNubj)}(h``arg->private_data``h]harg->private_data}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jOhjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjhhhhhMubh)}(hXTNote that the type bit-flags in port_info of this synth port must NOT contain ``TYPE_MIDI_GENERIC`` bit. Instead, ``TYPE_SPECIFIC`` should be used. Also, ``CAP_SUBSCRIPTION`` bit should NOT be included, too. This is necessary to tell it from other normal MIDI devices. If the open procedure succeeded, return zero. Otherwise, return -errno.h](hNNote that the type bit-flags in port_info of this synth port must NOT contain }(hjC hhhNhNubj)}(h``TYPE_MIDI_GENERIC``h]hTYPE_MIDI_GENERIC}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC ubh bit. Instead, }(hjC hhhNhNubj)}(h``TYPE_SPECIFIC``h]h TYPE_SPECIFIC}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC ubh should be used. Also, }(hjC hhhNhNubj)}(h``CAP_SUBSCRIPTION``h]hCAP_SUBSCRIPTION}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC ubh bit should NOT be included, too. This is necessary to tell it from other normal MIDI devices. If the open procedure succeeded, return zero. Otherwise, return -errno.}(hjC hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h] open-callbackah ]h"] open callbackah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hIoctl Callbackh]hIoctl Callback}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hThe ``ioctl`` callback is called when the sequencer receives device-specific ioctls. The following two ioctls should be processed by this callback:h](hThe }(hj hhhNhNubj)}(h ``ioctl``h]hioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh callback is called when the sequencer receives device-specific ioctls. The following two ioctls should be processed by this callback:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hhh](j)}(h@IOCTL_SEQ_RESET_SAMPLES reset all samples on memory -- return 0 h](j)}(hIOCTL_SEQ_RESET_SAMPLESh]hIOCTL_SEQ_RESET_SAMPLES}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(hhh]h)}(h'reset all samples on memory -- return 0h]h'reset all samples on memory -- return 0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(h4IOCTL_SYNTH_MEMAVL return the available memory size h](j)}(hIOCTL_SYNTH_MEMAVLh]hIOCTL_SYNTH_MEMAVL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(hhh]h)}(h return the available memory sizeh]h return the available memory size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj hhubj)}(h%FM_4OP_ENABLE can be ignored usually h](j)}(h FM_4OP_ENABLEh]h FM_4OP_ENABLE}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj! ubj)}(hhh]h)}(hcan be ignored usuallyh]hcan be ignored usually}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3 ubah}(h]h ]h"]h$]h&]uh1jhj! ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj hhubeh}(h]h ]h"]h$]h&]uh1jhj hhhhhNubh)}(h[The other ioctls are processed inside the sequencer without passing to the lowlevel driver.h]h[The other ioctls are processed inside the sequencer without passing to the lowlevel driver.}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]ioctl-callbackah ]h"]ioctl callbackah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hLoad_Patch Callbackh]hLoad_Patch Callback}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl hhhhhM ubh)}(hX{The ``load_patch`` callback is used for sample-downloading. This callback must read the data on user-space and transfer to each device. Return 0 if succeeded, and -errno if failed. The format argument is the patch key in patch_info record. The buf is user-space pointer where patch_info record is stored. The offs can be ignored. The count is total data size of this sample data.h](hThe }(hj} hhhNhNubj)}(h``load_patch``h]h load_patch}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj} ubhXi callback is used for sample-downloading. This callback must read the data on user-space and transfer to each device. Return 0 if succeeded, and -errno if failed. The format argument is the patch key in patch_info record. The buf is user-space pointer where patch_info record is stored. The offs can be ignored. The count is total data size of this sample data.}(hj} hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM"hjl hhubeh}(h]load-patch-callbackah ]h"]load_patch callbackah$]h&]uh1hhjhhhhhM ubh)}(hhh](h)}(hClose Callbackh]hClose Callback}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM*ubh)}(hXThe ``close`` callback is called when this device is closed by the application. If any private data was allocated in open callback, it must be released in the close callback. The deletion of ALSA port should be done here, too. This callback must not be NULL.h](hThe }(hj hhhNhNubj)}(h ``close``h]hclose}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh callback is called when this device is closed by the application. If any private data was allocated in open callback, it must be released in the close callback. The deletion of ALSA port should be done here, too. This callback must not be NULL.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM,hj hhubeh}(h]close-callbackah ]h"]close callbackah$]h&]uh1hhjhhhhhM*ubh)}(hhh](h)}(hReset Callbackh]hReset Callback}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM2ubh)}(hXThe ``reset`` callback is called when sequencer device is reset or closed by applications. The callback should turn off the sounds on the relevant port immediately, and initialize the status of the port. If this callback is undefined, OSS seq sends a ``HEARTBEAT`` event to the port.h](hThe }(hj hhhNhNubj)}(h ``reset``h]hreset}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh callback is called when sequencer device is reset or closed by applications. The callback should turn off the sounds on the relevant port immediately, and initialize the status of the port. If this callback is undefined, OSS seq sends a }(hj hhhNhNubj)}(h ``HEARTBEAT``h]h HEARTBEAT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh event to the port.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM4hj hhubeh}(h]reset-callbackah ]h"]reset callbackah$]h&]uh1hhjhhhhhM2ubeh}(h]interface-to-synthesizer-deviceah ]h"]interface to synthesizer deviceah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hEventsh]hEvents}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1 hhhhhM;ubh)}(hMost of the events are processed by sequencer and translated to the adequate ALSA sequencer events, so that each synth device can receive by input_event callback of ALSA sequencer port. The following ALSA events should be implemented by the driver:h]hMost of the events are processed by sequencer and translated to the adequate ALSA sequencer events, so that each synth device can receive by input_event callback of ALSA sequencer port. The following ALSA events should be implemented by the driver:}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj1 hhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jZ hjW ubj[ )}(hhh]h}(h]h ]h"]h$]h&]colwidthK'uh1jZ hjW ubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(h ALSA eventh]h ALSA event}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj| ubah}(h]h ]h"]h$]h&]uh1jz hjw ubj{ )}(hhh]h)}(hOriginal OSS eventsh]hOriginal OSS events}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj ubah}(h]h ]h"]h$]h&]uh1jz hjw ubeh}(h]h ]h"]h$]h&]uh1ju hjr ubah}(h]h ]h"]h$]h&]uh1jp hjW ubhtbody)}(hhh](jv )}(hhh](j{ )}(hhh]h)}(hNOTEONh]hNOTEON}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubj{ )}(hhh]h)}(hSEQ_NOTEON, MIDI_NOTEONh]hSEQ_NOTEON, MIDI_NOTEON}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubeh}(h]h ]h"]h$]h&]uh1ju hj ubjv )}(hhh](j{ )}(hhh]h)}(hNOTEh]hNOTE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubj{ )}(hhh]h)}(hSEQ_NOTEOFF, MIDI_NOTEOFFh]hSEQ_NOTEOFF, MIDI_NOTEOFF}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubeh}(h]h ]h"]h$]h&]uh1ju hj ubjv )}(hhh](j{ )}(hhh]h)}(hKEYPRESSh]hKEYPRESS}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj, ubah}(h]h ]h"]h$]h&]uh1jz hj) ubj{ )}(hhh]h)}(hMIDI_KEY_PRESSUREh]hMIDI_KEY_PRESSURE}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhjC ubah}(h]h ]h"]h$]h&]uh1jz hj) ubeh}(h]h ]h"]h$]h&]uh1ju hj ubjv )}(hhh](j{ )}(hhh]h)}(h CHANPRESSh]h CHANPRESS}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjc ubah}(h]h ]h"]h$]h&]uh1jz hj` ubj{ )}(hhh]h)}(h!SEQ_AFTERTOUCH, MIDI_CHN_PRESSUREh]h!SEQ_AFTERTOUCH, MIDI_CHN_PRESSURE}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjz ubah}(h]h ]h"]h$]h&]uh1jz hj` ubeh}(h]h ]h"]h$]h&]uh1ju hj ubjv )}(hhh](j{ )}(hhh]h)}(h PGMCHANGEh]h PGMCHANGE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubj{ )}(hhh]h)}(hSEQ_PGMCHANGE, MIDI_PGM_CHANGEh]hSEQ_PGMCHANGE, MIDI_PGM_CHANGE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubeh}(h]h ]h"]h$]h&]uh1ju hj ubjv )}(hhh](j{ )}(hhh]h)}(h PITCHBENDh]h PITCHBEND}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubj{ )}(hhh]h)}(h2SEQ_CONTROLLER(CTRL_PITCH_BENDER), MIDI_PITCH_BENDh]h2SEQ_CONTROLLER(CTRL_PITCH_BENDER), MIDI_PITCH_BEND}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubeh}(h]h ]h"]h$]h&]uh1ju hj ubjv )}(hhh](j{ )}(hhh]h)}(h CONTROLLERh]h CONTROLLER}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubj{ )}(hhh]h)}(h+MIDI_CTL_CHANGE, SEQ_BALANCE (with CTL_PAN)h]h+MIDI_CTL_CHANGE, SEQ_BALANCE (with CTL_PAN)}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubeh}(h]h ]h"]h$]h&]uh1ju hj ubjv )}(hhh](j{ )}(hhh]h)}(h CONTROL14h]h CONTROL14}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhj? ubah}(h]h ]h"]h$]h&]uh1jz hj< ubj{ )}(hhh]h)}(hSEQ_CONTROLLERh]hSEQ_CONTROLLER}(hjY hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjV ubah}(h]h ]h"]h$]h&]uh1jz hj< ubeh}(h]h ]h"]h$]h&]uh1ju hj ubjv )}(hhh](j{ )}(hhh]h)}(hREGPARAMh]hREGPARAM}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjv ubah}(h]h ]h"]h$]h&]uh1jz hjs ubj{ )}(hhh]h)}(h'SEQ_CONTROLLER(CTRL_PITCH_BENDER_RANGE)h]h'SEQ_CONTROLLER(CTRL_PITCH_BENDER_RANGE)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj ubah}(h]h ]h"]h$]h&]uh1jz hjs ubeh}(h]h ]h"]h$]h&]uh1ju hj ubjv )}(hhh](j{ )}(hhh]h)}(hSYSEXh]hSYSEX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubj{ )}(hhh]h)}(h SEQ_SYSEXh]h SEQ_SYSEX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubah}(h]h ]h"]h$]h&]uh1jz hj ubeh}(h]h ]h"]h$]h&]uh1ju hj ubeh}(h]h ]h"]h$]h&]uh1j hjW ubeh}(h]h ]h"]h$]h&]colsKuh1jU hjR ubah}(h]h ]h"]h$]h&]uh1jP hj1 hhhhhNubh)}(hThe most of these behavior can be realized by MIDI emulation driver included in the Emu8000 lowlevel driver. In the future release, this module will be independent.h]hThe most of these behavior can be realized by MIDI emulation driver included in the Emu8000 lowlevel driver. In the future release, this module will be independent.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj1 hhubh)}(hSome OSS events (``SEQ_PRIVATE`` and ``SEQ_VOLUME`` events) are passed as event type SND_SEQ_OSS_PRIVATE. The OSS sequencer passes these event 8 byte packets without any modification. The lowlevel driver should process these events appropriately.h](hSome OSS events (}(hjhhhNhNubj)}(h``SEQ_PRIVATE``h]h SEQ_PRIVATE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``SEQ_VOLUME``h]h SEQ_VOLUME}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh events) are passed as event type SND_SEQ_OSS_PRIVATE. The OSS sequencer passes these event 8 byte packets without any modification. The lowlevel driver should process these events appropriately.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMWhj1 hhubeh}(h]eventsah ]h"]eventsah$]h&]uh1hhhhhhhhM;ubh)}(hhh](h)}(hInterface to MIDI Deviceh]hInterface to MIDI Device}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hhhhhM]ubh)}(hX>Since the OSS emulation probes the creation and deletion of ALSA MIDI sequencer ports automatically by receiving announcement from ALSA sequencer, the MIDI devices don't need to be registered explicitly like synth devices. However, the MIDI port_info registered to ALSA sequencer must include a group name ``SND_SEQ_GROUP_DEVICE`` and a capability-bit ``CAP_READ`` or ``CAP_WRITE``. Also, subscription capabilities, ``CAP_SUBS_READ`` or ``CAP_SUBS_WRITE``, must be defined, too. If these conditions are not satisfied, the port is not registered as OSS sequencer MIDI device.h](hX4Since the OSS emulation probes the creation and deletion of ALSA MIDI sequencer ports automatically by receiving announcement from ALSA sequencer, the MIDI devices don’t need to be registered explicitly like synth devices. However, the MIDI port_info registered to ALSA sequencer must include a group name }(hjMhhhNhNubj)}(h``SND_SEQ_GROUP_DEVICE``h]hSND_SEQ_GROUP_DEVICE}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubh and a capability-bit }(hjMhhhNhNubj)}(h ``CAP_READ``h]hCAP_READ}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubh or }(hjMhhhNhNubj)}(h ``CAP_WRITE``h]h CAP_WRITE}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubh#. Also, subscription capabilities, }(hjMhhhNhNubj)}(h``CAP_SUBS_READ``h]h CAP_SUBS_READ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubh or }hjMsbj)}(h``CAP_SUBS_WRITE``h]hCAP_SUBS_WRITE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubhw, must be defined, too. If these conditions are not satisfied, the port is not registered as OSS sequencer MIDI device.}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM_hj<hhubh)}(hThe events via MIDI devices are parsed in OSS sequencer and converted to the corresponding ALSA sequencer events. The input from MIDI sequencer is also converted to MIDI byte events by OSS sequencer. This works just a reverse way of seq_midi module.h]hThe events via MIDI devices are parsed in OSS sequencer and converted to the corresponding ALSA sequencer events. The input from MIDI sequencer is also converted to MIDI byte events by OSS sequencer. This works just a reverse way of seq_midi module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhj<hhubeh}(h]interface-to-midi-deviceah ]h"]interface to midi deviceah$]h&]uh1hhhhhhhhM]ubh)}(hhh](h)}(hKnown Problems / TODO'sh]hKnown Problems / TODO’s}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMpubjK)}(hhh]jP)}(h@Patch loading via ALSA instrument layer is not implemented yet. h]h)}(h?Patch loading via ALSA instrument layer is not implemented yet.h]h?Patch loading via ALSA instrument layer is not implemented yet.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjubah}(h]h ]h"]h$]h&]uh1jOhjhhhhhNubah}(h]h ]h"]h$]h&]j+j,uh1jJhhhMrhjhhubeh}(h]known-problems-todo-sah ]h"]known problems / todo'sah$]h&]uh1hhhhhhhhMpubeh}(h]oss-sequencer-emulation-on-alsaah ]h"]oss sequencer emulation on alsaah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjz footnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj/error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehʌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j jj;j8j jjQjNjjj2j/jjj. j+ jjj~j{j j ji jf j j j j j& j# j9j6jjjju nametypes}(j j;j jQjj2jj. jj~j ji j j j& j9jjuh}(jhj8hjj>jNj jjTj/jjj5j+ jjjj{jj jjf j j jl j j j# j j6j1 jj<jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(hfPossible title underline, too short for the title. Treating it as ordinary text because it's so short.h]hhPossible title underline, too short for the title. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOlineKsourcehuh1jhjhhhhhKubatransform_messages] transformerN include_log] decorationNhhub.