[SOLVED] Clocking / Timing issues with DAC Pro’s internal clock

Max2Play Home 2016 (en) Forums Max2Play on Raspberry PI [SOLVED] Clocking / Timing issues with DAC Pro’s internal clock

Tagged: , ,

This topic contains 8 replies, has 2 voices, and was last updated by  Heiner Moderator 2 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • 11. März 2019 at 0:10 #44735

    Since yesterday I’m a proud owner of a brand new HifiBerry DAC+ Pro / RasPi 3B+
    After initial setup with the current max2play image, I tried with the stable 7.9.1 release of squeezebox.
    Most things worked as expected and I was happy.

    But I discovered today that some Radio Streams had sync / buffering issues. I was able to track it down to a streambuffering difference between
    the calculated and real buffer position, as shown in the squeezelite sdebug log, marked in my example with XXXX:

    [22:41:30.006471] sendSTAT:198 received bytesL: 2473952 streambuf: 1082 outputbuf: 961544 calc elapsed: 100353 real elapsed: 100405 (diff: XXXX) device: 52 delay: 6

    The difference was growing fast when playing the Radio streams and when it exceeded a value of around 2500 resulted in stuttering or resyncing.

    To track it further down, I started to debug the playback of mp3 files from the local music library. And guess: The playback is much too fast, resulting in a rapidly growing diff value. I tried it with Pink Floyd’s „Time“ from Dark Side of The Moon, which has a length of 7:04. The real playback time measured with my stop watch is 6:30 – 34 seconds difference. And this value is exactly represented in the sdebug log (34428 ms):

    [17:34:34.005094] sendSTAT:198 received bytesL: 2454463 streambuf: 2097151 outputbuf: 3300984 calc elapsed: 424241 real elapsed: 389813 (diff: 34428) device: 58 delay: 20

    After searching and reading through a lot of topics I finally learned that you can switch off the internal clock usage of the HifiBerry DAC+ Pro, so that it behaves like a DAC+ using the RaspBerry’s clock. You do that in the boot/config.txt with:

    dtoverlay=hifiberry-dacplus,slave=on

    Before: aplay -l -> Karte 1: sndrpihifiberry [snd_rpi_hifiberry_dacplus], Gerät 0: HiFiBerry DAC+ Pro HiFi pcm512x-hifi-0 []
    After : aplay -l -> Karte 1: sndrpihifiberry [snd_rpi_hifiberry_dacplus], Gerät 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 []

    And guess: After that magic switch the timing is correct and the diff stays in a reasonable range (around -55 … -50).

    Of course I want to use HifiBerry DAC+ Pro’s full functions. So I’ve already updated everything: max2play Beta, latest nigthly of squeezebox Server, latest squeezelite update, RaspBi Kernel update and update of all OS packages. But nothing helps.

    Would be great if someone who’s deeper into that topics could confirm my issue and support me or the developers in fixing it.

    Best regards,
    Marek

    • This topic was modified 2 months, 1 week ago by  sti.
    • This topic was modified 2 months ago by  Heiner.
    11. März 2019 at 16:20 #44746

    Hi Marek,

    Thank you for sharing this issue in detail and adding your process. We have not come across it yet.

    We will try to recreate it this week and let you know if it might be a general issue with the DAC+ Pro.
    Could you tell us which version of the DAC+ Pro you have? Under the name on the board, there should be „HW X.X“ for the version. We have HW 2.2 in our testing area right now.

    11. März 2019 at 16:29 #44747

    Hi Heiner,

    thank you for your quick reply. My HW revision is 2.6. Please let me know if you need any more details, i.e. sample files or stream links.

    Best regards – Marek

    12. März 2019 at 13:54 #44751

    Hi Marek,

    Looks like this might a hardware issue. Have you contacted HiFiBerry yet to ask whether they are familiar with this problem?

    We tested playback with a DAC+ Pro and 3B+ but were not able to recreate a noticable buffering issues.

    12. März 2019 at 14:20 #44752

    Hello Heiner,

    Thank you for your tests. Before I’m going to contact HifiBerry, I want to be sure that it is either an individual HW issue or a problem with revision 2.6.

    Can you please check the following stream, I can reproduce the issue surely with that one: http://direct.fipradio.fr/live/fip-midfi.mp3

    Since I bought the HW as bundle in the shop on the max2play site some days ago: Would it be possible to exchange the HW, in case you can exclude a general issue? And by the way – seems that you have revision 2.6 available in your shop, maybe you can repeat your checks with those ones?

    Best regards, Marek

    12. März 2019 at 14:28 #44753

    Hi Marek,

    Of course we will replace any defective hardware. I will test your stream and let you know if this results in any issues.

    We already used the 2.6 rev, sorry I forgot to specify that in the previous post.

    12. März 2019 at 21:54 #44755

    Heiner,

    don’t bother anymore! I’ve made some more measurements with aplay playing local wav files – with the same result. DAC+ Pro plays too fast. Let’s just replace the board. I’ll

    Best regards, Marek

    21. März 2019 at 21:27 #44845

    Hi,

    I received my replacement HifiBerry DAC Pro yesterday and the issue is resolved. Definitely a hardware problem, weird…
    Thank you for the support.

    22. März 2019 at 10:03 #44846

    Yes, we received your return yesterday and were immediately able to recreate the issue.

    I’ll mark this solved 😉

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

Register here