PDA

View Full Version : ac3 passthrough



tale
October 29th, 2008, 10:29 AM
I have boxee installed on Ubuntu 8.04. It's connected to my stereo via optical out. Sound works now, but it is always PCM. I'd like to have ac3 pass through so that I can get dolby 5.1 surround.

This works when I had this configuration setup via Windows Media Center, so I believe this is a setting in Linux.

Any ideas on what I should check?

-- Trey

tale
November 2nd, 2008, 09:28 AM
I can play ac3 video via this command in mplayer on my system. This sends the undecoded stream to my receiver which handles it properly.

mplayer -ao alsa:device=plughw=0.1 -ac hwac3, pukka-tdscr-cd2.avi

What similar configuration should I use to set the device in the audio hardware setting?

tale
November 4th, 2008, 08:54 PM
I finally got ac3 passthrough working on my system. I'm just going to include all the steps I did. Some may not be necessary, but I'm listing them here since I haven't tested to see if they are necessary yet. This is for Ubuntu 8.04. I'm using a Chaintech AV-710 card. You can see what cards are available with "aplay -l".

- add these commands to /etc/rc.local


echo Setting 5.1 Channel volumes...
amixer -q set Master 100% unmute
amixer -q set PCM 40% unmute
amixer -q set Surround 100% unmute
amixer -q set Center 81% unmute
amixer -q set LFE 100% unmute
amixer -q set "Mic" 65% unmute

- uninstall all packages that have "pulse" in the title. (this may be an optional step. Need to test)
- blacklist all "oss" modules in /etc/modprobe.d/blacklist (this may be an optional step. Need to test)
I black listed:


# prevents ac3 passthrough in boxee/xbmc
blacklist snd_pcm_oss
blacklist snd_mixer_oss
blacklist snd_seq_oss

- create file /etc/asound.conf insert this text:


# M-Audio Revolution 7.1 has no 'spdif' alias in 'aplay -L'
# # I'm guessing cards that have one defined won't need this.
pcm.!spdif {
type hw
card 0
device 1
}

# Sets default playback to 'spdif'.
pcm.!default{
type plug
slave {
pcm "spdif"
rate 48000
format S32_LE # ice1724 cards can only use this format
}
}

- set audio hardware in audio hardware to digital, check ac3 and dts checkboxes.
set output device and passthrough device to "default".

- in Settings->Preferences->Sound set all combo boxes to "iec1724 iec958". I'm running gnome. I have it set to autologin.

tale
November 13th, 2008, 10:26 AM
Here is my follow up. The last post had sound working, but it didn't fix the issue. I was able to have ac3 passthrough, but it was locking up with mp4 that had mp3 audio tracks. Here is my updated asound.conf


$ cat /etc/asound.conf
pcm.dmixer {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0660
slave {
pcm "hw:0,1"
rate 48000
channels 2
format S32_LE
period_time 0
period_size 1024
buffer_time 0
buffer_size 4096
}
}

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

youri
August 17th, 2010, 04:52 AM
You rock man!! Been looking everywhere for a solution but this did the trick!!

ps: sorry for reviving a 2 year old thread but it was worth it :p