SPDIF KeepAlive for Home Theatre PC

Optical SPDIF ConnectorAfter building a new Home Theatre PC I’ve discovered that the onboard IDT audio has a problem with the SPDIF output, or at least my Sony receiver has a problem with it! Every time a sound is played it causes the SPDIF input on the receiver to initialise which takes about 500 milliseconds, after the sound has finished the SPDIF goes back to sleep. As a result the first 500ms is lost off every sound that is played; not really a problem if you’re watching a movie but for applications that have little blips as you navigate around these sounds tend to get missed altogether; such is the case in MediaPortal the HTPC application I use.

My old motherboard with Nforce sound didn’t have this problem the SPDIF remained “active” all the time.

After much searching I did find a few other people with the same problem but no solution so I’ve written a small .NET application called SPDIFKeepAlive. It does just that. It sits in the system tray and continuously plays a silent wave file to keep SPDIF port active.

SPDIFKeepAlive Settings

Hope this is helpful for others, leave comments for bugs / feature requests etc


Version History

Version 1.0

  • Initial release

Version 1.1

  • Added new output options

Version 1.2 (Current Version)

  • Fixed auto play on startup
  • Added auto-restart option
SPDIFKeepAlive

Version:
Updated: 2010-11-08
Download: SPDIFKeepAlive-1.2.exe -

(.Net 2.0 Required)

Source Code – Feel free to do what you like with this (no license)

SPDIF Keep Alive Source
Version:
Updated: 2017-03-12
Download: SPDIFKeepAlive-1.2.exe - 2.42 MB

, , ,

48 Responses to SPDIF KeepAlive for Home Theatre PC

  1. Danno October 25, 2017 at 4:12 am #

    Hey Rys,
    This looks really nice and seems like a turn key solution to keep the sound going.
    Even with Dolby Content coming through over say a DvD or a BluRay in Windows Media Center, I’ve still had the occasional drop. This seems to be a good fix and looks like it can be shut off at any time.

    Would be cool to create a Linux / NetBSD daemon that works in the same way as this Windows Service!

  2. BradStoltz June 24, 2017 at 3:18 pm #

    Hey Rhys,

    Chanks for making this and providing the source, you are a legend!

    I wanted it as a windows service for various reasons, so I stripped down your code and made it into a very simple windows service that runs on windows startup (before login).

    I have put my source up on github, and linked back to your article as the original source.

    https://github.com/BradStoltz/SPDIFKeepAlive

    Cheers again for your excellent work!

    • Phill July 21, 2017 at 5:02 pm #

      Hi

      Thanks for this little program. It has solved a couple of issues I was having. I have a HDMI connected between my Media PC and a Rotel RSP1570 processor. When the HDMI dropped out the sound-card went into error and it would only play stereo in the two front speakers. I normally output a stereo signal and set the Rotel to 7 channel stereo. Also when starting to play I use to miss out on the initial introduction to the track due to the delay in the HDMI handshake.

  3. MattyIce April 15, 2017 at 12:35 am #

    JESUS H. CHRIST!!!

    This is such a simple but genius application. Thank you!

  4. arkin March 10, 2017 at 11:05 am #

    Thanks for this very useful utility. I use it for my HDMI connection. Any chance you would consider open sourcing it?

    • RhysGoodwin March 12, 2017 at 12:56 pm #

      Hi Arkin, I’ve uploaded the source to the post. No license at this stage.

      If you wanted, you could upload this to git hub and add GNU open source license details as required. I could then just link to it from the post. Depends if you can be bothered or not.

      Cheers,
      Rhys

      • arkin March 13, 2017 at 9:49 pm #

        Thank you Rhys!

  5. Anonymous January 11, 2017 at 8:03 am #

    Thank you so much for making this, you just solved years of being annoyed at this issue with such a simple yet effective application!

    For those wanting to run this at startup in Win 10:
    Windows Key + R –> Type shell:startup
    Make a shortcut to wherever you have stored the application’s exe.
    Drag and drop the SHORTCUT of the application to the folder that opened up when you typed “shell:startup”.
    The app will now start whenever you boot into Windows. 🙂

  6. Adam November 21, 2016 at 3:58 pm #

    Thank you so much for making this

    YOU ARE AWESOME!

  7. GladUser October 24, 2016 at 4:12 am #

    Thank you very much this is just genius!

  8. Anish October 15, 2016 at 1:46 am #

    Thank you for this application. This helped resolve the 1 second delay i was getting when ever I tried to play any audio file via my AVR from my PC. Also managed to get the application to execute as a Windows Service on my Windows 10 🙂 using NSSM (Non Sucking Service Manager). Now i can enjoy all my audio without the annoying 1 second delay. Thanks once again!!!!!

  9. stingz August 27, 2016 at 3:57 pm #

    it was working perfectly on win7, and win10 at the begining when i involuntary upgraded from win7,
    but lately it’s not working after some win10 upgrade, i am not sure since when and due to what patch……
    each time i pause a video, when resume i get 2 sec of silence……..just like before i found this app years ago
    is there any hope of upgrading this app………………..
    btw, iam form China, i see you thanking China for parts, i hope………
    Sincerely yours

    • RhysGoodwin March 12, 2017 at 1:02 pm #

      I suspect an application is taking exclusive access of the sound device.

  10. Garou August 18, 2016 at 2:52 pm #

    Oh god… I love you, I was searching for hours to a solution like this, I want to hug you and maybe give you a kiss, no homo and thank you so much.

  11. Blake August 17, 2016 at 5:57 pm #

    I also want to thank you for this simple but effective app. I’m learning Morse Code using a computer training program, and my SPDIF system was cutting off the beginning of every character, making it impossible to learn the (short) sounds associated with each letter. Your program completely solved the problem. Of course, your app also solved the generally annoying delay with other system sounds, music, and movies, but learning Morse Code was my primary reason for searching for this. Excellent work. Thanks Rhys! I really appreciate it!

  12. Raffaello July 9, 2016 at 6:16 am #

    Is there a way to select the sound device on which play the sound?
    I use an external USB-to-SPDIF card to play on my stereo set, while internal soundcard is used for Skype and system sounds only.
    Thank you!
    Raf

  13. Gorgone February 21, 2016 at 12:15 pm #

    Hi
    on windows 10 i got only test tone with 1.2
    there is no way to setup .. or cmd parameter to play it wit silence

  14. Ed Butler September 3, 2015 at 7:30 am #

    Just a quick note to say thanks for this! Used another app until Windows 10 arrived and it hogged massive amounts of CPU. This little app saved me time making one myself.

    Many thanks, Ed

    • Ed Butler September 3, 2015 at 7:37 am #

      Donated by the way. This also fixes the HDMI Silent Stream Bug, which is what i use it for!

      • RhysGoodwin September 6, 2015 at 7:39 am #

        Cheers Ed! I’m quite pleased to see 7 years since this post people are still getting good use out of this tiny app.

  15. Chris August 13, 2015 at 10:01 pm #

    Cheers, I had a slightly different problem: Windows 10 seems to start and stop the S/PDIF stream every time it plays a sound. My external DAC has some type of mechanical switch that fires when this occurs, so I got an annoying mechanical click from my DAC at every start and stop of an audio indication. Your program has stopped this – thanks a lot!

  16. Vuk November 9, 2014 at 10:11 pm #

    Dear Sir,

    Thank you so much for this – I’m using desktop Bluetooth speakers, and this is the ONLY utility that stops the speakers from going to stand-by mode due to inactivity!

    All the best,

    Vuk

  17. Michael F May 7, 2014 at 2:05 pm #

    Great little program you created here. Useful.
    I’m wondering how you exactly did the inaudible tone?
    If possible, could you teach me how to create a wave file?

  18. Barış Cebeci June 4, 2011 at 12:26 am #

    I have been looking for exactly this for 2 days! . I havent tried it on yet but I am sure it will work in Win7. Thanks again.!! This will save me a lot of troubles about my HTPC optical connection sleep problem!

    • Barış Cebeci June 6, 2011 at 7:57 pm #

      Unfortunately this program stops working when you start XBMC and play a movie. :(((

  19. cheers! October 4, 2010 at 1:12 am #

    Thank you!

  20. Benghis August 25, 2010 at 2:21 pm #

    Thanks for this! Also thanks to Marcus for the tip, that works perfectly!

    It was a bit worse than described on my Xonar DX and Logitch Z-680’s in that it would pop or crackle each time the optical stream started up again… Yikes

  21. markus June 19, 2010 at 12:57 pm #

    Juats wanted to say thank you! I was just about to code the same thing when I found your tool. Don’t have to do that now 🙂

  22. Alessandro March 1, 2010 at 7:15 pm #

    Thank you, this saved me much frustration. However I found my receiver would still go to sleep at even the tiniest interval of silence with all of the settings except for “Test Tone”. The solution for me was to create a 20KHz wav file and use it as a custom file. Apparently my receiver has a lower end limit but not a higher end one. Thought this might help someone.

  23. Vampyre October 26, 2009 at 1:49 pm #

    “Yeah sorry about this, I was meant to fix this ages ago. I’ll get to it soon. I’ll make sure it starts playing as soon as it starts. That’s how it used to work but I broke it in the last version!”

    Any update? Program would then be perfect 😉

  24. Marcus October 25, 2009 at 1:27 pm #

    In Vista and above, you can have the audible tone running but set the mixer to reduce the volume output specifically by this program to zero. You won’t hear anything but the connection is still kept alive, and you can check on it anytime but raising the program’s volume output.

    Rhys – thanks btw for this excellent tool.

  25. Eric October 3, 2009 at 2:31 pm #

    Could the executable capture the parameters of output options so that the inaudible tone starts automatically at Windows start up?

    • Rhys October 3, 2009 at 9:22 pm #

      Yeah sorry about this, I was meant to fix this ages ago. I’ll get to it soon. I’ll make sure it starts playing as soon as it starts. That’s how it used to work but I broke it in the last version!

  26. Vampyre July 4, 2009 at 4:31 pm #

    Well only thing with 1.1 is that it wont auto start when then the startup menu.

    On the previous ones I would place it to start with windows. This one starts but you have to open it and then click start to get it going.

    If you could make a option to start what ever sound you choose when lauched I think it would be perfect!

    • Rhys July 4, 2009 at 6:37 pm #

      Hmmm…Yeah good point. I’ll sort that out soon. 🙂

    • Rhys January 15, 2010 at 10:54 am #

      Ok I’ve updated and finally fixed the startup problem! 🙂
      Version 1.2 now available

  27. Vampyre July 4, 2009 at 11:53 am #

    Downloading new version! Just reinstalled windows Glad I could find this website again.

    THANK YOU

  28. RTonietto July 3, 2009 at 1:30 pm #

    New version tested and it’s perfect now (for my ears at least ;D). I couldn’t hear the inaudible tone and any sound I play on my computer now is heard on the HT’s speakers without any delay. Thank you.

  29. Rhys June 27, 2009 at 5:58 pm #

    Ok new version (1.1) available now. New inaudible tone and option to select a custom wav file

  30. RTonietto June 26, 2009 at 4:51 pm #

    That’s the same version I was trying. I’ve noticed the 3 options: test, inaudible and silence. Obviosly, only the first 2 keep the output busy. But I can listen to both tones, even the high frequency of the inaudible one. I know it’s not common for humans to listen to frequencies above 16 KHz, but unfortunately that’s my case. I remember once when I made a step motor drive to use in a device and followed the component’s datasheet recommendation to use a frequency of 20 KHz, which would be inaudible for humans. The funny thing is that I was the only one who could listen to the high pitch buzz the machine emitted.

    • Rhys June 27, 2009 at 1:32 pm #

      Okey, I’ll put up a new version soon with a new audio file. Maybe an option to specify your own .wav file so you can experiment. 🙂

  31. RTonietto June 22, 2009 at 5:16 pm #

    That’s exactly what I was looking for. However, I think I might have a canine ancestor, as I’m able to hear the inaudible tone. That happened to me before with other high frequency sounds people usually couldn’t hear. What frequency did you use? 20 KHz? Is it possible to use a higher one (and maybe also a lower volume)? Thanks in advance.

    • Rhys June 24, 2009 at 9:57 am #

      Hi, Can you try the test version, it has some options for output type. If it’s still not working I’ll dig the code out and have a look 🙂

  32. Vampyre April 19, 2009 at 7:28 am #

    Thank you for the 64bit update. Now working great in vista x64 sp1 with .dot net 3.5!

    Keep up the great work.

    Now if I could only find vista 64 bit drivers for the ps3 sixaxis controller id be set to use vista full time.

Trackbacks/Pingbacks

  1. CAM - September 7, 2011

    CineS2…

    […]SPDIF KeepAlive for Home Theatre PC[…]…

  2. Mesleki Deformasyon » Logitech Z5500 optik ses gecikme ve erken kesilmelerine çözüm. - June 4, 2011

    […] buradan indirebilirsiniz: tıklayın. Merhaba, Mesleki Deformasyon'a hoş geldiniz. Sitemi beğendiyseniz sayfamı takip etmek için […]

  3. SPDIFKeepAlive 1.2 :: Rhys Goodwin’s Weblog - January 15, 2010

    […] can download the new version at the bottom of the SPDIFKeepAlive Post Tags: Keepalive , sony unlock , SPDIF , spdif […]

Leave a Reply