patch-1.3.37 linux/Documentation/cdrom/cdu31a

Next file: linux/Documentation/networking/arcnet.txt
Previous file: linux/Documentation/cdrom/aztcd
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.36/linux/Documentation/cdrom/cdu31a linux/Documentation/cdrom/cdu31a
@@ -1,117 +1,57 @@
-   Tips for using cdu31a.c, the driver for Sony CDU-31A and CDU-33A CDROM
-   drives.
-  
-   Corey Minyard (minyard@wf-rch.cirr.com)
+
+		CDU31A/CDU33A Driver Info
+		-------------------------
+
+Information on the Sony CDU31A/CDU33A CDROM driver for the Linux
+kernel.
+
+   Corey Minyard (minyard@metronet.com)
   
    Colossians 3:17
-  
-   The Sony interface device driver handles Sony interface CDROM
-   drives and provides a complete block-level interface as well as an
-   ioctl() interface compatible with the Sun (as specified in
-   include/linux/cdrom.h).  With this interface, CDROMs can be
-   accessed and standard audio CDs can be played back normally.
-  
-   WARNING - 	All autoprobes have been removed from the driver.
-  		You MUST configure the CDU31A via a LILO config
-  		at boot time or in lilo.conf.  I have the
-  		following in my lilo.conf:
-  
-                  append="cdu31a=0x1f88,0,PAS"
-  
-  		The first number is the I/O base address of the
-  		card.  The second is the interrupt (0 means none).
-  		The third should be "PAS" if on a Pro-Audio
-  		spectrum, or nothing if on something else.
-  
-   This interface is (unfortunately) a polled interface.  This is
-   because most Sony interfaces are set up with DMA and interrupts
-   disables.  Some (like mine) do not even have the capability to
-   handle interrupts or DMA.  For this reason you will see a lot of
-   the following:
-  
-     retry_count = jiffies+ SONY_JIFFIES_TIMEOUT;
-     while ((retry_count > jiffies) && (! <some condition to wait for))
-     {
-        while (handle_sony_cd_attention())
-           ;
-  
-        sony_sleep();
-     }
-     if (the condition not met)
-     {
-        return an error;
-     }
-  
-   This ugly hack waits for something to happen, sleeping a little
-   between every try.  it also handles attentions, which are
-   asynchronous events from the drive informing the driver that a disk
-   has been inserted, removed, etc.
-  
-   NEWS FLASH - The driver now supports interrupts but they are
-   turned off by default.  Use of interrupts is highly encouraged, it
-   cuts CPU usage down to a reasonable level.  I had DMA in for a while
-   but PC DMA is just too slow.  Better to just insb() it.
-  
-   One thing about these drives: They talk in MSF (Minute Second Frame) format.
-   There are 75 frames a second, 60 seconds a minute, and up to 75 minutes on a
-   disk.  The funny thing is that these are sent to the drive in BCD, but the
-   interface wants to see them in decimal.  A lot of conversion goes on.
-  
-   DRIVER SPECIAL FEATURES
-   -----------------------
-  
-   This section describes features beyond the normal audio and CD-ROM
-   functions of the drive.
-  
-   2048 byte buffer mode
-  
-   If a disk is mounted with -o block=2048, data is copied straight
-   from the drive data port to the buffer.  Otherwise, the readahead
-   buffer must be involved to hold the other 1K of data when a 1K
-   block operation is done.  Note that with 2048 byte blocks you
-   cannot execute files from the CD.
-  
-   XA compatibility
-  
-   The driver should support XA disks for both the CDU31A and CDU33A.
-   It does this transparently, the using program doesn't need to set it.
-  
-   Multi-Session
-  
-   A multi-session disk looks just like a normal disk to the user.
-   Just mount one normally, and all the data should be there.
-   A special thanks to Koen for help with this!
-   
-   Raw sector I/O
-  
-   Using the CDROMREADAUDIO it is possible to read raw audio and data
-   tracks.  Both operations return 2352 bytes per sector.  On the data
-   tracks, the first 12 bytes is not returned by the drive and the value
-   of that data is indeterminate.
-  
-  
-    Copyright (C) 1993  Corey Minyard
-  
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-  
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-  
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-  
-  /
 
-/*
+Crude Table of Contents
+-----------------------
+
+  Setting Up the Hardware
+  Configuring the Kernel
+  Configuring as a Module
+  Driver Special Features
+
   
-   Setting up the Sony CDU31A/CDU33A drive interface card.  If
-   You have another card, you are on your own.
+This device driver handles Sony CDU31A/CDU33A CDROM drives and
+provides a complete block-level interface as well as an ioctl()
+interface as specified in include/linux/cdrom.h).  With this
+interface, CDROMs can be accessed, standard audio CDs can be played
+back normally, and CD audio information can be read off the drive.
+
+Note that this will only work for CDU31A/CDU33A drives.  Some vendors
+market their drives as CDU31A compatible.  They lie.  Their drives are
+really CDU31A hardware interface compatible (they can plug into the
+same card).  They are not software compatible.
+
+Setting Up the Hardware
+-----------------------
+
+The CDU31A driver in unable to safely tell if an interface card is
+present that it can use because the interface card does not announce
+its presence in any way besides placing 4 I/O locations in memory.  It
+used to just probe memory and attempt commands, but Linus wisely asked
+me to remove that because it could really screw up other hardware in
+the system.
+
+Because of this, you must tell the kernel where the drive interface
+is, what interrupts are used, and possibly if you are on a PAS-16
+soundcard.
+
+If you have the Sony CDU31A/CDU33A drive interface card, the following
+diagram will help you set it up.  If You have another card, you are on
+your own.  You need to make sure that the I/O address and interrupt is
+not used by another card in the system.  You will need to know the I/O
+address and interrupt you have set.  Note that use of interrupts is
+highly recommended, if possible, it really cuts down on CPU used.
+Unfortunately, most soundcards do not support interrupts for their
+CDROM interfaces.  By default, the Sony interface card comes with
+interrupts disabled.
    
         +----------+-----------------+----------------------+
         |  JP1     |  34 Pin Conn    |                      |
@@ -158,3 +98,99 @@
    
                   The documentation states to set this for interrupt
                   4, but I think that is a mistake.
+
+Note that if you have another interface card, you will need to look at
+the documentation to find the I/O base address.  This is specified to
+the SLCD.SYS driver for DOS with the /B: parameter, so you can look at
+you DOS driver setup to find the address, if necessary.
+
+Configuring the Kernel
+----------------------
+
+You must tell the kernel where the drive is at boot time.  This can be
+done at the Linux boot prompt, by using LILO, or by using Bootlin.
+Note that this is no substitute for HOWTOs and LILO documentation, if
+you are confused please read those for info on bootline configuration
+and LILO.
+
+At the linux boot prompt, press the ALT key and add the following line
+after the boot name (you can let the kernel boot, it will tell you the
+default boot name while booting):
+
+	cdu31a=<base address>,<interrupt>[,PAS]
+
+The base address needs to have "0x" in front of it, since it is in
+hex.  For instanc, to configure a drive at address 320 on interrupt 5,
+use the following:
+
+	cdu31a=0x320,5
+
+I use the following boot line:
+
+	cdu31a=0x1f88,0,PAS
+
+because I have a PAS-16 which does not support interrupt for the
+CDU31A interface.
+
+Adding this as an append line at the beginning of the /etc/lilo.conf
+file will set it for lilo configurations.  I have the following as the
+first line in my lilo.conf file:
+
+	append="cdu31a=0x1f88,0"
+
+I'm not sure how to set up Bootlin (I have never used it), if someone
+would like to fill in this section please do.
+
+
+Configuring as a Module
+-----------------------
+
+The driver supports loading as a module.  However, you must specify
+the boot address and interrupt on the boot line to insmod.  You can't
+use modprobe to load it, since modprobe doesn't support setting
+variables.
+
+Anyway, I use the following line to load my driver as a module
+
+  /sbin/insmod /lib/modules/`uname -r`/misc/cdu31a.o cdu31a_port=0x1f88
+
+You can set the following variables in the driver:
+
+  cdu31a_port=<I/O address> - sets the base I/O.  If hex, put 0x in
+			      front of it.  This must be specified.
+
+  cdu31a_irq=<interrupt> - Sets the interrupt number.  Leaving this
+			   off will turn interrupts off.
+
+
+Driver Special Features
+-----------------------
+
+This section describes features beyond the normal audio and CD-ROM
+functions of the drive.
+
+2048 byte buffer mode
+
+If a disk is mounted with -o block=2048, data is copied straight from
+the drive data port to the buffer.  Otherwise, the readahead buffer
+must be involved to hold the other 1K of data when a 1K block
+operation is done.  Note that with 2048 byte blocks you cannot execute
+files from the CD.
+
+XA compatibility
+
+The driver should support XA disks for both the CDU31A and CDU33A.  It
+does this transparently, the using program doesn't need to set it.
+
+Multi-Session
+
+A multi-session disk looks just like a normal disk to the user.  Just
+mount one normally, and all the data should be there.  A special
+thanks to Koen for help with this!
+
+Raw sector I/O
+
+Using the CDROMREADAUDIO it is possible to read raw audio and data
+tracks.  Both operations return 2352 bytes per sector.  On the data
+tracks, the first 12 bytes is not returned by the drive and the value
+of that data is indeterminate.

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this