Next Previous Contents

2. Preparing your Linux system for DVD playback

This section will show you exactly what has to be done to your system in order to get your Creative DXR2/Encore 5X up and running on your Linux system. At the time of this writing, I am using Red Hat Linux 5.2, 6.0 and 6.1 and have gotten the DVD working on the 6.1 machine so far. As for 6.0 and the 5.2 machines, the procedure would be no different.

If you have any information regarding other distributions of linux (S.U.S.E., Slackware, Debian), please email me the info. I will be trying different distributions as time permits.

2.1 Set up the Linux kernel

For any problems encountered compiling the kernel I suggest giving the Kernel-HOWTO a read, it is at http://www.redhat.com/mirrors/LDP/HOWTO/Kernel-HOWTO.html. I have included all of this information simply for convenience of not having to move from document to document.

Unfortunatly most linux distributions do not come with support built in for the Creative Encore 5X, so you will have to make some modifications to your linux kernel and recompile it. Sound scary? No need to worry, the complete process of applying the patches and recompiling the kernel will be detailed here in full. So if you have not ever compiled a kernel before, you will be able to by the time you are done reading this.

A note About Distribution Kernels:

I was having an enourmous amount of difficulty getting the patches to apply to my kernel. Every time I compiled it would crash out at either the UDF filesystem area or the BLOCK DEVICES section. I looked for help, so I emailed Jens Axobe (maintainer of the cdrom/dvd ioctl patches), about the problems. Jens brought it to my attention that the Red Hat distribution kernel had extra tid-bits of code that do not quite agree with the IOCTL and UDF kernel patches, and that a fresh kernel should be used and not the proprietary kernel. After trying this all went smoothly.

Red Hat, Mandrake and others:

With Red Hat linux and Mandrake comes a ready made kernel that is defined by the selections you make during set-up. If you compile and install a fresh kernel without backing up the old, you may find that you lose several default features. You should look over your current configuration BEFORE proceeding with any of this, so you can enable the default settings that match your current kernel.

The latest stable kernel at the time of this writing is 2.2.14, the latest development kernel is 2.2.38.

The 2.2.14 kernel requires both the IOCTL patch and the UDF filesystem patch.
The 2.3.38 kernel is reported to have the experimental code built into the kernel, and can be used as is, no patching. It should be noted that the 2.3.x series of linux kernel is still in development and is not yet deemed stable. Use at your own risk.

1. Get the kernel

Go to http://www.kernel.org and download the latest kernel.

Unpack the kernel source

# cd /usr/src

# tar xvzf linux-2.2.xx.tar.gz

This will create the kernel source tree /usr/src/linux


2. Get the CD-ROM/DVD IOCTL patch

Go to www.kernel.dk (Jens Axobes' site) Download the IOCTL patch that matches your kernel.

It will be a file named dvd-cd-2.2.xx.diff.bz2.

tip: You are better off going with kernel 2.2.14, Jens has both patches right at this site, it makes things that much easier. :) The UDF patch from his site is called udf-2.2.14-2.diff.bz2.


Unpack the patches

The BZIP2 compression program will be needed to unpack these patches.

# cd /directory/where/you/saved/patch/files

# bzip2 -d dvd-cd-2.2.xx.diff.bz

This will decompress the file to dvd-cd-2.2.xx.diff.


Apply the patch to the kernel source

# cd /usr/src/linux

# patch -p1 < /location/of/patch/dvd-cd-2.2.xx.diff

The output of this will show several lines that say "patching file..." If you messages like HUNK #1 FAILED, then the patch was unsuccessful. See Troubleshooting

If no error messages are shown then proceed to the next step; getting and applying the UDF patch.


3. Get the UDF filesystem patch

Go to http://www.csc.calpoly.edu/~bfennema/udf.html or http://trylinux.com/projects/udf/index.html to get the UDF filesystem patch. ( if you haven't already gotten it from Jens' site mentioned above)

Unpack the UDF patch

# cd /location/of/patch/file

# bzip2 -d udf-2.2.xx.diff.bz2

NOTE: xx is the kernel version. Also not all patches are bzip2 compressed, some are TGZ, some are tar.gz. Use the right compression tool to decompress the files you download. ('tar xvzf {filename}' will handle tgz and tar.gz, 'gunzip {filename}' will decompress .gz files)

Apply the patch

# cd /usr/src/linux

# patch -p1 < /location/of/patch/udf-2.2.xx.diff

Again you will get several lines of 'Patching file...'. If any errors appear the patch was unseuccessful. Again see Trouble Shooting. If no errors show up, you are ready to compile the modified kernel.

Compiling the Kernel

This is where you configure the new kernel, compile it and install it. After the compile is complete, the computer is rebooted and the kernel is put to the test. :) Also, you must be 'root' to compile and configure the kernel.

# cd /usr/src/linux

# make config

This is the longest way of configuring the kernel. It is text based, and makes you answer Yes, No, or Module to every question. If you prefer to use an xwindows configuration system try

# cd /usr/src/linux

# make xconfig

This will open the kernel for configuring in a window. Making it easy to do a 'point and click' configuration of the kernel.

Some configs to keep an eye out for:


Once you have the kernel set up so that you are happy with it and the above filesystems are enabled. You have to build the kernel dependencies. Type the following in the /usr/src/linux directory:


# make dep

This can take a while (depending on the speed of your computer). When it is finished you will get a regular command prompt. (ie: 'root #')

Now that the kernel dependencies are built, you have to make the actual kernal image file. This can be either a zImage, zdisk or bzImage. For the sake of example I will use the one that works for me, the bzImage. In the /usr/src/dir (still as root) type:

# make bzImage

Again when it is done, it will return you to the prompt, also it will report the size of your kernel image file and the size of the system.


Installing the kernel

You will want to create a new directory for the new kernel image to live in.

# cd /

# mkdir newboot

You can call 'newboot' anything you want. I am just using that as an example. The next thing you need to do is copy the kernel image to the new boot directory.


# cp /usr/src/linux/arch/i386/boot/bzImage /newboot

Then rename the System.map file in the current boot directory to System.map_old.

# cd /boot

# mv System.map System.map_old

Copy the System.map file from the kernel source tree to the /boot folder.

# cd /usr/src/linux

# cp System.map /boot

By doing this your computer will not complain about the wrong kernel version being loaded up. NOTE: we did make a back-up of the old one so that if something goes wrong. you still have that one.

Lilo

You can configure lilo (linux loader) either by editing /etc/lilo.conf or by using the program linuxconf. For ease of explanation, I am going to explain the lilo.conf method. Your lilo.conf file might Look like this:

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux

image=/boot/vmlinuz-2.2.12-20
	label=linux
	initrd=/boot/initrd-2.2.12-20.img
	read-only
	root=/dev/hda5

other=/dev/hda2
	label=windows


Add the following to it (bold text):


boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux2

image=/newboot/bzImage
	label=linux2
	read-only
	root=/dev/hda5

image=/boot/vmlinuz-2.2.12-20
	label=linux
	initrd=/boot/initrd-2.2.12-20.img
	read-only
	root=/dev/hda5

other=/dev/hda2
	label=windows

Don't forget to change the 'default=linux' to 'linux2' (or what-ever you label your second kernel)

Now run:


# /sbin/lilo

you will get output like this:


added linux2*
added linux
added windows

The '*' means that is the default boot kernel (the new one). Now reboot your computer, and take a break. The rest is easy from this point on. :) (really!)

After you have added the new kernel to lilo, it is time to see if it boots! Reboot your computer, and at the lilo: prompt just hit enter (the new kernel is now the default).

If all went well and the new kernel boots, now all that is left is to move the loadable modules over to the new kernel. This is done like so:


 as root

  # cd /usr/src/linux

  # make modules

 then

  # make modules_install

Reboot the computer 1 more time and you are ready for the software installs!


2.2 Setting up the Dxr2 Software and Drivers

Stop right there! If you have come to this section and have NOT completed the above kernel modifications, the install WILL fail. If you have patched and recompiled the kernel, you are in the right place. :)

Getting The Software

First, obtain a copy of the latest dxr2 driver snapshot from opensource.creative.com. It will be found in the 'latest snapshots' section. It will be a file called 'dxr2-2000xxxx.tar.gz'.

Unpack the Software


# cd /dir/where/dxr2-2000xxxx.tar.gz/is

# tar xvzf dxr2-2000xxxx.tar.gz

Make the dxr2 device file

as root (su - root)

# mknod /dev/dxr2 c 120 0

Compile the source


as root

# cd /directory/dxr2-2000xxx/de-compressed/to

(usually /tmp/dxr2 or $HOME/dxr2 [$HOME= your home directory])

type:

# make

This will compile the software. If you encounter any errors proceed to the trouble-shooting section of this HOWTO.

Insert the Dxr2 module


still as root (in the dxr2 directory):

# make insert


NOTE: The make insert command is the one that can cause some problems.  If you are set 
      up as the superuser (su) then it may not work.  You have to 'su' to fully qualified
      root for this to work correctly. (su - root).

      Also if the directory /lib/modules/2.2.14/misc does not exist, you may have to create it yourself.



This will load the Dxr2 module into the kernel. Only a couple of steps left and we are wathing movies!


The dxr2player.conf and dvd1.ux files.

The dvd1.ux firmware file

This is the firmware driver file for the Dxr2 card. It is obtained from opensource.creative.com in the binary downloads section.

Download this file and read on, it's use will be outlined in the dxrplayer.conf file description below.

dxr2player.conf

This is the main configuration file for the dvdplay program. You have to copy it to the /etc folder after decmporessing the dxr2-2000xxxx.tar.gz package.


as root

# cp dxr2player.conf /etc


I think to really explain this file I should display its entire contents (don't worry, it isn't like sendmail.cf :) Then explain the various parts and controls. The changes made in here can make or break the player.

The dxr2player.conf File

--------------------------------------------------

# Configuration information for the DVD player

# Devices

drive: /dev/hdc
dxr2:  /dev/dxr2
firmware: /usr/src/dvd1.ux
mountpoint: /dvd

# Other Defaults

# Audio Format: AC3 / MPEG
audio_format: AC3

# Audio Frequency: 44.1 / 48 / 96 / 2205 / 32
audio_freq: 48

# Audio bitstream width: 16 / 20 / 24
audio_width: 16

# NTSC / NTSC60 / PAL_M / PAL_M_60 / PAL_BDGHI / PAL_N / PAL_Nc / PAL_60
tv_format: NTSC

# 30 / 25
video_freq: 30

# letterbox / normal / pan_scan
video_format: letterbox

# subpicture: ON / OFF
subpicture: OFF

# VGA Overlay Info

# Default overlay status:  ON / OFF
overlay: ON

# Overlay geometry... standard X format:  x++
overlay_geom: 640x480+0+0
#overlay_geom: 300x450+100+100

# Overlay cropping:  xxx
overlay_crop: 0x0x55x355

------------------------------------------------------------
         

There, that is it. As you can see there is not very much at all to the file and after all is said and done, it really explains itself. The only real areas that need attention are the top four: drive, dxr2, firmware, and mountpoint settings. If these are misconfigured, the player will not work.

Edit the dxr2player.conf file and change "drive: " to your DVD rom drive. (ie- /dev/hdb), "dxr: " to the dxr2 device (/dev/dxr2), "firmware: " to the location of the dvd1.ux file (ie- /dxr2/dvd1.ux), and "mountpoint: " to where the dvd is mounted (ie- /mnt/dvd).


2.3 GATOS: General ATI TV and Overlay Software


I would have to say that one of the easiest parts of this whole mess was to get the ATI - All in Wonder card working, thanks to the GATOS (General ATI TV and Overlay Software) project. At the time of this writing the default dvd player with the DXR2 driver has been disabled due to a complication in the coding. So the only video ouput is through the TV out connection on the back of the DXR2 card. (At the time I was trying to get it to work I was thinking I was doing something wrong!)

Getting GATOS

Go to http://www.core.binghamton.edu/~insomnia/gatos/ and download the latest version. At the time of this writing it is version 0.0.5. You will also have to download and compile ibtk-0.0.14.tar.gz as well, GATOS needs this.

Once you have downloaded the two files you need to unpack them and compile them. Both of these are a typical software installation:

IBTK

# cd /location/of/ibtk-0.0.14.tar.gz

# tar xvzf ibtk-0.0.14.tar.gz

# cd ibtk-0.0.14

# ./configure

# make

as root

# make install


GATOS

# cd /location/of/gatos-0.0.5.tar.gz

# tar xvzf gatos-0.0.5.tar.gz

# cd gatos-0.0.5

# ./configure

# make

as root

# make install


Now all you have to do is run 'xatitv' at the command line to start the software. Set it up for your region, scan channels, and you are watching TV.    Now you can move on to the next section for how to setup GATOS for DVD playback, and the wiring needed. (Section 3.2 : Using GATOS with the DXR2/Encore 5x)

2.4 Software Available for VOB (DVD) Playback

gdxr2-0.2a - This is an alpha GTK frontend for dvdplay. You can get the latest version of gdxr2 from gdxr2.havoknet.com

The players below are sofware based players and require that you have a fast machine to be able to play DVD's. If for some reason you cannot get the Dxr2 to work for you, these are here as optional resources. I have not tried these players (slow computer), but I am sure they will do the trick.

nist-0.6 Nist 0.6 can be downloded from http://linuxdvd.webjump.com.

The complete LiViD DVD munitions package - This is another software player, included in the tarball is everything you need to set up DVD on your linux machine. You can get it at http://www.opendvd.org/.


Next Previous Contents
Hosted by www.Geocities.ws

1