OpenELEC Forum
NForce4 CK804: SPDIF passthrough not working - Printable Version

+- OpenELEC Forum (https://forum.openelec.tv)
+-- Forum: Generic Forum (https://forum.openelec.tv/forumdisplay.php?fid=5)
+--- Forum: AUDIO (https://forum.openelec.tv/forumdisplay.php?fid=53)
+--- Thread: NForce4 CK804: SPDIF passthrough not working (/showthread.php?tid=73085)

Pages: 1 2


NForce4 CK804: SPDIF passthrough not working - apa - 09-30-2014

chewitt post=118416 Wrote:also make sure it's nothing dumb like amixer muting the device
Already tested extensively with unmuting device with amixer before loading XBMC: no joy.

chewitt post=118418 Wrote:based on some hints I read here: http://forums.solydxk.com/viewtopic.php?f=6&t=2749
Code:
echo "blacklist snd-hda-intel" > /storage/.config/modprobe.d/snd-hda-intel.conf
reboot
Hadn't seen that one before. I'll give it a try when I get home: thanks!


NForce4 CK804: SPDIF passthrough not working - apa - 09-30-2014

chewitt post=118418 Wrote:based on some hints I read here: http://forums.solydxk.com/viewtopic.php?f=6&t=2749
Code:
echo "blacklist snd-hda-intel" > /storage/.config/modprobe.d/snd-hda-intel.conf
reboot
I can confirm that the change was taken into account: the HDMI ports (from my graphics card) dissapeared from the XBMC audio settings.

Unfortunately,, no sound (neither in XBMC menus nor in HD movies).

On IRC, I was also asked to provide amixer -c0...


NForce4 CK804: SPDIF passthrough not working - apa - 09-30-2014

In the amixer -c0 output I posted above, you'll notice that SPDIF is muted ("IEC958 Playback AC97-SPSA" set to 0).

In order to be certain I'm not missing something, I undid every little fix I tried so far (checked and double-checked). In XBMC I then re-selected my SPDIF as both the audio-device and the passthrough device.

I rebooted, then checked "amixer -c0" again: sure enough, SPDIF was muted again. I executed the following command to unmute it:
Code:
amixer set 'IEC958 Playback AC97-SPSA' 100
I verified with "amixer -c0" and SPDIF was at 100%.

I then killed xbmc ("killall -9 xbmc.bin") and when it restarted. I tried disabling xbmc ("touch /var/lock/xbmc.disabled" followed by "killall -9 xbmc.bin"), but xbmc restarted automatically anyway. I then stopped xbmc using "systemctl stop xbmc" (which worked), unmuted the SPDIF again (and verified: was ok) and execute "systemctl start xbmc" to restart it: sure enough, SPDIF became muted again. What am I doing wrong?


NForce4 CK804: SPDIF passthrough not working - apa - 09-30-2014

Just had a lengthy IRC discussion on the matter. Conclusion thusfar seems to be there is a bug in the audio driver (Intel8x0 in this case). Problem should occur in all other Linux distros as well as I understand it.

Will see if I can open a bug with alsa to get this investigated further.


NForce4 CK804: SPDIF passthrough not working - apa - 10-04-2014

It works: I have sound in the menus, from 2-channel/mp3 audio-tracks and from DD/DTS via passthrough to my receiver!

Solution (in OpenElec 4.2.0; settings on other distros would be similar):

  1. Create custom asound.state in /storage/.config/ with the following contents: http://sprunge.us/SiHH
    This state-file will, among other things, unmute the appropriate mixer controls, set proper output formats, ...).
  2. Load the above state file with the following command:
    Code:
    alsactl nrestore 0 -f /storage/.config/asound.state
    Rreplace the "0" with the card-number corresponding to CK804 on your system. You may want to add this command to a custom autostart.sh in /storage/.config/ so the state is restored on every boot:
    Code:
    #! /bin/sh
    alsactl nrestore 0 -f /storage/.config/asound.state
  3. Create intel8x0.conf in /storage/.config/modprobe.d/ with the following contents:
    Code:
    options snd-intel8x0 spdif_aclink=1

    I am told that this above setting depends on the specific motherboard, so this may not work for everyone: it does work on my ASUS A8N-SLI Deluxe!
    This was the final setting that solved the issue for me. I did try this setting before, but it seems that some sources on the Internet had this mis-written as "options snd-intel-8x0 spdif_aclink=1" (notice the extra dash).
  4. In XBMC, select the SPDIF out as both the audio-device AND the passthrough device.
  5. You'll need to reboot for these settings to have any effect.

If sound still doesn't work, check the front-panel audio connector on the board. It is located on the motherboard, above the blue PCI-E slot, and between the molex-connector and the back-panel audio jacks. If you don't have a front-panel audio connector attached to it, then there must be jumpers installed on either side of the 1-pin row. Failure to do so will disable the back-panel audio outputs!

There is also a timer bug on NForce4 boards (look for "acpi_use_timer_override" on Google). BIOS 1805 for the A8N-SLI Deluxe is said to fix the timer-bug (I am told other boards have been fixed through BIOS as well). If you flash that BIOS, you'll notice a message "MP-BIOS BUG 8254 timer not connected - use noapic option to boot" during boot. To resolve this issue, follow the following steps:
  1. In a SSH window, issue the following command:
    Code:
    mount -o rw,remount /flash
    Then, do a "cd /flash".
  2. Edit the file extlinux.conf you'll find there. It should initially look like this:
    Code:
    DEFAULT linux
    PROMPT 0

    LABEL linux
    KERNEL /KERNEL
    APPEND boot=LABEL=System disk=LABEL=Storage ssh quiet

    Append "acpi_use_timer_override" to the kernel boot parameters so the file ends up looking similar to this:

    Code:
    DEFAULT linux
    PROMPT 0

    LABEL linux
    KERNEL /KERNEL
    APPEND boot=LABEL=System disk=LABEL=Storage ssh quiet acpi_use_timer_override
  3. You'll need to reboot for these settings to have any effect.

I want to thank the good people on the alsa-devel mailing list as well as fritsch on the #xbmc IRC channel for all their help!