Mythbuntu 9.10 + PulseAudio + IEC958 (S/PDIF)
Setting up PulseAudio on Mythtbuntu 9.10 is really quite easy.
sudo apt-get install pulseaudio
All of the GUI tools should be installed along with it, but if they aren’t, pop this into your console:
sudo apt-get install pavumeter paman padevchooser paprefs
padevchooser is being deprecated, but it will be supported at least until Mythbuntu 11.04. The first thing you’ll want to do is launch padevchooser which will put an icon in your tray. From here, you can control all aspects of PulseAudio.
- Left-click the icon and select ‘Preferences’; click the checkbox next to ‘Start applet on session login’ and close the dialogue.
- Next, left-click the icon and select ‘Configure local sound server’; click the ‘Network Server’ tab and check the boxes next to ‘Enable network access to local sound devices’ and then ‘Don’t require authentication’. This allows applications to stream audio data direct to PulseAudio instead of through PulseAudio’s implementation of the ALSA API. This is necessary for all applications that support talking directly to PulseAudio.
Next, you’ll want to open the Volume Control from the tray icon menu and select your output device on the Configuration tab. PulseAudio should have enumerated all of the available combinations on your system, so choose the option you want. If you’re using optical output to your A/V receiver or television, choose digital, SPDIF or IEC958.
Setting up mpd for use with PulseAudio is straightforward. Open your /etc/mpd.conf file and comment out all the configuration related to alsa, then scroll down a bit and you should see a commented-out section related to PulseAudio. Make your config look like the below, and restart mpd.
# An example of an ALSA output:
#
#audio_output {
# type "alsa"
# name "My ALSA Device"
# device "hw:0,1" # optional
# format "44100:16:2" # optional
# mixer_device "default" # optional
# mixer_control "PCM" # optional
# mixer_index "0" # optional
#}
audio_output {
type "pulse"
name "My Pulse Output"
# server "remote_server" # optional
# sink "remote_server_sink" # optional
}
Next, you’ll need to setup MythTV. This is pretty straightforward, all I did was go through the General settings to the audio options menu and set the following options:
Update! MythTV trunk supports PulseAudio, so all you need to do is select ‘PulseAudio:default’ as the audio output device.
- Output:ALSA:plughw:0,1 (0,1 being the card id, device id key, obtainable through the command ‘aplay -l’; you may have something different in your setup but you can freely edit this text field for the correct device)
- Passthrough output device: Default
- Max audio channels: Stereo
- Upmix: passive
- Enable AC3 to SPDIF passthrough: no (force AC3 decoding by MythTV if your receiver can’t do it)
- Enable DTS to SPDIF passthrough: yes (pass Dolby/DTS to your receiver, for DVDs)
And that’s it! All done. You should now have mpd and MythTV routable through PulseAudio which allows you to make use of the excellent projectM audio visualisation suite (basically an implementation of Milkdrop in OpenGL for Linux). Excellent for parties!
A note: This does actually output PCM 44.1Khz correctly. I was previously routing my audio through HDMI cable to the television, then from the television to the receiver. The TV was outputing a 48Khz signal; direct from the computer via optical, it’s a sweet 44.1Khz. Nice!
I’m surprised it wasn’t set up already. It should have been.
“It” being PulseAudio.
Mythbuntu doesn’t have PulseAudio installed by default. There are two camps in this as with everything else FLOSS. Some people hate PA, some people love it. Anyway, MythTV now supports PulseAudio (in the latest trunk anyway), so everything’s jiving nicely now.
I’m not as successful as you with this same issue. I get audio out via spdif but it’s only stereo. AC3 is not present in LiveTV (via HDHomerun) , or videos played via myth internal player or mplayer. Have seen other posts saying that PA doesn’t support AC3 or DTS passthru. I’ve haven’t been able to get AC3 since Mythbuntu 8.04 Others claim that removing PA and going back to ALSA works but not a good option now with 9.10 having a dependency with the desktop. Any ideas on workarounds? I only use spdif output and have tried all combinations of the audio setting in Myth so far.
Yeah, unfortunately PulseAudio doesn’t support AC3 or DTS passthrough, you’re right there. I only play music and watch TV through my system so stereo/PCM is good enough for me. I do wish that it properly supported AC3/DTS though, as it is severely lacking in this department versus Windows-based solutions which are capable of Dolby TrueHD and DTS HD Master Audio output!
I am hidayah.i am doing mythtv project partner.we already installed mythtbuntu 0.22 in our current system as well as the avermedia volar ax tuner card.we are having problem with mythbackend.it cannot run on our system.
*with my partner..
As is typical with a lot of these things, it seems as though the original reason I set out to use PulseAudio was based on false knowledge. Essentially: ALSA was able, and has been able, to do everything that I wanted, since … well, since before I setup this HTPC anyway. So I have done away with PulseAudio because it does not support DTS passthrough. I now have MythTV working properly. I am a very happy man. And it only took me … what, a few months!