IDE-CD driver documentation 19 May 1996 scott snyder 1. Introduction --------------- The ide-cd driver should work with all ATAPI 1.2 compliant cdrom drives which attach to an IDE interface. Note that some cdrom vendors (including Mitsumi, Sony, Creative, Aztech, and Goldstar) have made both ATAPI-compliant drives and drives which use a proprietary interface. If your drive uses one of those proprietary interfaces, this driver will not work with it (but one of the other cdrom drivers probably will). This driver will not work with `ATAPI' drives which attach to the parallel port. In addition, there is at least one drive (CyCDROM CR520ie) which attaches to the IDE port but is not ATAPI; this driver will not work with drives like that either (but see the aztcd driver). This driver provides the following features: - Reading from data tracks, and mounting iso9660 filesystems. - Playing audio tracks. Most of the cdrom player programs floating around should work; i usually use Workman. - Multisession support. - On drives which support it, reading digital audio data directly from audio tracks. The program cdda2wav can be used for this. Note, however, that only a few drives actually support this function; the only ones which i've heard of successes with are Sony and Toshiba drives. - There is now rudimentary support for cdrom changers which comply with the ATAPI 2.6 draft standard (such as the NEC CDR-251). This merely adds a function to switch between the slots of the changer under control of an external program. A sample such program is appended to the end of this file. The Sanyo 3-disc changer (which does not conform to the standard) is also now supported. Please note the driver refers to the first CD as slot # 0. 2. Installation --------------- 0. The ide-cd relies on the ide disk driver. See Documentation/ide.txt for up-to-date information on the ide driver. 1. Make sure that the ide and ide-cd drivers are compiled into the kernel you're using. When configuring the kernel, say `yes' to the options Enhanced IDE/MFM/RLL disk/cdrom/tape support Include IDE/ATAPI CDROM support and `no' to Use old disk-only driver on primary interface Depending on what type of IDE interface you have, you may need to specify additional configuration options. See Documentation/ide.txt. 2. You should also ensure that the iso9660 filesystem is either compiled into the kernel or available as a loadable module. You can see if a filesystem is known to the kernel by cat'ing the file /proc/filesystems. 3. The cdrom drive should be connected to the host on an IDE interface. Each interface on a system is defined by an I/O port address and an IRQ number, the standard assignments being 0x170 and 14 for the primary interface and 0x1f0 and 15 for the secondary interface. Each interface can control up to two devices, where each device can be either a hard drive, a cdrom drive, or a tape drive. The two devices on an interface are called `master' and `slave'; this is usually selectable via a jumper on the drive. Linux names these devices as follows. The master and slave devices on the primary IDE interface are called `hda' and `hdb', respectively. The drives on the secondary interface are called `hdc' and `hdd'. (Interfaces at other locations get other letters in the third position; see Documentation/ide.txt.) If you want your cdrom drive to be found automatically by the driver, you should make sure your IDE interface uses either the primary or secondary addresses mentioned above. In addition, if the cdrom drive is the only device on the IDE interface, it should be jumpered as `master'. (If for some reason you cannot configure your system in this manner, you can probably still use the driver. You may have to pass extra configuration information to the kernel when you boot, however. See Documentation/ide.txt for more information.) 4. Boot the system. If the drive is recognized, you should see a message which looks like hdb: NEC CD-ROM DRIVE:260, ATAPI CDROM drive If you do not see this, see section 5 below. 5. You may want to create a symbolic link /dev/cdrom pointing to the actual device. You can do this with the command ln -s /dev/hdX /dev/cdrom where X should be replaced by the letter indicating where your drive is installed. 6. You should be able to see any error messages from the driver with the `dmesg' command. 3. Basic usage -------------- An iso9660 format cdrom can be mounted by putting the disc in the drive and typing (as root) mount -t iso9660 /dev/cdrom /mnt/cdrom where it is assumed that /dev/cdrom is a link pointing to the actual device (as described in step 5 of the last section) and /mnt/cdrom is an empty directory. You should now be able to see the contents of the cdrom under the /mnt/cdrom directory. If you want to eject the cdrom, you must first dismount it with a command like umount /mnt/cdrom Note that audio cds cannot be mounted. Some distributions set up /etc/fstab to always try to mount a cdrom filesystem on bootup. It is not required to mount the cdrom in this manner, though, and it may be a nuisance if you change cdroms often. You should feel free to remove the cdrom line from /etc/fstab and mount cdroms manually if that suits you better. Multisession and photocd discs should work with no special handling. The hpcdtoppm package (ftp.gwdg.de:/pub/linux/hpcdtoppm/) may be useful for reading photocds. To play an audio cd, you should first unmount and remove any data cdrom. Any of the cdrom player programs should then work (workman, workbone, cdplayer, etc.). Lacking anything else, you could use the cdtester program in Documentation/cdrom/sbpcd. On a few drives, you can read digital audio directly using a program such as cdda2wav. The only types of drive which i've heard support this are Sony and Toshiba drives. You will get errors if you try to use this function on a drive which does not support it. For supported changers, you can use the `cdload' program (appended to the end of this file) to switch between changer slots. Note that the drive should be unmounted before attempting this. The program takes two arguments: the cdrom device, and the slot number to which to change. If the slot number is -1, the drive is unloaded. 4. Compilation options ---------------------- There are a few additional options which can be set when compiling the driver. Most people should not need to mess with any of these; they are listed here simply for completeness. A compilation option can be enabled by adding a line of the form `#define