root/include/linux/aztcd.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /* $Id: aztcd.h,v 2.20 1996/03/12 18:31:30 root Exp root $
   2  *
   3  * Definitions for a AztechCD268 CD-ROM interface
   4  *      Copyright (C) 1994, 1995  Werner Zimmermann
   5  *
   6  *      based on Mitsumi CDROM driver by Martin Harriss
   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  *  History:    W.Zimmermann adaption to Aztech CD268-01A Version 1.3
  23  *              October 1994 Email: zimmerma@rz.fht-esslingen.de
  24  */
  25 
  26 
  27 /* *** change this to set the I/O port address of your CD-ROM drive*/
  28 #define AZT_BASE_ADDR           0x320
  29 
  30 /* Uncomment this, if your CDROM is connected to a Soundwave32-soundcard
  31    and configure AZT_BASE_ADDR and AZT_SW32_BASE_ADDR */
  32 /*#define AZT_SW32 1
  33 */
  34 
  35 #ifdef AZT_SW32 
  36 #define AZT_SW32_BASE_ADDR       0x220  /*I/O port base address of your soundcard*/
  37 #endif
  38 
  39 /* Set this to 1, if you want your tray to be locked, set to 0 to prevent tray 
  40    from locking */
  41 #define AZT_ALLOW_TRAY_LOCK     1
  42 
  43 /*Set this to 1 to allow auto-eject when unmounting a disk, set to 0, if you 
  44   don't want the auto-eject feature*/
  45 #define AZT_AUTO_EJECT          0
  46 
  47 /*Set this to 1, if you want to use incompatible ioctls for reading in raw and
  48   cooked mode */
  49 #define AZT_PRIVATE_IOCTLS      1
  50 
  51 /*Set this to 1, if you want multisession support by the ISO fs. Even if you set 
  52   this value to '0' you can use multisession CDs. In that case the drive's firm-
  53   ware will do the appropriate redirection automatically. The CD will then look
  54   like a single session CD (but nevertheless all data may be read). Please read 
  55   chapter '5.1 Multisession support' in README.aztcd for details. Normally it's 
  56   uncritical to leave this setting untouched */
  57 #define AZT_MULTISESSION        1
  58 
  59 /*---------------------------------------------------------------------------*/
  60 /*-----nothing to be configured for normal applications below this line------*/
  61 
  62 
  63 /* Increase this if you get lots of timeouts; if you get kernel panic, replace
  64    STEN_LOW_WAIT by STEN_LOW in the source code */
  65 #define AZT_STATUS_DELAY        400       /*for timer wait, STEN_LOW_WAIT*/
  66 #define AZT_TIMEOUT             8000000   /*for busy wait STEN_LOW, DTEN_LOW*/
  67 #define AZT_FAST_TIMEOUT        10000     /*for reading the version string*/
  68 
  69 /* number of times to retry a command before giving up */
  70 #define AZT_RETRY_ATTEMPTS      3
  71 
  72 /* port access macros */
  73 #define CMD_PORT                azt_port
  74 #define DATA_PORT               azt_port
  75 #define STATUS_PORT             azt_port+1
  76 #define MODE_PORT               azt_port+2
  77 #ifdef  AZT_SW32                
  78  #define AZT_SW32_INIT           (unsigned int) (0xFF00 & (AZT_BASE_ADDR*16))
  79  #define AZT_SW32_CONFIG_REG     AZT_SW32_BASE_ADDR+0x16  /*Soundwave32 Config. Register*/
  80  #define AZT_SW32_ID_REG         AZT_SW32_BASE_ADDR+0x04  /*Soundwave32 ID Version Register*/
  81 #endif
  82 
  83 /* status bits */
  84 #define AST_CMD_CHECK           0x80            /* 1 = command error */
  85 #define AST_DOOR_OPEN           0x40            /* 1 = door is open */
  86 #define AST_NOT_READY           0x20            /* 1 = no disk in the drive */
  87 #define AST_DSK_CHG             0x02            /* 1 = disk removed or changed */
  88 #define AST_MODE                0x01            /* 0=MODE1, 1=MODE2 */
  89 #define AST_MODE_BITS           0x1C            /* Mode Bits */
  90 #define AST_INITIAL             0x0C            /* initial, only valid ... */
  91 #define AST_BUSY                0x04            /* now playing, only valid
  92                                                    in combination with mode
  93                                                    bits */
  94 /* flag bits */
  95 #define AFL_DATA                0x02            /* data available if low */
  96 #define AFL_STATUS              0x04            /* status available if low */
  97 #define AFL_OP_OK               0x01            /* OP_OK command correct*/
  98 #define AFL_PA_OK               0x02            /* PA_OK parameter correct*/
  99 #define AFL_OP_ERR              0x05            /* error in command*/
 100 #define AFL_PA_ERR              0x06            /* error in parameters*/
 101 #define POLLED                  0x04            /* polled mode */
 102 
 103 /* commands */
 104 #define ACMD_SOFT_RESET         0x10            /* reset drive */
 105 #define ACMD_PLAY_READ          0x20            /* read data track in cooked mode */
 106 #define ACMD_PLAY_READ_RAW      0x21            /* reading in raw mode*/
 107 #define ACMD_SEEK               0x30            /* seek msf address*/
 108 #define ACMD_SEEK_TO_LEADIN     0x31            /* seek to leadin track*/
 109 #define ACMD_GET_ERROR          0x40            /* get error code */
 110 #define ACMD_GET_STATUS         0x41            /* get status */
 111 #define ACMD_GET_Q_CHANNEL      0x50            /* read info from q channel */
 112 #define ACMD_EJECT              0x60            /* eject/open tray */
 113 #define ACMD_CLOSE              0x61            /* close tray */
 114 #define ACMD_LOCK               0x71            /* lock tray closed */
 115 #define ACMD_UNLOCK             0x72            /* unlock tray */
 116 #define ACMD_PAUSE              0x80            /* pause */
 117 #define ACMD_STOP               0x81            /* stop play */
 118 #define ACMD_PLAY_AUDIO         0x90            /* play audio track */
 119 #define ACMD_SET_VOLUME         0x93            /* set audio level */
 120 #define ACMD_GET_VERSION        0xA0            /* get firmware version */
 121 #define ACMD_SET_DISK_TYPE      0xA1            /* set disk data mode */
 122 
 123 #define MAX_TRACKS              104
 124 
 125 struct msf {
 126         unsigned char   min;
 127         unsigned char   sec;
 128         unsigned char   frame;
 129 };
 130 
 131 struct azt_Play_msf {
 132         struct msf      start;
 133         struct msf      end;
 134 };
 135 
 136 struct azt_DiskInfo {
 137         unsigned char   first;
 138         unsigned char   next;
 139         unsigned char   last;
 140         struct msf      diskLength;
 141         struct msf      firstTrack;
 142         unsigned char   multi;
 143         struct msf      nextSession;
 144         struct msf      lastSession;
 145         unsigned char   xa;
 146         unsigned char   audio;
 147 };
 148 
 149 struct azt_Toc {
 150         unsigned char   ctrl_addr;
 151         unsigned char   track;
 152         unsigned char   pointIndex;
 153         struct msf      trackTime;
 154         struct msf      diskTime;
 155 };

/* [previous][next][first][last][top][bottom][index][help] */