Yes jackd2 works perfectly, I did it some years ago with systemd scripts ,
Warning: I am not a specialist in systemd, and also I didnt know if it is
better jackd as dbus-run-session or systemd dbus script.
Anyhow better, use User-session: A better way to start/stop applications is
to use "user sessions" (systemd --user) and not system-wide service, but didnt
change since it worked as before.
maybe this helps, comments are appreciated.
mfg
winfried
Am Dienstag, 1. Oktober 2019, 21:54:03 CEST schrieb Paul Davis:
> On Tue, Oct 1, 2019 at 1:08 PM Steven Kruyswijk <stevenkruyswijk@xxxxxxxxx>
>
> wrote:
> > Ah... I only now realize that I need to utilize jackd1. Raspbian comes
> > with
> > jackd2 as standard.
>
> jack1 can't do anything that jack2 can't do (with respect to this problem).
>
> it's just that the zalsa_{in,out} functionality is implemented as an
> internal client in jack1, which makes it easier to invoke directly from the
> command given to start the JACK server.
>
> you can do the same thing using the separate zalsa_{inlout} clients with
> jack2.
--
Ritsch, Winfried, Ao.Univ.Prof. Dipl.-Ing.
Institut 17 Elektronische Musik und Akustik
Inffeldgasse 10/III, 8010 Graz, Austria
E-Mail: ritsch@xxxxxx - http://iem.at/~ritsch - mobil ++436642439369
# jackd-dbus.service
# for embedded headless machines with USB sound card or other.
# done for iemKit domeplayer
# the idea is that other services depending on this will start audio applications
# for installations
#
# (c) GPL, 2016 IEM, Winfried Ritsch
# see https://git.iem.at:/cm/iemKit
#
# STATUS: I dont know enough to handle this
#
# note: [D-BUS Service]
# Name=org.jackaudio.service
# Exec=/usr/bin/jackdbus auto
# already installed via jackd2 package in /usr/share/dbus-1/services/
[Unit]
Description=JACKDBUS
After=sound.target
After=network.target
After=usb-reset.service
Before=pulseaudio.service
Requires=dbus.socket
[Service]
Type=dbus
BusName=org.jackaudio.Controller
#run as user algo for security reasons, should be nobody in future
User=algo
Group=audio
# start service
#ExecStart=/usr/bin/jackdbus auto
#ExecStart=/usr/bin/jack_control
ExecStart=/usr/bin/jack_control start
ExecStop=/usr/bin/jack_control stop
ExecStopPost=/usr/bin/pkill -9 jackdbus
SuccessExitStatus=0
RemainAfterExit=true
[Install]
WantedBy=multi-user.target
# ajbridge.service for embedded headless machines with USB sound card or other.
#
[Unit]
Description=AJBRIDGE
After=jackd.target usb-reset.service multi-user.target
#Before=stream.service
Requires=multi-user.target
AllowIsolate=yes
[Service]
#could not get dbus to work without X11 DISPLAY. so using dbus-run-session now
#run as user algo for security reasons, should be nobody in future
User=aas
Group=audio
# start service
ExecStart=/usr/bin/zita-a2j -d hw:Device -r 44100 -c 1
ExecStart=/usr/bin/zita-a2j -d hw:Device_1 -r 44100 -c 1
#ExecStart=zita-a2j -d hw:Device_2 -r 44100 -c 1
#ExecStart=zita-a2j -d hw:Device_3 -r 44100 -c 1
#ExecStart=zita-a2j -d hw:Device_4 -r 44100 -c 1
#ExecStart=zita-a2j -d hw:Device_5 -r 44100 -c 1
ExecStop=/usr/bin/killall zita-a2j
SuccessExitStatus=0
#RemainAfterExit=true
[Install]
WantedBy=multi-user.target
WantedBy=jack.target
#RequiredBy=ajbridge.target
# jackd.service for embedded headless machines with USB sound card or other.
# done for iemKit domeplayer
# the idea is that other services depending on this will start audio applications
# for installations
#
# (c) GPL, 2016 IEM, Winfried Ritsch
# see https://git.iem.at:/cm/iemKit
#
[Unit]
Description=JACKD
After=sound.target usb-reset.service multi-user.target
Before=stream.service
Requires=multi-user.target
AllowIsolate=yes
[Service]
#could not get dbus to work without X11 DISPLAY. so using dbus-run-session now
#run as user algo for security reasons, should be nobody in future
User=algo
Group=audio
# If they are declared in /etc/limits.d/audio.conf, they are not needed here
LimitRTPRIO=96
LimitRTTIME=infinity
LimitMEMLOCK=infinity
# Additional tuning if needed on small embedded devices
#MemoryMax=512M
#CPUSchedulingPolicy=rr
#CPUSchedulingPriority=95
#CPUAffinity=1 ;
#LimitNPROC=1
#LimitCPU=1024
#ControlGroupAttribute=memory.swappiness 10
# setting parameter in here
Environment="DEVICE=hw:0"
Environment="NAME=JACKD"
Environment="RATE=44100"
Environment="NPERIODS=2"
Environment="PERIOD=1024"
# or read from a file:
#EnvironmentFile=-/etc/jack/%i
# start service
ExecStart= /usr/bin/dbus-run-session /usr/bin/jackd -d alsa --device ${DEVICE} \
--rate ${RATE} --nperiods ${NPERIODS} --period ${PERIOD}
ExecStop=/usr/bin/killall /usr/bin/jackd
SuccessExitStatus=0
#RemainAfterExit=true
[Install]
WantedBy=multi-user.target
#WantedBy=jack.target
RequiredBy=jackd.target
# aj-snapshot.service for embedded headless machines with USB sound card or other.
# done for iemKit domeplayer
# the idea is that other services depending on this will start audio applications
# for installations
#
# (c) GPL, 2017 IEM, Winfried Ritsch
#
# first install a snapshot:
# mkdir /etc/aj-snapshot
# ajsnapshot -j /etc/aj-snapshot/routing.snap
# with kill -HUP of the daemon it will reload the snapshot (to be impemented below)
[Unit]
Description=aj-snapshot
After=syslog.target network.target jackd.service
[Service]
Type=simple
User=algo
Group=algo
LimitMEMLOCK=infinity
ExecStart=/usr/bin/aj-snapshot -xjd /etc/aj-snapshot/routing.snap
SuccessExitStatus=0
#RemainAfterExit=true
[Install]
WantedBy=multi-user.target
#WantedBy=jackd.target
#RequiredBy=aj-snapshot.target
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
https://lists.linuxaudio.org/listinfo/linux-audio-user