PDA

View Full Version : Sound on MP3 playback and navigation, but not videos?


muskorv
2009-04-06, 00:39
I'm having a quite strange sound issue. After following the installation guide for Hardy (http://xbmc.org/wiki/?title=HOW-TO:_Install_XBMC_for_Linux_on_Ubuntu_8.10_(Intrepi d)_step-by-step), I had no sound at all in XBMC.

Trying to follow the instructions in this post (http://xbmc.org/forum/showpost.php?p=209655&postcount=2), I created an .asoundrc file with the line "pcm.!default spdif". When I then run "speker-test -c 2" I get no error messages (the output looks normal) but my speakers remain silent. However, if I keep the .asoundrc file and start XBMC, both navigation sound and MP3 playback (with both PAPlayer aswell as DVDplayer) works. But no sound on videos. If I delete the .asoundrc file, XBMC won't play any sounds at all.

I have searched the forum for a solution, but I'm still stuck with silent videos. Can't figure out what's causing this.

This is my aplay -l and aplay -L output:
xbmc@HTPC:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC885 Analog [ALC885 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC885 Digital [ALC885 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
xbmc@HTPC:~$ aplay -L
front:CARD=SB,DEV=0
HDA ATI SB, ALC885 Analog
Front speakers
surround40:CARD=SB,DEV=0
HDA ATI SB, ALC885 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=SB,DEV=0
HDA ATI SB, ALC885 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SB,DEV=0
HDA ATI SB, ALC885 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SB,DEV=0
HDA ATI SB, ALC885 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SB,DEV=0
HDA ATI SB, ALC885 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=SB,DEV=0
HDA ATI SB, ALC885 Digital
IEC958 (S/PDIF) Digital Audio Output
null
Discard all samples (playback) or generate zero samples (capture)

My hardware setup is a Gigabyte GA-MA78GM-S2H (AMD 780G chipset) motherboard and a Gainward GeForce 8400GS graphics card. The graphics card is connected to the internal S/PDIF header on the motherboard and then outputting both audio and video through HDMI to the TV.

In XBMC I have the following settings:
Digital
Dolby Digital (AC3) Capable Receiver - unchecked
DTS Capable Receiver - unchecked
Audio output device - default
Passthough output device - iec958
Downmix multichannel audio to stereo - checked

Analog
Audio output device - default
Downmix multichannel audio to stereo - checked

Using XBMC r19182. Debug logging is enabled but the log contains no errors.

Bagger
2009-04-06, 01:32
Probaly a different fault, but when my sound dissapeared the only way I got it back was
/usr/bin/iecset audio on

muskorv
2009-04-06, 17:55
Thanks for your reply, but that command only renders an error message (snd_ctl_elem_write: Operation not permitted) on my computer. If I run the command without arguments I get the following output, so I guess audio already is set to "on".:
xbmc@HTPC:~$ iecset
Mode: consumer
Data: audio
Rate: 48000 Hz
Copyright: permitted
Emphasis: none
Category: PCM coder
Original: original
Clock: 1000 ppm


I find it quite confusing that I do get sound from MP3 files and navigation but not from video playback. It's a bit inconsistent and I really can't figure out why.

I know that the video files are okay, because they play with sound when I use XBMC on my other computers.

Aenima99x
2009-04-06, 18:01
In XBMC I have the following settings:
Digital
Dolby Digital (AC3) Capable Receiver - unchecked
DTS Capable Receiver - unchecked
Audio output device - default
Passthough output device - iec958
Downmix multichannel audio to stereo - checked

Analog
Audio output device - default
Downmix multichannel audio to stereo - checked

Try setting your "Audio Output Device" to iec958
I had some issues similar to yours a while back and it worked for me

fasteddy
2009-04-06, 18:25
Thanks for your reply, but that command only renders an error message (snd_ctl_elem_write: Operation not permitted)

did you sudo /usr/bin/iecset audio on?

Also, is alsamixer muted anywhere?

muskorv
2009-04-06, 19:00
Try setting your "Audio Output Device" to iec958
I had some issues similar to yours a while back and it worked for me Doesn't seem to matter whether I set the device to "default" or "iec958". Both settings will result in MP3 and navigation sound, but no video sound.
did you sudo /usr/bin/iecset audio on? Yes, tried that but just after I sent my last post I figured it out – XBMC was still running. After stopping it, I could run the command without any error message. Unfortunately, it didn't help in my case.
Also, is alsamixer muted anywhere? Nothing is muted in alsamixer.

topfs2
2009-04-06, 20:01
Please follow the HOW-TO post about a problem in a useful manner (http://xbmc.org/forum/showthread.php?t=34655) thread...

Debuglog is not optional...

Cheers,
Tobias

muskorv
2009-04-06, 21:00
Debuglog is not optional... My bad, sorry. Here's a debug log trying to play a x264 movie file:
http://pastebin.com/fe32d863

No sound, but the same setup works flawlessly with navigation sounds and MP3 playback.

topfs2
2009-04-06, 21:38
Please post a log when you play mp3s that would help aswell.

Also could you try to play a mp3 with DVDPlayer and see if it exhibit the same behaviour? (context menu -> play using)

Cheers,
Tobias

muskorv
2009-04-06, 21:46
Here's a debug log playing an MP3 file with PAPlayer and DVDPlayer. Both players outputs sound to the TV.

http://pastebin.com/f6c37dcbd

topfs2
2009-04-07, 15:41
The only thing I can see from the logs are that the video you play are AC3 while on music it tries PCM.

Also the AC3 stream is set to be non-passthrough, are you sure you have enabled passthrough in settings?

Are you sure your reciever supports AC3? if not then you should set XBMC to decode it into PCM (should be available in settings afaik).

Cheers,
Tobias.

muskorv
2009-04-08, 00:34
Thanks for your reply!

I have no receiver at all, the computer is connected to a Panasonic plasma television. Therefore I want XBMC to decode everything into PCM.

My XBMC Audio Hardware settings looks like this:

Audio output: Digital
- Dolby Digital (AC3) capable receiver - unchecked
- DTS Capable Receiver - unchecked
Audio output device - default
Passthrough output device - default
Downmix multichannel audio to stereo - checked



As far as I understand, these settings should be correct for my needs. Or are there another option somewhere to make XBMC decode AC3/DTS to 2 channel PCM? Changing device names from default to iec958 won't change anything.

muskorv
2009-04-08, 15:56
Did some more testing (see below). From this, I conclude that the passthrough output device setting shouldn't matter in my case, as I don't have an AC3/DTS capable receiver. As long as AC3 and DTS are unchecked, only the device selected by "Audio output device" will be used by XBMC. I feel like I have tried every setting available in XBMC without success, but I can't understand why the audio is partially working. Is the issue ALSA related or does XBMC for some reason refuse to properly decode AC3/DTS and (through the S/PDIF) output it as stereo to my TV?

This is what I did to jump to my conclusions above; If I leave everything as in my previous message in this thread, and make the AC3 and DTS capable reveiver radio buttons checked I get neither sound nor any error message:

Audio output: Digital
- Dolby Digital (AC3) capable receiver - checked
- DTS Capable Receiver - checked
Audio output device - default
Passthrough output device - iec958
Downmix multichannel audio to stereo - checked

Same goes if I uncheck the AC3/DTS radio buttons and change passthrough output device to something obviously invalid (like below).

Audio output: Digital
- Dolby Digital (AC3) capable receiver - unchecked
- DTS Capable Receiver - unchecked
Audio output device - default
Passthrough output device - balbalbabr
Downmix multichannel audio to stereo - checked

However, if i then check AC3/DTS radio buttons again, the GUI will present an errore message saying "Failed to initialize audio device, please check your audio settings".

Audio output: Digital
- Dolby Digital (AC3) capable receiver - checked
- DTS Capable Receiver - checked
Audio output device - default
Passthrough output device - balbalbabr
Downmix multichannel audio to stereo - checked

topfs2
2009-04-08, 16:11
I'd say try removing (backup might be better :) ) the .asoundrc and then reset XBMC audio hardware to analog and default.

That is if you have just one card.

If it's over spdif you might want to set it to plughw;0,1
Best is to try it using aplay
ie
aplay -Dplughw;0,1 sample.wav

If you get it to work in aplay and if it doesn't work in XBMC we have a better understanding of why.
And if your afraid of analog on spdif I have audio over HDMI and I have it as analog. afaik analog only enforces it to be PCM, which your TV only seems to support.

EDIT: on a sidenote following that guide is not recomended, recomended is to install XBMC ontop of a std ubuntu desktop. it's dead easy and more likely to work. Also more easily debuggable :)

Cheers,
Tobias

muskorv
2009-04-08, 17:41
Thanks for your reply.

Removed .asoundrc and set XBMC to analog and default. No sound at all after that. After changing "Audio output device" from default to plughw;0,1 I also received the error message "Failed to initialize audio device, please check your audio settings" when I tried to play a movie. The aplay command won't output anything either.

I started out with a standard Ubuntu Desktop install, but I couldn't get the nVidia drivers to work properly so I followed the guide instead. But since I've been stuck for so long with my audio problem, I guess it might be worth trying again.

topfs2
2009-04-08, 18:33
Damn, sorry.
plughw:0,1

muskorv
2009-04-12, 20:19
Thanks for your reply.

Couldn't get it to work, but today I installed a standard Intrepid Desktop and everything worked almost instantly. All I had to do was to activate the iec958 switch in the sound mixer.