[MPlayer-dev-eng] AC3-surround patch

Felix Buenemann atmosfear at users.sourceforge.net
Tue Nov 27 19:39:11 CET 2001


On Monday, 26. November 2001 19:39, you wrote:
> Hi developers,
>
> Here's my patch for adding full multichannel AC3 decoding to mplayer.
great!

[snip]
>
> I've tested with various DVDs with 3/2.1, 3/2, 2/1, 2/0 AC3 streams, and
> with the Dolby Digital trailers (wow).  Iffy-est piece of the code is the
> new LFE decoding I added, but I think thats right.
>
I get heavy distortions on the Canyon trailer for example. When I do a 
-dumpaudio and play with a52dec -o oss6 stream.dump it is fine, so stuff in 
libac3 is buggy.

Do you use a CPU with SSE support?

> For it to work you'll need an OSS soundcard driver that supports
> SNDCTL_DSP_CHANNELS with channels==6.  For example, a recent emu10k1
> driver for the SB Live.
I used 20011127 cvs snap from emu10k1, my soundcard is a SBLive! Value with 
two amplifiers connected to rear and front (was to lazy after moving to my 
room to connect the front speakers to the amplifier so I had to do quite some 
work connecting it today ;).

[snip]
> You'll need a file with an ac3 soundtrack.  Most DVDs, for example.
>
> Some configuration work will probably be necessary on the SB Live side,
> too.  To do this you will need the emu-config and emu-dspmgr programs.
> Perhaps best to get them from the emu10k1 driver CVS (via
> opensource.creative.com).  Also, in the emu10k1 source tree, read
> docs/multichannel.txt, which provides background info on how the driver's
> multichannel support works.  Importantly, if you want to hear anything you
> need to use emu-dspmgr to map the fx8 through fx13 dsp channels to
> somewhere.
>
> For instance, if you have 6 speaker output, you probably want to:
>
>   emu-config -a
>   emu-dspmgr -a"fx8:Front L"
>   emu-dspmgr -a"fx9:Front R"
>   emu-dspmgr -a"fx10:Rear L"
>   emu-dspmgr -a"fx11:Rear R"
>   emu-dspmgr -a"fx12:Analog Center"
>   emu-dspmgr -a"fx13:Analog LFE"
>
> This will map all the outputs to the right places.
Either you have both front and rear speaker swapped ot it should be:
--setup script for my sb live! value --
#!/bin/sh
emu-dspmgr -x -z
emu-dspmgr -y
emu-config -a
# Front L
emu-dspmgr -a"fx8:Front R"
# Front R
emu-dspmgr -a"fx9:Front L"
# Rear L
emu-dspmgr -a"fx10:Rear R"
# Rear R
emu-dspmgr -a"fx11:Rear L"
# Center
emu-dspmgr -a"fx12:Analog Center"
# LFE
emu-dspmgr -a"fx13:Analog LFE"
--end of script--

I tested speaker order with the ac3test.ac3 extracted from AC3TEST.vob.

>
> If you have 4 speakers only, then you probably want:
>
>   emu-config -a
>   emu-dspmgr -a"fx8:Front L"
>   emu-dspmgr -a"fx9:Front R"
>   emu-dspmgr -a"fx10:Rear L"
>   emu-dspmgr -a"fx11:Rear R"
>   emu-dspmgr -a"fx12:Front"
>   emu-dspmgr -a"fx13:Front"
this won't work, you have to use my above config, as there is no output named 
"Front", my emu-dspmgr -o shows me:
Outputs:
  Front L
  Front R
  Digital L
  Digital R
  Digital Center
  Digital LFE
  Phones L
  Phones R
  Rear L
  Rear R
  ADC Rec L
  ADC Rec R
  Mic Rec
  out6r
  out7l
  out7r
  out8l
  Analog Center
  Analog LFE
  out9r
  out10l
  out10r
  out11l
  out11r
  out12l
  out12r
  out13l
  out13r
  out14l
  out14r
  out15l
  out15r

>
> You might need "emu-dspmgr -x -z" at the start to get rid of old routes.
and emu-dspmgr -y to start the dsp again, or you'll have no luck ;)

>
> There is an emu-script provided with the emu10k1 driver that can help get
> this stuff configured for you.
what's the name?

>
> All sorts of other things are possible with the emu10k1 DSP stuff - but
> this should get things started.
>
> I'm interested in results, especially if you have an pre 5.1 SB Live, or
> some other multichannel card.  Sounds awesome for me, though now I'll have
> to buy some "proper" surround speakers and a subwoofer :-(
sounds awesome with a52dec for me, but due to libac3 bugs not yet very 
enjoyable with mplayer :) but I don't think bug is in your code, unless you 
also get the distortions on Canyon.VOB (very loud so you'll notice it).

Isit ok to apply patch to cvs?
>
> Steve

-- 
Best Regards,
	Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________



More information about the MPlayer-dev-eng mailing list