Linux No HDMI audio in XBMC
#1
I have XBMC installed on Linux Mint 13. I was successfully using optical audio for many months until a black out, after which audio no longer worked. I have tried other devices using the optical audio of my AV receiver with no luck. For that reason I have abandoned optical audio and am trying to use HDMI audio from my HTPC to the TV.

I can play music and watch videos in Mint and the audio works just find. But I cannot get audio working in XBMC and I have been trying for days. I hope somebody can help me because I miss being able to use my HTPC with XBMC!

Here is the output from aplay -l

Quote:**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC892 Digital [ALC892 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

And the output from aplay -L

Quote:null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default
Playback/recording through the PulseAudio sound server
sysdefault:CARD=SB
HDA ATI SB, ALC892 Analog
Default Audio Device
front:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
Front speakers
surround40:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=SB,DEV=0
HDA ATI SB, ALC892 Digital
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
Direct sample mixing device
dmix:CARD=SB,DEV=1
HDA ATI SB, ALC892 Digital
Direct sample mixing device
dsnoop:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
Direct sample snooping device
dsnoop:CARD=SB,DEV=1
HDA ATI SB, ALC892 Digital
Direct sample snooping device
hw:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
Direct hardware device without any conversions
hw:CARD=SB,DEV=1
HDA ATI SB, ALC892 Digital
Direct hardware device without any conversions
plughw:CARD=SB,DEV=0
HDA ATI SB, ALC892 Analog
Hardware device with all software conversions
plughw:CARD=SB,DEV=1
HDA ATI SB, ALC892 Digital
Hardware device with all software conversions
hdmi:CARD=HDMI,DEV=0
HDA ATI HDMI, HDMI 0
HDMI Audio Output
dmix:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct sample mixing device
dsnoop:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct sample snooping device
hw:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct hardware device without any conversions
plughw:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Hardware device with all software conversions

I have checked the s/pdif using alsamixer and it is not muted (reads 00). Unfortunately I could not get a screenshot in mint to work to show this.

Most recently tried this: http://wiki.xbmc.org/index.php?title=XBM...dio_issues
putting the ".asoundrc" in the home directory of my xbmc user and setting xbmc as described but it did not work. Playback does not complain the audio device is wrong, there is just no sound. I have tried setting the audio in XBMC to analog and hdmi. I have tried using the default ALSA entry for audio device and pass through.

I have had success running each of the following in Mint:

Quote:speaker-test -Dhw:2,3 -c2 -twav
speaker-test -Dplughw:2,3 -c2 -twav
speaker-test -Dhdmi:2,0 -c2 -twav

but none of those work when i set XBMC to custom for audio device and/or pass through with either hdmi or analog. Again, for each of these playback in XBMC does not complain the audio device is wrong, there is just no sound.

There hasn't always been method to my madness with regards to this. I am learning a lot about it as I go. I have tried a lot of different things though and nothing is working. I would really appreciate any help.
Reply
#2
An update. I decided to try updating to Frodo to see if that would solve the problem but unfortunately it hasn't.

There are now just 3 options in the Audio Output Device:

- Playback/recording through PulseAudio sound server...
- PulseAudio sound server
- HD ATI SB ALC892 Digital S/PDIF

And 1 entry for the pass through device:

- HD ATI SB ALC892 Digital S/PDIF

I have tried each of these with Audio Output = Analog as well as HDMI. Channels always set to 2.

None of the combinations worked.

Sound works fine within Linux Mint. i.e. the following plays sounds perfectly:

Quote:mplayer -ao pulse my.avi
Reply
#3
You've set the custom audio device to plughw:2,3 and checked that your un muting the correct sound device within alsamixer? by pressing f6 to select the "HDA ATI HDMI" option?

Which device did you define within the .rcsound file?
Reply
#4
(2012-12-17, 13:24)avooda Wrote: You've set the custom audio device to plughw:2,3 and checked that your un muting the correct sound device within alsamixer? by pressing f6 to select the "HDA ATI HDMI" option?

Which device did you define within the .rcsound file?

Thanks for the response. I had checked each of the sound cards in alsamixer including the HDA ATI HDMI entry. It has a single S/PDIF set to 00.

I tried some different .rcsound files using samples i found in numerous threads.

One was:

Quote:pcm.!default {
type hw
card 2
device 3
}

another:

Quote:pcm.!default {
type hdmi
card 2
device 0
}

and finally {
Quote:pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:2,3"
period_time 0
period_size 1024
buffer_size 8192
#periods 128
#rate 44100
rate 48000
}
bindings {
0 0
1 1
}
}

pcm.!default {
type plug
slave.pcm "dmixer"
}

I didn't really know what I was doing with these. I just found the samples elsewhere in threads attempting to address a similar issue.

Having said all that it is now a moot point since I updated xbmc to Frodo since I no longer have the option of a "Custom" entry. I am willing to revert to Eden if there is a simple solution.
Reply
#5
I suggest you dont use any .asoundrc or /etc/asound.conf files and unmute spdif 1 in alsamixer

Code:
amixer -q set 'IEC958',1 unmute

Or try directly unmute via alsamixer.

FYI spdif 1 is HDMI.

uNi
Reply
#6
Thanks uNi. I do not have an spdif 1 in alsamixer. I have spdif and spdif d.

If I run the command you posted I get:

amixer: Unable to find simple control 'IEC958',1

Reply
#7
Well then unmute all the spdifs in alsamixer and wack volume up just to be safe.

Usually spdif 1 is HDMI but your card being ATI who knows (probably someone with ATI) i.e. not me.

A screenshot of the alsamixer would be nice to see all the devices, you can take a screenshot of alsamixer when its displayed in putty or whatever you use to ssh.

uNi
Reply
#8
Thanks uNi. As in my original post I'd love to post a screenshot but for some reason printscreen doesn't seem to be working in Mint.

There doesn't seem to be any IEC958 in amixer.

amixer contents:

Quote:numid=4,iface=MIXER,name='Master Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=3,iface=MIXER,name='Master Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1
: values=62587,62587
numid=2,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=1,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw------,values=1,min=0,max=65536,step=1
: values=46397

I found the answer for screenshots, will post very shortly
Reply
#9
Well the screenshots are being taken but the terminal window in blank, ffs.

I can copy and past it into a text file and it looks like a screenshot!

So here is a best effort of the two cards achieved by copy and paste into a text file. Of course its too wide to post in full here.

This is an "excerpt" for the first card (I have remove things like Front Left/Right etc).

Code:
Card: HDA ATI SB                          
│ Chip: Realtek ALC892                    
│ View: F3:[Playback] F4: Capture  F5: All
│ Item: Master [dB gain: -1.00]            
│                                          



┌──┐     ┌──┐   Disabled    │
│OO│     │OO│               │
└──┘     └──┘               │
                             │
S/PDIF  S/PDIF D Auto-Mut    │

and the HDMI card...

Code:
Card: HDA ATI HDMI  
│ Chip: ATI RS690/780 HDMI
│ View: F3: Playback  F4: Capture  F5:[All]
│ Item: S/PDIF                              
│                                                                                                                                    │
│    ┌──┐
│    │OO│
│    └──┘
│ < S/PDIF >

Sorry if they are hard to follow. If you have a better way for me to provide it I will do so willingly.
Reply
#10
In alsamixer make sure your volumes are up and unmuted.

From the top in XBMC

Audio output - HDMI
Speaker configureation 2.0
Boost volume level on downmix OFF

- Dolby Digital (AC3) capable receiver OFF
- DTS capable receiver OFF
- AAC capable receiver OFF
- MultiChannel LPCM capable receiver OFF
-TrueHD capable receiver OFF
- DTS-HD capable receiver OFF

Audio output device HDA ATI, HDMI
Passthrough output device HDA ATI, HDMI

later you can see about http://wiki.xbmc.org/index.php?title=Aud...x_in_Linux when you get any sounds.

uNi
Reply
#11
Do you mean I should turn up the volumes of the SPDIF items? There doesn't seem to be volume for them as there is for the other items. Perhaps that is the issue?

BTW I just worked out SPDIF D is actually SPDIF Default PCM.
Reply
#12
I mean MASTER and PCM should have volumes up. no spdif doesnt have volumes so no, its more likely your settings in xbmc need to be what I posted, not excluding that pulseaudio is also interfering with xbmc, in this case you need to configure the output devices in mint via the desktop audio mixer.

uNi

Reply
#13
Ok thanks. MASTER and PCM are both 100. I have the audio settings as you described but still no sounds. I have tried changing audio output and passthrough too but no good.


**EDIT Scrap that last comment! Audio output and passthrough now have HDA ATI, HDMI, selected them for both and sound works Smile Yeeeeha!

Thanks for your help uNi.
Reply
#14
YEY Big Grin

Ok mark this thread as Solved so other can use this as reference.

I would ask you to + me but you need 10 posts minimum to be able to.

uNi
Reply
#15
(2012-12-17, 15:55)uNiversal Wrote: YEY Big Grin

Ok mark this thread as Solved so other can use this as reference.

I would ask you to + me but you need 10 posts minimum to be able to.

uNi

Hang on, I might just get there yet (10 posts)... after a reboot the HDA ATI, HDMI entry is missing and I'm back to no sound, ARRGHH!
Right, more info and now I think the end is in sight.

The HTPC is set to boot straight into XBMC. When it does the HDA ATI, HDMI is not in the list of audio output devices. As a result it defaults to PulseAudio and I get no sound.

If I exit XBMC (return to the Mint desktop) then start XBMC manually HDA ATI, HDMI appears as an option.
Reply

Logout Mark Read Team Forum Stats Members Help
No HDMI audio in XBMC0