-
Notifications
You must be signed in to change notification settings - Fork 16
Add ability to add custom PulseAudio startup commands #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
Thank you for your PR. How would the user create those configuration files? Do you have a specific use case? Maybe we could support that with an updated default configuration file. |
|
I had just assumed they are available through advanced terminal, but turns out I’m wrong. Is there any reason why My use-case is to logically split the streams of a single audio device, since the actual speakers wired to it are physically located in different rooms: While having this available as a native option in Home Assistant would be great, it would require changes to supervisor (for API) and a corresponding integration in Core, I believe. So significant changes. |
|
Also changed the approach a bit regarding the |
|
(Given Home Assistants limitations regarding local audio, the whole setup is quite weird anyways: Create 2 mapped subsinks in PulseAudio, Run 2 instances of SqueezeLite add-on with each targeting on of the subsinks, then have Music Assistant connect to both SqueezeLite instances to actually manage their audio… Yeah, layers…! – Really hope Music Assistant gets local audio capabilities at some point, but who know if and when… 🤷♀️) |
agners
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still a bit uncertain if we really want to add this capability. It opens a lot of flexibility, but it also feels a very not user friendly way 🤔 .
We could copy the customization file from another location on audio plug-in startup, e.g. /share.
In your current use case you don't use the override.pa, correct? Maybe we could just start with the customization file 🤔 .
rootfs/etc/pulse/system.pa
Outdated
| # | ||
| # Using nofail has two effects here: | ||
| # 1) Causes PulseAudio to log a message at startup if the user configuration | ||
| # is not present to increase visible of the corresponding configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By that you mean so users learn about the possibility?
Seems weird to me to do that through an error 😅 . I'd rather go with ifexists here, and document the capabilities somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, its just a warning. When I started digging into: How do I get this to work? One of the first things I did was look through the commands exposed by ha audio, including the ha audio logs sub-command. I’ve intentionally included an example of the message logged there, so that it’d eventually end up in online searches.
Obviously we want to document this, but the idea would be that the documentation includes that messages as an “this means no config was loaded” example that would then also show up in searches.
In that way, I think its quite useful, also to give you feedback on whether your custom configuration has been picked up or not.
Yeah, I don’t need the Is there some save location that is accessible through Advanced Terminal but not regular Terminal / SAMBA perhaps? That’d feel like the right place to me. |
Loads two extra “user-configurable” configuration files: /mnt/data/supervisor/audio/override.pa … replaces the default configuration, if present. /mnt/data/supervisor/audio/custom.pa … is appended to the default configuration, if present.
|
What’s the status on this? Hand-patching the PulseAudio container after HAOS updates is kinda annoying honestly… |
Loads two extra “user-configurable” configuration files:
/mnt/data/supervisor/audio/override.pa
… replaces the default configuration, if present.
/mnt/data/supervisor/audio/custom.pa
… is appended to the default configuration, if present.
Tested and working… but kinda requires at least Advanced Terminal & SSH (if not host access) to be useful given how complicated it is to access these files.
Minimally addresses #178.