root/include/linux/sbpcd.h

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

INCLUDED FROM


   1 /*
   2  * sbpcd.h   Specify interface address and interface type here.
   3  */
   4 
   5 /*
   6  * Attention! This file contains user-serviceable parts!
   7  * I recommend to make use of it...
   8  *
   9  * The definitions for the first controller can get overridden by
  10  * the kernel command line ("lilo boot option").
  11  * Examples:
  12  *                                 sbpcd=0x230,SoundBlaster
  13  *                             or
  14  *                                 sbpcd=0x300,LaserMate
  15  *                             or
  16  *                                 sbpcd=0x330,SPEA
  17  *
  18  * If sbpcd gets used as a module, you can load it with
  19  *     insmod /usr/src/linux/modules/sbpcd.o sbpcd=0x230,1
  20  * or
  21  *     insmod /usr/src/linux/modules/sbpcd.o sbpcd=0x300,0
  22  * or
  23  *     insmod /usr/src/linux/modules/sbpcd.o sbpcd=0x330,2
  24  * respective to override the configured address and type.
  25  */
  26 
  27 /*
  28  * define your CDROM port base address as CDROM_PORT
  29  * and specify the type of your interface card as SBPRO.
  30  *
  31  * Read linux/drivers/block/README.sbpcd if you are in doubt about the
  32  * type of your interface card (you should do that anyway).
  33  *
  34  * address:
  35  * ========
  36  * SBPRO type addresses typically are 0x0230 (=0x220+0x10), 0x0250, ...
  37  * LASERMATE type (CI-101P, WDH-7001C) addresses typically are 0x0300, ...
  38  * SPEA addresses are from the LASERMATE type and range.
  39  * There are some soundcards on the market with 0x0630, 0x0650, ...; their
  40  * type is not obvious (both types are possible).
  41  *
  42  * example: if your SBPRO audio address is 0x220, specify 0x230 and SBPRO 1.
  43  *          if your soundcard has its CDROM port above 0x300, specify
  44  *          that address and try SBPRO 0 first.
  45  *
  46  * interface type:
  47  * ===============
  48  * set SBPRO to 1 for "true" SoundBlaster card
  49  * set SBPRO to 0 for "compatible" soundcards and
  50  *                for "poor" (no sound) interface cards.
  51  * set SBPRO to 2 for the SPEA Media FX card
  52  *
  53  * Almost all "compatible" sound boards need to set SBPRO to 0.
  54  * If SBPRO is set wrong, the drives will get found - but any
  55  * data access will give errors (audio access will work).
  56  * The "OmniCD" no-sound interface card from CreativeLabs needs SBPRO 1.
  57  *
  58  * mail to emoenke@gwdg.de if you have a "compatible" sound card which
  59  * in fact needs to set SBPRO to 1 (not any known at time).
  60  *
  61  * sound base:
  62  * ===========
  63  * The SOUND_BASE definition tells if we should try to turn the CD sound
  64  * channels on. It will only be of use regarding soundcards with a SbPro
  65  * compatible mixer.
  66  *
  67  * Example: #define SOUND_BASE 0x220 enables the sound card's CD channels
  68  *          #define SOUND_BASE 0     leaves the soundcard untouched
  69  */
  70 #if !(SBPCD_ISSUE-1)     /* first (or if you have only one) interface board: */
  71 #define CDROM_PORT 0x340 /* <-----------<< port address                      */
  72 #define SBPRO      0     /* <-----------<< interface type                    */
  73 #define SOUND_BASE 0x220 /* <-----------<< sound address of this card or 0   */
  74 #endif
  75 #if !(SBPCD_ISSUE-2)     /* ==================== second interface board: === */
  76 #define CDROM_PORT 0x344 /* <-----------<< port address                      */
  77 #define SBPRO      0     /* <-----------<< interface type                    */
  78 #define SOUND_BASE 0x000 /* <-----------<< sound address of this card or 0   */
  79 #endif
  80 #if !(SBPCD_ISSUE-3)     /* ===================== third interface board: === */
  81 #define CDROM_PORT 0x634 /* <-----------<< port address                      */
  82 #define SBPRO      1     /* <-----------<< interface type                    */
  83 #define SOUND_BASE 0x240 /* <-----------<< sound address of this card or 0   */
  84 #endif
  85 #if !(SBPCD_ISSUE-4)     /* ==================== fourth interface board: === */
  86 #define CDROM_PORT 0x634 /* <-----------<< port address                      */
  87 #define SBPRO      0     /* <-----------<< interface type                    */
  88 #define SOUND_BASE 0x000 /* <-----------<< sound address of this card or 0   */
  89 #endif
  90 
  91 /*
  92  * some more or less user dependent definitions - service them!
  93  */
  94 
  95 /* Set this to 0 after you have configured your interface definitions right. */
  96 #define DISTRIBUTION 1
  97 
  98 /* max. number of audio frames to read with one     */
  99 /* request (allocates n* 2352 bytes kernel memory!) */
 100 /* may be freely adjusted, f.e. 75 (= 1 sec.), at   */
 101 /* runtime by use of the CDROMAUDIOBUFSIZ ioctl.    */
 102 #define READ_AUDIO 0 
 103 
 104 /* tray control: eject tray if no disk is in (0 or 1) */
 105 #define JUKEBOX 1
 106 
 107 /* tray control: eject tray after last use (0 or 1) */
 108 #define EJECT 1
 109 
 110 /*==========================================================================*/
 111 /*==========================================================================*/
 112 /*
 113  * nothing to change below here if you are not experimenting
 114  */
 115 #ifndef _LINUX_SBPCD_H
 116 
 117 #define _LINUX_SBPCD_H
 118 /*==========================================================================*/
 119 /*==========================================================================*/
 120 #define LONG_TIMING 0 /* test against timeouts with "gold" CDs on CR-521 */
 121 #undef  FUTURE
 122 
 123 #define TEST_UPC 0
 124 #define SPEA_TEST 0
 125 #define TEST_STI 0
 126 #undef PATH_CHECK
 127 /*==========================================================================*/
 128 /*
 129  * DDI interface definitions
 130  * "invented" by Fred N. van Kempen..
 131  */
 132 #define DDIOCSDBG       0x9000
 133 
 134 /*==========================================================================*/
 135 /*
 136  * "private" IOCTL functions
 137  */
 138 #define CDROMRESET              0x5380 /* hard-rest the drive */
 139 #define CDROMVOLREAD            0x5381 /* let the drive tell its volume settings */
 140 #define CDROMAUDIOBUFSIZ        0x5382 /* set the audio buffer size */
 141 
 142 /*==========================================================================*/
 143 /*
 144  * Debug output levels
 145  */
 146 #define DBG_INF 1       /* necessary information */
 147 #define DBG_BSZ 2       /* BLOCK_SIZE trace */
 148 #define DBG_REA 3       /* READ status trace */
 149 #define DBG_CHK 4       /* MEDIA CHECK trace */
 150 #define DBG_TIM 5       /* datarate timer test */
 151 #define DBG_INI 6       /* initialization trace */
 152 #define DBG_TOC 7       /* tell TocEntry values */
 153 #define DBG_IOC 8       /* ioctl trace */
 154 #define DBG_STA 9       /* ResponseStatus() trace */
 155 #define DBG_ERR 10      /* cc_ReadError() trace */
 156 #define DBG_CMD 11      /* cmd_out() trace */
 157 #define DBG_WRN 12      /* give explanation before auto-probing */
 158 #define DBG_MUL 13      /* multi session code test */
 159 #define DBG_IDX 14      /* test code for drive_id !=0 */
 160 #define DBG_IOX 15      /* some special information */
 161 #define DBG_DID 16      /* drive ID test */
 162 #define DBG_RES 17      /* drive reset info */
 163 #define DBG_SPI 18      /* SpinUp test */
 164 #define DBG_IOS 19      /* ioctl trace: subchannel functions */
 165 #define DBG_IO2 20      /* ioctl trace: general */
 166 #define DBG_UPC 21      /* show UPC information */
 167 #define DBG_XA1 22      /* XA mode debugging */
 168 #define DBG_LCK 23      /* door (un)lock info */
 169 #define DBG_SQ1 24      /* dump SubQ frame */
 170 #define DBG_AUD 25      /* READ AUDIO debugging */
 171 #define DBG_SEQ 26      /* Sequoia interface configuration trace */
 172 #define DBG_LCS 27      /* Longshine LCS-7260 debugging trace */
 173 #define DBG_CD2 28      /* MKE CD200 debugging trace */
 174 #define DBG_TEA 29      /* TEAC CD-55A debugging trace */
 175 #define DBG_TE2 30      /* TEAC CD-55A 2nd debugging level */
 176 #define DBG_000 31      /* unnecessary information */
 177 
 178 /*==========================================================================*/
 179 /*==========================================================================*/
 180 
 181 /*
 182  * bits of flags_cmd_out:
 183  */
 184 #define f_respo3                0x100
 185 #define f_putcmd                0x80
 186 #define f_respo2                0x40
 187 #define f_lopsta                0x20
 188 #define f_getsta                0x10
 189 #define f_ResponseStatus        0x08
 190 #define f_obey_p_check          0x04
 191 #define f_bit1                  0x02
 192 #define f_wait_if_busy          0x01
 193 
 194 /*
 195  * diskstate_flags:
 196  */
 197 #define x80_bit                 0x80
 198 #define upc_bit                 0x40
 199 #define volume_bit              0x20
 200 #define toc_bit                 0x10
 201 #define multisession_bit        0x08
 202 #define cd_size_bit             0x04
 203 #define subq_bit                0x02
 204 #define frame_size_bit          0x01
 205 
 206 /*
 207  * disk states (bits of diskstate_flags):
 208  */
 209 #define upc_valid               (D_S[d].diskstate_flags&upc_bit)
 210 #define volume_valid            (D_S[d].diskstate_flags&volume_bit)
 211 #define toc_valid               (D_S[d].diskstate_flags&toc_bit)
 212 #define cd_size_valid           (D_S[d].diskstate_flags&cd_size_bit)
 213 #define subq_valid              (D_S[d].diskstate_flags&subq_bit)
 214 #define frame_size_valid        (D_S[d].diskstate_flags&frame_size_bit)
 215 
 216 /*
 217  * the status_bits variable
 218  */
 219 #define p_success       0x100
 220 #define p_door_closed   0x80
 221 #define p_caddy_in      0x40
 222 #define p_spinning      0x20
 223 #define p_check         0x10
 224 #define p_busy_new      0x08
 225 #define p_door_locked   0x04
 226 #define p_disk_ok       0x01
 227 
 228 /*
 229  * LCS-7260 special status result bits:
 230  */
 231 #define p_lcs_door_locked       0x02
 232 #define p_lcs_door_closed       0x01
 233 
 234 /*
 235  * CR-52x special status result bits:
 236  */
 237 #define p_caddin_old    0x40
 238 #define p_success_old   0x08
 239 #define p_busy_old      0x04
 240 #define p_bit_1         0x02    /* hopefully unused now */
 241 
 242 /*
 243  * "generation specific" defs of the status result bits:
 244  */
 245 #define p0_door_closed  0x80
 246 #define p0_caddy_in     0x40
 247 #define p0_spinning     0x20
 248 #define p0_check        0x10
 249 #define p0_success      0x08 /* unused */
 250 #define p0_busy         0x04
 251 #define p0_bit_1        0x02 /* unused */
 252 #define p0_disk_ok      0x01
 253 
 254 #define pL_disk_in      0x40
 255 #define pL_spinning     0x20
 256 #define pL_check        0x10
 257 #define pL_success      0x08 /* unused ?? */
 258 #define pL_busy         0x04
 259 #define pL_door_locked  0x02
 260 #define pL_door_closed  0x01
 261 
 262 #define p1_door_closed  0x80
 263 #define p1_disk_in      0x40
 264 #define p1_spinning     0x20
 265 #define p1_check        0x10
 266 #define p1_busy         0x08
 267 #define p1_door_locked  0x04
 268 #define p1_bit_1        0x02 /* unused */
 269 #define p1_disk_ok      0x01
 270 
 271 #define p2_disk_ok      0x80
 272 #define p2_door_locked  0x40
 273 #define p2_spinning     0x20
 274 #define p2_busy2        0x10
 275 #define p2_busy1        0x08
 276 #define p2_door_closed  0x04
 277 #define p2_disk_in      0x02
 278 #define p2_check        0x01
 279 
 280 /*
 281  * used drive states:
 282  */
 283 #define st_door_closed  (D_S[d].status_bits&p_door_closed)
 284 #define st_caddy_in     (D_S[d].status_bits&p_caddy_in)
 285 #define st_spinning     (D_S[d].status_bits&p_spinning)
 286 #define st_check        (D_S[d].status_bits&p_check)
 287 #define st_busy         (D_S[d].status_bits&p_busy_new)
 288 #define st_door_locked  (D_S[d].status_bits&p_door_locked)
 289 #define st_diskok       (D_S[d].status_bits&p_disk_ok)
 290 
 291 /*
 292  * bits of the CDi_status register:
 293  */
 294 #define s_not_result_ready      0x04 /* 0: "result ready" */
 295 #define s_not_data_ready        0x02 /* 0: "data ready"   */
 296 #define s_attention             0x01 /* 1: "attention required" */
 297 /*
 298  * usable as:
 299  */
 300 #define DRV_ATTN        ((inb(CDi_status)&s_attention)!=0)
 301 #define DATA_READY      ((inb(CDi_status)&s_not_data_ready)==0)
 302 #define RESULT_READY    ((inb(CDi_status)&s_not_result_ready)==0)
 303 
 304 /*
 305  * drive types (firmware versions):
 306  */
 307 #define drv_fam0        0x08            /* CR-52x family */
 308 #define drv_199         (drv_fam0+0x01) /* <200 */
 309 #define drv_200         (drv_fam0+0x02) /* <201 */
 310 #define drv_201         (drv_fam0+0x03) /* <210 */
 311 #define drv_210         (drv_fam0+0x04) /* <211 */
 312 #define drv_211         (drv_fam0+0x05) /* <300 */
 313 #define drv_300         (drv_fam0+0x06) /* >=300 */
 314 
 315 #define drv_famL        0x10            /* Longshine family */
 316 #define drv_260         (drv_famL+0x01) /* LCS-7260 */
 317 #define drv_e1          (drv_famL+0x01) /* LCS-7260, firmware "A E1" */
 318 #define drv_f4          (drv_famL+0x02) /* LCS-7260, firmware "A4F4" */
 319 
 320 #define drv_fam1        0x20            /* CR-56x family */
 321 #define drv_099         (drv_fam1+0x01) /* <100 */
 322 #define drv_100         (drv_fam1+0x02) /* >=100, only 5.00 known here */
 323 
 324 #define drv_famT        0x40            /* TEAC CD-55A */
 325 #define drv_fam2        0x80            /* CD200 family */
 326 
 327 #define fam0_drive      (D_S[d].drv_type&drv_fam0)
 328 #define famL_drive      (D_S[d].drv_type&drv_famL)
 329 #define fam1_drive      (D_S[d].drv_type&drv_fam1)
 330 #define fam2_drive      (D_S[d].drv_type&drv_fam2)
 331 #define famT_drive      (D_S[d].drv_type&drv_famT)
 332 #define fam0L_drive     (D_S[d].drv_type&(drv_fam0|drv_famL))
 333 #define fam1L_drive     (D_S[d].drv_type&(drv_fam1|drv_famL))
 334 #define fam01_drive     (D_S[d].drv_type&(drv_fam0|drv_fam1))
 335 #define fam12_drive     (D_S[d].drv_type&(drv_fam1|drv_fam2))
 336 #define fam2T_drive     (D_S[d].drv_type&(drv_fam2|drv_famT))
 337 
 338 /*
 339  * audio states:
 340  */
 341 #define audio_playing   2
 342 #define audio_pausing   1
 343 
 344 /*
 345  * drv_pattern, drv_options:
 346  */
 347 #define speed_auto      0x80
 348 #define speed_300       0x40
 349 #define speed_150       0x20
 350 #define audio_mono      0x04
 351 
 352 /*
 353  * values of cmd_type (0 else):
 354  */
 355 #define READ_M1 0x01    /* "data mode 1": 2048 bytes per frame */
 356 #define READ_M2 0x02    /* "data mode 2": 12+2048+280 bytes per frame */
 357 #define READ_SC 0x04    /* "subchannel info": 96 bytes per frame */
 358 #define READ_AU 0x08    /* "audio frame": 2352 bytes per frame */
 359 
 360 /*
 361  * sense_byte:
 362  *
 363  *          values: 00
 364  *                  01
 365  *                  81
 366  *                  82 "raw audio" mode
 367  *                  xx from infobuf[0] after 85 00 00 00 00 00 00
 368  */
 369 
 370 /* audio status (bin) */
 371 #define aud_00 0x00 /* Audio status byte not supported or not valid */
 372 #define audx11 0x0b /* Audio play operation in progress             */
 373 #define audx12 0x0c /* Audio play operation paused                  */
 374 #define audx13 0x0d /* Audio play operation successfully completed  */
 375 #define audx14 0x0e /* Audio play operation stopped due to error    */
 376 #define audx15 0x0f /* No current audio status to return            */
 377 
 378 /* audio status (bcd) */
 379 #define aud_11 0x11 /* Audio play operation in progress             */
 380 #define aud_12 0x12 /* Audio play operation paused                  */
 381 #define aud_13 0x13 /* Audio play operation successfully completed  */
 382 #define aud_14 0x14 /* Audio play operation stopped due to error    */
 383 #define aud_15 0x15 /* No current audio status to return            */
 384 
 385 
 386 /*
 387  * highest allowed drive number (MINOR+1)
 388  */
 389 #define NR_SBPCD        4
 390 
 391 /*
 392  * we try to never disable interrupts - seems to work
 393  */
 394 #define SBPCD_DIS_IRQ   0
 395 
 396 /*
 397  * "write byte to port"
 398  */
 399 #define OUT(x,y)        outb(y,x)
 400 
 401 /*==========================================================================*/
 402 
 403 #define MIXER_CD_Volume 0x28    /* internal SB Pro register address */
 404 
 405 /*==========================================================================*/
 406 /*
 407  * Creative Labs Programmers did this:
 408  */
 409 #define MAX_TRACKS      120     /* why more than 99? */
 410 
 411 /*==========================================================================*/
 412 /*
 413  * To make conversions easier (machine dependent!)
 414  */
 415 typedef union _msf
 416 {
 417         u_int n;
 418         u_char c[4];
 419 } MSF;
 420 
 421 typedef union _blk
 422 {
 423         u_int n;
 424         u_char c[4];
 425 } BLK;
 426 
 427 /*==========================================================================*/
 428 
 429 /*============================================================================
 430 ==============================================================================
 431 
 432 COMMAND SET of "old" drives like CR-521, CR-522
 433                (the CR-562 family is different):
 434 
 435 No.     Command                        Code
 436 --------------------------------------------
 437 
 438 Drive Commands:
 439  1      Seek                            01      
 440  2      Read Data                       02
 441  3      Read XA-Data                    03
 442  4      Read Header                     04
 443  5      Spin Up                         05
 444  6      Spin Down                       06
 445  7      Diagnostic                      07
 446  8      Read UPC                        08
 447  9      Read ISRC                       09
 448 10      Play Audio                      0A
 449 11      Play Audio MSF                  0B
 450 12      Play Audio Track/Index          0C
 451 
 452 Status Commands:
 453 13      Read Status                     81      
 454 14      Read Error                      82
 455 15      Read Drive Version              83
 456 16      Mode Select                     84
 457 17      Mode Sense                      85
 458 18      Set XA Parameter                86
 459 19      Read XA Parameter               87
 460 20      Read Capacity                   88
 461 21      Read SUB_Q                      89
 462 22      Read Disc Code                  8A
 463 23      Read Disc Information           8B
 464 24      Read TOC                        8C
 465 25      Pause/Resume                    8D
 466 26      Read Packet                     8E
 467 27      Read Path Check                 00
 468  
 469  
 470 all numbers (lba, msf-bin, msf-bcd, counts) to transfer high byte first
 471 
 472 mnemo     7-byte command        #bytes response (r0...rn)
 473 ________ ____________________  ____ 
 474 
 475 Read Status:
 476 status:  81.                    (1)  one-byte command, gives the main
 477                                                           status byte
 478 Read Error:
 479 check1:  82 00 00 00 00 00 00.  (6)  r1: audio status
 480 
 481 Read Packet:
 482 check2:  8e xx 00 00 00 00 00. (xx)  gets xx bytes response, relating
 483                                         to commands 01 04 05 07 08 09
 484 
 485 Play Audio:
 486 play:    0a ll-bb-aa nn-nn-nn.  (0)  play audio, ll-bb-aa: starting block (lba),
 487                                                  nn-nn-nn: #blocks
 488 Play Audio MSF:
 489          0b mm-ss-ff mm-ss-ff   (0)  play audio from/to
 490 
 491 Play Audio Track/Index:
 492          0c ...
 493 
 494 Pause/Resume:
 495 pause:   8d pr 00 00 00 00 00.  (0)  pause (pr=00) 
 496                                      resume (pr=80) audio playing
 497 
 498 Mode Select:
 499          84 00 nn-nn ??-?? 00   (0)  nn-nn: 2048 or 2340
 500                                      possibly defines transfer size
 501 
 502 set_vol: 84 83 00 00 sw le 00.  (0)  sw(itch): lrxxxxxx (off=1)
 503                                      le(vel): min=0, max=FF, else half
 504                                      (firmware 2.11)
 505 
 506 Mode Sense:
 507 get_vol: 85 03 00 00 00 00 00.  (2)  tell current audio volume setting
 508 
 509 Read Disc Information:
 510 tocdesc: 8b 00 00 00 00 00 00.  (6)  read the toc descriptor ("msf-bin"-format)
 511 
 512 Read TOC:
 513 tocent:  8c fl nn 00 00 00 00.  (8)  read toc entry #nn
 514                                        (fl=0:"lba"-, =2:"msf-bin"-format)
 515 
 516 Read Capacity:
 517 capacit: 88 00 00 00 00 00 00.  (5)  "read CD-ROM capacity"
 518 
 519 
 520 Read Path Check:
 521 ping:    00 00 00 00 00 00 00.  (2)  r0=AA, r1=55
 522                                      ("ping" if the drive is connected)
 523 
 524 Read Drive Version:
 525 ident:   83 00 00 00 00 00 00. (12)  gives "MATSHITAn.nn" 
 526                                      (n.nn = 2.01, 2.11., 3.00, ...)
 527 
 528 Seek:
 529 seek:    01 00 ll-bb-aa 00 00.  (0)  
 530 seek:    01 02 mm-ss-ff 00 00.  (0)  
 531 
 532 Read Data:
 533 read:    02 xx-xx-xx nn-nn fl. (??)  read nn-nn blocks of 2048 bytes,
 534                                      starting at block xx-xx-xx  
 535                                      fl=0: "lba"-, =2:"msf-bcd"-coded xx-xx-xx
 536 
 537 Read XA-Data:
 538 read:    03 xx-xx-xx nn-nn fl. (??)  read nn-nn blocks of 2340 bytes, 
 539                                      starting at block xx-xx-xx
 540                                      fl=0: "lba"-, =2:"msf-bcd"-coded xx-xx-xx
 541 
 542 Read SUB_Q:
 543          89 fl 00 00 00 00 00. (13)  r0: audio status, r4-r7: lba/msf, 
 544                                        fl=0: "lba", fl=2: "msf"
 545 
 546 Read Disc Code:
 547          8a 00 00 00 00 00 00. (14)  possibly extended "check condition"-info
 548 
 549 Read Header:
 550          04 00 ll-bb-aa 00 00.  (0)   4 bytes response with "check2"
 551          04 02 mm-ss-ff 00 00.  (0)   4 bytes response with "check2"
 552 
 553 Spin Up:
 554          05 00 ll-bb-aa 00 00.  (0)  possibly implies a "seek"
 555 
 556 Spin Down:
 557          06 ...
 558 
 559 Diagnostic:
 560          07 00 ll-bb-aa 00 00.  (2)   2 bytes response with "check2"
 561          07 02 mm-ss-ff 00 00.  (2)   2 bytes response with "check2"
 562 
 563 Read UPC:
 564          08 00 ll-bb-aa 00 00. (16)  
 565          08 02 mm-ss-ff 00 00. (16)  
 566 
 567 Read ISRC:
 568          09 00 ll-bb-aa 00 00. (15)  15 bytes response with "check2"
 569          09 02 mm-ss-ff 00 00. (15)  15 bytes response with "check2"
 570 
 571 Set XA Parameter:
 572          86 ...
 573 
 574 Read XA Parameter:
 575          87 ...
 576 
 577 ==============================================================================
 578 ============================================================================*/
 579 
 580 /*
 581  * commands
 582  *
 583  * CR-52x:      CMD0_
 584  * CR-56x:      CMD1_
 585  * CD200:       CMD2_
 586  * LCS-7260:    CMDL_
 587  * TEAC CD-55A: CMDT_
 588  */
 589 #define CMD1_RESET      0x0a
 590 #define CMD2_RESET      0x01
 591 #define CMDT_RESET      0xc0
 592 
 593 #define CMD1_LOCK_CTL   0x0c
 594 #define CMD2_LOCK_CTL   0x1e
 595 #define CMDT_LOCK_CTL   CMD2_LOCK_CTL
 596 #define CMDL_LOCK_CTL   0x0e
 597 
 598 #define CMD1_TRAY_CTL   0x07
 599 #define CMD2_TRAY_CTL   0x1b
 600 #define CMDT_TRAY_CTL   CMD2_TRAY_CTL
 601 #define CMDL_TRAY_CTL   0x0d
 602 
 603 #define CMD1_MULTISESS  0x8d
 604 #define CMDL_MULTISESS  0x8c
 605 
 606 #define CMD1_SUBCHANINF 0x11
 607 #define CMD2_SUBCHANINF 0x??
 608 
 609 #define CMD2_x02        0x02
 610 #define CMD1_x08        0x08
 611 #define CMD2_x08        0x08
 612 #define CMDT_x08        0x08
 613 
 614 #define CMD2_SETSPEED   0xda
 615 
 616 #define CMD0_PATH_CHECK 0x00
 617 #define CMD1_PATH_CHECK 0x???
 618 #define CMD2_PATH_CHECK 0x???
 619 #define CMDT_PATH_CHECK 0x???
 620 #define CMDL_PATH_CHECK CMD0_PATH_CHECK
 621 
 622 #define CMD0_SEEK       0x01
 623 #define CMD1_SEEK       CMD0_SEEK
 624 #define CMD2_SEEK       0x2b
 625 #define CMDT_SEEK       CMD2_SEEK
 626 #define CMDL_SEEK       CMD0_SEEK
 627 
 628 #define CMD0_READ       0x02
 629 #define CMD1_READ       0x10
 630 #define CMD2_READ       0x28
 631 #define CMDT_READ       CMD2_READ
 632 #define CMDL_READ       CMD0_READ
 633 
 634 #define CMD0_READ_XA    0x03
 635 #define CMD2_READ_XA    0xd4
 636 #define CMDL_READ_XA    CMD0_READ_XA /* really ?? */
 637 
 638 #define CMD0_READ_HEAD  0x04
 639 
 640 #define CMD0_SPINUP     0x05
 641 #define CMD1_SPINUP     0x02
 642 #define CMD2_SPINUP     CMD2_TRAY_CTL
 643 #define CMDL_SPINUP     CMD0_SPINUP
 644 
 645 #define CMD0_SPINDOWN   0x06 /* really??? */
 646 #define CMD1_SPINDOWN   0x06
 647 #define CMD2_SPINDOWN   CMD2_TRAY_CTL
 648 #define CMDL_SPINDOWN   0x0d
 649 
 650 #define CMD0_DIAG       0x07
 651 
 652 #define CMD0_READ_UPC   0x08
 653 #define CMD1_READ_UPC   0x88
 654 #define CMD2_READ_UPC   0x???
 655 #define CMDL_READ_UPC   CMD0_READ_UPC
 656 
 657 #define CMD0_READ_ISRC  0x09
 658 
 659 #define CMD0_PLAY       0x0a
 660 #define CMD1_PLAY       0x???
 661 #define CMD2_PLAY       0x???
 662 #define CMDL_PLAY       CMD0_PLAY
 663 
 664 #define CMD0_PLAY_MSF   0x0b
 665 #define CMD1_PLAY_MSF   0x0e
 666 #define CMD2_PLAY_MSF   0x47
 667 #define CMDT_PLAY_MSF   CMD2_PLAY_MSF
 668 #define CMDL_PLAY_MSF   0x???
 669 
 670 #define CMD0_PLAY_TI    0x0c
 671 
 672 #define CMD0_STATUS     0x81
 673 #define CMD1_STATUS     0x05
 674 #define CMD2_STATUS     0x00
 675 #define CMDT_STATUS     CMD2_STATUS
 676 #define CMDL_STATUS     CMD0_STATUS
 677 
 678 #define CMD0_READ_ERR   0x82
 679 #define CMD1_READ_ERR   CMD0_READ_ERR
 680 #define CMD2_READ_ERR   0x03
 681 #define CMDT_READ_ERR   CMD2_READ_ERR /* get audio status */
 682 #define CMDL_READ_ERR   CMD0_READ_ERR
 683 
 684 #define CMD0_READ_VER   0x83
 685 #define CMD1_READ_VER   CMD0_READ_VER
 686 #define CMD2_READ_VER   0x12
 687 #define CMDT_READ_VER   CMD2_READ_VER /* really ?? */
 688 #define CMDL_READ_VER   CMD0_READ_VER
 689 
 690 #define CMD0_SETMODE    0x84
 691 #define CMD1_SETMODE    0x09
 692 #define CMD2_SETMODE    0x55
 693 #define CMDT_SETMODE    CMD2_SETMODE
 694 #define CMDL_SETMODE    CMD0_SETMODE
 695 
 696 #define CMD0_GETMODE    0x85
 697 #define CMD1_GETMODE    0x84
 698 #define CMD2_GETMODE    0x5a
 699 #define CMDT_GETMODE    CMD2_GETMODE
 700 #define CMDL_GETMODE    CMD0_GETMODE
 701 
 702 #define CMD0_SET_XA     0x86
 703 
 704 #define CMD0_GET_XA     0x87
 705 
 706 #define CMD0_CAPACITY   0x88
 707 #define CMD1_CAPACITY   0x85
 708 #define CMD2_CAPACITY   0x25
 709 #define CMDL_CAPACITY   CMD0_CAPACITY /* missing in some firmware versions */
 710 
 711 #define CMD0_READSUBQ   0x89
 712 #define CMD1_READSUBQ   0x87
 713 #define CMD2_READSUBQ   0x42
 714 #define CMDT_READSUBQ   CMD2_READSUBQ
 715 #define CMDL_READSUBQ   CMD0_READSUBQ
 716 
 717 #define CMD0_DISKCODE   0x8a
 718 
 719 #define CMD0_DISKINFO   0x8b
 720 #define CMD1_DISKINFO   CMD0_DISKINFO
 721 #define CMD2_DISKINFO   0x43
 722 #define CMDT_DISKINFO   CMD2_DISKINFO
 723 #define CMDL_DISKINFO   CMD0_DISKINFO
 724 
 725 #define CMD0_READTOC    0x8c
 726 #define CMD1_READTOC    CMD0_READTOC
 727 #define CMD2_READTOC    0x???
 728 #define CMDL_READTOC    CMD0_READTOC
 729 
 730 #define CMD0_PAU_RES    0x8d
 731 #define CMD1_PAU_RES    0x0d
 732 #define CMD2_PAU_RES    0x4b
 733 #define CMDT_PAUSE      CMD2_PAU_RES
 734 #define CMDL_PAU_RES    CMD0_PAU_RES
 735 
 736 #define CMD0_PACKET     0x8e
 737 #define CMD1_PACKET     CMD0_PACKET
 738 #define CMD2_PACKET     0x???
 739 #define CMDL_PACKET     CMD0_PACKET
 740 
 741 /*==========================================================================*/
 742 /*==========================================================================*/
 743 #endif _LINUX_SBPCD_H
 744 /*==========================================================================*/
 745 /*
 746  * Overrides for Emacs so that we follow Linus's tabbing style.
 747  * Emacs will notice this stuff at the end of the file and automatically
 748  * adjust the settings for this buffer only.  This must remain at the end
 749  * of the file. 
 750  * ---------------------------------------------------------------------------
 751  * Local variables:
 752  * c-indent-level: 8
 753  * c-brace-imaginary-offset: 0
 754  * c-brace-offset: -8
 755  * c-argdecl-indent: 8
 756  * c-label-offset: -8
 757  * c-continued-statement-offset: 8
 758  * c-continued-brace-offset: 0
 759  * End:
 760  */

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