Ravenna Virtual Soundcard for Linux

Leggi questa pagina in Italiano

by Marco Sacco / Logo Facebook Marco Suono

Update: NEW release v1.1.74 (28/06/2019)

This new release features improvements and bug fixes:

Enhancements:

  • ALSA mmap support
  • Remove the 8 channels limit of public ALSA driver when a Merging product is present
  • Webapp : check if user provides a valid IP in
  • Global safety playout delay added
  • SSM Source Specific Multicast option added
  • Sources can be enabled/disabled

Bug Fixes:

  • Advanded webpage may infinity popup new windows
  • Wrong TTL Time To Live value in source's SDP
  • Session sink reports RTP status error while the audio is correct

Merging Technologies recently published a RVS RAVENNA/AES67 Virtual Soundcard for Linux on its website! We have tested the RVS on the Debian-based AV Linux distribution, oriented for multimedia and in particular for professional audio.

summary


Introduction

The RVS exploits the ALSA Advanced Linux Sound Architecture driver, among the most used for the audio management on many distributions, interfacing with it through the IPC Inter-process communication method according to the diagram in the figure below:

Merging Linux Kernel Module Architecture
Merging Linux Kernel Module Architecture

For the networking test we used two Genelec 8430A IP SAM studio monitors that implement the RAVENNA/AES67 protocol.

Genelec 8430a IP SAM
Genelec 8430a IP SAM

Installation and configuration

Once downloaded the source software with the command:

git clone https://bitbucket.org/MergingTechnologies/ravenna-alsa-lkm.git

We can enter the driver folder that contains the source files in c to be compiled:

cd ravenna-alsa-lkm/driver

Start the compilation process with the command:

make

The compilation produces two files. The first is the module for the kernel named MergingRavennaALSA.ko (located in the driver folder) which, once inserted into the kernel, makes the Ravenna device available along with the other available audio interfaces.

The other created component Merging_RAVENNA_Daemon (located in the Butler folder) is a daemon that among other tasks communicates and configures the Kernel Ravenna Device and manages the communication between the RAVENNA/AES67 protocol and the hardware devices that implement it.

Kernel module: MergingRavennaALSA

Once the compilation is complete, the newly created module can be added to the kernel with the command:

sudo insmod MergingRavennaALSA.ko

Alternatively, in order to make the choice permanent by inserting module during the boot sequence, follow these steps:

Copy the kernel module the appropriate kernel modules library with the command:

sudo cp MergingRavennaALSA.ko /lib/modules/$(uname -r)/kernel/sound

In order to load the module during the boot sequence insert the MergingRavennaALSA line (without the .ko extension) in the modules file using the command:

sudo vi /etc/modules

and save the file (with the ": wq" command)

Run the depmod command to remap the kernel modules:

sudo depmod

Now the module will always be available immediately after each operative system startup.

Daemon: Merging_RAVENNA_Daemon

Before launching the daemon that will create the communication between the RVS and the hardware devices, it is necessary to change the configuration file of the daemon itself merging_ravenna_daemon.conf located in the Butler folder.

In the default configuration the parameters are as follows (but there are others available, documented here).

  • interface_name=eth0 (Ethernet interface used by the RVS. To find out which one is currently used, you can run the sudo ifconfig command)
  • web_app_port=9090 (port on which the RVS web interface responds)
  • tic_frame_size_at_1fs=256 (frame size. To be AES67-compliant put this value to 48)
  • config_pathname=/var/alsa-aes67-driver/butler.config (the butler.config file is written by the daemon, make sure the /var/alsa-aes67-driver directory exists, or create it)

Now you can run the daemon with the command (if the file is not executable, make it so with the command chmod u+x ./Merging_RAVENNA_Daemon):

./Merging_RAVENNA_Daemon

Launching the daemon establishes the communication between the Ravenna Virtual Soundcard and the hardware devices in the network which are now able to send and receive audio streams.

In this case it is better to start the daemon from the shell and then kill it when it is no longer needed, also because in this way you can read the messages (not many, actually) about the status of the connections (including SDP references) that the demon sends on the standard output:

Standard output of the LKM daemon
Standard output of the LKM daemon

Now the RVS is active.

Web interface

Opening a browser and entering the IP address of the machine on which the daemon is active and using the port 9090 (if the web_app_port parameter has not been changed) gives access to the RVS web interface which is quite identical to that of the Mac version (there is an annoying bug that continually opens up new pop-ups but this can easily avoided with an anti-popup).

Interfaccia web RVS
RVS web interface

From the Session sources tab, create a new source and verify that all settings are correct.

Tab sources
Tab sources

At this point the device "RAVENNA" is configured in our system and ready to be used as an audio interface.

Test n. 1: from shell with the speaker-test command

Following the instructions on the merging site, the simplest test to do is from shell with the speaker-test utility through the command:

speaker-test -D plughw:RAVENNA -r 44100 -c 2

which generates an alternating pink noise between Left and Right at the indicated sampling rate. In this case the software communicates directly with the ALSA driver, already in communication with the RAVENNA driver.

To receive this audio stream on Genelec 8430a monitors you need to configure Ravenna using their web interface, accessible in various ways including the pull-down menu of the web interface previously opened.

Scelta del device RAVENNA
Choice of the RAVENNA device

Choosing the menu item of the previous figure we access the elegant web interface for the Ravenna configuration on Genelec monitors (note in this different layout the view of the 3 currently active Ravenna devices in the upper part the display).

Ravenna web interface on Genelec 8430a
Ravenna web interface on Genelec 8430a

As you can see, the monitors are already receiving the audio stream set on the RVS and called in this case ALSA (on workstation_8) and as soon as we set the source and channel flow, we can hear the pink noise produced by the speaker-test application.

The test gives a positive result.

Test n. 2: From Desktop with Spotify

In this second test we use a desktop application like Spotify and see how to set up the RVS on the Gnome window manager. In this case the audio passes through an intermediate layer made up of the Pulse audio server, used by the window manager to manage multiple audio streams.

As soon as the MergingRavennaALSA module is inserted into the kernel, the RVS appears together with the other ALSA devices. We can see it from the Pulse Audio Panel Plugin application used for the configuration of the available interfaces and volumes:

Ravenna web interface on Genelec 8430a
Ravenna web interface on Genelec 8430a

Opening the audio mixer you can see the RAVENNA device along with the other audio devices:

The RVS now appears among the audio devices
The RVS now appears among the audio devices

Now let’s open Spotify for Linux and set its output device from the Reproduction tab of the Pulse Audio Panel:

Spotify uses the RVS as an audio device
Spotify uses the RVS as an audio device

Just enough to listen to our favorite playlists via Ravenna on Genelec monitors.

The test gives a positive result.

Test n.3. With Jack + DAW

After the two previous tests, the crucial test is with the Jack Audio server (instead of the Pulse Audio server), which is the standard server used in professional audio applications on Linux.

We configure Audio Jack using the QjackCtl desktop application and set the RAVENNA device for it:

Setting RVS on the Jack server
Setting RVS on the Jack server

We start the Jack Audio server and ... unfortunately we detect the following error message:

creating alsa driver ... 
hw:RAVENNA|-|256|7|44100|0|8|nomon|swmeter|-|32bit
Using ALSA driver snd_merging_rav running on card 0 - Merging RAVENNA
configuring for 44100Hz, period = 256 frames (5.8 ms), buffer = 7 periods
ERROR: ALSA: mmap-based access is not possible for the playback 
stream of this audio interface
ERROR: ALSA: cannot configure playback channel
Released audio card Audio0
ERROR: Cannot initialize driver
ERROR: JackServer::Open failed with -1
ERROR: Failed to open server

It seems that the problem lies in the use of the MMAP (memory mapped) function (on the user forum you can follow the discussion)

The test gives a negative result.

Conclusions

The Ravenna Virtual Soundcard for Linux by Merging has just have been published, and it is already a small miracle to have it available for the most common audio activities (although in addition to the limit that emerged in the test n.3 also has some other minor bugs).

But we are sure that soon Merging will release an update that will properly manage the RVS communication with the Jack Audio server thus allowing Linux users to access to the magic of audio networking!

Useful links

RAVENNA
www.ravenna-network.com/using-ravenna/overview/

MERGING TECHNOLOGIES
ALSA RAVENNA AES67 Linux Driver by Merging Technologies: https://www.merging.com/products/alsa_ravenna_aes67_driver
Documentazione Merging Linux Kernel Module: bitbucket.org/MergingTechnologies/ravenna-alsa-lkm/
Forum Merging Linux Kernel Module: forum.merging.com/viewtopic.php?t=14062&p=40096

GENELEC
8430a IP SAM: www.genelec.com/studio-monitors/sam-studio-monitors/8430a-ip-sam-studio-monitor
Distribuite in Italia da: MidiWare midiware.com/

LINUX
AV Linux Distribution: www.bandshed.net/avlinux/
ALSA: www.alsa-project.org/main/index.php/Main_Page / www.ti.com/lit/an/sprac10/sprac10.pdf

Audio server
Pulse audio server: www.freedesktop.org/wiki/Software/PulseAudio/
Jack audio server: http://www.jackaudio.org/

Digital Audio Workstation
Ardour www.jackaudio.org/
Harrison Mixbus harrisonconsoles.com/site/mixbus.html





curve 

Latest Comments

curve 

Latest Posts

curve 

Most visited