snapcast: add snapserver and snapclient packages#23956
Conversation
Add Snapcast package files as is from https://github.com/badaix/snapos/tree/29a5daebb0513faa825b12474125c0c2dd66c2ee/openwrt/snapcast Co-authored-by: badaix <johannes.pohl@badaix.de> Co-authored-by: David Andreoletti <david@andreoletti.net> Co-authored-by: luciferin <40036150+hunterzero99@users.noreply.github.com> Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
Snapcast [1] is a multiroom client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio. It's not a standalone player, but an extension that turns your existing audio player into a Sonos-like multiroom solution. Audio is captured by the server and routed to the connected clients. Several players can feed audio to the server in parallel and clients can be grouped to play the same audio stream. One of the most generic ways to use Snapcast is in conjunction with the music player daemon (MPD) [2] or Mopidy [3]. The inclusion starts with version 0.28.0 because of OpenSSL dependency issues of version 0.29.0. Newer versions (e.g. 0.32.3, see [4]) with optional OpenSSL support, will be incorporated with flavours, like "-mini" and "-full" in the upcoming PRs. More about this topic please check the inclusion PR at [5]! [1]: https://github.com/badaix/snapcast [2]: http://www.musicpd.org/ [3]: https://www.mopidy.com/ [4]: https://github.com/badaix/snapcast/blob/develop/changelog.md [5]: openwrt#23956 (comment) Fixes: openwrt#23924 Suggested-by: Tianling Shen <cnsztl@immortalwrt.org> Suggested-by: George Sapkin <george@sapk.in> Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
b31170a to
cbf46ff
Compare
|
@xabolcs I am interested in this too and already compile snapcast (server) on my end with OpenWRT snapshot. What's missing from your code (and PR) to get merged ? |
|
Hi! Thaks for testing! A few things:
Adding myself as amaintainer would also help. |
|
On my end:
|
|
Sorry for noob question, but how did you build my branch? |
I did not build your branch. I thought you were asking about my hardware setup for an eventual test. |
|
OK, thanks for clearing up the misunderstanding! 🙏 I'll let you know when I have packages for you - built from this PR. |
(ping @xabolcs ) |
|
Hi @davidandreoletti ! Thanks for the reminder! Sorry, I was carried away! 🙂 Well in the meantime Snapcast 0.29.0 came out which has HTTPS support, but I'm so noob I don't know how to add those dependencies! 🙈 Sure, I could stick with 0.28.0. 🤷 |
cbf46ff to
9f1e2e9
Compare
|
Stick with 0.28 for this PR. 0.29 dependencies will be investigated in a new PR. |
I had to backport a few Boost v1.87.0 compatibility commit for that ... sure its far more easier for me. 👌 |
After revisiting the PR, it didn't even compile because of commit c50de92 ("boost: Updates package to version 1.87.0"). Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
9f1e2e9 to
f970ef6
Compare
|
After backporting 3 commits, 0.28.0 is compiling again! 🎉 Here is the result for SNAPSHOT (and |
|
Almost there:
|
f970ef6 to
9e81165
Compare
|
@xabolcs My build system broke with the switch to OpenWRT's new "apk" package manager. I can compile this PR's snapcast package now. Will get back to you soon with my testing on the same hardware as you. |
|
@xabolcs Snapcast works on NanoPi R4s (4G) with OpenWRT master + this PR. Thank you! |
|
@neheb This is a new package. Both individuals confirm the package compiles and works on their machine. |
| PKG_NAME:=snapcast | ||
| BASE_VERSION:=0.28.0 | ||
| PKG_SOURCE_DATE:=2024-04-15 | ||
| PKG_SOURCE_VERSION:=5fa01b8a49d842ed368138ee071cdf1c34be7a64 |
There was a problem hiding this comment.
why not just use the version here? something like
PKG_VERSION:=0.28.0
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
as is done elsewhere.
There was a problem hiding this comment.
why not just use the version here?
Snapcast has master branch for release versions and develop branch for nightly builds.
In the older days there was too much commit between the two and the development version was stable enough to use it.
That's why I wanted to include the exact commit and commit date from what the actual version was built.
Sure, badaix releases Snapcast often these days, so your suggestion could work too.
I would stick with this advanced versioning, but if you ask me to change it to the simple versioning, I would do it.
There was a problem hiding this comment.
I'd like that. If needed, SOURCE_DATE can be revisited.
| SECTION := sound | ||
| CATEGORY := Sound | ||
| TITLE := Synchronous multiroom audio player | ||
| DEPENDS := +AUDIO_SUPPORT:alsa-lib +libstdcpp +libavahi-client +libatomic +libogg +libflac +libopus +boost +libsoxr |
There was a problem hiding this comment.
libstdcpp is included with boost. Minor detail.
There was a problem hiding this comment.
libstdcpp is included with boost. Minor detail.
Thank you very much! I'm a package maintainer newbie.
|
@davidandreoletti unfortunately the answer is constant pinging and hoping someone cares. |
For this package, @xabolcs and I are active. Your 2 feedbacks will be acted on. |
|
huh? |
|
@neheb Your message sounded a bit negative: "unfortunately the answer is constant pinging" and perhaps you growing tired of "hey I need you" kind of pings. Looks like I misinterpreted. I am sorry and let's move on. |
@davidandreoletti |
|
Might be a good idea to add CI test scripts ( |
Do you have something in mind, @GeorgeSapkin ? While I can play with workflow When to trigger those scripts? On Boost change? On Snapcast change? Both? root@GL-MT6000-64B ~ # snapserver --version
snapserver v0.29.0
Copyright (C) 2014-2024 BadAix (snapcast@badaix.de).
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Johannes M. Pohl and contributors <https://github.com/badaix/snapcast/graphs/contributors>.
root@HT-TM02-43C ~ # snapclient --list
0: null
Discard all samples (playback) or generate zero samples (capture)
1: default
Default Audio Device
2: sysdefault
Default Audio Device
3: default:CARD=CODEC
USB Audio CODEC, USB Audio
Default Audio Device
4: sysdefault:CARD=CODEC
USB Audio CODEC, USB Audio
Default Audio Device
5: front:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
Front output / input
6: surround21:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
2.1 Surround output to Front and Subwoofer speakers
7: surround40:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
4.0 Surround output to Front and Rear speakers
8: surround41:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
9: surround50:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
5.0 Surround output to Front, Center and Rear speakers
10: surround51:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
11: surround71:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
12: iec958:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
IEC958 (S/PDIF) Digital Audio Output
|
|
@xabolcs I meant a version check or an equivalent. |
|
There is a root@HT-TM02-43C ~ # snapclient --version
snapclient v0.28.0
Copyright (C) 2014-2022 BadAix (snapcast@badaix.de).
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Johannes M. Pohl and contributors <https://github.com/badaix/snapcast/graphs/contributors>.
But I still don't know where to start. Do you have some pointers where to start looking? |
|
If there are just two binaries and their names match those of their respective packages, and they both support a #!/bin/sh
"$1" --version | grep -F "$PKG_VERSION"The script is used by CI in the Test via Docker container step. |
b14cadb to
0fdfdd3
Compare
Thank you very much, now I see it! May I add your |
Sure. |
0fdfdd3 to
a72a846
Compare
| include $(TOPDIR)/rules.mk | ||
|
|
||
| PKG_NAME:=snapcast | ||
| PKG_VERSION:=0.28.0 |
There was a problem hiding this comment.
Hi @GeorgeSapkin !
The latest release is 0.32.3. Why not use that one?
It started with 0.29.0 where OpenSSL support introduced and I got problems with it (back in January 2025):
Well in the meantime Snapcast 0.29.0 came out which has HTTPS support, but I'm so noob I don't know how to add those dependencies! 🙈
I mean:Package snapserver is missing dependencies for the following libraries: libcrypto.so.3 libssl.so.3Sure, I could stick with 0.28.0. 🤷
At that point of time I decided to stick with 0.28.0 and deal with this OpenSSL support later with a followup PR where I introduce different flavours: snap*-mini and snap*-full.
And I also want to make the Avahi dependency optional: snapcast/snapos#4
And then, last week @1715173329 suggested how to solve the problem
I found this:
Package snapserver is missing dependencies for the following libraries: libcrypto.so.3 libssl.so.3Please add libopenssl to DEPENDS, it should resolve the issue.
And now we are here.
In summary:
- I'd like to include
snapcastbefore OpenWrt 25.xx branches off (and hopefully backport to 24.10, @hunterzero99 had a success build for once) - with that in mind I choose to stick to 0.28.0 and backport compatibility fixes
- because I don't know how to be a maintainer in
openwrt/packagesand this would be my first package
- because I don't know how to be a maintainer in
- and after I learn how to deal with those things above, I plan update to latest tagged Snapcast or even to specific
developcommit (see talk with @neheb)
If you have time and energy to coordinate me with these problems (disabling the OpenSSL support is on upstream develop, see snapcast/snapcast#1427) I happily go this way in this PR! 👌 🙏
There was a problem hiding this comment.
Thanks for the summary. I guess if everybody else is OK with this, then I'm OK.
There was a problem hiding this comment.
Thanks for the summary.
Thank you for asking!
Now it's summarized. 🙂
Should I add a few lines about these into the commit?
There was a problem hiding this comment.
I guess it wouldn't hurt for future reference.
There was a problem hiding this comment.
I guess it wouldn't hurt for future reference.
riscv64 is still building, but here comes my amended commit message!
|
Please do not add |
a72a846 to
174ca44
Compare
Done! |
174ca44 to
b79c6d0
Compare
|
Are 5 separate commits necessary? Judging by the comments, the first two commits don't compile on their own. And do the last 3 boost-related commits needs to be separate? As in would there be any use reverting to any of those individual commits? |
They are showing history. I created the first commit to separate my work from the original The other commits are just boost compatibility commits. If everybody would have been faster (including me) then this PR consisted only the first two commit. I think they have their value (maybe they need rewording). Of course, in the end, only one commit is necessary. 🤷 |
I'm not sure if you're agreeing or disagreeing with me here 😅 |
You are right! I hope my (2 base + 3 compat) commits aren't pollute the git history too much. |
As I already wrote earlier, my ultimate goal is to add Snapcast into |
Snapcast [1] is a multiroom client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio. It's not a standalone player, but an extension that turns your existing audio player into a Sonos-like multiroom solution. Audio is captured by the server and routed to the connected clients. Several players can feed audio to the server in parallel and clients can be grouped to play the same audio stream. One of the most generic ways to use Snapcast is in conjunction with the music player daemon (MPD) [2] or Mopidy [3]. The inclusion starts with version 0.28.0 because of OpenSSL dependency issues of version 0.29.0. Newer versions (e.g. 0.32.3, see [4]) with optional OpenSSL support, will be incorporated with flavours, like "-mini" and "-full" in the upcoming PRs. More about this topic please check the inclusion PR at [5]! [1]: https://github.com/badaix/snapcast [2]: http://www.musicpd.org/ [3]: https://www.mopidy.com/ [4]: https://github.com/badaix/snapcast/blob/develop/changelog.md [5]: #23956 (comment) Fixes: #23924 Suggested-by: Tianling Shen <cnsztl@immortalwrt.org> Suggested-by: George Sapkin <george@sapk.in> Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
|
Merged, thank you! |
|
Sorry for creating faillog for I'm very sorry! |
While testing my integration of Snapcast, I didn't test with CONFIG_ALL* and CONFIG_BUILDBOT flags, but the buildbots did and failed with a lot of undefined reference to PulseAudio. Fix it with preventing PulseAudio detection. While at it, prevent Avahi detection too to save more flash space. These features will be available later, through flavours. Fixes: openwrt#23956 Fixes: eeb8d13 ("snapcast: add package snapserver and snapclient") Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
While testing my integration of Snapcast, I didn't test with CONFIG_ALL* and CONFIG_BUILDBOT flags, but the buildbots did and failed with a lot of undefined reference to PulseAudio. Fix it with preventing PulseAudio detection. While at it, prevent Avahi detection too to save more flash space. These features will be available later, through flavours. Fixes: #23956 Fixes: eeb8d13 ("snapcast: add package snapserver and snapclient") Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
Maintainer: me (@xabolcs), @davidandreoletti
Compile tested:
Run tested:
Description:
Fixes: #23924