[mythtv-users] AC3 passthrough setup problems

James Fidell james at fidell.co.uk
Fri Nov 9 14:35:42 UTC 2007

Jonathan Rogers wrote:
> On Nov 8, 2007 8:37 PM, Bob <mythtv at cox.net> wrote:
>> James Fidell wrote:
>>> I have everything working fine with normal stereo sound, so I thought
>>> I'd finally get around to trying to get AC3 passthrough working on my
>>> main front-end.
>>> I'm following the guidelines in the wiki at
>>>   http://mythtv.org/wiki/index.php/DigitalSoundHowTo
>> http://mythtv.org/wiki/index.php/Configuring_Digital_Sound_with_AC3_and_SPDIF
>>> but when testing with mplayer (using an ISO rip of a DVD) mplayer
>>> spews a52 CRC errors, plays choppy sound and can't display the video
>>> properly either.
>>> I've tried changing the mythtv config as suggested and playing the same
>>> iso back with the internal player but get no sound at all.  In "normal"
>>> stereo mode, playback is fine on both video and audio.
>>> I think first I need to confirm that I can play back properly through
>>> the SPDIF connector outside mythtv.  Is there another easy way to do
>>> that?
>> Try speaker-test:
>> http://alsa.opensrc.org/index.php/Speaker-test
>> There are a lot of options, more than the web page indicates.  I was
>> never able to get speaker test to make pink noise through 6 speakers,
>> but I do have surround sound working.
> Unfortunately, speaker-test doesn't have anything to do with S/PDIF or
> IEC958 passthrough. It can produce test sounds for two channels through a
> digital output just like for analog stereo output, but James Fidell said he
> already had regular stereo (I assume PCM) working.

Normal non-digital stereo playback works fine.  Running speaker-test:

  speaker-test -Dplug:spdif -c6

*says* it's testing all the speakers, but my AV amp tells me it's only
getting input for left and right.  Those two do work, however.  Playback
using mplayer (outside mythtv) gives me six-channel audio according to
the AV amp, but it's very choppy (and mplayer doesn't play back the
video properly, which I guess might be related to the poor quality of
the audio).

> I found that configuring passthrough was much simpler than the Wiki
> describes. I believe all I had to do was to add "-afm hwac3" for mplayer and
> select "ALSA:iec958:{ AES0 0x02 }" in the "Passthrough output device:"
> listbox in the MythTV configuration. I have no idea what "{ AES0 0x02 }"
> means, but it seems to be correct for AC3 passthrough.

I've not done anything with mplayer as I'm using the internal player for
my DVD rips, but I've changed the passthrough device as above and
enabled passthrough for DTS and AC3.

It appears that when I try to play an ISO image, the open of /dev/dsp
fails with an "invalid argument" error.  I assume therefore that I must
have something misconfigured in the sound subsystem, but I can't work
out what.  As suggested in the second of the above web pages, I have an
/etc/asound.conf as follows:

  pcm.!default {
  type plug
  slave {
  pcm "spdif"
  rate 48000
  format S16_LE

and have added "options snd-pcm-oss dsp_map=1" to modprobe.conf.  I've
also unmuted the IEC958 device in asound.state.  Those are all the
changes I've made.


More information about the mythtv-users mailing list