Set up multiple sound server options for FreeBSD.

This commit is contained in:
Tom Alexander
2024-05-18 09:52:18 -04:00
parent f44074ebe7
commit 38d255f0ab
8 changed files with 59 additions and 21 deletions

View File

@@ -4,13 +4,6 @@
- mixertui
state: present
- name: Install packages
when: install_graphics
package:
name:
- pavucontrol
state: present
- name: Configure sysctls
ignore_errors: true
when: sound_default_unit is defined
@@ -25,12 +18,15 @@
- name: hw.snd.default_unit
value: "{{ sound_default_unit }}"
- name: Install loader.conf
copy:
src: "files/{{ item }}_loader.conf"
dest: "/boot/loader.conf.d/{{ item }}.conf"
mode: 0644
owner: root
group: wheel
- name: Configure sysctls
sysctl:
name: "{{ item.name }}"
value: "{{ item.value }}"
state: present
sysctl_file: "/etc/sysctl.conf.local"
loop:
- realtime_priority
- name: hw.snd.verbose
value: "2"
- include_tasks: "tasks/freebsd_{{sound_system}}.yaml"
when: sound_system is defined

View File

@@ -0,0 +1,37 @@
# Jack users must be added to the realtime group.
# Also set memorylocked to 128M in login.conf
# D-bus should be enabled for auto-launching jack.
- name: Install loader.conf
copy:
src: "files/{{ item }}_loader.conf"
dest: "/boot/loader.conf.d/{{ item }}.conf"
mode: 0644
owner: root
group: wheel
loop:
- realtime_priority
- name: Install packages
package:
name:
- jackit
state: present
- name: Install packages
when: install_graphics
package:
name:
- qjackctl
state: present
# hw.snd.default_auto=0 # (2)
# hw.snd.default_unit=1 # (3)
# hw.usb.uaudio.buffer_ms="2"
# hw.snd.latency=0
# hw.snd.latency_profile=0
# Hurts battery:
# kern.timecounter.alloweddeviation=0

View File

@@ -0,0 +1,7 @@
- name: Install packages
when: install_graphics
package:
name:
- pavucontrol
state: present