Dominique Dumont wrote:
Clemens Ladisch <[EMAIL PROTECTED]> writes:


Does it work if you play a stereo PCM stream to hw:0,2?

Yes.

A DTS stream also works (although my amplifier recognizes it as a DTS
stream from a CD audio, not from a DVD).

That's strange, there should be no difference between DTS and AC3 as far as the sound card is concerned.


Yes. Moreover, the DTS stream is detected as coming from a CD (albeit
at 48Khz, go figure).

That makes me wonder how a yamaha amplifier (DSP A1) is able to
detect whether a DTS stream is coming from a CD or a DVD.

It is the SPDIF non-audio bit.


I guess that some flag is present is the DTS from DVD stream that is
missing (unset) in the DTS from CD stream.


I (also) guess that this flag is mandatory for AC3 stream that can
only come from DVD (well, that's the point of view of my amplifier).

I guess (again) that the stream from my nforce board does not set this
mysterious flag. So only PCM and DTS (seen as coming from a CD) is
working. AC3 without this flag is rejected by my amplifier (this would
explain why I sometimes hear a very short scratchy (may be a short
lived white noise) when I start to play the AC3 stream from ac3dec.

That's a lot of guesswork.... I'll try to find some data regarding DTS
in SPDIF encapsulation.


AFAIR, the DTS on CD is a hack and a CD player is tricked into
believing that DTS is regular audio. The DVD forum did not accept this
hack and required a specific flag that was later introduced in DVD
player. That's why early DVD player are not DTS compatible.
FUD, You can have DTS and AC3 on CDs. Any CD player can play it.
As the CD player will not set the SPDIF non-audio bit, the receiver will assume that the signal is CD stereo sound in PCM format. Once the receiver sees an AC3 or DTS spdif header in the PCM stream, it will switch modes. So, generally receivers that see do not see the "non-audio" bit will assume it is coming from a CD. You computer's sound card and modern DVDs players should set the correct "non-audio" bit in the spdif header. Trying to play AC3 streams with ac3dec and not specifying the correct device name will most probably result in no sound.


As a general rule, for PCM stereo sound, do not set the spdif "non-audio" bit. For AC3 or DTS, set the "non-audio" bit, because AC3 and DTS are not PCM, but instead just data passed over a simple 16bits per channel stereo PCM digital signal.

The alsa device name to use for "non-audio" is "iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2"
Full command line: -
ac3dec -C -Diec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2 filename.ac3



HTH




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to