DTS passthrough works for the first movie, then fails to initialize
#1
All videos with non-passthrough audio work every time, for every file I have tried. I can play as many movies with mp3 sound as I like. However, only the first movie that has AC3 or DTS will play with audio. After I exit one of these movies, any further AC3 or DTS movies (or even the same one again) will have XBMC report that it "failed to initialize the audio device." I can continue to play mp3 movies after this normally. I can also play another movie normally by restarting XBMC.

I set up digital 5.1 surround over SPDIF using this guide:
https://help.ubuntu.com/community/DigitalAC-3Pulseaudio and my .asoundrc and other files match what the guide has. I'm on Ubuntu 11.04, and running the stable XBMC release. I have my XBMC audio settings set to:

Audio Output: Optical/coax
Speaker Configuration: 5.1
Audio Output Device: defaults
Passthrough Output Device: HDA ATI SB iec958

What can I do to not have to restart XBMC between movies?
Reply
#2
Here is the relevant part of the error log:

Quote:10:12:43 T:139860298381056 M:2925236224 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
10:12:43 T:139860298381056 M:2925236224 ERROR: Initialize - config_copy, alsa error: -17 - File exists
10:12:43 T:139860298381056 M:2925236224 ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen

I am not sure why that shows as a two channel audio; it is my 5.1 test file.
Reply
#3
Was there a solution to this?

I seem to have the same problem only my just started to not work.
Reply
#4
Very very strange... this is a problem for centuries...
Eternal problem audio passthrough in xbmc layed on linux.
This thread started 3 months ago and no answer, anyway, no more philosophy!


Same problem here
Ubuntu 10.04
Xbmc Dharma

If I set my audio hardware output to analog in ubuntu sound preferences...
Image
and play firstly a 5.1 DTS (from XBMC) passed through iec958...
Image

I have sound corectly decoded by receiver. Secondly if I play another 5.1 DTS file I have again sound corectly decoded by receiver.

The tricky part came now, If I play now an 5.1 AC3 file, my receiver see this as a 2.0 (stereo). And from now on, every type of audio (DTS, AC3, AAC, MP3, 2.0 5.1 6.1 7.1 maybe others) I try to play, results in the lack of sound.

Is this a Linux or XBMC issue?
and also
Is there any way to resolve that problem?
Reply
#5
@pricinosus
1. When you change between test files, are you stopping the previous playback (x) then giving it a second and starting the next? I have found in my testing that direct change to non-audio (DTS/AC3 passthrough) from audio (e.g. PCM decoded audio) doesn't work and then all passthrough audo fails.

2. I would suggest changing the Ubuntu pulse audo settings to a Profile of Off/Disabled and just use the iec985 ALSAs in XBMC..it might work better.

3. The way I use to recover from this situation is to use alsamixer to mute/unmute the SPDIF or the Master output. Here is a script I use to recover on my setup.

Code:
#!/bin/bash
amixer sset Master mute
sleep 1
amixer sset Master unmute
sleep 0.50/0.75 also works for me. It seems that the short time of null stream to the receiver allows it to recover and then I can play passthrough again.

I can reproduce my issue at any time by following this process
1. Start playing a movie with mp3 audio
2. Hit Tab for the movie selections to show up
3. Select a movie with passthrough (AC3/DTS) audio
Expected Result: New file and audio plays fine.
Actual Result: Passthrough audio is broken until I run the master mute fix.
Reply
#6
Reply to myself. I just followed the directions here and it seems to have fixed my issue. Reproduction steps do not reproduce the failure.

I still run with pulse-audio off during my XBMC Session...below please find my current XBMC loader script
Code:
#!/bin/bash
echo -e "    NOTE: You should run this as a background script.\n";
xbmc=/usr/lib/xbmc/xbmc.bin;
PID_xbmc=$(pidof -s $xbmc);
if [ -n "$PID_xbmc" ]; then
# Note that XBMC is already running
  echo -e "    XBMC is running as $PID_xbmc \n";
else
# Turn Off Pulse Audio for stability
  pacmd set-card-profile 0 off;
# Clean up Alsa in case the IEC958 is stuck
  amixer sset Master mute;
  sleep .75;
  amixer sset Master unmute;
  #DISPLAY=:0.1 references xorg display for TV output
echo -e "    Starting XBMC\n";  
  DISPLAY=:0.1 xbmc;
  pacmd set-card-profile 0 output:iec958-stereo;
fi
Reply
#7
Another great thread everyone should refer to for passthrough issues.
http://forums.boxee.tv/showthread.php?t=8985
Reply

Logout Mark Read Team Forum Stats Members Help
DTS passthrough works for the first movie, then fails to initialize0