alsa-project / snd-firewire-ctl-services

A set of server programs for audio and music units on IEEE 1394 bus supported by Linux sound subsystem a.k.a. ALSA.
GNU General Public License v3.0
34 stars 5 forks source link
alsa ieee1394 linux server

======================== snd-firewire-ctl-services

2024/03/03 Takashi Sakamoto

Introduction

This project is a sub-project within Advanced Linux Sound Architecture a.k.a ALSA, aimed to provide user space service programs for Audio and Music units connected to IEEE 1394 bus, supported by drivers in ALSA firewire stack.

The latest release is version 0.2.0 <https://github.com/alsa-project/snd-firewire-ctl-services/releases/tag/snd-firewire-ctl-services%2Fv0.2.0>_.

The service programs are designed to operate digital signal processing function in the audio and music units connected to IEEE 1394 bus. The service programs work as message broker <https://en.wikipedia.org/wiki/Message_broker>_. ALSA control and sequencer applications are available as an end to communicate to the service programs. The audio and music units in IEEE 1394 bus is the opposite end. The service programs receives messages from both ends, then translates and convert the messages to send to the opposite end. The internal design of the programs are illustrated in Design note section.

Executables for service programs

The project provides the following service programs in the form of Rust binary crates:

snd-firewire-digi00x-ctl-service For sound card bound to ALSA firewire-digi00x driver (snd-firewire-digi00x) snd-firewire-tascam-ctl-service For sound card bound to ALSA firewire-tascam driver (snd-firewire-tascam), or TASCAM FE-8. snd-fireworks-ctl-service For sound card bound to ALSA fireworks driver (snd-fireworks) snd-firewire-motu-ctl-service For sound card bound to ALSA firewire-motu driver (snd-firewire-motu) snd-oxfw-ctl-service For sound card bound to ALSA oxfw driver (snd-oxfw) snd-bebob-ctl-service For sound card bound to ALSA bebob driver (snd-bebob) snd-dice-ctl-service For sound card bound to ALSA dice driver (snd-dice) snd-fireface-ctl-service For sound card bound to ALSA fireface driver (snd-fireface)

Disclaimer

The project provides neither GUI programs nor end-user interfaces against expectation of users,

The main motivation of project is to preserve the way (protocol) to operate the audio and music units in IEEE 1394 bus, which was defined by several vendors.

Supported devices

Currently below devices are supported. If you would like to add support for your device, please contact to developer.

Restrictions

Due to a lack of information about the target devices, certain restrictions are unavoidable. However, we welcome any assistance that can enhance the project.

Support

License

Dependencies

In Debian and its derived distributions such as Ubuntu

In Debian 13.0 (trixie) or later, some packages are available in the repositories instead of the manual installation of dependent libraries.

In Ubuntu 24.04 LTS (Noble Numbat) or later, the packages are also available by Debian import mechanism.

How to build

Build ::

$ cargo build

Execute temporarily ::

& cargo run --bin (the executable name) -- (the arguments of executable)

All of executables can print help when either --help or -h is given as an argument of command line. In the most executables, the first positional argument is the numeric identifier of sound card in Linux sound subsystem. For further information, please refer to Runtime debugging clause.

Once the service program runs, it remains to dispatch events until receiving SIGTERM signal (e.g. press Ctrl + C) or detecting disconnection of the device.

Install executables ::

$ cargo install --path (path to binary crate)

The runtime crates which provide the executables are listed below:

snd-firewire-digi00x-ctl-service snd-firewire-digi00x-ctl-service crate locates in runtime/digi00x snd-firewire-tascam-ctl-service snd-firewire-tascam-ctl-service crate locates in runtime/tascam snd-fireworks-ctl-service snd-fireworks-ctl-service crate locates in runtime/fireworks snd-firewire-motu-ctl-service snd-firewire-motu-ctl-service crate locates in runtime/motu snd-oxfw-ctl-service snd-oxfw-ctl-service crate locates in runtime/oxfw snd-bebob-ctl-service snd-bebob-ctl-service crate locates in runtime/bebob snd-dice-ctl-service snd-dice-ctl-service crate locates in runtime/dice snd-fireface-ctl-service snd-fireface-ctl-service crate locates in runtime/fireface

The executable is usually installed under ~/.cargo/bin, while it's possible to choose the path. In detail, please refer to manual of cargo install <https://doc.rust-lang.org/cargo/commands/cargo-install.html>_.

Uninstall executables ::

$ cargo uninstall -p (name of runtime crate)

Runtime debugging

All executables support an option for log level for debugging. When either -l or --log-level is given with log level, they prints verbose logs to standard output. At present, debug is just supported for the log level.

This function is implemented by tracing <https://crates.io/crates/tracing> and tracing-subscriber <https://crates.io/crates/tracing-subscriber> crates.

Supported protocols

Design note

Control model

.. image:: docs/control-model.png :alt: control model

Measure model

.. image:: docs/measure-model.png :alt: measure model

Notify model (with help of drivers in ALSA firewire stack)

.. image:: docs/notify-model-a.png :alt: notify-a-model

Notify model (without any help of drivers in ALSA firewire stack)

.. image:: docs/notify-model-b.png :alt: notify-b-model

Multi threading

.. image:: docs/overview.png :alt: overview