We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

G_Pisano
Posts: 1
Joined: Fri Sep 23, 2022 4:20 am

Issues with Jack and vc4hdmi

Thu Oct 06, 2022 6:03 am

Hi everyone,

Rather new to Raspberry Pi and Linux, trying to figure out how to run multichannel audio without an audio interface.

The idea is to run an HDMI cable in an audio extractor and take the 7.1 signal - treating it as a regular 8ch of audio - to feed loudspeakers. Optionally I am also going to use an Audio Injector Octo or a different audio interface, depending on the situation.

I have uninstalled Pulse Audio because it clashes with everything i need, from Audio Injector to Jack:

Code: Select all

sudo apt-get remove pulseaudio

sudo apt-get remove pulseaudio-utils

sudo apt-get autoremove
Have installed all the missing packages of alsa:

Code: Select all

$ sudo apt-get install alsa-base alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui libalsaplayer0
have installed jackd and qjackctl

now when I try to run jack both from terminal AND from the GUI i get the following error:

  • JackShmReadWritePtr::~JackShmReadWritePtr - init not done for -1, skipping unlock
    JackShmReadWritePtr::~JackShmReadWritePtr - init not done for -1, skipping unlock
    13:29:22.970 Statistics reset.
    13:29:34.376 JACK is starting...
    13:29:34.377 /usr/bin/jackd -dalsa -dhw:vc4hdmi0 -r44100 -p16 -n2 -P
    Cannot connect to server socket err = no such file or directory
    Cannot connect to server request channel
    jack server is not running and cannot be started
    JackShmReadWritePtr::~JackShmReadWritePtr - init not done for -1, skipping unlock
    JackShmReadWritePtr::~JackShmReadWritePtr - init not done for -1, skipping unlock
    13:29:34.452 JACK was started with PID=1823
    Copyright 2001-2005 Paul Davis and others.
    Copyright 2004-2016 Grame.
    Copyright 2016-2021 Filipe Coelho.
    jackdmp comes with ABSOLUTELY NO WARRANTY
    This is free software, and you are welcome to redistribute it
    under certain conditions; see the file COPYING for details
    JACK server starting in realtime mode with priority 10
    self-connect-mode is "Don't restrict self connect requests"
    audio_reservation_init
    Acquire audio card Audio0
    creating alsa driver ... hw:vc4hdmi0|-|16|2|44100|0|0|nomon|swmeter|-|32bit
    configuring for 44100Hz, period = 16 frames (0.4 ms), buffer = 2 periods
    Sorry. The audio interface "hw:vc4hdmi0" doesn't support any of the hardware sample formats that JACK's alsa-driver can use.
    ALSA: cannot configure playback channel
    Released audio card Audio0
    audio_reservation_finish
    Cannot initialize driver
    JackServer::Open failed with -1
    Failed to open server
    13:29:34.902 JACK was stopped
    13:29:36.478 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages windows for more info.
    Cannot connect to server socket err = no such file or directory
    Cannot connect to server request channel
    jack server is not running and cannot be started
    JackShmReadWritePtr::~JackShmReadWritePtr - init not done for -1, skipping unlock
    JackShmReadWritePtr::~JackShmReadWritePtr - init not done for -1, skipping unlock


So far speaker tests run correctly.

Code: Select all

sudo speaker-test -c 2 -t sine -D hdmi:vc4hdmi0

speaker-test 1.2.4

Playback device is hdmi:vc4hdmi0
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 440,0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 65536
Period size range from 32 to 32768
Using max buffer size 65536
Periods = 4
was set period_size = 16384
was set buffer_size = 65536
 0 - Front Left
 1 - Front Right
Time per period = 4,111098
 0 - Front Left

So far both my aplay-L and my aplay -l look good to me (even tho i don't understand why the PulseAudio Sound Server still shows up ???)

Code: Select all

sudo aplay -L

null
    Discard all samples (playback) or generate zero samples (capture)
sysdefault
    Default Audio Device
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    Jack Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4, 6, 8)
downmix
    Plugin for channel downmix (stereo) with a simple spacialization
default
anyChannelCount
hw:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Direct hardware device without any conversions
plughw:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Hardware device with all software conversions
sysdefault:CARD=vc4hdmi0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Default Audio Device
hdmi:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    HDMI Audio Output
dmix:CARD=vc4hdmi0,DEV=0
    vc4-hdmi-0, MAI PCM i2s-hifi-0
    Direct sample mixing device
usbstream:CARD=vc4hdmi0
    vc4-hdmi-0
    USB Stream Output
hw:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Direct hardware device without any conversions
plughw:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Hardware device with all software conversions
sysdefault:CARD=vc4hdmi1
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Default Audio Device
hdmi:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    HDMI Audio Output
dmix:CARD=vc4hdmi1,DEV=0
    vc4-hdmi-1, MAI PCM i2s-hifi-0
    Direct sample mixing device
usbstream:CARD=vc4hdmi0
    vc4-hdmi-0
    USB Stream Output
and

Code: Select all

sudo aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM 12s-hifi-0 [MAI PCM 12s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM 12s-hifi-0 [MAI PCM 12s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
Another thing I don't get is why both card 0 and card 1 are listed as device 0, is that normal?

To me it doesn't seem that I have a problem inside ALSA, it looks more like Jack not being able to find something it needs to run.

Anyone has a clue?

Also, eventually, I would like to enable the 7.1 on both HDMI that are 2ch by default. Does anyone know where can I find the config file to do so?




Device:
Raspberry Pi 4 Mod. B 8Gb

System:
Raspberry Pi reference 64bit

Best Regards,

G

Return to “Troubleshooting”