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

  • Yes, it is enabled! The spdif optical output is lit.

    Now, after i changed the settings in alsamixer - there is audio, but no passthrough.

    This is the goal - to make the system to passthrough audio using the onboard audio, not the Nvidia...

  • Code
    m_deviceName      : @
    2020-12-21 18:08:07.153 T:140019641022208  NOTICE:         m_displayName     : Default (NVidia CK804 NVidia CK804)

    When this device is enabled and in alsamixer the spdif volume is set to 0, there is sound.

    The default passthrough device is set to Nvidia CK804 - IEC958 S/PDIF and I cannot change it in Kodi settings (no other options) - this will not work like this...(reasons: previous posts). I think it should default to the same "@", or somehow the onboard audio to be selected as a passthrough device.

    Help! 😭

  • I'm sure you already know, but:

    The default device has no passthrough capabilities, but support 7.1 channels PCM:

    Code
         Device 1
             m_deviceName      : @
             m_displayName     : Default (NVidia CK804 NVidia CK804)
             m_deviceType      : AE_DEVTYPE_PCM
             m_channels        : FL, FR, BL, BR, FC, LFE, SL, SR
             m_streamTypes     : No passthrough capabilities

    The only passthrough device is the S/PDIF device with 2 PCM channels (5.1 via AC3):

    Code
         Device 4
             m_deviceName      : iec958:CARD=CK804,DEV=0
             m_displayName     : NVidia CK804
             m_deviceType      : AE_DEVTYPE_IEC958
             m_channels        : FL, FR
             m_streamTypes     : STREAM_TYPE_AC3,STREAM_TYPE_DTSHD_CORE,STREAM_TYPE_DTS_1024,STREAM_TYPE_DTS_2048,STREAM_TYPE_DTS_512

    I'm afraid as long you do not find a physical connection and kodi configuration to output hearable sound via the S/PDIF interface (like TV(AC3) from Audio quickstart guide - Official Kodi Wiki) there is no passthrough support.

  • A Google search comes up with a lot of people having problems with getting the S/PDIF to work in Linux on that nForce4 audio. Here is one example: Optical Audio Output for Nforce 4 (IEC958) sound card | AVS Forum

    But one thing that has been assumed is that the onboard audio can passthrough AC3 or DTS. It's not a given. And that audio appears to be AC'97, not the newer high definition audio. Not knowing your exact hardware I couldn't confirm if AC3 is technically supported. Yes, I know you said you had it working before.

    Since you get some sound now, have you tried turning off the passthrough option in Kodi and testing to see if something DD or DTS plays audio? I'm presuming it will now.

    I'm not very Linux savvy, so excuse me if you already tried the stuff noted here for nForce4 digital output: Alsa Opensrc Org - Independent ALSA and linux audio support site

  • The only reliable source is the manufacturer's datasheets and application notes.

    Post the motherboard manufacturer's full model number, including CPU, graphics card, etc..

    Motherboard manufacturer's tweak the Intel and AMD reference motherboard designs.

    It is easier using Windows specifications than Linux.

    Compare the motherboard specification to the chipset manufacturer's specifications.

    Compare the motherboard drivers to the chipset manufacturer reference driver.

    Once the specifications and differences are known, search and compare with the Linux reference driver.

    If the Linux chipset driver was reverse engineered from the chipset manufacturer reference driver there is a possibility the testing of the Linux chipset driver was conducted and verified with only a specific motherboard, CPU, graphics card, etc., combination. Verify the Linux driver has been tested with the system components in use.

    An example is Windows 10 updates. With all the testing, many systems are stuck in a continuous reboot loop. All can be traced to system drivers. In many cases the chipset manufacturer reference driver is buggy, requiring an update.

    Other issues.

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

    All motherboard timings are derived from the CPU timing crystal.

    Crystal drift will affect timings. If the timings are confined to the motherboard, everything should function correctly.

    Where issues occur is external peripherals dependent on accurate timing handshaking and synchronization with the CPU timing crystal.

    Also check for ground loops between the computer and AVR. If available use the TOSLINK optical fiber connection. TOSLINK is an electrically isolated connection, eliminating ground loops and radio frequency interference.

    S/PDIF - Wikipedia.

    The receiver does not control the data rate, so it must avoid bit slip by synchronizing its reception with the source clock. Many S/PDIF implementations cannot fully decouple the final signal from influence of the source or the interconnect. Specifically the process of clock recovery used to synchronize reception may produce jitter. If the DAC does not have a stable clock reference then noise will be introduced into the resulting analog signal. However, receivers can implement various strategies that limit this influence.

    TOSLINK optical fiber, unlike coaxial cables, are and RF

    Edited once, last by JonasStax: Additional Information. (December 29, 2020 at 12:38 PM).

  • I'm afraid as long you do not find a physical connection and kodi configuration to output hearable sound via the S/PDIF interface (like TV(AC3) from Audio quickstart guide - Official Kodi Wiki) there is no passthrough support.

    Thanks! I understand that this should be the passthrough device, but... I have tried all the possible options in every Wiki (Kodi and Libre) and every (quickstart) guide to make this to work again. This is why I am writing here asking for help!

    The physical connection "proprietary NVidia spdif cable" that chewitt mentioned will not work at all for my implementation - it is audio-in connection from the motherboard to the video card that is supposed to help send audio through the dvi connection of the card using dvi-hdmi adapter. I do not want to use such connection.

    I am using:

    dvi for video to the TV

    S/pdif (digital coaxial) cable for audio to the AVR

    I think this is exactly the problem in the configuration - if this setting (NVIDIA CK804 - IEC958 S/PDIF) is selected, the system is trying to send audio through the dvi output of the card and not through the digital audio output of the motherboard... (or maybe I am totally wrong) /shrug

    The last change that I made prior to the temporary success (DD/DTS worked) was:

    In advancedsettings.xml I changed the passthrough device from iec958:CARD=CK804,DEV=0 to iec958:CARD=CK804,DEV=1. I found this "solution" in a forum thread. Maybe this will ring some bells on why and how it worked...

    Optical Audio Output for Nforce 4 (IEC958) sound card | AVS Forum

    Alsa Opensrc Org - Independent ALSA and linux audio support site

    Here there are some interesting ideas... which may work. Thanks for this!!! :)

    ...but I really don't know where to put asound.conf or ~/.asoundrc ?( > /etc/ is read only... I tried in /storage/.config/, but nothing changed...;(

    Since you get some sound now, have you tried turning off the passthrough option in Kodi and testing to see if something DD or DTS plays audio? I'm presuming it will now.

    Yes, I have sound with the passthrough disabled - the receiver shows pro logic II (pcm), not DD/DTS.

    Post the motherboard manufacturer's full model number, including CPU, graphics card, etc..

    Motherboard: EP-MF4 Ultra 3 (almost no information available as there is no more official website of the manufacturer)

    CPU: AMD Athlon 64 X2 4200+
    Video Card: NVidia GeForce GTX 260

    Will try to use the Optical output to see if any difference. Thanks for the detailed info!


    N.B. The DD/DTS passthrough worked at some point, hence the hardware supports it and the system is capable of! I need help in configuring the software to use the right components.

  • https://www.newegg.com/epox-ep-mf4ultra-3/p/N82E16813123016

    Audio Chipset: Realtek ALC850, 8 Channels.

    The following guide may help.

    Installing Realtek ALC892 Audio Driver on Linux Mint

    Linux Mint - Community

    The download link is obsolete.

    Google: Realtek ALC850 Linux drivers; Realtek ALC850 Linux driver download

    Similar Linux audio issues across many Linux distros have been reported with varying success results.

    It may be easier purchasing a cheap Linux audio compatible sound card.

  • I noticed this earlier LibreELEC.tv/soundconfig at master · LibreELEC/LibreELEC.tv · GitHub while looking at the file for some other reason. This might explain why some settings aren't preserved. The soundconfig file itself cannot be overriden, but it is called from udev through 90-alsa-restore.rules which can be, e.g. place a file of the same name in /storage/.config/udev.rules.d and it will be used at boot time instead of the embedded (read-only) one. This allows you to call a different soundconfig script with alternative mixer settings.

    I still think you need to create a different alsa conf that deffines the on-board S/PDIF device as an IEC958 source. Unless you do this the device will not show up as pass-through capable in Kodi. Sadly, alsa configuration is one of Linux's "dark arts" that's particularly dense and difficult to Google search for solutions on as anything including "alsa" automatically gets a billion unrelated hits.

  • IT WOOOOOOORKED!!! :):):):*:cool:8):love::thumbup:

    edit: partially ;(

    N.B. I understand that most of the things I made (explained bellow) are totally wrong, but please don't judge me - I am total noob in this. I am just listing the things I made so it can help someone who understands the matter see what is wrong and how I can fix it.

    After the last comments I tinkered with it again today.

    What I did:

    1. Created 90-alsa-restore.rules in /storage/.config/udev.rules.d with

    , but nothing changed... (except that in alsamixer everything is back to default) and then I started tinkering randomly.

    2. Using this wiki and pulseaudio -D in order to be able to make changes (it does not work otherwise)

    Code
    pacmd "set-default-source ....

    i was able to set the default device and output, then I created in /storage/.config/udev.rules.d 91-pulseaudio-custom.rules with

    Code
    SUBSYSTEM!="sound", GOTO="pulseaudio_end"
    ACTION!="change", GOTO="pulseaudio_end"
    KERNEL!="card*", GOTO="pulseaudio_end"
    
    SUBSYSTEMS=="pci", ATTRS{vendor}=="0x10de", ATTRS{device}=="0x0059", ENV{PULSE_PROFILE_SET}="custom-profile.conf"
    
    LABEL="pulseaudio_end"

    and in  ~/.config/pulse-daemon.conf.d/custom-profile.conf  added

    Until this point nothing worked for the final goal (DD/DTS passthrough).

    Then I tried one last time with autostart.sh in  /storage/.config/ with

    Bash
    #!/bin/sh
    pulseaudio -D
    pulseaudio --system
    pactl load-module module-udev-detect
    pactl load-module module-alsa-sink device=dmix
    pactl load-module module-alsa-source device=dsnoop
    pactl load-module module-combine-sink sink_name=combined
    pactl load-module module-allow-passthrough

    (here I am pretty sure it is totally wrong, but... read on)

    After reboot in Kodi there was audio device "PULSE Simultaneous biult-in audio output", which I choose, but the passthrough device was still NVidia IEC958 S/PDIF. Then I checked in guisettings.xml in /storage/.kodi/userdata and there the audio device was PULSE:combined and the passthrough one was ALSA:iec958...
    After this I created advancedsettings.xml in /storage/.kodi/userdata with passthrough device PULSE:combined

    Rebooted, changed the settings in alsamixer again (s/pdif unmute, s/pdif volume 0)

    and... VOILA!!!
    Started a DTS (and after that DTS-HD) movie and the AVR lit for DD/DTS digital signal... :):):):)

    Edit:

    P.S. During the writing of this resume of the things I have done I checked to see if the signal is true passthrough... and it is NOT. I am able to change the volume in Kodi, but at least the AVR reads DD/DTS signal. When I switch off the passthrough, the AVR is back to PCM signal... Really strange!

    The audio stream now is:

    FL;FR;FC;LFE;SL;SR; ff-ac3 ; 32 bits; 48.000 Hz or FL;FR;FC;LFE;SL;SR; ff-dca; 32 bits; 48.000 Hz and the AVR lit for DD/DTS signal.

    and before todays' changes when the passthrough was active without sound was raw;raw;rawraw;raw;raw; pt-dts; 8 bits; 48.000Hz and the AVR showed pcm (pro logic).


    Perhaps new Log will help you understand what is wrong and what I made, or...?

    :):):) HAPPY NEW YEAR TO ALL!!! :):):)