Troubles with Jack and Patchbox/Pisound

Hello,

I’m trying to get my newly received pisound to work nicely with Pianoteq pro (ARM32, latest version). But I’m already experiencing problems when trying to select a default interface for Jack in the patchbox-config tool:

patch@patchbox:~ $ sudo patchbox-config
Jack service restarted!
Waiting for Jack to boot...
Error: Failed to start Jack service! Try different settings!

patch@patchbox:~ $ sudo systemctl status jack.service
● jack.service - JACK Server
   Loaded: loaded (/lib/systemd/system/jack.service; enabled; vendor preset: ena
   Active: active (running) since Mon 2021-03-15 23:03:50 CET; 44s ago
 Main PID: 1224 (jackd)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/jack.service
           └─1224 /usr/bin/jackd -t 2000 -R -P 95 -d alsa -d hw:pisound -r 48000

Mar 15 23:03:50 patchbox jackdrc[1224]: port created: Midi-Through:midi/capture_
Mar 15 23:03:50 patchbox jackdrc[1224]: port created: pisound:midi/playback_1
Mar 15 23:03:50 patchbox jackdrc[1224]: port created: pisound:midi/capture_1
Mar 15 23:03:50 patchbox jackdrc[1224]: port created: pisound-ctl:midi/playback_
Mar 15 23:03:50 patchbox jackdrc[1224]: port created: pisound-ctl:midi/capture_1
Mar 15 23:03:54 patchbox jackdrc[1224]: ALSA: poll time out, polled for 3999065
Mar 15 23:03:54 patchbox jackdrc[1224]: JackAudioDriver::ProcessAsync: read erro
Mar 15 23:03:56 patchbox jackdrc[1224]: JackPosixProcessSync::LockedTimedWait er
Mar 15 23:03:56 patchbox jackdrc[1224]: Driver is not running
Mar 15 23:03:56 patchbox jackdrc[1224]: Cannot create new client

Pisound Button Version: 1.12
Pisound Hardware Version: 1.1
Pisound Server Version: 1.03
Pisound Firmware Version: 1.03
Pisound Serial Number: PS-3GP6QRH

The pisound driver is recognised in the patchbox-config options and shows up alongside the integrated headphones and HDMI outputs.

Everything updated and upgraded, not using the rt kernel or any patchbox module config. RPi4 8GB with official power supply.

Here’s the Dmesg

DrJeddRPI4PatchboxDMESG.zip (8.6 KB)

Happy to provide anything else. Looking for the quickest way to get this thing to output realtime HQ sound so I can use my lovely pianos :smile:

Thanks a lot for your help!

Hey, did you just recently install Patchbox OS? What settings did you provide for the configuration? I can see 48000 sampling rate which is good, but the rest of the arguments are cut from the systemctl output :slight_smile:

Is there some other audio software running in the background that could interfere with Jack initialization?

Hi again, thanks for your quick reply! I was away for a while but did try again from the start.

Right away I’m getting the same Jack service error on a brand new fresh install of Patchbox OS :

This happens whatever interface I choose (default RPI or Pisound), and whatever setting I choose for samplerate, buffer, etc.

● jack.service - JACK Server
   Loaded: loaded (/lib/systemd/system/jack.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-03-27 11:58:26 GMT; 51s ago
  Process: 2183 ExecStart=/etc/jackdrc (code=exited, status=255/EXCEPTION)
 Main PID: 2183 (code=exited, status=255/EXCEPTION)

Mar 27 11:58:25 patchbox jackdrc[2183]: ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
Mar 27 11:58:25 patchbox jackdrc[2183]: configuring for 48000Hz, period = 128 frames (2.7 ms), buffer = 2 periods
Mar 27 11:58:25 patchbox jackdrc[2183]: ALSA: final selected sample format for playback: 16bit little-endian
Mar 27 11:58:25 patchbox jackdrc[2183]: ALSA: cannot set period size to 128 frames for playback
Mar 27 11:58:25 patchbox jackdrc[2183]: ALSA: cannot configure playback channel
Mar 27 11:58:25 patchbox jackdrc[2183]: Cannot initialize driver
Mar 27 11:58:25 patchbox jackdrc[2183]: JackServer::Open failed with -1
Mar 27 11:58:26 patchbox jackdrc[2183]: Failed to open server
Mar 27 11:58:26 patchbox systemd[1]: jack.service: Main process exited, code=exited, status=255/EXCEPTION
Mar 27 11:58:26 patchbox systemd[1]: jack.service: Failed with result 'exit-code'.

Dmesg:
jedd_dmesg.zip (9.0 KB)

Hi, looks like dmesg contains these errors:

[ 565.079260] bcm2835-i2s fe203000.i2s: I2S SYNC error!
[ 565.081381] bcm2835-i2s fe203000.i2s: I2S SYNC error!

It could simply be caused by insufficient contact between the boards - squeezing them together a bit, (or just mounting without the standoffs for the sake of trying it out) might make it work. I²S is the interface for transmitting and receiving audio. It could be an issue with the Pisound itself or with the Raspberry Pi. Any chance you could try the Pisound with another Raspberry Pi if making better contact does not help?

I managed to get my hands on a RPi3 and it works well: I’m getting through the setup wizard without hassle and started the pianoteq trial which played nicely through the Pisound output.

Mounting the pisound back on the RPi4 with a fresh patchbox install and making sure the pin contacts are happening and undisturbed, same error with jack service from the get go. I also tried installing patchbox a little while before receiving the pisound and I remember already having issues with jack. Which means the problem is not coming from Pisound but from either the hardware or patchbox OS support for the RPi4 8gb…

Should I send you a pic of the board ?

Dmseg on the RPi3 for comparison: jedd_rpi3_dmesg.zip (8.6 KB)

It does sound like an issue with RPi 4 itself, occasionally the GPIO pins can get damaged due to electrostatic discharges or if something gets shorted, even very briefly, if hooking up something with wires, etc…

I think the final test you could make is to see if Pisound works with Rasbperry Pi 4 running Raspberry Pi OS. All audio applications should be failing if you try to play audio via the Pisound. One easy command you can use to test it is:

speaker-test -c2 -r48000 -Dhw:pisound

Done:

Now you may run sudo pisound-config to customize your installation!
pi@raspberrypi:~ $ speaker-test -c2 -r48000 -Dhw:pisound

speaker-test 1.1.8

Playback device is hw:pisound
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 128 to 131072
Period size range from 64 to 65536
Using max buffer size 131072
Periods = 4
was set period_size = 32768
was set buffer_size = 131072
 0 - Front Left
 1 - Front Right
Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Input/output error
pi@raspberrypi:~ $

Ok, I think this definitely confirms that the issue is the Raspberry Pi 4 board itself. Pisound should work just fine with 8GB Raspberry Pis.

So we’d suggest replacing the Pi board with another one. :slight_smile:

1 Like

Gotcha. Will try to RMA the board!

1 Like