[Solved] No audio input going to output


#21

nothing changed …hmm


#22

This may mean that the device is already in use by other audio software.

The X display error should be worked around by ‘JACK_NO_AUDIO_RESERVATION=1’


#23
JACK_NO_AUDIO_RESERVATION=1 /usr/bin/jackd -v -t 2000 -P 75 -d alsa -d hw:pisound -r 48000 -p 128 -n 2 -X seq -s -S
jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
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"
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: playback device hw:pisound
Jack: capture device hw:pisound
Jack: apparent rate = 48000
Jack: frames per period = 128
Jack: JackDriver::Open capture_driver_name = hw:pisound
Jack: JackDriver::Open playback_driver_name = hw:pisound
Jack: Check protocol client = 8 server = 8
Jack: JackEngine::ClientInternalOpen: name = system
Jack: JackEngine::AllocateRefNum ref = 0
Jack: JackPosixSemaphore::Allocate name = jack_sem.1001_default_system val = 0
Jack: JackEngine::NotifyAddClient: name = system
Jack: JackGraphManager::SetBufferSize size = 128
Jack: JackConnectionManager::DirectConnect first: ref1 = 0 ref2 = 0
Jack: JackGraphManager::ConnectRefNum cur_index = 0 ref1 = 0 ref2 = 0
Jack: JackDriver::SetupDriverSync driver sem in flush mode
Failed to connect to session bus for device reservation Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

Audio device hw:pisound cannot be acquired...
Jack: ~JackDriver
Cannot initialize driver
Jack: no message buffer overruns
Jack: JackPosixThread::Stop
Jack: JackPosixThread::ThreadHandler : exit
JackServer::Open failed with -1
Jack: Succeeded in unlocking 82278944 byte memory area
Jack: JackShmMem::delete size = 0 index = 0
Jack: ~JackDriver
Jack: Succeeded in unlocking 1232 byte memory area
Jack: JackShmMem::delete size = 0 index = 1
Jack: Cleaning up shared memory
Jack: Cleaning up files
Jack: Unregistering server `default'
Failed to open server

…I tried something from stackexchange but I think it made it worse :confused: https://raspberrypi.stackexchange.com/questions/56456/cant-start-jackd

Now I get some other errors omg so sorry

export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket JACK_NO_AUDIO_RESERVATION=1 /usr/bin/jackd -v -t 2000 -P 75 -d alsa -d hw:pisound -r 48000 -p 128 -n 2 -X seq -s -S
-bash: export: `/usr/bin/jackd': not a valid identifier
-bash: export: `-v': not a valid identifier
-bash: export: `-t': not a valid identifier
-bash: export: `2000': not a valid identifier
-bash: export: `-P': not a valid identifier
-bash: export: `75': not a valid identifier
-bash: export: `-d': not a valid identifier
-bash: export: `-d': not a valid identifier
-bash: export: `hw:pisound': not a valid identifier
-bash: export: `-r': not a valid identifier
-bash: export: `48000': not a valid identifier
-bash: export: `-p': not a valid identifier
-bash: export: `128': not a valid identifier
-bash: export: `-n': not a valid identifier
-bash: export: `2': not a valid identifier
-bash: export: `-X': not a valid identifier
-bash: export: `-s': not a valid identifier
-bash: export: `-S': not a valid identifier




JACK_NO_AUDIO_RESERVATION=1 /usr/bin/jackd -v -t 2000 -P 75 -d alsa -d hw:pisound -r 48000 -p 128 -n 2 -X seq -s -S`
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
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"
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: playback device hw:pisound
Jack: capture device hw:pisound
Jack: apparent rate = 48000
Jack: frames per period = 128
Jack: JackDriver::Open capture_driver_name = hw:pisound
Jack: JackDriver::Open playback_driver_name = hw:pisound
Jack: Check protocol client = 8 server = 8
Jack: JackEngine::ClientInternalOpen: name = system
Jack: JackEngine::AllocateRefNum ref = 0
Jack: JackPosixSemaphore::Allocate name = jack_sem.1001_default_system val = 0
Jack: JackEngine::NotifyAddClient: name = system
Jack: JackGraphManager::SetBufferSize size = 128
Jack: JackConnectionManager::DirectConnect first: ref1 = 0 ref2 = 0
Jack: JackGraphManager::ConnectRefNum cur_index = 0 ref1 = 0 ref2 = 0
Jack: JackDriver::SetupDriverSync driver sem in flush mode
audio_reservation_init
dbus_bus_request_name() failed. (1)
Failed to acquire device name : Audio1 error : Connection ":1.29" is not allowed to own the service "org.freedesktop.ReserveDevice1.Audio1" due to security policies in the configuration file
Audio device hw:pisound cannot be acquired...
Jack: ~JackDriver
Cannot initialize driver
Jack: no message buffer overruns
Jack: JackPosixThread::Stop
Jack: JackPosixThread::ThreadHandler : exit
JackServer::Open failed with -1
Jack: Succeeded in unlocking 82278944 byte memory area
Jack: JackShmMem::delete size = 0 index = 0
Jack: ~JackDriver
Jack: Succeeded in unlocking 1232 byte memory area
Jack: JackShmMem::delete size = 0 index = 1
Jack: Cleaning up shared memory
Jack: Cleaning up files
Jack: Unregistering server `default'
Failed to open server

Got rid of the

 Failed to acquire device name : Audio1 error : Connection ":1.29" is not allowed to own the service "org.freedesktop.ReserveDevice1.Audio1" due to security policies in the configuration file
    Audio device hw:pisound cannot be acquired...

by adding the policy to /etc/dbus-1/system.conf:

<policy user="pi">
     <allow own="org.freedesktop.ReserveDevice1.Audio0"/>
     <allow own="org.freedesktop.ReserveDevice1.Audio1"/>
</policy>

…and eventually it is running now by adding:

export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket

to ~/.bashrc

It works now! Awesome! Thank you so much!!


#24

This might be specific to Volumio image or something, it worked more straightforwardly on regular Raspbian image :slight_smile:


#25

Okay, I had to investigate a lot further and this is a common problem for headless systems.

My problem now is that it works when I start it manually with the user pi but when I make a bash script which gets triggered by pisound-btn I get the same error as before.

I tried to add everything as in my solution (added a user pisound-btn because it didn’t exist <-- I think somewhere here is the error) and added the lines to its bashrc but still same error (Failed to connect to session bus for device reservation Unable to autolaunch a dbus-daemon without a $DISPLAY for X11).

I tried to remove the dbus from jack2 (as mentioned here: https://supercollider.github.io/development/building-raspberrypi - go to Step 3) but it didn’t change anything either (maybe I did something wrong but everything went without an error …).

Any idea what I could try so I can trigger jack2 with the Pisound Button?

Edit: Okay solved it again… for anybody having this problem: I had jackd installed in /bin/local/jackd and was starting the unpatched version /usr/bin/jackd …works like a charm now!