
This is a device driver for a Creative Labs CT7160 mpeg decoder card.
The driver supports mpeg1 system streams (if they don't use D frames)
and mpeg2 program streams.  If you have an un-encrypted vob file, those
just happen to be similar enough to mpeg2 program streams to work,
but no audio.  It does not support elementary streams of any kind.

To use, just cat an mpeg stream to /dev/lux0.
Reading from /dev/lux0 will do completely unpredicatable things. (don't
do that)
Mmaping /dev/lux0 will allow you to access the ls220 registers and
the onboard RAM.  Look at testreg (described below) if you're interested
in this.

There is a serious bug, it will either have an annoying whine in the audio
if you use the non-I2S firmware, or it will always use an audio sample
rate of 48KHz, no matter what the mpeg file really is if you do use the
I2S firmware.  There is a #if in lux_firmware.c.  The current setting of
the #if will result in the incorrect sample rate.

It will not play PAL mpeg files correctly, nor generate PAL format video.
Thats on the todo list...

This was developed under Free-BSD 4.4.  It is extremely pre-release, and
the code needs some serious cleanup.  I am putting it up because its
time for beta testers, and perhaps someone can tell me what clue I am
missing with the audio sample rate.

I'm not sure what to do about the Copyright.  While I (Tommy Johnson) have
created these files, they are mostly a cut-and-paste from the MS Windows
driver.  I have put quite a bit of work into attempting to understand
the hardware and fill in all the missing blanks in the documentations, 
so I would like my name to be attached.  However I don't think I did
enough to call it an original work.  

The firmware found in lux_firmware.c is unquestionably Copyright Luxsonor.

How to install/compile this driver:

Copy * to /usr/src/sys/dev/lux

Copy LUX and files.LUX to /usr/src/sys/i386/conf

config LUX
cd ../../compile/LUX
make depend 
make

mknod /dev/lux0 c 20 0

I didn't actually try this procedure however, its just been living in my
source tree.

There are a couple of test programs in testreg/.

The first one is named bigcat, and its just like cat, only it writes 64K at
a time, instead of cat's 1K at a time.  This was just to eliminate variables
when I was attempting to correct a bug in the buffer code.

The second one is named testreg.  It allows one to read and write the 
registers on the ls220 as it runs.  

When testreg starts up, it will stuff a test pattern into the frame-buffer.
It will then spit out the first 16 registers and wait for a command.  

The commands:

r300	- read register 300 (hex).  The r is optional.  The address will
	  be remembered as the current address.
e	- exit
s1234	- set register at the current address to 0x1234.
=1234	- same as s.
|1234	- Bitwise or of the current register with 0x1234.
&1234	- Bitwise and of the current register with 0x1234.
z1234	- Zero the set bits.   current register&=~(0x1234)
p	- display all the PTS registers.

Note that the addresses are always byte addresses, as per the convention
in the ls220 data-sheet, and the example device driver.  The displayed data
is 32 bit words, the least significant 2 bits of the address are being
silently zeroed.

Good luck!  Let me know if you have problems, so I can at least correct
this file.  Email me at protius@bobdbob.com.

$Id: README.TXT,v 1.2 2002/03/30 05:19:24 protius Exp $
