Solved More sound woes: analogue out down NVidia HDMI.
#1
Music 
A further saga of this thread...

TL;DR: installed 64-bit Debian, dropped XBMC on it and now can't get sound through XBMC to work.

Background: on forth install of XBMC:
  1. RaspBMC - dropped this on a Pi, worked okay for most things (struggled a bit when trying to do several things at once, like update my library and play video at the same time). Couldn't get the remote to work properly - some Lirc tools didn't exist for RaspBMC.
  2. OpenELEC - on the advice of a friend, tried this out and it ran a lot smoother, with the remote doing a lot of things by default without needing to mess around with keymaps.xml and other files. But it still struggled.
  3. XBMCbuntu - went for a full-blown distro on a Zotac. Worked well, apart from the issue with sound that the Pi lacked. Couldn't get custom keypresses to work on the remote - that's another tale of woe - but it's 32-bit, and the H/W is 64
XBMCbuntu doesn't come in 64-bit so went for Debian Wheezy + XFCE and dropped XBMC on top of it. And have some sound woes.

Some diagnostic info about the kit:
Code:
~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
and...
Code:
$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Intel
    HDA Intel, ALC892 Analog
    Default Audio Device
sysdefault:CARD=Intel
    HDA Intel, ALC892 Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Front speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
    HDA Intel, ALC892 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    HDMI Audio Output
The two devices I'm interested in are the analogue out (speakers driven by the phone jack out the Zotac's front) and the HDMI out (sound to the TV), which are listed as "default" and "hw:1,7" respectively.

"alsamixer" shows volume controls all up to full, nothing unmuted. Sound checks work, too, i.e.:

I can get stuff to play out of the speakers okay with:
Code:
aplay noise.wav
speaker-test -t wav -c2 -l3

And the TV sings out with:
Code:
aplay -D plughw:1,7 noise.wav
speaker-test -t wav -c2 -l3 -D hw:1,7
(I've no idea why "hw:1,7" didn't work with aplay, but plughw did).

I recall I originally messed around with /etc/asound.conf and .asoundrc files until I could get sound squirted down the HDMI cable. The guides I originally followed are either outdated or unsuitable for my situation (and the device names differ between distro so just copying over the files won't work) but it seemed various entries in these files simply routed any sound destined for the default device out to the HDMI, e.g:

Code:
~$ more /etc/asound.conf
##
## taken from https://bbs.archlinux.org/viewtopic.php?pid=789152
##
## seems to reroute all default sound through plug
## and to 1,7 (aplay -l = shows hardware)
##
##      Using this config file, can ignore all .asoundrc in $HOME directories
##
## ----- to test:
##
##      aplay -D plughw:default noise.wav <-- comes through speakers okay.
##      aplay -D plughw:1,7 noise.wav <-- coming through TV.
##
##      aplay noise.wav <-- should use "default" and come through TV.
##      speaker-test -c2 -t wav -l 3<-- use both channels, three times, through TV now.

pcm.!default
{
  type plug
  slave.pcm "dmix:1,7"
}

And now, having done all that...

1. I log into LXDE; command-line stuff can play out to speakers and TV but firing up mplayer only plays out through speakers. I can't see a way of redirecting it out to the HDMI.. Both both analogue and HDMI show up in the graphical volume control tool, but there seems to be no way of setting one to be default.

2. XBMC has "Analog/HDMI/Optical" against "Audio Output" and a list of different names under "Audio output device". I'm unsure which to pick (what's the difference between "audio output" and "audio output device"?) I've tried several different combinations but none of them seem to work - I've had an MP3 playing whilst trying to get sound out, and an MKV pops up "can't initialise sound device". I've had "HDA NVidia - hdmi - 7 (ALSA)" show up in this drop-down list, as well as "iec958" and "default" - where does XBMC get these names from?

I know all cables are working fine since XBMCbuntu played sound okay.

Any ideas, any further tests I can try?

Does XBMC use the "asound" config files, or does it bypass these at all?

Bit more OS info:
Code:
$ uname -a
Linux smudge 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.1 (wheezy)
Release:        7.1
Codename:       wheezy

$ dpkg -l xbmc
ii  xbmc             2:11.0~git201 all           XBMC Media Center (arch-independent da
Any other info required?
Reply
#2
Just to be clear here, are you trying to get dual audio out - both analogue and hdmi at the same time?

If so, it is tricky, and there is a long thread about it on this subforum.

PS just noticed you are using an old and unsupported version of XBMC. (Having said that I believe dual audio is easier to get on 11 than 12).
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
"Audio output" refers to the way your audio is connected (analog/HDMI/optical). "Audio output device" is the device you'd like to use. If you want HDMI, go with the HDA Nvidia something, if you want analog, go with ALC892 analog.

If you can't get anything to work, post a debug log.
Reply
#4
(2013-10-14, 01:09)nickr Wrote: Just to be clear here, are you trying to get dual audio out - both analogue and hdmi at the same time?
No - I want all sound to be chucked down HDMI, but my TV doesn't process DTS (or whatever).

(2013-10-14, 01:09)nickr Wrote: PS just noticed you are using an old and unsupported version of XBMC. (Having said that I believe dual audio is easier to get on 11 than 12).
Eh? Oh. It was the one I installed using apt-get... Frodo? There another I should use?

(2013-10-14, 10:32)negge Wrote: "Audio output" refers to the way your audio is connected (analog/HDMI/optical). "Audio output device" is the device you'd like to use. If you want HDMI, go with the HDA Nvidia something, if you want analog, go with ALC892 analog.
Okay, so "Audio output" needs to be set to HDMI to send sound to the TV?
Not sure why there's multiple "audio output device" entries, but selecting them doesn't seem to provide sound out of the cable.

(2013-10-14, 10:32)negge Wrote: If you can't get anything to work, post a debug log.
I've no idea why the hell I never did that (despite several other threads advising it) - I'll crack on with that later this week.

Thanks for suggestions, all!
Reply
#5
Yes, audio output should be HDMI, and both audio devices should be HDA Nvidia or something similar. Uncheck all audio formats except Dolby Digital, then try again.
Reply
#6
Okay, would you believe I booted up off the new SSD (the one containing 64-bit Debian) and... sound works?

Audio Output = HDMI
Audio Output Device = HDA NVidia 3 etc...

Oddly, no matter what I set the AO or AOD to, I still get sound. Well weird.

I strongly suspect I was setting them to something else and not "Okaying" the setting - it's not clear when the setting becomes active.

Either way - thanks for all your help. It seems to work now, I'm going to screenshot it!
Reply
#7
Could be that asound.conf file that screwed you over. You usually don't need them.
Reply
#8
Oh.. okay. I *did* notice an asound.conf in the /usr/share/xbmc dir and wondered which sound file XBMC actually honoured.

I may try deleting (well, renaming them out of the way) and testing again, just to confirm it _was_ asound messing things up.

All systems go!
Reply
#9
As far as I know the only files that actually matter are /etc/asound.conf and ~/.asoundrc.
Reply
#10
To close this story... after another boot, sound stopped working again, so I fell back to my original 32-bit build.

I'm not convinced it was the config files causing an issue, I suspect it was me changing some of the settings through the GUI and not understanding when the settings took.

I don't honestly recall making any changes to my 32-bit XBMCbuntu install but glancing at the config files I must have.

Either way, for anyone hitting this thread during a search, the solution to my sound woes involved doing a fresh build which worked fine. I did the following:

1. Use Bram's guide to get XBMC up and running fine under 64-bit ubuntu. (I also had to update the version of XBMC, the guide points to an earlier release). No sound, but it was a complete idiot-proof automated install for my kit.
2. Applied these changes here. You don't need to reboot after making changes to the alsa sound files - restarting XBMC ought to be enough - but it's useful to reboot occasionally to test it all comes up working.

Can a mod close this?
Reply



Logout Mark Read Team Forum Stats Members Help
More sound woes: analogue out down NVidia HDMI.0
This forum uses Lukasz Tkacz MyBB addons.