Ok. Here a few of my experiences thus far. It seems that the passthrough option of pulseaudio has not yet been implemented (mythtv, xine). XMBC has an implementation though (see links).
sudo apt-get install pulseaudio
sudo apt-get install pulseaudio-module-zeroconf
I ran Pulseaudio systemwide:
------------- /etc/default/pulseaudio:
PULSEAUDIO_SYSTEM_START=1
DISALLOW_MODULE_LOADING=0
I was not able to activate passthrough with pulseaudio without adding a profile. You can check which profile file is getting loaded by running
udevadm info --query=all --path /sys/class/sound/card0
In /usr/share/pulseaudio/alsa-mixer/profile-sets/extra-hdmi.conf I added:
[Mapping iec958-stereo2]
device-strings = iec958:%f,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x02
channel-map = left,right
priority = 5
direction = output
(For info on the AES0 values see
http://www.mythtv.org/wiki/Configuring_Digital_Sound#How_do_I_get_5.1_AC3_audio_to_work_again.3F )
To be able to run everything I gave some pulse rights:
sudo gpasswd -a root pulse-access
sudo gpasswd -a mythtv pulse-access
in /etc/pulse/system.pa:
set-card-profile 1 output:iec958-stereo2
set-sink-formats 1 "pcm; ac3-iec61937; dts-iec61937"
where the number is the index of your card (pactl list cards). And "output:iec958-stereo2" the profile that you want activated at boot. (the formats will show in the list for the sink when running pactl list)
To prevent noice (not happening on every skip) in mythtv when skipping play/pause:
In audio settings go to 'Advanced Audio Settings' on the audio Config Page. Here activate 'Override SRC audio quality Sample rate conversion' and select 'Disabled'
What also worked to prevent the noice was adding to /etc/pulse/default.pa:
default-sample-rate = 48000
There is also an option in the 'Advanced Audio Settings' to force 48k on the device
To be able to use the audiocard over the network I added to /etc/pulse/system.pa:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24 auth-anonymous=1
load-module module-zeroconf-publish
then I was able to select the audio card on my client (after enabling it in PulseAudio Preferences [papref]. Under the Network Access tab select "Make discoverable PulseAudio network sound devices available locally").
When I was playing with analog 5.1 I noticed that alsamixer had the soundcard set to 2ch instead of 6ch (analog 5.1).
To make sure Linuxmce did not take control of everything I set the audio settings on the MD to manual (M) and in the dropdownbox. I also removed the /etc/asound.conf.
When passthrough is implemented in the programs it has a lot of potential.
Some reference links:
http://wiki.linuxmce.org/index.php/Audio_in_1004http://wiki.linuxmce.org/index.php/Changing_Xine_Player_Audio_Settingshttp://wiki.linuxmce.org/index.php/Audio_over_HDMIhttp://wiki.xbmc.org/index.php?title=PulseAudiohttp://www.mythtv.org/wiki/Configuring_Digital_Sound#How_do_I_get_5.1_AC3_audio_to_work_again.3Fhttps://help.ubuntu.com/community/DigitalAC-3Pulseaudio