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]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 }(hhhhhNhNubhliteral)}(h``/dev/sequencer``h]h/dev/sequencer}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh and }(hhhhhNhNubh)}(h``/dev/music``h]h /dev/music}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubhc devices. The most of applications using OSS can run if the appropriate ALSA sequencer is prepared.}(hhhhhNhNubeh}(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:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj=ubh 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.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQubah}(h]h ]h"]h$]h&]uh1jOhhhKhj=ubeh}(h]h ]h"]h$]h&]uh1j;hj8hhhhhNubj<)}(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:}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjoubjP)}(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 }(hjhhhNhNubh)}(h``/dev/music``h]h /dev/music}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jOhhhKhjoubeh}(h]h ]h"]h$]h&]uh1j;hj8hhhhhNubj<)}(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!hjubjP)}(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&]uh1jOhhhK#hjubeh}(h]h ]h"]h$]h&]uh1j;hj8hhhhhNubj<)}(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&hjubjP)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jOhhhK(hjubeh}(h]h ]h"]h$]h&]uh1j;hj8hhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1j6hhhKhhhhubh)}(h:Furthermore, you can find the following advanced features:h]h:Furthermore, you can find the following advanced features:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hhhhubj7)}(hhh](j<)}(hIBetter queue mechanism: The events are queued before processing them. h](h)}(hBetter queue mechanism:h]hBetter queue mechanism:}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hj*ubjP)}(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.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hj<ubah}(h]h ]h"]h$]h&]uh1jOhhhK/hj*ubeh}(h]h ]h"]h$]h&]uh1j;hj'hhhhhNubj<)}(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:}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjZubjP)}(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.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjlubah}(h]h ]h"]h$]h&]uh1jOhhhK3hjZubeh}(h]h ]h"]h$]h&]uh1j;hj'hhhhhNubj<)}(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&]uh1hhhhK9hjubjP)}(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&]uh1jOhhhK;hjubeh}(h]h ]h"]h$]h&]uh1j;hj'hhhhhNubj<)}(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](h)}(h ``/proc``h]h/proc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh interface:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK@hjubjP)}(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 }(hjhhhNhNubh)}(h``/proc/asound/seq/oss``h]h/proc/asound/seq/oss}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhF at any time. In the later version, configuration will be changed via }(hjhhhNhNubh)}(h ``/proc``h]h/proc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh interface, too.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKBhjubah}(h]h ]h"]h$]h&]uh1jOhhhKBhjubeh}(h]h ]h"]h$]h&]uh1j;hj'hhhhhNubeh}(h]h ]h"]h$]h&]jjuh1j6hhhK-hhhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Installationh]h Installation}(hj-hhhNhNubah}(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 (}(hj;hhhNhNubh)}(h``--with-sequencer=yes``h]h--with-sequencer=yes}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubh) and OSS emulation (}(hj;hhhNhNubh)}(h``--with-oss=yes``h]h--with-oss=yes}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubh) options. A module }(hj;hhhNhNubh)}(h``snd-seq-oss.o``h]h snd-seq-oss.o}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubh 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.}(hj;hhhNhNubeh}(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 }(hjhhhNhNubh)}(h``cat /proc/asound/seq/oss``h]hcat /proc/asound/seq/oss}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh`, 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 }(hjhhhNhNubh)}(h``/proc/asound/oss-devices``h]h/proc/asound/oss-devices}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhE or ones of the original OSS driver. Use the device number listed in }(hjhhhNhNubh)}(h``/proc/asound/seq/oss``h]h/proc/asound/seq/oss}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh% 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&]uh1hhjhhhhhKuubh)}(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 }(hj hhhNhNubh)}(h``/dev/sequencer``h]h/dev/sequencer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh like sfxload, too.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKwhjhhubh)}(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{hjhhubeh}(h]using-synthesizer-devicesah ]h"]using synthesizer devicesah$]h&]uh1hhhhhhhhKuubh)}(hhh](h)}(hUsing MIDI Devicesh]hUsing MIDI Devices}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhKubh)}(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 }(hjQhhhNhNubh)}(h``/proc/asound/seq/oss``h]h/proc/asound/seq/oss}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQubhD. Be aware that these numbers are mostly different from the list in }(hjQhhhNhNubh)}(h``/proc/asound/oss-devices``h]h/proc/asound/oss-devices}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQubh.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj@hhubeh}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(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}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hhhhhKubh)}(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 }(hj2hhhNhNubh)}(h``/dev/sequencer``h]h/dev/sequencer}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2ubhA are processed and put onto the queue specified by module option.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj!hhubh)}(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 }(hjRhhhNhNubh)}(h``/dev/sequencer``h]h/dev/sequencer}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubhX5 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.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj!hhubh)}(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.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj!hhubh)}(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&]uh1hhhhKhj!hhubh)}(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 }(hjhhhNhNubh)}(h``/dev/sequencer``h]h/dev/sequencer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh. in blocking mode, the process will be awaked.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj!hhubeh}(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 }(hjhhhNhNubh)}(h``name``h]hname}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, }(hjhhhNhNubh)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, }hjsbh)}(h ``subtype``h]hsubtype}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh and }(hjhhhNhNubh)}(h ``nvoices``h]hnvoices}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh 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:}(hjJhhhNhNubah}(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)}hjXsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hFwhere the ``index`` is the index number returned by register function.h](h where the }(hjfhhhNhNubh)}(h ``index``h]hindex}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfubh3 is the index number returned by register function.}(hjfhhhNhNubeh}(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 }(hjhhhNhNubh)}(h``open``h]hopen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh and }(hjhhhNhNubh)}(h ``close``h]hclose}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh( 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 }(hjhhhNhNubh)}(h``snd_seq_oss_arg_t``h]hsnd_seq_oss_arg_t}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh 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, }(hjhhhNhNubh)}(h ``app_index``h]h app_index}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, }(hjhhhNhNubh)}(h ``file_mode``h]h file_mode}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh and }(hjhhhNhNubh)}(h ``seq_mode``h]hseq_mode}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh' are initialized by OSS sequencer. The }(hjhhhNhNubh)}(h ``app_index``h]h app_index}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhY is the application index which is unique to each application opening OSS sequencer. The }(hjhhhNhNubh)}(h ``file_mode``h]h file_mode}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh6 is bit-flags indicating the file operation mode. See }(hjhhhNhNubh)}(h ``seq_oss.h``h]h seq_oss.h}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh for its meaning. The }(hjhhhNhNubh)}(h ``seq_mode``h]hseq_mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh; is sequencer operation mode. In the current version, only }(hjhhhNhNubh)}(h``SND_OSSSEQ_MODE_SYNTH``h]hSND_OSSSEQ_MODE_SYNTH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh is used.}(hjhhhNhNubeh}(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, }(hjhhhNhNubh)}(h``addr``h]haddr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh and }(hjhhhNhNubh)}(h``private_data``h]h private_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh;, must be filled by the synth driver at open callback. The }(hjhhhNhNubh)}(h``addr``h]haddr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhr contains the address of ALSA sequencer port which is assigned to this device. If the driver allocates memory for }(hjhhhNhNubh)}(h``private_data``h]h private_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh2, 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, }(hjhhhNhNubh)}(h``event_passing``h]h event_passing}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh6, indicates how to translate note-on / off events. In }(hjhhhNhNubh)}(h``PROCESS_EVENTS``h]hPROCESS_EVENTS}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhe mode, the note 255 is regarded as velocity change, and key pressure event is passed to the port. In }(hjhhhNhNubh)}(h``PASS_EVENTS``h]h PASS_EVENTS}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhG mode, all note on/off events are passed to the port without modified. }(hjhhhNhNubh)}(h``PROCESS_KEYPRESS``h]hPROCESS_KEYPRESS}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubha mode checks the note above 128 and regards it as key pressure event (mainly for Emu8000 driver).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] callbacksah ]h"] callbacksah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h Open Callbackh]h Open Callback}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhhhhhKubh)}(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 }(hj~hhhNhNubh)}(h``open``h]hopen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~ubh 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:}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjmhhubhenumerated_list)}(hhh](j<)}(hAllocate private data record.h]h)}(hjh]hAllocate private data record.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j;hjhhhhhNubj<)}(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&]uh1j;hjhhhhhNubj<)}(h*Set the new port address on ``arg->addr``.h]h)}(hjh](hSet the new port address on }(hjhhhNhNubh)}(h ``arg->addr``h]h arg->addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j;hjhhhhhNubj<)}(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 }(hjhhhNhNubh)}(h``arg->private_data``h]harg->private_data}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j;hjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjmhhhhhMubh)}(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 }(hj/ hhhNhNubh)}(h``TYPE_MIDI_GENERIC``h]hTYPE_MIDI_GENERIC}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ ubh bit. Instead, }(hj/ hhhNhNubh)}(h``TYPE_SPECIFIC``h]h TYPE_SPECIFIC}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ ubh should be used. Also, }(hj/ hhhNhNubh)}(h``CAP_SUBSCRIPTION``h]hCAP_SUBSCRIPTION}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ 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.}(hj/ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjmhhubeh}(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 hhhNhNubh)}(h ``ioctl``h]hioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 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}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj 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.}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{ hhubeh}(h]ioctl-callbackah ]h"]ioctl callbackah$]h&]uh1hhjhhhhhMubh)}(hhh](h)}(hLoad_Patch Callbackh]hLoad_Patch Callback}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjX 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 }(hji hhhNhNubh)}(h``load_patch``h]h load_patch}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji 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.}(hji hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM"hjX 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 hhhNhNubh)}(h ``close``h]hclose}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 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 hhhNhNubh)}(h ``reset``h]hreset}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 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 hhhNhNubh)}(h ``HEARTBEAT``h]h HEARTBEAT}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 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:}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj hhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jF hjC ubjG )}(hhh]h}(h]h ]h"]h$]h&]colwidthK'uh1jF hjC ubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(h ALSA eventh]h ALSA event}(hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjh ubah}(h]h ]h"]h$]h&]uh1jf hjc ubjg )}(hhh]h)}(hOriginal OSS eventsh]hOriginal OSS events}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj ubah}(h]h ]h"]h$]h&]uh1jf hjc ubeh}(h]h ]h"]h$]h&]uh1ja hj^ ubah}(h]h ]h"]h$]h&]uh1j\ hjC ubhtbody)}(hhh](jb )}(hhh](jg )}(hhh]h)}(hNOTEONh]hNOTEON}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubjg )}(hhh]h)}(hSEQ_NOTEON, MIDI_NOTEONh]hSEQ_NOTEON, MIDI_NOTEON}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubeh}(h]h ]h"]h$]h&]uh1ja hj ubjb )}(hhh](jg )}(hhh]h)}(hNOTEh]hNOTE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubjg )}(hhh]h)}(hSEQ_NOTEOFF, MIDI_NOTEOFFh]hSEQ_NOTEOFF, MIDI_NOTEOFF}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubeh}(h]h ]h"]h$]h&]uh1ja hj ubjb )}(hhh](jg )}(hhh]h)}(hKEYPRESSh]hKEYPRESS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubjg )}(hhh]h)}(hMIDI_KEY_PRESSUREh]hMIDI_KEY_PRESSURE}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj/ ubah}(h]h ]h"]h$]h&]uh1jf hj ubeh}(h]h ]h"]h$]h&]uh1ja hj ubjb )}(hhh](jg )}(hhh]h)}(h CHANPRESSh]h CHANPRESS}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjO ubah}(h]h ]h"]h$]h&]uh1jf hjL ubjg )}(hhh]h)}(h!SEQ_AFTERTOUCH, MIDI_CHN_PRESSUREh]h!SEQ_AFTERTOUCH, MIDI_CHN_PRESSURE}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjf ubah}(h]h ]h"]h$]h&]uh1jf hjL ubeh}(h]h ]h"]h$]h&]uh1ja hj ubjb )}(hhh](jg )}(hhh]h)}(h PGMCHANGEh]h PGMCHANGE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubjg )}(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&]uh1jf hj ubeh}(h]h ]h"]h$]h&]uh1ja hj ubjb )}(hhh](jg )}(hhh]h)}(h PITCHBENDh]h PITCHBEND}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubjg )}(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&]uh1jf hj ubeh}(h]h ]h"]h$]h&]uh1ja hj ubjb )}(hhh](jg )}(hhh]h)}(h CONTROLLERh]h CONTROLLER}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubjg )}(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&]uh1jf hj ubeh}(h]h ]h"]h$]h&]uh1ja hj ubjb )}(hhh](jg )}(hhh]h)}(h CONTROL14h]h CONTROL14}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhj+ ubah}(h]h ]h"]h$]h&]uh1jf hj( ubjg )}(hhh]h)}(hSEQ_CONTROLLERh]hSEQ_CONTROLLER}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjB ubah}(h]h ]h"]h$]h&]uh1jf hj( ubeh}(h]h ]h"]h$]h&]uh1ja hj ubjb )}(hhh](jg )}(hhh]h)}(hREGPARAMh]hREGPARAM}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjb ubah}(h]h ]h"]h$]h&]uh1jf hj_ ubjg )}(hhh]h)}(h'SEQ_CONTROLLER(CTRL_PITCH_BENDER_RANGE)h]h'SEQ_CONTROLLER(CTRL_PITCH_BENDER_RANGE)}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjy ubah}(h]h ]h"]h$]h&]uh1jf hj_ ubeh}(h]h ]h"]h$]h&]uh1ja hj ubjb )}(hhh](jg )}(hhh]h)}(hSYSEXh]hSYSEX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubjg )}(hhh]h)}(h SEQ_SYSEXh]h SEQ_SYSEX}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubah}(h]h ]h"]h$]h&]uh1jf hj ubeh}(h]h ]h"]h$]h&]uh1ja hj ubeh}(h]h ]h"]h$]h&]uh1j hjC ubeh}(h]h ]h"]h$]h&]colsKuh1jA hj> ubah}(h]h ]h"]h$]h&]uh1j< hj 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&]uh1hhhhMShj 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 (}(hj hhhNhNubh)}(h``SEQ_PRIVATE``h]h SEQ_PRIVATE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh and }(hj hhhNhNubh)}(h``SEQ_VOLUME``h]h SEQ_VOLUME}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh 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.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMWhj 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 }(hj9hhhNhNubh)}(h``SND_SEQ_GROUP_DEVICE``h]hSND_SEQ_GROUP_DEVICE}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubh and a capability-bit }(hj9hhhNhNubh)}(h ``CAP_READ``h]hCAP_READ}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubh or }(hj9hhhNhNubh)}(h ``CAP_WRITE``h]h CAP_WRITE}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubh#. Also, subscription capabilities, }(hj9hhhNhNubh)}(h``CAP_SUBS_READ``h]h CAP_SUBS_READ}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubh or }hj9sbh)}(h``CAP_SUBS_WRITE``h]hCAP_SUBS_WRITE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubhw, must be defined, too. If these conditions are not satisfied, the port is not registered as OSS sequencer MIDI device.}(hj9hhhNhNubeh}(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&]uh1hhjhhhhhMpubj7)}(hhh]j<)}(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&]uh1j;hjhhhhhNubah}(h]h ]h"]h$]h&]jjuh1j6hhhMrhjhhubeh}(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_backlinksjf 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_handlerjerror_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}(jjj'j$jjj=j:jjjjjjj j jjjjjgjx ju jU jR j j j j j j j%j"jjjju nametypes}(jj'jj=jjjj jjjjx jU j j j j%jjuh}(jhj$hjj*j:jjj@jjjj!j jjjjgjju jmjR j{ j jX j j j j j"j 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&]levelKtypeINFOlineKsourcehuh1j}hjhhhhhKubatransform_messages] transformerN include_log] decorationNhhub.