Make Pulse role more modular
This commit is contained in:
parent
7851fb89aa
commit
46eb6a73d7
11
roles/pulseaudio/README.md
Normal file
11
roles/pulseaudio/README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# 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.
|
24
roles/pulseaudio/defaults/main.yml
Normal file
24
roles/pulseaudio/defaults/main.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# 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: 48000
|
||||||
|
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
|
@ -1,23 +1,22 @@
|
|||||||
# Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
|
# See pulse-daemon.conf(5) for more info
|
||||||
# more information. Default values are commented out. Use either ; or # for
|
# This file managed via Ansible
|
||||||
# commenting.
|
|
||||||
|
|
||||||
# Bugfixes for my desktop's audio card
|
# Bugfixes for my desktop's audio card
|
||||||
realtime-scheduling = no # Fixes a weird stutter issue
|
realtime-scheduling = no # Fixes a weird stutter issue
|
||||||
|
|
||||||
# Sanity
|
# Sanity
|
||||||
flat-volumes = no
|
flat-volumes = {{ pulse_flat_volumes }}
|
||||||
|
|
||||||
# Audio Quality
|
# Audio Quality
|
||||||
default-sample-format = s32le # Pulse does 16bit sampling by default for some reason
|
default-sample-format = {{ pulse_sample_format }} # Pulse does 16bit sampling by default for some reason
|
||||||
default-sample-rate = 48000 # Higher sample rate than default
|
default-sample-rate = {{ pulse_sample_rate }}
|
||||||
alternate-sample-rate = 44100
|
alternate-sample-rate = {{ pulse_sample_rate_alternate }}
|
||||||
resample-method = speex-float-5 # Increase resampling quality
|
resample-method = {{ pulse_resample_method }} # Increase resampling quality
|
||||||
avoid-resampling = true
|
avoid-resampling = {{ pulse_resample_avoid }}
|
||||||
|
|
||||||
default-fragments = 5 # Pulse, why are you so friggin latent by default?
|
default-fragments = {{ pulse_latency_fragments }} # Pulse, why are you so friggin latent by default?
|
||||||
default-fragment-size-msec = 10
|
default-fragment-size-msec = {{ pulse_latency_fragment_size }}
|
||||||
|
|
||||||
high-priority = yes
|
high-priority = {{ pulse_high_priority }}
|
||||||
nice-level = -19
|
nice-level = {{ pulse_nice_level }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user