2011-01-19, 01:57
Hi everyone,
I've been struggling the whole day with this problem and I just can't figure it out. I also talked to some guys on the IRC channel but no progress was made.
The problem is that I can't play movies with AC3/DTS audio, because when XBMC has to use the selected passthrough device it fails with the standard "Failed to initialize audio device" error. This is what shows up in the log:
Googling for that particular error gives no results...
My setup is as follows:
XBMC version: newest GIT build
Soundcard: M-Audio Audiophile 2492, connected to reciever with coaxial cable
Everything works out of the box with VLC, I get 6 channel audio to my reciever just fine. Same with mplayer when I try playing an AC3 file with this command:
I've tried tons of different .asoundrc's I've found by googling, but none of them has worked. Worth noting is that I can play movies with MP3 audio when the output device is set to "Default (ALSA)" (although I have to change some settings in Envy24Control to hear anything).
Here is some (possibly related) outputs:
aplay -l
aplay -L
Output from a successful playback with mplayer (command quoted above)
Please, if anyone has even the slightest idea about what could be wrong, please reply! My only other option after this would be to go buy a 5 meter Toslink cable and use the integrated audio, but that would be such a waste.
I've been struggling the whole day with this problem and I just can't figure it out. I also talked to some guys on the IRC channel but no progress was made.
The problem is that I can't play movies with AC3/DTS audio, because when XBMC has to use the selected passthrough device it fails with the standard "Failed to initialize audio device" error. This is what shows up in the log:
Quote:01:32:31 T:2761333616 M:3895308288 DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
01:32:31 T:2761333616 M:3895308288 DEBUG: RemoveActiveDevice - Removing device 0
01:32:31 T:2761333616 M:3895308288 DEBUG: Initialize - using alsa device iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
01:32:31 T:2761333616 M:3895181312 ERROR: Initialize - hw_params_get_buffer_size, alsa error: -22 - Invalid argument
01:32:31 T:2761333616 M:3895181312 DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
01:32:31 T:2761333616 M:3895181312 DEBUG: RemoveActiveDevice - Removing device 2
01:32:31 T:2761333616 M:3895181312 DEBUG: CGUIAudioManager::Initialize
01:32:31 T:2761333616 M:3892387840 ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen
01:32:31 T:2761333616 M:3892260864 DEBUG: RemoveActiveDevice - Removing device 1
01:32:31 T:2761333616 M:3892133888 DEBUG: CGUIAudioManager:eInitialize
Googling for that particular error gives no results...
My setup is as follows:
XBMC version: newest GIT build
Soundcard: M-Audio Audiophile 2492, connected to reciever with coaxial cable
Everything works out of the box with VLC, I get 6 channel audio to my reciever just fine. Same with mplayer when I try playing an AC3 file with this command:
Code:
mplayer -ao alsa:device=iec958 -ac hwac3 test.ac3
I've tried tons of different .asoundrc's I've found by googling, but none of them has worked. Worth noting is that I can play movies with MP3 audio when the output device is set to "Default (ALSA)" (although I have to change some settings in Envy24Control to hear anything).
Here is some (possibly related) outputs:
aplay -l
Quote:**** List of PLAYBACK Hardware Devices ****
card 0: M2496 [M Audio Audiophile 24/96], device 0: ICE1712 multi [ICE1712 multi]
Subdevices: 1/1
Subdevice #0: subdevice #0
aplay -L
Quote:null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=M2496
M Audio Audiophile 24/96, ICE1712 multi
Default Audio Device
front:CARD=M2496,DEV=0
M Audio Audiophile 24/96, ICE1712 multi
Front speakers
surround40:CARD=M2496,DEV=0
M Audio Audiophile 24/96, ICE1712 multi
4.0 Surround output to Front and Rear speakers
surround41:CARD=M2496,DEV=0
M Audio Audiophile 24/96, ICE1712 multi
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=M2496,DEV=0
M Audio Audiophile 24/96, ICE1712 multi
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=M2496,DEV=0
M Audio Audiophile 24/96, ICE1712 multi
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
iec958:CARD=M2496,DEV=0
M Audio Audiophile 24/96, ICE1712 multi
IEC958 (S/PDIF) Digital Audio Output
Output from a successful playback with mplayer (command quoted above)
Quote:mplayer: /usr/local/lib/libaa.so.1: no version information available (required by mplayer)
mplayer: /usr/local/lib/libaa.so.1: no version information available (required by /usr/lib/libggi.so.2)
MPlayer SVN-r31918 © 2000-2010 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not open config files /home/sam/.lircrc and /etc/lirc/lircrc
mplayer: No such file or directory
Failed to read LIRC config file ~/.lircrc.
Playing /media/Archive/farsan.ac3.
libavformat file format detected.
[ac3 @ 0xa5a9aa0] max_analyze_duration reached
[ac3 @ 0xa5a9aa0] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: audio (ac3), -aid 0
==========================================================================
Forced audio codec: hwac3
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
hwac3: switched to AC3, 448000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, ac3be, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)
==========================================================================
AO: [alsa] 48000Hz 2ch ac3be (2 bytes per sample)
Video: no video
Starting playback...
A: 1.0 (00.9) of 5637.1 ( 1:33:57.0) 0.1%
MPlayer interrupted by signal 2 in module: play_audio
A: 1.0 (00.9) of 5637.1 ( 1:33:57.0) 0.1%
Exiting... (Quit)
Please, if anyone has even the slightest idea about what could be wrong, please reply! My only other option after this would be to go buy a 5 meter Toslink cable and use the integrated audio, but that would be such a waste.