Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Achievable precision of clock synchronisation
08-09-2014, 02:04 PM
Post: #1
Achievable precision of clock synchronisation
Hi,

I am wondering what precision can be achieved using the Songcast synchronisation feature? Would it be in the range of some ms or better like some us? The documentation seems not to mention anything about it.

I am interested in using streaming to independent speakers in a stereo setup, where it would obviously required to have a very exact synchronisation.

Cheers,
Julian
Find all posts by this user
08-09-2014, 02:43 PM
Post: #2
RE: Achievable precision of clock synchronisation
(08-09-2014 02:04 PM)julian Wrote:  I am wondering what precision can be achieved using the Songcast synchronisation feature? Would it be in the range of some ms or better like some us? The documentation seems not to mention anything about it.

I am interested in using streaming to independent speakers in a stereo setup, where it would obviously required to have a very exact synchronisation.

Once started, synchronisation is possible to about a fifth of a microsecond. (Half the MCLK rate noted in the timestamping section of the protocol spec.)

Startup of songcast receivers is not however synchronised. This isn't an issue for receivers in different rooms, both on a decent wired network but I suspect you'd at least sometimes get an appreciable discrepancy between channels if you ran speakers as separate receivers. If you're planning on writing both a sender and receiver, you could add your own synchronisation code on startup of each receiver to solve this.

If you go ahead with this work, please let us know how you get on.
Find all posts by this user
08-09-2014, 02:45 PM
Post: #3
RE: Achievable precision of clock synchronisation
Thank you for the detail. As you say "on a decent wired network": How is the behaviour of the sync algorithm on networks with varying latency like Wifi? We'd actually be more intersted in Wifi streaming than in wired streaming for our scenario.
Find all posts by this user
08-09-2014, 03:06 PM
Post: #4
RE: Achievable precision of clock synchronisation
(08-09-2014 02:45 PM)julian Wrote:  Thank you for the detail. As you say "on a decent wired network": How is the behaviour of the sync algorithm on networks with varying latency like Wifi? We'd actually be more intersted in Wifi streaming than in wired streaming for our scenario.

Once started, synchronisation is highly accurate* and does not vary with wired/wireless networks. Startup synchronisation will be more important for wireless networks however and is not provided by the current songcast protocol. We intend to add this in future. For now, you'd have to add additional code to sync startup of your receivers.

* Strictly speaking, the protocol allows for highly accurate synchronisation but actual synchronisation varies with the capabilities of the sender and receiver. The sender must have access to a suitably accurate clock and must be able to apply timestamps to audio frames as close to the wire as possible. Linn's DS players have dedicated hardware to do this. User-space programs on a desktop OS wouldn't have access to a suitable clock and would struggle to access audio frames sufficiently close to the wire.
Find all posts by this user
09-09-2014, 07:05 AM
Post: #5
RE: Achievable precision of clock synchronisation
Ok, I understand. Basically the same as with 802.1AS synchronisation where ideally Ethernet PHYs include Hardware support...
Do you have thought of some proxying concept where audio coming from non-capable senders is routed through another device which rebuffers a short amount and then adds proper timestamping to the data, so that high accuracy sync is possible? Imho especially the option to stream from virtually any device directly to the speakers is very charming...

I will try to dive into this whole openhome/songcast concept a little more and play around with it to see how it goes. I'll probably raise some more questions later on then Smile
Find all posts by this user
09-09-2014, 01:32 PM
Post: #6
RE: Achievable precision of clock synchronisation
(09-09-2014 07:05 AM)julian Wrote:  Do you have thought of some proxying concept where audio coming from non-capable senders is routed through another device which rebuffers a short amount and then adds proper timestamping to the data, so that high accuracy sync is possible? Imho especially the option to stream from virtually any device directly to the speakers is very charming...

I will try to dive into this whole openhome/songcast concept a little more and play around with it to see how it goes. I'll probably raise some more questions later on then Smile

The only possible issue with this type of audio proxy is is that it'll introduce extra latency so may be problematic for content that has already had its delay tuned to synchronise with video. We've found that 70 - 100ms delay is required to cope with devices connected via either wireless or homeplug. Delays over 50ms are likely to be noticeable by at least some users.
Find all posts by this user


Forum Jump: