Audio dropouts when using onboard SPDIF

  • Hi there!

    I recently upgraded my home enterntainment system and switched from my nvidias graphics card hdmi passthrough audio to the onboard SPDIF coax/rca out. After also switching from a four year old version of openelec to the last stable libre elec release I was good to go, or at least I thought so. After first having to reboot my device several times for the spdif option to show up in the audio settings (idk why, but so far this seems to have fixed this issue) I started to experience audio dropouts lasting one or two seconds once I started to playback movies. After searching a bit on the kodi forums I read that this appears to be a software problem and sometimes gets fixed by using a different version. After reflashing my device a few times I am now using the latest experimental version and somehow managed to reduce these dropouts to one every two to three minutes. (Again, no idea what exactly did the trick)
    However, I still haven't been able to get rid of them entirely.

    Would be great if someone could help me to get this working. Here are more informations:

    libreelec version:
    most likely any, but currently 7.90.007 and 7.0.2

    mobo:
    still working on it, haven't found a ssh command similar to lshw or hwinfo that works. And I have absolutely no idea what I used when I first assembled my htpc.

    processor:
    model name : AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
    cpu MHz : 1000.000
    cache size : 512 KB

    graphics card:
    single nvidia geforce 210 card.

    ram: (ddr2 If I am not wrong)
    MemTotal: 2029896 kB
    MemFree: 986288 kB

    Full dmesg:
    dmesg - Pastebin.com

    lspci:
    lspci - Pastebin.com

    lsusb:
    lsusb - Pastebin.com

    Audio Settings:
    Audio Settings - Album on Imgur

    Log that was created while watching a tv episode (with dts audio) from my nas using the latest dev version of libreelec.
    Ubuntu Pastebin

    I am open to any suggestions, just tell me if I should try to flash a different libreelec version and/or post different logs.

    Edited once, last by Jacky2611 (October 29, 2016 at 4:29 PM).

  • nVidia cards cannot output 23.976 correctly, it's normally something close, but never close enough for glitch free playback so you will see "pullup correction" to keep things in sync. The debug log shows this:

    INFO: ID:0x1ce Name:1920x1080 Refresh:23.970909 Width:1920 Height:1080

    The only way to resolve this is to use a custom /storage/.config/xorg.conf that details the exact mode timings for the screen, e.g. for my Samsung TV at home I am using this file: aTAB .. the key line is:

    ModeLine "1920x1080_23.976" 74.1756 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync

    the 74.1756 value is a "tuned" version (4 decimal places) where normally it would be 74.17 (2 decimal places) and the extra resolution allows me to reach an actual refresh rate of:

    INFO: ID:0x284 Name:1920x1080 Refresh:23.976080 Width:1920 Height:1080

    Which is close enough that you only see the correction maybe once every 3+ hours, i.e. not during a normal movie. The fun part for you is figuring out the modelines for your TV, as they are TV specific and you can't just copy them from my file.

  • Had to switch to Spdif because my entire surround system was moved away from the tv to the other side of the room while my nas and htpc are now standing next to my switch in the cellar. Previously my htpc was right next to my Yamaha Surround system so I could just connect it using HDMI passthrough.

    chewitt Never heared about this bevor, Can hardly believe that such a huge issue still exists. I am currently checking my exact TV model and will give your idea a shot. However, I did some reading on the nvidia forums and it appears like it should be the other way around, with video stutters instead of audio dropouts. Can you recommend me some articles to read up more on this issue? Sounds highly interesting and very important should I decide to build/buy a new htpc in the future.

    EDIT: Wait, I think I understand where the problem is now. My video uses the graphics card onboard clock while my onboard spdif audio output uses the mobos/CPUs clock, and they are not always necessarily in perfect sync. After a while this results in the audio pausing for a second so that the video can catch up to it. So I can now either try to solve this issue using software, get a new graphics card with a spdif audio out (has anyone ever seen such a card?) or use a splitter after my current graphic cards hdmi out to split the signal into audio and video.
    [hr]
    OK, so after nearly disassembling my TV I figured out that its a Philips 46pfl9704h. Problem now is that there I can't seem to find any data on it. Is there a databse or something where I can look this up?

    Edited once, last by Jacky2611 (October 30, 2016 at 6:01 PM).

  • Have you tried fiddling with the PLL adjustment settings in audio settings on expert level? Might help since it says something about audio drop-outs in the tooltip.

    Also (maybe I'm just a noob) if you are using SPDIF coax how is it that Nvidia HDA is still shown as an output device?