[mythtv-users] ALSA experts: Please help me configure SPDIF

Michael T. Dean mtdean at thirdcontact.com
Tue Jun 19 04:59:34 UTC 2007


On 06/19/2007 12:28 AM, JDP DATA wrote:
> Thanks for all the suggestions guys, but sadly still no AC3 sound out
> from my receiver.
>
> - I've unmuted  IEC958 ( IEC958 Playback Switch value to true)
> - Set 'IEC958 Playback AC97-SPSA' to 0

= read IEC958 data from sound chip's PCM input, not from the chip's
dedicated S/PDIF (IEC958) input

> - I don't have IEC958 alias in aplay -L.  Is this causing my
> problems?  How do I config the alias?

It's built in to the default ALSA configuration for all sound chips with
an IEC958 input.  However, it's not necessarily listed with aplay -L.

>   I know optical out is working because I can see the red laser beam
> from tos-link port.  And my receiver output sound but only analog
> (Dolby PRO LOGIC).

You mean digital PCM, right?

> - I've set Audio output and passthrough device to 'ALSA:hw:0,4'

= outputting to the chip's dedicated IEC958 input, which you've told the
sound card not to use.  (Note, however, that telling your sound card not
to use the chip's IEC958 input is probably the right thing to do many
(most?) sound cards available today do not connect any circuitry to the
chip's IEC958 input, preferring to save the traces and "reuse" the PCM
input circuitry.)

So, set the output to the same setting you would use for analog output. 
I.e. with no ALSA config file, use ALSA:default.  Note, however, that
without additional configuration, some types of sound won't work.  I.e.
/all/ audio written to the chip's PCM input must be 48kHz.  Myth doesn't
do this, so you'll need to configure the sound system to do it for you
(through, perhaps, a proper ALSA configuration).  Using the wiki's ALSA
config file, you would just specify the same card/device for
pcm.analog-hw and pcm.digital-hw.

Note, though, that getting AC-3/DTS passthrough requires some additional
plumbing in the ALSA config.  One of these days, I might write up some
info (just wondering if it's worthwhile since everyone says, "You don't
need an ALSA configuration file").

To prove that the additional plumbing would work even with passthrough,
you could issue the command:
iecset professional off audio off rate 48000 copyright off original on

To get back to having the ability to output digital PCM, use:
iecset audio on
(or just reboot)

Mike


More information about the mythtv-users mailing list