-
Notifications
You must be signed in to change notification settings - Fork 432
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
Add Airplay 2 support - Upgrade shairport version #621
Add Airplay 2 support - Upgrade shairport version #621
Conversation
Edit : This was fixed by starting NQPTP before shairport-sync |
The current version works on my devices, I would be glad to have a review at that point 😇 |
55f6f97
to
0a5ecd6
Compare
Just tested this on a RasPi3 with HiFiBerry AMP2 and RasPi3 with USB DAC. Works great! |
Wow, thanks for looking in to this! I had a read through, it seems that the NQPTP service is already scheduled to start in the container (https://github.com/mikebrady/shairport-sync/blob/master/docker/etc/s6-overlay/s6-rc.d/03-nqptp/run), but we override this in our script I think the easiest way, without deviating too far from how it already is built by the maintainer, would be to use Here is a good guide on implementation: https://towardsdatascience.com/run-multiple-services-in-single-docker-container-using-supervisor-b2ed53e3d1c0. Do you think this is something you would be able to add in to this PR? It would mean that both services are started, but that they are all connected to the initial running process and are managed properly by balena-engine. |
I also noticed it is running with
|
I was not clear about what was started by the container actually, without the manual start of NQPTP. |
I made some changes @Maggie0002 but we might have an issue here. See the logs below (sorry for the typo in
I am not clear on the best approach here. |
We could build a custom docker image based on the official one, but it would mean deviate even farer from how it is currently built by the maintainer... |
Have you tried with the |
Or |
Hang on, I'm a bit confused. Looking again, I think you are going from the script to SupervisorD. But SupervisorD should be PID 1. So we could either add that in as the CMD in the Dockerfile directly and then use it to call the service. Or alternatively, have SupervisorD call the .sh script. Probably the latter is the closest to the original configuration. So it would be SupervisorD is the first thing called by the Dockerfile, not the .sh script. Then SupervisorD will call the .sh script. |
Yes they are build time flags, hence the suggestion to use a custom dockerfile, but this is not an ideal setup in my opinion. |
3c20f91
to
686423d
Compare
I have tried your suggestion and it works ! Logs below
|
To follow! |
Looking solid to me, great work! @laytonhayes, are you able to test this one for us too? |
@Maggie0002, tested out the update with both RasPi3s, works great! I'm getting something at startup about a CRIT Supervisor, not sure where that's coming from. Here's the startup log:
|
This is because we added a program (supervisor) that allows to control several processes, that adds this warning when ran as root. Do you know if docker in balenaOS is ran in rootless mode ? I am not clear of the implication (and risks) of running supervisor as root here. |
Yep, good idea. It is running as root already, and should be, so we can add |
Other changes : - Update entrypoint to start NQPTP before starting shairport sync - Add logs when starting both scripts inside entrypoint - Update shairport-sync config to remove default flag Remove flag as it is now the default update supervisor config
686423d
to
6f77936
Compare
I have made the changes, as well in this change I removed the |
This looks tons better, and adds a new feature! @fabienheureux, @laytonhayes, there is no way we would have been able to do this without your help, huge thanks! @fabienheureux, this looks good to me, if you are happy with the tests and ready for me to pull the trigger and merge then say the word. 👍 |
Always happy to contribute ! |
Add AirPlay 2 support
Description
Following #607
This is an attempt to bring airplay 2 support to balena sound.
What's working ?
Current setup
Features tested
I tested all this with
SOUND_MODE=standalone
andSOUND_MODE=MULTI_ROOM
orSOUND_MODE=MULTI_ROOM_CLIENT
Issues
I noticed even before this upgrade that my raspberry pi zero had high CPU usage, and the sound was stuttering while streaming as a multiroom client.
I was not able to properly test the sound output for this device, the stuttering persisted after the shairport's version upgrade. I am pretty sure this is a different issue, but I would be glad if other users tested on their properly working Rpi zero to ensure this is not an issue caused by these changes.
How to test it locally
git clone -b feature/bring-airplay-2-support https://github.com/fabienheureux/balena-sound.git
cd balena-sound
balena push YOUR_FLEET_NAME