root/include/linux/aztcd.h

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

INCLUDED FROM


   1 /* $Id: aztcd.h,v 1.30 1995/07/04 08:28:17 root Exp $
   2  * Definitions for a AztechCD268 CD-ROM interface
   3  *      Copyright (C) 1994, 1995  Werner Zimmermann
   4  *
   5  *      based on Mitsumi CDROM driver by Martin Harriss
   6  *
   7  *  This program is free software; you can redistribute it and/or modify
   8  *  it under the terms of the GNU General Public License as published by
   9  *  the Free Software Foundation; either version 2 of the License, or
  10  *  (at your option) any later version.
  11  *
  12  *  This program is distributed in the hope that it will be useful,
  13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  *  GNU General Public License for more details.
  16  *
  17  *  You should have received a copy of the GNU General Public License
  18  *  along with this program; if not, write to the Free Software
  19  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20  *
  21  *  History:    W.Zimmermann adaption to Aztech CD268-01A Version 1.3
  22  *              October 1994 Email: zimmerma@rz.fht-esslingen.de
  23  */
  24 
  25 /* *** change this to set the I/O port address of your CD-ROM drive*/
  26 #define AZT_BASE_ADDR           0x320
  27 
  28 /* Uncomment this, if your CDROM is connected to a Soundwave32-soundcard
  29    and configure AZT_BASE_ADDR and AZT_SW32_BASE_ADDR */
  30 /*#define AZT_SW32 1
  31 */
  32 
  33 #ifdef AZT_SW32 
  34 #define AZT_SW32_BASE_ADDR       0x220  /*I/O port base adress of your soundcard*/
  35 #endif
  36 
  37 /* Set this to 1, if you want your tray to be locked, set to 0 to prevent tray 
  38    from locking */
  39 #define AZT_ALLOW_TRAY_LOCK     1
  40 
  41 /*Set this to 1 to allow auto-eject when unmounting a disk, set to 0, if you 
  42   don't want the auto-eject feature*/
  43 #define AZT_AUTO_EJECT          0
  44 
  45 /*---------------------------------------------------------------------------*/
  46 /*------------nothing to be configured below this line-----------------------*/
  47 
  48 /* use incompatible ioctls for reading in raw and cooked mode */
  49 #define AZT_PRIVATE_IOCTLS
  50 
  51 /* Increase this if you get lots of timeouts; if you get kernel panic, replace
  52    STEN_LOW_WAIT by STEN_LOW in the source code */
  53 #define AZT_STATUS_DELAY        400       /*for timer wait, STEN_LOW_WAIT*/
  54 #define AZT_TIMEOUT             8000000   /*for busy wait STEN_LOW, DTEN_LOW*/
  55 #define AZT_FAST_TIMEOUT        10000     /*for reading the version string*/
  56 
  57 /* number of times to retry a command before giving up */
  58 #define AZT_RETRY_ATTEMPTS      3
  59 
  60 /* port access macros */
  61 #define CMD_PORT                azt_port
  62 #define DATA_PORT               azt_port
  63 #define STATUS_PORT             azt_port+1
  64 #define MODE_PORT               azt_port+2
  65 #ifdef  AZT_SW32                
  66  #define AZT_SW32_INIT           (unsigned int) (0xFF00 & (AZT_BASE_ADDR*16))
  67  #define AZT_SW32_CONFIG_REG     AZT_SW32_BASE_ADDR+0x16  /*Soundwave32 Config. Register*/
  68  #define AZT_SW32_ID_REG         AZT_SW32_BASE_ADDR+0x04  /*Soundwave32 ID Version Register*/
  69 #endif
  70 
  71 /* status bits */
  72 #define AST_CMD_CHECK           0x80            /* command error */
  73 #define AST_DSK_CHG             0x20            /* disk removed or changed */
  74 #define AST_NOT_READY           0x02            /* no disk in the drive */
  75 #define AST_DOOR_OPEN           0x40            /* door is open */
  76 #define AST_MODE_BITS           0x1C            /* Mode Bits */
  77 #define AST_INITIAL             0x0C            /* initial, only valid ... */
  78 #define AST_BUSY                0x04            /* now playing, only valid
  79                                                    in combination with mode
  80                                                    bits */
  81 /* flag bits */
  82 #define AFL_DATA                0x02            /* data available if low */
  83 #define AFL_STATUS              0x04            /* status available if low */
  84 #define AFL_OP_OK               0x01            /* OP_OK command correct*/
  85 #define AFL_PA_OK               0x02            /* PA_OK parameter correct*/
  86 #define AFL_OP_ERR              0x05            /* error in command*/
  87 #define AFL_PA_ERR              0x06            /* error in parameters*/
  88 #define POLLED                  0x04            /* polled mode */
  89 
  90 /* commands */
  91 #define ACMD_SOFT_RESET         0x10            /* reset drive */
  92 #define ACMD_PLAY_READ          0x20            /* read data track in cooked mode */
  93 #define ACMD_DATA_READ_RAW      0x21            /* reading in raw mode*/
  94 #define ACMD_SEEK_TO_LEADIN     0x31            /* seek to leadin track*/
  95 #define ACMD_GET_ERROR          0x40            /* get error code */
  96 #define ACMD_GET_STATUS         0x41            /* get status */
  97 #define ACMD_GET_Q_CHANNEL      0x50            /* read info from q channel */
  98 #define ACMD_EJECT              0x60            /* eject/open tray */
  99 #define ACMD_CLOSE              0x61            /* close tray */
 100 #define ACMD_LOCK               0x71            /* lock tray closed */
 101 #define ACMD_UNLOCK             0x72            /* unlock tray */
 102 #define ACMD_PAUSE              0x80            /* pause */
 103 #define ACMD_STOP               0x81            /* stop play */
 104 #define ACMD_PLAY_AUDIO         0x90            /* play audio track */
 105 #define ACMD_SET_VOLUME         0x93            /* set audio level */
 106 #define ACMD_GET_VERSION        0xA0            /* get firmware version */
 107 #define ACMD_SET_MODE           0xA1            /* set drive mode */
 108 
 109 #define MAX_TRACKS              104
 110 
 111 struct msf {
 112         unsigned char   min;
 113         unsigned char   sec;
 114         unsigned char   frame;
 115 };
 116 
 117 struct azt_Play_msf {
 118         struct msf      start;
 119         struct msf      end;
 120 };
 121 
 122 struct azt_DiskInfo {
 123         unsigned char   first;
 124         unsigned char   last;
 125         struct msf      diskLength;
 126         struct msf      firstTrack;
 127 };
 128 
 129 struct azt_Toc {
 130         unsigned char   ctrl_addr;
 131         unsigned char   track;
 132         unsigned char   pointIndex;
 133         struct msf      trackTime;
 134         struct msf      diskTime;
 135 };

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