Snapserver PTPv2 / ieee1588v2 support for sub-microsecond accurate Master Clock
Is your feature request related to a problem? Please describe.
The current software method for synchronizing time between clients solves an extremely difficult problem very well, but newer Ethernet controllers are coming equipped with support for PTPv2 hardware timestamping. You can even buy USB Ethernet adapters for ~$10 USD on Amazon right now, such as this ugreen thing(AX88179b chipset). This hardware (even the USB one) gives us a clock that's (at any given moment!) accurate within a few dozen nanoseconds from the 'master clock'. Since it's being included in commodity hardware, it'll be essentially free and ubiquitous quite soon.
A clock this accurate would immediately make Snapcast competitive with even high end synchronous audio solutions, like Sonos, and (ignoring latency) even commercial Dante/Ravenna solutions - alarmingly easily. If one wanted to, they could even stick a computer in individual speakers and build their very own Sonos-like system very easily, with perfectly synchronous audio.
Describe the solution you'd like
It would be wicked if we could use a PTP clock alongside - or instead of Snapcast's current software clock implementation, to drive the resampler. It would also be wicked if we could refer to this PTP clock in the snapserver and snapclient config, either by ethernet interface name (like eth0), or PTP device path (like /dev/ptp0).
Describe alternatives you've considered
There isn't really an alternative I can think of, ieee1588v2 is the closest thing we have to a truly isochronous clock, across all platforms.
Additional context Similar behavior is currently possible using Pipewire as an AES67 sender and receiver, but Pipewire's support for RTP + AES67 is still nascent, and it'll be a minute before the kinks are worked out well enough to use it continuously for long periods of time without technical difficulty.
That's actually what I'm using in my living room right now! With it, I was able to build some of the worlds cheapest ($25) AES67 speakers out of Raspberry Pi Zero W 2s ($15), the previously mentioned USB to Ethernet adapters ($10) (which needed a slightly custom Linux driver to get working), and... speakers. They work shockingly well, and audio plays dead-center, with zero desync.
It's an amazing thing, but it took a horrific amount of effort. Like, months. If similar functionality existed in Snapcast, even if it cost some latency, nobody else would have to suffer like I did to achieve perfectly synchronous audio, and I think that's a very good thing.
Source: snapcast/snapcast