Skip to content

Allow overriding PulseAudio daemon.conf (sample rate / format) - #240

Closed
maze735 wants to merge 1 commit into
home-assistant:masterfrom
maze735:daemon-conf-override
Closed

maze735 wants to merge 1 commit into
home-assistant:masterfrom
maze735:daemon-conf-override

Conversation

@maze735

@maze735 maze735 commented Oct 4, 2026

Copy link
Copy Markdown

This adds a small init step that creates /data/daemon.conf.d/ and symlinks it to /etc/pulse/daemon.conf.d.
PulseAudio 17 reads daemon.conf.d/*.conf itself (pa_config_parse() with use_dot_d), so no custom parsing or new settings code is needed.

Example for a USB DAC that should run at 96 kHz / 32 bit, e.g. as
/data/daemon.conf.d/10-rate.conf:

default-sample-rate = 96000
alternate-sample-rate = 96000
default-sample-format = s32le

Apply with ha audio restart and check the result with
pactl list sinks short. Devices that cannot do the requested rate or
format fall back silently to the nearest supported values.

This adds a small init step that creates /data/daemon.conf.d/
and symlinks it to /etc/pulse/daemon.conf.d.
PulseAudio 17 reads daemon.conf.d/*.conf itself (pa_config_parse()
with use_dot_d), so no custom parsing or new settings code is needed.

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @maze735

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
home-assistant Bot marked this pull request as draft October 4, 2026 19:13
@home-assistant

home-assistant Bot commented Oct 4, 2026

Copy link
Copy Markdown

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@maze735

maze735 commented Oct 4, 2026

Copy link
Copy Markdown
Author

Closing this in favour of #230, which does the same thing with a simpler change (a single .include /data/custom.conf in daemon.conf, matching the existing custom.pa include). I tested the same idea on my hardware (USB DAC at s32le 96000Hz) and it works, so I've left a note there. Thanks!

@maze735 maze735 closed this Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant