This page looks best with JavaScript enabled

Mumble + Jackd on FreeBSD

 ·  🎃 kr0m

Mumble is a cross-platform messaging and VoIP system that works well on most systems, but it has some issues on FreeBSD. Using OSS directly is a disaster, as it requires restarting after every configuration change, and as soon as the configuration is applied and the main window is returned to, it stops capturing microphone audio. However, these problems are solved by using Jackd (audio server), the only drawback being that we will have to compile Mumble from the ports.

First, we need to know what audio cards are available on the system:

pciconf -lv

hdac1@pci0:0:31:3:    class=0x040300 card=0x86911043 chip=0xa1708086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '100 Series/C230 Series Chipset Family HD Audio Controller'
    class      = multimedia
    subclass   = HDA
hdac0@pci0:1:0:1:    class=0x040300 card=0x61633842 chip=0x10f110de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'GP106 High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA

The first one is the onboard audio card, and the second one is the graphics card’s audio card, which is used to output audio through HDMI.

Now we list the audio devices created by the operating system:

cat /dev/sndstat

Installed devices:
pcm0: <NVIDIA (0x0084) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0084) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0084) (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA (0x0084) (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC1150 (Analog 5.1+HP/2.0)> (play/rec) default
pcm5: <Realtek ALC1150 (Rear Digital)> (play)
pcm6: <Realtek ALC1150 (Front Analog Mic)> (rec)
pcm7: <USB audio> (rec)
No devices installed from userspace.

To identify the output devices, we will change the default card and play an audio file.

In this case, we change the default output to the pcm3 device:

sysctl hw.snd.default_unit=3

We play the audio file with mpv, for example:

mpv FILE

For recording, we will use sox and try different AUDIODEV until we manage to record from the microphone:

AUDIODRIVER=oss AUDIODEV=/dev/dsp6 sox -d test.wav trim 0 10

We reproduce the recorded file with mpv:

mpv test.wav

After testing audio playback and recording, I have come to the following conclusion:

  • pcm4: <Realtek ALC1150 (Analog 5.1+HP/2.0)> (play/rec) default -> Output jack
  • pcm6: <Realtek ALC1150 (Front Analog Mic)> (rec) -> Microphone input

We must compile Mumble with the Jackd option. To do this, we will use the ports system, but keep in mind that once we use ports, we must manage all the packages from them. In this previous article, it is explained how to manage packages from ports.

We compile and install Mumble with the Jack option enabled:

cd /usr/ports/audio/mumble
make config

We compile and install:

make install clean

We install Jackd:

portsnap fetch update
cd /usr/ports/audio/qjackctl
make config
make
make install
make clean

We configure Jackd, indicating the user who will use it and the input/output devices:

vi /etc/rc.conf

jackd_enable=\"yes\"
jackd_user="kr0m"
jackd_rtprio="YES"
jackd_args="-R -doss -r48000 -p1024 -n3 -w16 --capture /dev/dsp6 --playback /dev/dsp4"

NOTE: This configuration imposes the limitation that only the user kr0m can use the sound server. A possible workaround would be to reconfigure it through a script that uses sudo and sysrc at the start of each user’s X.

We start the service:

service jackd start

We start Mumble and go to the audio input options where we will indicate:

System: JACK
Transit: Signal to Noise

In the audio output section:

System: JACK
Device: Stereo

With this configuration, we can now enjoy Mumble without any problems.

If you liked the article, you can treat me to a RedBull here