On Wed, Jun 27, 2001 at 12:00:09AM -0700, Michael Pruett wrote:
> > Hello.
> >
> > I am currently working on a project that aims to build a parallell
> > multistream MPEG-2 decoder for SGI Onyx2 (and similair) machines. We
> > have an external AC-3 decoder/effect box hooked up via the AES digital
> > interface on the Onyx2.
> > It is easy to play raw PCM samples and use the effect box to
> > manipulate the sound.
> >
> > My problem is that I want to write raw undecoded AC-3 frames directly
> > via the AES channel and have the external decoder handle them instead
> > of doing the decoding in software.
> > Is this possible using AL (audio library) or do I have to access the
> > raw device and write the correctly packed stream myself.
> >
> > Thanks, Calle
> >
> > PS I know that this might be the wrong forum for this type of
> > questions since this is the Linux dmSDK but, please, if you know
> > anything about this please reply.
>
> Calle,
> This mailing list is appropriate for discussing dmSDK for IRIX as well
> as Linux.
>
> Yes, it is possible to send an arbitrary bitstream over the AES using
> RAD (SGI's digital audio interface).
>
> If you're using the recently released dmSDK 2.0 for IRIX, you can open
> a path to the OpticalOutAES or AESOut jack on the RAD device and set
> the sample format to DM_FORMAT_AES_CHANNEL_STATUS. You will need to
> set bit 1 of byte 0 (the nonaudio bit). To transfer the actual AC-3
> data, you should open the same jack with sample format
> DM_FORMAT_AES_S24_in32R (24-bit data packed to the right in 32 bits)
> and pack your AC-3 data accordingly.
>
> You can do the same thing with the SGI Audio Library, of course,
> opening the optical interface (AL_OPTICAL_IF_TYPE) or the AES interface
> (AL_AES_IF_TYPE) of the RAD's AES Output using a sample format of
> AL_SAMPFMT_AES_CHANNEL_STATUS. And, of course, you need to pack your
> AC-3 data as the lower 24 bits of each 32-bit sample with the sample
> format of AL_SAMPFMT_TWOSCOMP and a width of AL_SAMPLE_24.
>
> The trickiest part of this approach is knowing that you need two dmSDK
> paths (or two AL ports), one for AES channel status information and the
> other for sample data.
>
> Michael
Hello.
I tried doing the open two ports thingie in AL but I can't get the
decoder to recognize the AC-3 stream. This is how I do it (simplified):
0. Set NA bit in the stream channel status word and setup output port
to 24 byte sample width with 2 complement sample format.
1. Read AC-3 stream preamble+burst from file.
2. Pack 32 bit preamble and burst into a 32 bit integer array in
16 bit chunks.
3. Send packed array to AL via alWriteFrames.
4. Do from 1 if we are not done yet.
Is it something I'm missing. I know that the channel status word is
set correctly since the decoder recognizes that I'm sending non-audio
data. But it seems I can't get it to locate the preamble (and thus
detecting the presence of AC3 audio) correctly.
Thanks for the help so far, Calle
|