WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore13.0.3 - audio - jack broken - clients not connecting  (Read 1171 times)

Offline redFrik

  • Newbie
  • *
  • Posts: 6
Hi,
something must have changed between piCore12.0 and piCore13.0.3 that broke jack.
The problem that now occur under piCore13 is that jack clients are crashing as they connect. I've tried many things but am now out of Ideas. jack.tcz and alsa.tcz seem identical between the two versions so i'm guessing the issue must be elsewhere.

To reproduce install alsa and jack on a fresh system. Start jack with sudo and a relatively high priority (-P75). Next run sudo jack_lsp or sudo jack_simple_client. They both work as expected under piCore12.0...

Code: [Select]
tce-load -wi alsa jack

tc@box:~$ sudo jackd -P75 -p16 -dalsa -P -dhw:0 -r44100 -p1024 -n3 &
tc@box:~$ jackdmp 1.9.14
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2019 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 75
self-connect-mode is "Don't restrict self connect requests"
creating alsa driver ... hw:0|-|1024|3|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 3 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 3 periods for playback

tc@box:~$ sudo jack_lsp
system:playback_1
system:playback_2

But when we try the same under a fresh piCore13.0.3 install the clients do not want to connect. Everything is identical and jack seem to start and run without problems. As soon as we run jack_lsp though...

Code: [Select]
tc@box:~$ sudo jack_lsp
JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Driver is not running
Cannot read socket fd = 5 err = Success
CheckRes error
Cannot create new client
JackSocketClientChannel read fail
Cannot open lsp client
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Error: cannot connect to JACK, jack_client_open() failed, status = 0x21

and no other clients i tried could connect - i get the same error.

This is on a RPi3 v1.2 32-bit with the built-in sound card. Also same issue running without sudo.

Grateful for any ideas.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
Re: piCore13.0.3 - audio - jack broken - clients not connecting
« Reply #1 on: July 27, 2021, 04:47:31 PM »
I don't use jack, but nothing changed with alsa between 12 and 13.

However there were significant changes with the rpi kernel sound drivers.  I would make sure your audio works completely before messing with jack.

« Last Edit: July 27, 2021, 04:50:35 PM by Paul_123 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11230
Re: piCore13.0.3 - audio - jack broken - clients not connecting
« Reply #2 on: July 27, 2021, 06:00:42 PM »
Hi redFrik
I do notice one small difference for ARM6.
This is the dependency tree for  http://tinycorelinux.net/12.x/armv6/tcz/jack.tcz.tree
Code: [Select]
jack.tcz
   libasound.tcz
      alsa-modules-5.4.51-piCore.tcz
   libopus.tcz
   libsamplerate.tcz
      libsndfile.tcz
   readline.tcz
      ncurses.tcz

This is the dependency tree for  http://tinycorelinux.net/13.x/armv6/tcz/jack.tcz.tree
Code: [Select]
jack.tcz
   libasound.tcz
      alsa-modules-5.10.16-piCore.tcz
   libopus.tcz
   libsamplerate.tcz
      libsndfile.tcz
         flac.tcz
            libogg.tcz
         libasound.tcz
            alsa-modules-5.10.16-piCore.tcz
         libvorbis.tcz
            libogg.tcz
         sqlite3.tcz
   readline.tcz
      ncurses.tcz

That suggests  libsndfile  may have changed, yet both  .info  files are identical with change logs dated  2016/05/20:
http://tinycorelinux.net/13.x/armv6/tcz/libsndfile.tcz.info

Offline redFrik

  • Newbie
  • *
  • Posts: 6
Re: piCore13.0.3 - audio - jack broken - clients not connecting
« Reply #3 on: July 28, 2021, 02:30:47 AM »
Thank you Paul_123 and Rich.

Sound is fine here otherwise (speaker-test, aplay). It's the jack clients.

Strange that the libsndfile tree changed. The file sqlite3.tcz is different so perhaps that triggered it.
I tried swapping out sqlite3 and libsndfile with files directly from piCore12 repo but still no go. I don't think that's the problem.

Rather I found this report... Raspberry Pi 4 (snd_bcm2835) does not play nice with jack https://github.com/jackaudio/jack2/issues/691 This is the same problem and that indicates it has to do with the audio driver. The suggested workaround - jack with dummy driver works here under piCore13 but is not optimal - choppy sound and more latency.

Anyways, I'll stick with piCore12.0 for now.
« Last Edit: July 28, 2021, 02:38:05 AM by redFrik »