-
Notifications
You must be signed in to change notification settings - Fork 239
Allow access to real alsa hardware by systemd #1406
Conversation
Signed-off-by: Robert Sprunk <git@sprunk.me>
contrib/airsonic.service
Outdated
NoNewPrivileges=yes | ||
PrivateDevices=yes | ||
#PrivateDevices=yes |
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.
If we were to remove this, should we directly remove it, rather than commenting-it-out?
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.
Maybe add a comment stating that this is required for Jukebox only, similar to line 46-48: #ProtectHome=true
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.
Yes a comment would be good and moved into a separate section like ProtectHome
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.
@Whisprin can you update your PR?
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.
@muff1nman Updated the PR accordingly, sorry for the delay
For whoever is interested, here is the systemd doc about private devices: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#PrivateDevices= |
Opened an issue for further discussion. With the changes proposed here I'm able to select an audio device from the Admin UI. |
I think we should:
Also, what do you mean by "jukebox is a bit crashy"? Is this something that could be split in a separate issue, or is that related to the device restrictions? |
Yes, propably something that would go into a separate issue. I'm trying to make it reproducible and collect logs. In short: I use DSub to connect to the jukebox, music is playing, switching songs works - however, when I disconnect DSub and reconnect later: nothing is playing anymore |
Signed-off-by: Robert Sprunk <git@sprunk.me>
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.
This sounds good to me now.
Add
DeviceAllow=char-alsa rw
and disablePrivateDevices
to allow access to alsa hardware