Kodi Community Forum

Full Version: [LINUX] cannot initialize audio for DTS/AC3 passthrough
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm brand new to xbmc. I'm trying to get DTS and AC3 passthrough to work
through and optical cable. The cable connects to the S/PDIF header on my
motherboard and to a home-theater receiver. Passthrough works on mplayer
using the options

-ao also -afm hwac3

so I know the hardware is capable of doing the job. However, I tried a number of combinations of settings with XBMC, and either I get straight 2-channel PCM audio with no DTS or Dolby Digital (AC3), or else I get no sound at all and an
error message about xbmc not being able to initialize audio.

The debug log, at http://pastebin.com/BzpJGznG, suggests that the device
is busy. I think pulseaudio may be running, and perhaps xbmc cannot grab
the device for that reason? Not sure.

I am running a stock Ubuntu Maverick with the xbmc PPA added.

Any suggestions?
Close XBMC and please post output of:

Code:
lsof | grep snd

That command will tell you what program is using your audio.

Jerry
Jerry,

Thanks kindly for your help. (Slow reply because this is a weekend project.)
It looks like the pulseaudio daemon has /dev/snd/controlC0 open:

Code:
$ sudo lsof | grep snd
gnome-set 1456         tv  mem       REG        8,3   403948  269419554 /usr/lib/libsndfile.so.1.0.21
pulseaudi 1583         tv  mem       REG        8,3   403948  269419554 /usr/lib/libsndfile.so.1.0.21
pulseaudi 1583         tv   27u      CHR     116,10      0t0       8846 /dev/snd/controlC0
gconf-hel 1713         tv  mem       REG        8,3   403948  269419554 /usr/lib/libsndfile.so.1.0.21
tv@tvdog:~$ ps ax | grep 158[3]
1583 ?        S<l    0:00 /usr/bin/pulseaudio --start --log-target=syslog

A search turns up a blog entry from January 2009 suggesting that problems with XBMC and pulseaudio should be in the past.
But maybe I need to do something?