Kodi Community Forum

Full Version: Please help! R3700, moved from SPDIF to HDMI - cannot get audio!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am not an expert, but have tried many different things and cannot get audio out of the R3700, now that I have changed from SPDIF to HDMI for audio. Oo

Running XBMC Live 10.1
Alsa is at 1.0.24
nVidia HDMI is on 1,3.
All SPDIF channels in alsamixer are not muted.

I've tried:
Audio output: HDMI
Audio output device: HDMI, nVidia HDA defaults, plughw:1,7, plughw:1,3
Passthrough output device: HDMI, nVidia HDA defaults, plughw:1,7, plughw:1,3

This has been driving me nuts for the past week, and I will honestly post a beer to whomever might be able to offer assistance! I am stumped now! Eek

What further information can I provide that will assist? Many thanks!!!
How have you tested the audio?

What I would suggest is try the following: open a terminal and check ALL eld#P.0 files in /proc/asound/card1/ using cat. P being an integer from 0-3 or maybe 0-2.

Exactly one of them should start with this:

Code:
monitor_present        1

Then, with the following mapping table, remember the appropriate Q given the P that you found above:

P->Q
======
0->1
1->2
2->4
3->8

Now, as root, open /etc/modprobe.d/alsa-base.conf in an editor and append the following line:

Code:
options snd-hda-intel enable_msi=0 probe_mask=-1,0xQ


So if there was a "monitor_present 1" in /proc/asound/card1/eld#0.0, append

Code:
options snd-hda-intel enable_msi=0 probe_mask=-1,0x1


to /etc/modprobe.d/alsa-base.conf. Then execute as root:

Code:
modprobe -r snd-hda-intel && modprobe snd-hda-intel

or just reboot, just to be safe. Then open alsamixer again and unmute the only S/PDIF channel on card1 you should have left now.

Then just set the audio and passthrough device to "hdmi" and you should have sound during video and music playback!

Note: this only works when the hdmi output is card1, i.e. the second card. If it is your only and/or first card, change the probe_mask to probe_mask=0xQ. So just ommit the -1, which indicates default handling for the first card (card0).

This tutorial is based on the official Nvidia document regarding hdmi audio in Linux/ALSA: ftp://download.nvidia.com/XFree86/gpu-hd..._numbering. Have a look there for more info.
Excellent, thanks for the informative response. I will try this evening (in about ~8hrs) and let you know the result!
Hi, so first issue being that there is only one file - eld#

This only has;
monitor_present 0

Where would you suggest going from here?
What do aplay -l and aplay -L say?

Also, can I assume that something was actually connected to it at boot time and at the time of reading said file?
Quote:steve@XBMCLive:/proc/asound/card1$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
steve@XBMCLive:/proc/asound/card1$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
front:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
HDA Intel, ALC662 rev1 Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia
HDA NVidia, NVIDIA HDMI
HDMI Audio Output

HDMI lead was certainly connected at time of boot and looking at the above...
WAIT - HDMI was going through a switcher. Have checked the file again now and there is a 1. Will go through the rest of the steps...
OK, still doesn't work (Failed to initialise audio device in XBMC).

Last few lines of /etc/modprobe.d/alsa-base.conf have similar format if that helps (and this should be the case):

Quote:# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
options snd-hda-intel enable_msi=0 probe_mask=0xffff,0xfff2
# Audio over HDMI
options snd-hda-intel model=6stack-dig
options snd-hda-intel enable_msi=0 probe_mask=-1,0x2

Also, relevant error lines in xbmc log;

Quote:21:31:21 T:2493975408 M:1864273920 ERROR: Initialize - failed to open custom device hdmi:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2 (error:No such file or directory), retry with default hdmi
21:31:21 T:2493975408 M:1864146944 ERROR: Initialize - pcm_open_lconf, alsa error: -2 - No such file or directory
21:31:21 T:2493975408 M:1864146944 ERROR: Unable to open audio mixer
21:31:21 T:2493975408 M:1864146944 ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen

Hope this helps...!
Comment all the other options snd-hda-intel lines by prefixing them with a #. Then reboot again. And check your eld's again. If there's no monitor present, you make have to redo the procedure, meaning that you should comment or remove that last line as well and start over.
So, unfortunately not a happy ending.

I couldn't get it to work, and followed some other random advice about adding the user to the audio group - which reverted xbmc to always going to the command prompt as I'd blatently messed up some permissions somewhere.

One reinstall later, I found the problem was not with xbmc at all. It was with the pass-through in the amp! Where I'd assumed it was splitting out the optical, it wasn't, so was simply sending all xbmc audio through the HDMI to the TV (which had no speakers connected).

So, in short, a week of pain for what was ultimately a quick fix and nothing to do with xbmc which continues to be wonderful. Thanks for your help anyway...!