Friday, July 29, 2005

Access Granted

Direct Memory Access (DMA) allows hard drives and CD/DVD drives to access system memory. It can help to eliminate skipping during CD and DVD playback. Today I'll demonstrate how to enable DMA on a Samsung SM-348B drive. These instructions should be applicable to most other CD/DVD drives. Please make sure your drive is capable of DMA before following these steps. I'm assuming that hdc is your CD-ROM here. If you're not sure, check /etc/fstab.

First we should find out if DMA is already enabled for the drive.

sudo hdparm /dev/hdc

If it says that using_dma is on, then DMA has already been enabled for the drive and you don't need to continue. Otherwise we can enable it now.

sudo hdparm -d1 /dev/hdc

That's the number one, not an L. Of course, we also want the system to enable DMA at startup. We'll have to edit hdparm.conf for this. Let's back it up first.

sudo cp /etc/hdparm.conf /etc/hdparm.conf.bak
sudo gedit /etc/hdparm.conf


Now we must add the following lines to the end of the file.

/dev/hdc {
dma = on
}


Save the file and we should be good to go. If you run the first command after rebooting, you can see if it worked. Now your CD or DVD drive will have access to system memory and be able to read and write at its fastest.

No comments: