Remove pulseaudio role, since everything uses pipewire these days

This commit is contained in:
Salt 2024-04-23 18:03:52 -05:00
parent c812dd514d
commit d79d442303
7 changed files with 0 additions and 182 deletions

View File

@ -1,11 +0,0 @@
# pulseaudio
Role to configure Pulseaudio as a system-wide daemon *without* using Pulse in system mode.
## What?
Pulseaudio runs as its own server with control over the audio hardware in `pulseaudio.service`. It listens on a socket in `/tmp/pulse-server` responding to members of the `audio` group.
## Why?
It allows for clean, efficient multi-user setups.

View File

@ -1,24 +0,0 @@
# vim:ft=ansible:
# Flat volumes are the behavior where Pulse uses one global audio slider
# instead of allowing for per-application, per-sink control.
pulse_flat_volumes: "no"
# Sample rate; pretty self-explanatory
# Consider setting to 96000 if you have high-quality headphones
pulse_sample_rate: 96000
pulse_sample_rate_alternate: 44100
# For some reason, Pulse does 16-bit sampling by default. This fixes that
pulse_sample_format: s32le
# Sometimes Pulse has to resample; speex-float-5 is pretty solid
pulse_resample_method: speex-float-5
pulse_resample_avoid: "true"
# Latency settings; increase if you get stuttering
# "Size" is in milliseconds
pulse_latency_fragments: 5
pulse_latency_fragment_size: 10
## You shouldn't have to mess with these settings
# Should the process be marked as high-priority?
pulse_high_priority: "yes"
# What level should Pulse renice itself to on startup?
pulse_nice_level: -19

View File

@ -1,21 +0,0 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
- name: assure pulse package
ansible.builtin.apt: name=pulseaudio
when: ansible_os_family == 'Debian'
- name: remove user pulseaudio services
ansible.builtin.file: state=absent path={{ item }}
loop:
- /etc/systemd/user/default.target.wants/pulseaudio.service
- /etc/systemd/user/sockets.target.wants/pulseaudio.socket
- name: template out configs
ansible.builtin.template: src={{ item.src }} dest={{ item.dest }} mode=0644
loop:
- { src: "pulse-client.conf", dest: "/etc/pulse/client.conf" }
- { src: "pulse-daemon.conf", dest: "/etc/pulse/daemon.conf" }
- { src: "pulse-default.pa", dest: "/etc/pulse/default.pa" }
- { src: "pulseaudio.service", dest: "/etc/systemd/system/pulseaudio.service" }
- name: assure pulse user
ansible.builtin.user: name=pulseaudio password="!" system=yes home=/var/lib/pulse groups=audio
- name: enable pulse service
ansible.builtin.systemd: name=pulseaudio enabled=yes state=started daemon_reload=yes

View File

@ -1,3 +0,0 @@
# {{ ansible_managed }}
autospawn = no
default-server = unix:/tmp/pulse-server

View File

@ -1,22 +0,0 @@
# See pulse-daemon.conf(5) for more info
# {{ ansible_managed }}
# Bugfixes for my desktop's audio card
realtime-scheduling = no # Fixes a weird stutter issue
# Sanity
flat-volumes = {{ pulse_flat_volumes }}
# Audio Quality
default-sample-format = {{ pulse_sample_format }} # Pulse does 16bit sampling by default for some reason
default-sample-rate = {{ pulse_sample_rate }}
alternate-sample-rate = {{ pulse_sample_rate_alternate }}
resample-method = {{ pulse_resample_method }} # Increase resampling quality
avoid-resampling = {{ pulse_resample_avoid }}
default-fragments = {{ pulse_latency_fragments }} # Pulse, why are you so friggin latent by default?
default-fragment-size-msec = {{ pulse_latency_fragment_size }}
high-priority = {{ pulse_high_priority }}
nice-level = {{ pulse_nice_level }}

View File

@ -1,77 +0,0 @@
#!/usr/bin/pulseaudio -nF
#!/usr/bin/pulseaudio -nF
#
.fail
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
load-module module-augment-properties
### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available
### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif
# Device detection
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
load-module module-detect
.endif
# Bluetooth
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
# Protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix auth-group=audio socket=/tmp/pulse-server
# Load GSettings/paprefs modules
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif
load-module module-default-device-restore
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif
# Enable positioned event sounds
load-module module-position-event-sounds
# Cork music/video streams when a phone stream is active
load-module module-role-cork
# Block audio recording for snap confined packages
.ifexists module-snap-policy.so
load-module module-snap-policy
.endif
load-module module-filter-heuristics
load-module module-filter-apply
## Gets around a weird audio skipping bug on my desktop
.ifexists module-udev-detect.so
load-module module-udev-detect tsched=0
## My laptop gets sink suspension popping when using headphones
unload-module module-suspend-on-idle

View File

@ -1,24 +0,0 @@
# vim:ft=systemd
# NOTE: This service is ONLY useful IF you have the following:
# * client.conf is set to not autospawn and listen to a socket instead
# * default.pa is configured to start such a socket
# Using this unit file and complaining to me that it doesn't work without
# the other configs in place will result in me not giving a shit
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
## THIS UNIT DOES NOT START PULSE IN SYSTEM MODE
[Unit]
Description=Pulseaudio sound server
[Service]
User=pulseaudio
Group=pulseaudio
ExecStart=/usr/bin/pulseaudio --disallow-exit
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
[Install]
WantedBy=multi-user.target