~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/drivers/cdrom/mcd.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Definitions for a Mitsumi CD-ROM interface
  3  *
  4  *      Copyright (C) 1992  Martin Harriss
  5  *
  6  *      martin@bdsi.com
  7  *
  8  *  This program is free software; you can redistribute it and/or modify
  9  *  it under the terms of the GNU General Public License as published by
 10  *  the Free Software Foundation; either version 2 of the License, or
 11  *  (at your option) any later version.
 12  *
 13  *  This program is distributed in the hope that it will be useful,
 14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 16  *  GNU General Public License for more details.
 17  *
 18  *  You should have received a copy of the GNU General Public License
 19  *  along with this program; if not, write to the Free Software
 20  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 21  *
 22  */
 23 
 24 /* Increase this if you get lots of timeouts */
 25 #define MCD_STATUS_DELAY        1000
 26 
 27 /* number of times to retry a command before giving up */
 28 #define MCD_RETRY_ATTEMPTS      10
 29 
 30 /* port access macro */
 31 #define MCDPORT(x)              (mcd_port + (x))
 32 
 33 /* How many sectors to read at 1x when an error at 2x speed occurs. */
 34 /* You can change this to anything from 2 to 32767, but 30 seems to */
 35 /* work best for me.  I have found that when the drive has problems */
 36 /* reading one sector, it will have troubles reading the next few.  */
 37 #define SINGLE_HOLD_SECTORS 30  
 38 
 39 #define MCMD_2X_READ 0xC1       /* Double Speed Read DON'T TOUCH! */
 40 
 41 /* status bits */
 42 
 43 #define MST_CMD_CHECK           0x01            /* command error */
 44 #define MST_BUSY                0x02            /* now playing */
 45 #define MST_READ_ERR            0x04            /* read error */
 46 #define MST_DSK_TYPE            0x08
 47 #define MST_SERVO_CHECK         0x10
 48 #define MST_DSK_CHG             0x20            /* disk removed or changed */
 49 #define MST_READY               0x40            /* disk in the drive */
 50 #define MST_DOOR_OPEN           0x80            /* door is open */
 51 
 52 /* flag bits */
 53 
 54 #define MFL_DATA                0x02            /* data available */
 55 #define MFL_STATUS              0x04            /* status available */
 56 
 57 /* commands */
 58 
 59 #define MCMD_GET_DISK_INFO      0x10            /* read info from disk */
 60 #define MCMD_GET_Q_CHANNEL      0x20            /* read info from q channel */
 61 #define MCMD_GET_STATUS         0x40
 62 #define MCMD_SET_MODE           0x50
 63 #define MCMD_SOFT_RESET         0x60
 64 #define MCMD_STOP               0x70            /* stop play */
 65 #define MCMD_CONFIG_DRIVE       0x90
 66 #define MCMD_SET_VOLUME         0xAE            /* set audio level */
 67 #define MCMD_PLAY_READ          0xC0            /* play or read data */
 68 #define MCMD_GET_VERSION        0xDC
 69 #define MCMD_EJECT              0xF6            /* eject (FX drive) */
 70 
 71 /* borrowed from hd.c */
 72 
 73 #define READ_DATA(port, buf, nr) \
 74 insb(port, buf, nr)
 75 
 76 #define SET_TIMER(func, jifs)                           \
 77         do {                                            \
 78                 mcd_timer.function = func;              \
 79                 mod_timer(&mcd_timer, jiffies + jifs);  \
 80         } while (0)
 81 
 82 #define CLEAR_TIMER             del_timer_async(&mcd_timer);
 83 
 84 #define MAX_TRACKS              104
 85 
 86 struct msf {
 87         unsigned char   min;
 88         unsigned char   sec;
 89         unsigned char   frame;
 90 };
 91 
 92 struct mcd_Play_msf {
 93         struct msf      start;
 94         struct msf      end;
 95 };
 96 
 97 struct mcd_DiskInfo {
 98         unsigned char   first;
 99         unsigned char   last;
100         struct msf      diskLength;
101         struct msf      firstTrack;
102 };
103 
104 struct mcd_Toc {
105         unsigned char   ctrl_addr;
106         unsigned char   track;
107         unsigned char   pointIndex;
108         struct msf      trackTime;
109         struct msf      diskTime;
110 };
111 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.