LibreELEC generic 9.2.6 on old PC - NO S/PDIF SOUND / No DTS/DD passtrough audio

  • Hello, Gods! :angel: Thanks for creating the best multimedia tool known to man! :heart:

    I will start with a difficult for me /shrug and probably dumb for many of you question and will be happy if I find someone here that can help me (or went on the difficult path to success :cool: )...

    Installation: Libreelec Generic 9.2.6 on old PC (AMD Athlon 64x2, NVidia GeForce GTX 260)

    Connections:

    PC>dvi cable>TV (for video)

    PC>s/pdif (digital coaxial cable)>AVR (for audio).

    The problem: no audio at all / later evolved in no DTS/DD passthrough audio.

    Attempts to resolve the issue:

    no audio at all

    1. All the settings in Kodi in all the possible configurations - without success

    2. Installed Multimedia tools and ssh in alsamixer. When I lowered the volume to 0 in the s/pdif section, the audio started, but no passtrough…

    no DTS/DD passthrough audio

    3. PulseAudio configuration – tried to set it to use ALSA, tried "dmix" and "dspoon", tried to load modules and also tried to turn it off completely - partial success – passtrough audio, but again without DTS/DD

    4. <advancedsettings.xml> - added settings for audio output: dts/dd passtrough audio and device passthrough.

    Here strange thing happened - everything started – I heard DD audio and the receiver lit up for DD signal... After restart - it does not work again... ;(;(;(

    5. I repeated all the previous steps (probably because of some sequence of things I pushed) - again without success. :cry:

    Later made a fresh install from USB to clean the mess I made with tinkering with the settings. Again I cannot replicate the success. ||

    Over the past 3 weeks (||yes, 3 weeks, every single day I am fighting with this||) I have researched all possible topics and forums, but I do not find a solution... This is my last hope that I will find here a “hacker”:evil: who fought through this and is willing to help me :*:blush:.

    I am not posting log file as I am currently using banned addons… but if the problem does not have a common solution, I will reset everything and post a log from clean installation

    I understand "the banned addons" policy and respect it! This is why i wrote that i will post a log from clean install.

    Here it is:

    Log

    Now I am back to point 1 - no sound at all...

    Please feel free to ask for any additional info as I do not know what will be of help to put in here…

    In case anyone has an idea and wants to help, please give me every advice that you have. (desperate)

    Thank you in advance!:)

    Edited 2 times, last by elmismo (December 21, 2020 at 6:25 PM).

  • The fact that you are using banned addons will halt any help here. When you have removed ALL banned addons, feel free to post again and include all necessary logs.

  • I understand "the banned addons" policy and respect it! This is why i wrote that i will post log from clean install.
    Here it is:
    Log

    Now I am back to point 1 - no sound at all...

    I really hope that you will be able to help me.
    (edit in the first post)

  • I'm not fully versed in reading Kodi logs, but from what I can tell in the log you posted the audio output device you have set is the analog part, not the S/PDIF. You can see the enumerated devices in your log, just look for "Enumerated ALSA devices". The one that got chosen is listed where it says "CActiveAESink::OpenSink - ALSA Initialized:"

    Set your Audio Output Device (Settings/System/Audio) to the S/PDIF labelled one. Possibly labelled something like "NVidia CK804" or "NVidia CK804 - IEC958 S/PDIF". Set your Passthrough Output Device to the same one.

    Use the audio quickstart guide on Kodi's wiki page to help with setting things appropriately.

    If you are not getting appropriate options on those two output device settings then you've got other issues I'm not smart enough to help with.

    Good luck.

  • Thank you very much for your kind advice and for the time spent on my problem. 🙂

    If i enable NVidia CK804 - IEC958 S/PDIF as you suggest, then I have no sound at all no matter what I do.

    When I choose the Default NVidia CK804 and install Multimedia tools and then ssh to alsamixer, I am able to lower the spdif section to 0 (the default value is maximum) and then there is sound (no passthrough of course 😭).

    I think the problem is somewhere in the ALSA choosing the wrong output - analog instead of digital. The sound card have 6 ch analog surround as well as spdif digital output.

    Any advice on how to set the default output in ALSA will be much appreciated. ❤️

    P.S. Today I tinkered the Pulseaudio way and I found possible solution... Unfortunately all the etc/pulse/ part is read only and I cannot change anything...😭

    Also, tried combined sinks in Pulseaudio - again with no success... 😡

  • Thanks for the advice, but this will not fix the broken software.

    The audio and the DTS/DD passthrough worked for a little as I mentioned... Everything was just how it is supposed to be. So the problem is just to be set up properly. I need help for this.

  • I don't have a "solution" .. but here's some thoughts that might be useful:

    GTX260 does not have any on-board audio capabilities; it is normally a DVI output only card and DVI does not carry audio. As this is the era before nVidia figured out how to do HDMI properly the card shipped with a cable that connects the motherboard soundcard digital output (S/PDIF) to unused pins in the DVI connector which a custom nVidia DVI to HDMI adaptor uses to present "HDMI" audio to a TV or AVR. HDMI and S/PDIF send the same signal, so this allows the card to send full 8-channel audio via HDMI (over S/PDIF the bandwidth is reduced and the receiver will not support more than 6-channel, i.e. 5.1 audio). For this to work in Windows an nVidia audio driver must be used .. so likely there is something similar under linux. If you are using DVI not HDMI i'm wondering what might happen if this cable is disconnected and/or any nvidia audio modules are blacklisted to prevent them from being used.

    The kodi.log only shows "nVidia" audio devices being presented by ALSA, yet some fiddling with pulse (which reads hardware capabilities from the kernel in addition to being aware of ALSA devices) managed to get some audio out. I suspect via you've managed to route audio to the internal card; either by ignoring the nVidia devices or via snoop/dmix sending data to all devices. When fiddling with the config in alsamixer did you save/store the active configuration? .. this is not automatic.

    In the past (when we supported mk1 AppleTV devices which I maintained) the PCM output volume needed to be 100% before S/PDIF output worked; any less and the signal strength wasn't enough to be correctly carried (S/PDIF is digital but the signal still needs to be clean/strong enough for comms to work). The description of audio needing to be zero is the exact opposite, but makes me wonder if anything above zero results in additional audio data being mixed into the audio output and disrupting the digital signal.

  • An alternative is Windows 10 and ASIO4All.

    Install in the following order.

    Windows 10. Do not permit Windows to upgrade the drivers.

    SlimDrivers

    Download SlimDrivers - MajorGeeks

    Run the program and select the latest drivers.

    ASIO4All

    ASIO4ALL - Universal ASIO Driver For WDM Audio

    ASIO4All bypasses the Windows audio layer and will give you a clean audio output.

    Select the driver with ASIO4All in the path as the default audio driver.

    Install Kodi. Confirm ASIO4All is in the audio driver path.

  • Wow... Is this my Christmas miracle?! 🙂 Comments and help... Yeey!!! (I almost gave up)

    Merry Christmas to you all!!! 🌲☃️

    chewitt , thank you for your time trying to figure it out!

    I am not using this proprietary NVidia connector (i do not have it). Probably this is why I am not getting any sound when NVidia SPDIF is selected in Kodi settings. Should I try to find/make one or to continue trying to bypass it and make the motherboard surround card take the audio?

    There is, let's say, some white noise starting with the LibreELEC splash screen and when I lower the spdif volume in Alsamixer there are crackles in 100-80-60... until in volume 0 when sound from the source comes on. Probably your suspicion that there is another signal there is right...

    I save the settings for Alsamixer using

    alsactl store -f /storage/.config/sound.conf

    I think I found a possible solution in different forums - configuring Pulseaudio for default sink, source, loaded modules and mapping the audio output. Unfortunately everything is made in the "read only / unwritable" section of LibreELEC /etc/pulse... default.pa, default.conf, or in /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf, where I am not sure the system is using it.

    It will be of great help if you can tell me how to edit the "locked" files that I need or how to change them externally and "recompile" the iso (not sure if i am using the right terms, but hope you understand what I mean).

    In the logs and the outputs of "pacmd list cards", "pactl list sinks", I can see the right path for the audio and that is capable (digital audio, spdif, formats...) but I cannot make the system to use it... Help!!! 😭

    pactl set-sink-formats # "pcm, ac3-iec61937; dts-iec61937; eac3-iec61937 makes no change (it is not stored and not listed later...

    Also, should I use Pulseaudio as system or as daemon...

    pulseaudio --system

    or

     pulseaudio -D - this works only for couple of seconds.

    ...and should I make it in autostart.sh?

    Wow... So many questions... 😭 But I am willing to learn and to make it work! 😁

    JonasStax , thanks for the advice! This is one of my next options - to use Windows or Ubuntu, but I really want to make it work with LibreELEC (and I am pretty sure i will be able to do so with some more help configuring it right.

    mglae , in Alsamixer I have 3 options for spdif "mute" or "on"; volume bar; output pcm/analog in/iec958 in. Only when I select "on", "volume 0" and "pcm" - there is sound (no passthrough).

    When passthrough is selected in Kodi the "mute/on" and "volume" options are not active - I can't change them (and also, the white noise from above disappears - no sound at all).

    Hope all the above gives you an idea on where the problem might be and how we can fight it! 🙂

  • Based on your previous post about the nvidia proprietary spdif connector (thanks for this! 🙂), I have new idea:

    The passthrough device should not be Nvidia at all as LE/Kodi will try to pass the audio through the card and the card doesn't support it - dvi (and I don't want it).

    Previously I have used this PC with the analog surround connection and it works by default.

    Can you help me for:

    how to set up Alsa and/or Pulseaudio to use the digital (spdif) output on the motherboard (and not the card)?

    Thanks in advance! 🙂