[mythtv-users] SPDIF and Stereo Analog at same time anyone?

Steve Hodge stevehodge at gmail.com
Tue Feb 10 08:29:18 UTC 2009

On Tue, Feb 10, 2009 at 8:57 PM, Allen Edwards <allen.p.edwards at gmail.com>wrote:

> On Mon, Feb 9, 2009 at 9:22 AM, Allen Edwards <allen.p.edwards at gmail.com>wrote:
>> With the fury of activity lately on sound setups, I thought I would bring
>> up an old question I worked on unsuccessfully a few months ago.  Has anyone
>> figured out how to get spdif passthrough and analog 2 channel out at the
>> same time?
>> My setup has Intel HDA on an Asus M3A.  I have a projector and surround
>> system that we use together .  But most of the time I use the TV and its
>> speakers. The surround amp runs 200 watts at idol so I don't like to use it
>> to listen to Jepordy and the news.  I presently have an old Technics decoder
>> just for the TV in addition to the surround processor.  That works but I
>> want to use the processor in another room to get Pandora to play the same
>> thing in that room as what is playing in the living room.  I have a coax
>> cable that I can use to run the spdif between the rooms.
>> That brings me back to the question I spent so much time trying to figure
>> out previously.  How to set up the HDA chip to put out analog at the same
>> time it is putting out the unprocessed spdif signal.  Reading the data sheet
>> on the sound chip I am almost positive it can be done.  I have tried the
>> earphone jack, tried both AC'97 and HDA and nothing works.  If anyone has
>> solved this please let me know what you did.
>> Allen
> I have worked some more on this today and think I am stuck.  Please someone
> let me know if the following is correct.
> I can change mythtv to put sound into alsa default.  I can set up alsa to
> put the sound into the spdif type hw:0:1 and that works fine.  I can also
> set default up as a plug and slave to a section that puts the sound into
> hw:0,1 and that works.  My thought was to split the signal there and have
> one continue to go to the spdif port hw:0,1 and have the other section
> decode the spdif and send it to the analog output hw:0,1.  But, I do not
> think alsa can decode the spdif.  I think it expects a pcm signal and can
> encode to spdif.  So, to get combined analog and digital from alsa I would
> not use passthrough but send pcm to alsa which would send one signal to the
> analog port and the other encode and send to the spdif port.  But this is
> not passthrough, will not do DTS for example, and isn't what I want.  My
> thought is that it is the applications responsibility to form the pcm signal
> for the sound chip to do the DAC on.  The sound chip is not a spdif decoder,
> that is the applications responsibility.
> So, I think it cannot be done.
> Am I correct?

SPDIF is not an audio encoding scheme. The protocol that SPDIF uses is sort
of like UDP - it just transfers whatever data is provided. SPDIF was
actually intended to carry PCM data (essentially the raw data off a CD or
DAT), but it just as happily transfers DTS data which is encoded. So what
happens on the sound card is that the data provided (either PCM or DTS or
Dolby Digital data) is given to the SPDIF chip which simply slices it up
into frames, adds its header info and puts it on the wire. "Passthrough"
simply means telling the soundcard (and/or ALSA, and/or application) not to
attempt to decode DTS or DD5.1 before handing it off to the SPDIF subsystem.

So if you want Dolby 5.1 or DTS to be output via SPDIF and stereo via analog
outputs at the same time then something has to decode the Dolby 5.1/DTS
signal for the analog outputs. I'm not sure how that could be done. So it
may or may not be possible. It might depend on the soundcard.

If you just want to output stereo signals to SPDIF and analog simultaneously
then it should be possible as no decoding needs to happen anywhere. I've
never tried it so I'm not sure what you'll have to do to configure ALSA. And
it wouldn't surprise me to find that one of the signals ended up slightly

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090210/b3bde1d2/attachment.htm>

More information about the mythtv-users mailing list