@@ -0,0 +1,9 @@ | |||||
--- | |||||
jackaudio_default_server: default | |||||
jackaudio_driver: dummy | |||||
jackaudio_device: '' | |||||
jackaudio_realtime: true | |||||
jackaudio_additional_options: '' | |||||
jackaudio_driver_settings: | | |||||
-r{{jackaudio_sample_rate}} | |||||
jackaudio_sample_rate: 48000 |
@@ -0,0 +1,10 @@ | |||||
--- | |||||
- name: systemd daemon-reload | |||||
systemd: | |||||
daemon_reload: yes | |||||
- name: restart jackaudio | |||||
systemd: | |||||
name: jack.service | |||||
state: restarted |
@@ -0,0 +1,34 @@ | |||||
--- | |||||
- name: jackaudio group | |||||
user: | |||||
name: jack | |||||
system: true | |||||
- name: jackaudio user | |||||
user: | |||||
name: jack | |||||
group: jack | |||||
groups: | |||||
- audio | |||||
system: true | |||||
- name: jackaudio systemd service unit | |||||
template: | |||||
src: jack.service.j2 | |||||
dest: /etc/systemd/system/ | |||||
notify: | |||||
- systemd daemon-reload | |||||
- restart jackaudio | |||||
- name: jackaudio config | |||||
template: | |||||
src: jack.conf.j2 | |||||
dest: /etc/jack.conf | |||||
notify: restart jackaudio | |||||
- name: make sure jackaudio is enabled and started | |||||
systemd: | |||||
name: jack.service | |||||
state: started | |||||
enabled: true |
@@ -0,0 +1,16 @@ | |||||
{{ansible_managed|comment}} | |||||
pcm.rawjack { | |||||
type jack | |||||
playback_ports { | |||||
0 system:playback_1 | |||||
} | |||||
} | |||||
pcm.jack { | |||||
type plug | |||||
slave { pcm "rawjack" } | |||||
hint { | |||||
description "JACK Audio Connection Kit" | |||||
} | |||||
} |
@@ -0,0 +1,11 @@ | |||||
{{ansible_managed|comment}} | |||||
JACK_USER="jack" | |||||
JACK_GROUP="jack" | |||||
# Options to JACK (e.g. -m, -n, -p, -r, -P, -t, -C, -u, -v) | |||||
JACK_OPTIONS="{{jackaudio_options|replace('\n',' ')|trim}}" | |||||
# Audio backend (e.g. alsa, dummy, firewire, netone, oss, portaudio) | |||||
DRIVER="{{jackaudio_driver}}" | |||||
# Specific settings for the audio backend in use | |||||
DRIVER_SETTINGS="{{jackaudio_driver_settings|replace('\n',' ')|trim}}" |
@@ -0,0 +1,23 @@ | |||||
{{ansible_managed|comment}} | |||||
[Unit] | |||||
Description=JACK server | |||||
Documentation=man:jackd(1) | |||||
After=sound.target | |||||
[Service] | |||||
EnvironmentFile=/etc/jack.conf | |||||
ExecStart=jackd $JACK_OPTIONS -d $DRIVER $DRIVER_SETTINGS | |||||
LimitRTPRIO=95 | |||||
LimitRTTIME=infinity | |||||
LimitMEMLOCK=infinity | |||||
# Caution: use on memory-limited devices only | |||||
# OOMScoreAdjust=-1000 | |||||
#Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket | |||||
User=jack | |||||
Group=jack | |||||
Environment="JACK_PROMISCUOUS_SERVER=jack" | |||||
UMask=0 | |||||
[Install] | |||||
WantedBy=multi-user.target |
@@ -0,0 +1,3 @@ | |||||
jackaudio_options: | | |||||
-{{ jackaudio_realtime | ternary('R','r') }} | |||||
{{jackaudio_additional_options}} |