[linux-audio-dev] Re: [alsa-devel] Woohoo, Dolby Digital 5.1!

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Re: [alsa-devel] Woohoo, Dolby Digital 5.1!
From: German Gomez (german_AT_pinon.ccu.uniovi.es)
Date: Fri Mar 24 2000 - 10:08:18 EET


Andy Lo A Foe wrote:
>
> Yes!
>
> I'm now listening to the AC-3 5.1 soundtrack from "The Matrix" DVD through
> ALSA!! I finally figured out the correct padding and framing. Turns out
> each AC-3 frame encodes exactly 1536 audio samples. So to get the correct
> rate you simply calc how many AC-3 frames you need in order to satisfy the
> sample rate. So let's take 48KHz (since the Trident NX only support 32 and
> 48KHz on the S/PDIF).
>
> 48000 samples/sec / 1536 samples/frame = 31.25 frames/sec
>
> The S/PDIF is going at a rate of 192000 bytes/sec (48KHz 16 bit stereo),
> so we need to fit 31.25 frames inside this bandwith. That means we have to
> start a new frame every (192000 / 31.25 = ) 6144 bytes and voila, there's
> the padding value. So now take an nullified array 6144 bytes long,
> construct the syncframe + AC3 data burst inside this array and send it off
> to the soundcard -> 5.1 channel sound :)
>
> The playback program has almost everything hard coded for a 384Kbit
> stream. As soon as I've cleaned it up I'll put it up for download
> somewhere (probably sometime this weekend)...

        Any possibility to run this on the SBLive? I have a Platinum with
LiveDrive II,
and I cannot get any output from the LiveDrive but the headphone output.
I would like
to use both the optical and normal S/PDIF outputs on it, but neither the
CVS emu10k1 from
creative nor the ALSA driver support it (or at least I could not figure
how to make it work)

        - german
 

<>-------------------------------------+-----------------------------------<>
   One O.S. to rule them all, | German Gomez Garcia
      One O.S. to find them. | german_AT_pinon.ccu.uniovi.es
   One O.S. to bring them all |
      and in the darkness bind them. | "Wur Qanar Wur Stilor Wur Kas"
<>-------------------------------------+-----------------------------------<>


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Mar 24 2000 - 10:31:47 EET