[mythtv-users] Making Pulse play nice with IEC958/SPDIF (Coax or Optical) connections

Doug Vaughan r.d.vaughan at rogers.com
Sun Feb 19 00:48:24 UTC 2012


   Hopefully the information below will help others that experience
problems with Pulse audio and their IEC958/SPDIF connected audio equipment.
There may be other ways to resolve the issues I experienced but I never
found them. I am in no way blaming MythTV as the issues sighted below happen
independent of MythTV.

Plug-in tested with: Ubuntu 11.04 and MythTV pre-0.25 (fully up-to-date)

Summary:
1) Support for AC3 5.1 and DTS 5.1 surround despite using Pulse audio
2) Resolved issue with Pulse locking out the IEC958/SPDIF connection to
a digital receiver
3) Pulse now releases the IEC958 connection much quicker eliminating
occurrences of audio lockouts which could only be rectified by a reboot

Issues BEFORE using the AC3 Pulse plug-in:
1) I often had to reboot when Pulse would not release the IEC958 connection.
Even this command would not always correct the issue:
 > sudo -v && pulseaudio -k && af
2) Pulse would take a several seconds to release the IEC958 connection after
video playback stopped. If another audio source started a lock up would
often occur blocking any audio from playing.
3) Frequently a MythTV commercial skipping/fast forward caused
intense white noise to come from the surround audio system. I am not sure
if this has been full eliminated but it definitely occurs less often.
4) No combination of MythTV audio settings seemed to eliminate audio
lockouts.
5) HDPVR AC3 5.1 recordings would only playback in stereo due to my
chose to use the MythTV "Pulse (default)" audio setting. This was the
only setting that reduced the number of audio lockouts.

Plug-in Good points:
1) AC3 5.1 sources playback without issue from any player
(MythTV, mplayer, ...)
2) DTS 5.1 sources playback without issue but I suspect the source channels
are converted to AC3 5.1 before being sent to the IEC958 connection
3) The plug-in did not introduce any video/audio sync issues
4) Stereo audio sources played without issue
5) This plug-in may work for other Linux distros that use Pulse audio

Plug-in Bad points:
1) All stereo audio sources are up-converted to AC3 5.1 this can be altered
for specific applications see comments below. Although the effect is not
unpleasant most audiophiles would find this unacceptable.
2) The plug-in needs to be compiled from source. The steps in the How-To
below were very straight forward. Keep in mind that I already compile
MythTV so your mileage may vary.

How-To steps:
1) A source link, compile and installation instructions can be found here.
These instructions include Ubuntu 11.10+ and earlier versions. See
"2ch Output For Music" section to force stereo output for audacious and
mplayer.
https://help.ubuntu.com/community/DigitalAC-3Pulseaudio

2) Using the Pulse "Sound Preferences" application, select the "Hardware"
tab and click "Test Speakers" then click "Test" under each of your 5.1
speakers to verify your surround system is working with the plug-in.

3) In the MythTV's frontend "Setup->Audio->Audio System"
a) For "Audio Output Device" select "PulseAudio:default".
b) For "Speaker Configuration" select "5.1"
Note: For me the "Test" option for the 5.1 channels did not work until
       I rebooted. The channels were all mixed up when tested without a
       reboot.
Note: I am not sure which versions of MythTV supports the
       "Speaker Configuration" selection "5.1" setting.


That's it! I just found this plug-in and had no part in its development.

If this plug-in is deemed useful by MythTV users I will add a wiki page.

Further IEC958 and Pulse information including pulseaudio server
with a 5.1 set up:
http://blog.kanojo.de/2011/09/18/pulseaudio-for-analogspdif-hell-simple-yet-you-gotta-find-it/

Doug


More information about the mythtv-users mailing list