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 * If you feel helpless, look into Documentation/cdrom/sbpcd 9 * (good idea anyway, at least before mailing me). 10 * 11 * The definitions for the first controller can get overridden by 12 * the kernel command line ("lilo boot option"). 13 * Examples: 14 * sbpcd=0x300,LaserMate 15 * or 16 * sbpcd=0x230,SoundBlaster 17 * or 18 * sbpcd=0x338,SoundScape 19 * or 20 * sbpcd=0x2C0,Teac16bit 21 * 22 * If sbpcd gets used as a module, you can load it with 23 * insmod sbpcd.o sbpcd=0x300,0 24 * or 25 * insmod sbpcd.o sbpcd=0x230,1 26 * or 27 * insmod sbpcd.o sbpcd=0x338,2 28 * or 29 * insmod sbpcd.o sbpcd=0x2C0,3 30 * respective to override the configured address and type. 31 */ 32 33/* 34 * define your CDROM port base address as CDROM_PORT 35 * and specify the type of your interface card as SBPRO. 36 * 37 * address: 38 * ======== 39 * SBPRO type addresses typically are 0x0230 (=0x220+0x10), 0x0250, ... 40 * LASERMATE type (CI-101P, WDH-7001C) addresses typically are 0x0300, ... 41 * SOUNDSCAPE addresses are from the LASERMATE type and range. You have to 42 * specify the REAL address here, not the configuration port address. Look 43 * at the CDROM driver's invoking line within your DOS CONFIG.SYS, or let 44 * sbpcd auto-probe, if you are not firm with the address. 45 * There are some soundcards on the market with 0x0630, 0x0650, ...; their 46 * type is not obvious (both types are possible). 47 * 48 * example: if your SBPRO audio address is 0x220, specify 0x230 and SBPRO 1. 49 * if your soundcard has its CDROM port above 0x300, specify 50 * that address and try SBPRO 0 first. 51 * if your SoundScape configuration port is at 0x330, specify 52 * 0x338 and SBPRO 2. 53 * 54 * interface type: 55 * =============== 56 * set SBPRO to 1 for "true" SoundBlaster card 57 * set SBPRO to 0 for "compatible" soundcards and 58 * for "poor" (no sound) interface cards. 59 * set SBPRO to 2 for Ensonic SoundScape or SPEA Media FX cards 60 * set SBPRO to 3 for Teac 16bit interface cards 61 * 62 * Almost all "compatible" sound boards need to set SBPRO to 0. 63 * If SBPRO is set wrong, the drives will get found - but any 64 * data access will give errors (audio access will work). 65 * The "OmniCD" no-sound interface card from CreativeLabs and most Teac 66 * interface cards need SBPRO 1. 67 * 68 * sound base: 69 * =========== 70 * The SOUND_BASE definition tells if we should try to turn the CD sound 71 * channels on. It will only be of use regarding soundcards with a SbPro 72 * compatible mixer. 73 * 74 * Example: #define SOUND_BASE 0x220 enables the sound card's CD channels 75 * #define SOUND_BASE 0 leaves the soundcard untouched 76 */ 77#define CDROM_PORT 0x340 /* <-----------<< port address */ 78#define SBPRO 0 /* <-----------<< interface type */ 79#define MAX_DRIVES 4 /* set to 1 if the card does not use "drive select" */ 80#define SOUND_BASE 0x220 /* <-----------<< sound address of this card or 0 */ 81 82/* 83 * some more or less user dependent definitions - service them! 84 */ 85 86/* Set this to 0 once you have configured your interface definitions right. */ 87#define DISTRIBUTION 1 88 89/* 90 * Time to wait after giving a message. 91 * This gets important if you enable non-standard DBG_xxx flags. 92 * You will see what happens if you omit the pause or make it 93 * too short. Be warned! 94 */ 95#define KLOGD_PAUSE 1 96 97/* tray control: eject tray if no disk is in */ 98#if DISTRIBUTION 99#define JUKEBOX 0 100#else 101#define JUKEBOX 1 102#endif /* DISTRIBUTION */ 103 104/* tray control: eject tray after last use */ 105#if DISTRIBUTION 106#define EJECT 0 107#else 108#define EJECT 1 109#endif /* DISTRIBUTION */ 110 111/* max. number of audio frames to read with one */ 112/* request (allocates n* 2352 bytes kernel memory!) */ 113/* may be freely adjusted, f.e. 75 (= 1 sec.), at */ 114/* runtime by use of the CDROMAUDIOBUFSIZ ioctl. */ 115#define READ_AUDIO 0 116 117/* Optimizations for the Teac CD-55A drive read performance. 118 * SBP_TEAC_SPEED can be changed here, or one can set the 119 * variable "teac" when loading as a module. 120 * Valid settings are: 121 * 0 - very slow - the recommended "DISTRIBUTION 1" setup. 122 * 1 - 2x performance with little overhead. No busy waiting. 123 * 2 - 4x performance with 5ms overhead per read. Busy wait. 124 * 125 * Setting SBP_TEAC_SPEED or the variable 'teac' to anything 126 * other than 0 may cause problems. If you run into them, first 127 * change SBP_TEAC_SPEED back to 0 and see if your drive responds 128 * normally. If yes, you are "allowed" to report your case - to help 129 * me with the driver, not to solve your hassle. Don�t mail if you 130 * simply are stuck into your own "tuning" experiments, you know? 131 */ 132#define SBP_TEAC_SPEED 1 133 134/*==========================================================================*/ 135/*==========================================================================*/ 136/* 137 * nothing to change below here if you are not fully aware what you're doing 138 */ 139#ifndef _LINUX_SBPCD_H 140 141#define _LINUX_SBPCD_H 142/*==========================================================================*/ 143/*==========================================================================*/ 144/* 145 * driver's own read_ahead, data mode 146 */ 147#define SBP_BUFFER_FRAMES 8 148 149#define LONG_TIMING 0 /* test against timeouts with "gold" CDs on CR-521 */ 150#undef FUTURE 151#undef SAFE_MIXED 152 153#define TEST_UPC 0 154#define SPEA_TEST 0 155#define TEST_STI 0 156#define OLD_BUSY 0 157#undef PATH_CHECK 158#ifndef SOUND_BASE 159#define SOUND_BASE 0 160#endif 161#if DISTRIBUTION 162#undef SBP_TEAC_SPEED 163#define SBP_TEAC_SPEED 0 164#endif 165/*==========================================================================*/ 166/* 167 * DDI interface definitions 168 * "invented" by Fred N. van Kempen.. 169 */ 170#define DDIOCSDBG 0x9000 171 172/*==========================================================================*/ 173/* 174 * "private" IOCTL functions 175 */ 176#define CDROMAUDIOBUFSIZ 0x5382 /* set the audio buffer size */ 177 178/*==========================================================================*/ 179/* 180 * Debug output levels 181 */ 182#define DBG_INF 1 /* necessary information */ 183#define DBG_BSZ 2 /* BLOCK_SIZE trace */ 184#define DBG_REA 3 /* READ status trace */ 185#define DBG_CHK 4 /* MEDIA CHECK trace */ 186#define DBG_TIM 5 /* datarate timer test */ 187#define DBG_INI 6 /* initialization trace */ 188#define DBG_TOC 7 /* tell TocEntry values */ 189#define DBG_IOC 8 /* ioctl trace */ 190#define DBG_STA 9 /* ResponseStatus() trace */ 191#define DBG_ERR 10 /* cc_ReadError() trace */ 192#define DBG_CMD 11 /* cmd_out() trace */ 193#define DBG_WRN 12 /* give explanation before auto-probing */ 194#define DBG_MUL 13 /* multi session code test */ 195#define DBG_IDX 14 /* test code for drive_id !=0 */ 196#define DBG_IOX 15 /* some special information */ 197#define DBG_DID 16 /* drive ID test */ 198#define DBG_RES 17 /* drive reset info */ 199#define DBG_SPI 18 /* SpinUp test */ 200#define DBG_IOS 19 /* ioctl trace: subchannel functions */ 201#define DBG_IO2 20 /* ioctl trace: general */ 202#define DBG_UPC 21 /* show UPC information */ 203#define DBG_XA1 22 /* XA mode debugging */ 204#define DBG_LCK 23 /* door (un)lock info */ 205#define DBG_SQ1 24 /* dump SubQ frame */ 206#define DBG_AUD 25 /* READ AUDIO debugging */ 207#define DBG_SEQ 26 /* Sequoia interface configuration trace */ 208#define DBG_LCS 27 /* Longshine LCS-7260 debugging trace */ 209#define DBG_CD2 28 /* MKE/Funai CD200 debugging trace */ 210#define DBG_TEA 29 /* TEAC CD-55A debugging trace */ 211#define DBG_ECS 30 /* ECS-AT (Vertos 100) debugging trace */ 212#define DBG_000 31 /* unnecessary information */ 213 214/*==========================================================================*/ 215/*==========================================================================*/ 216 217/* 218 * bits of flags_cmd_out: 219 */ 220#define f_respo3 0x100 221#define f_putcmd 0x80 222#define f_respo2 0x40 223#define f_lopsta 0x20 224#define f_getsta 0x10 225#define f_ResponseStatus 0x08 226#define f_obey_p_check 0x04 227#define f_bit1 0x02 228#define f_wait_if_busy 0x01 229 230/* 231 * diskstate_flags: 232 */ 233#define x80_bit 0x80 234#define upc_bit 0x40 235#define volume_bit 0x20 236#define toc_bit 0x10 237#define multisession_bit 0x08 238#define cd_size_bit 0x04 239#define subq_bit 0x02 240#define frame_size_bit 0x01 241 242/* 243 * disk states (bits of diskstate_flags): 244 */ 245#define upc_valid (current_drive->diskstate_flags&upc_bit) 246#define volume_valid (current_drive->diskstate_flags&volume_bit) 247#define toc_valid (current_drive->diskstate_flags&toc_bit) 248#define cd_size_valid (current_drive->diskstate_flags&cd_size_bit) 249#define subq_valid (current_drive->diskstate_flags&subq_bit) 250#define frame_size_valid (current_drive->diskstate_flags&frame_size_bit) 251 252/* 253 * the status_bits variable 254 */ 255#define p_success 0x100 256#define p_door_closed 0x80 257#define p_caddy_in 0x40 258#define p_spinning 0x20 259#define p_check 0x10 260#define p_busy_new 0x08 261#define p_door_locked 0x04 262#define p_disk_ok 0x01 263 264/* 265 * LCS-7260 special status result bits: 266 */ 267#define p_lcs_door_locked 0x02 268#define p_lcs_door_closed 0x01 /* probably disk_in */ 269 270/* 271 * CR-52x special status result bits: 272 */ 273#define p_caddin_old 0x40 274#define p_success_old 0x08 275#define p_busy_old 0x04 276#define p_bit_1 0x02 /* hopefully unused now */ 277 278/* 279 * "generation specific" defs of the status result bits: 280 */ 281#define p0_door_closed 0x80 282#define p0_caddy_in 0x40 283#define p0_spinning 0x20 284#define p0_check 0x10 285#define p0_success 0x08 /* unused */ 286#define p0_busy 0x04 287#define p0_bit_1 0x02 /* unused */ 288#define p0_disk_ok 0x01 289 290#define pL_disk_in 0x40 291#define pL_spinning 0x20 292#define pL_check 0x10 293#define pL_success 0x08 /* unused ?? */ 294#define pL_busy 0x04 295#define pL_door_locked 0x02 296#define pL_door_closed 0x01 297 298#define pV_door_closed 0x40 299#define pV_spinning 0x20 300#define pV_check 0x10 301#define pV_success 0x08 302#define pV_busy 0x04 303#define pV_door_locked 0x02 304#define pV_disk_ok 0x01 305 306#define p1_door_closed 0x80 307#define p1_disk_in 0x40 308#define p1_spinning 0x20 309#define p1_check 0x10 310#define p1_busy 0x08 311#define p1_door_locked 0x04 312#define p1_bit_1 0x02 /* unused */ 313#define p1_disk_ok 0x01 314 315#define p2_disk_ok 0x80 316#define p2_door_locked 0x40 317#define p2_spinning 0x20 318#define p2_busy2 0x10 319#define p2_busy1 0x08 320#define p2_door_closed 0x04 321#define p2_disk_in 0x02 322#define p2_check 0x01 323 324/* 325 * used drive states: 326 */ 327#define st_door_closed (current_drive->status_bits&p_door_closed) 328#define st_caddy_in (current_drive->status_bits&p_caddy_in) 329#define st_spinning (current_drive->status_bits&p_spinning) 330#define st_check (current_drive->status_bits&p_check) 331#define st_busy (current_drive->status_bits&p_busy_new) 332#define st_door_locked (current_drive->status_bits&p_door_locked) 333#define st_diskok (current_drive->status_bits&p_disk_ok) 334 335/* 336 * bits of the CDi_status register: 337 */ 338#define s_not_result_ready 0x04 /* 0: "result ready" */ 339#define s_not_data_ready 0x02 /* 0: "data ready" */ 340#define s_attention 0x01 /* 1: "attention required" */ 341/* 342 * usable as: 343 */ 344#define DRV_ATTN ((inb(CDi_status)&s_attention)!=0) 345#define DATA_READY ((inb(CDi_status)&s_not_data_ready)==0) 346#define RESULT_READY ((inb(CDi_status)&s_not_result_ready)==0) 347 348/* 349 * drive families and types (firmware versions): 350 */ 351#define drv_fam0 0x0100 /* CR-52x family */ 352#define drv_199 (drv_fam0+0x01) /* <200 */ 353#define drv_200 (drv_fam0+0x02) /* <201 */ 354#define drv_201 (drv_fam0+0x03) /* <210 */ 355#define drv_210 (drv_fam0+0x04) /* <211 */ 356#define drv_211 (drv_fam0+0x05) /* <300 */ 357#define drv_300 (drv_fam0+0x06) /* >=300 */ 358 359#define drv_fam1 0x0200 /* CR-56x family */ 360#define drv_099 (drv_fam1+0x01) /* <100 */ 361#define drv_100 (drv_fam1+0x02) /* >=100, only 1.02 and 5.00 known */ 362 363#define drv_fam2 0x0400 /* CD200 family */ 364 365#define drv_famT 0x0800 /* TEAC CD-55A */ 366 367#define drv_famL 0x1000 /* Longshine family */ 368#define drv_260 (drv_famL+0x01) /* LCS-7260 */ 369#define drv_e1 (drv_famL+0x01) /* LCS-7260, firmware "A E1" */ 370#define drv_f4 (drv_famL+0x02) /* LCS-7260, firmware "A4F4" */ 371 372#define drv_famV 0x2000 /* ECS-AT (vertos-100) family */ 373#define drv_at (drv_famV+0x01) /* ECS-AT, firmware "1.00" */ 374 375#define fam0_drive (current_drive->drv_type&drv_fam0) 376#define famL_drive (current_drive->drv_type&drv_famL) 377#define famV_drive (current_drive->drv_type&drv_famV) 378#define fam1_drive (current_drive->drv_type&drv_fam1) 379#define fam2_drive (current_drive->drv_type&drv_fam2) 380#define famT_drive (current_drive->drv_type&drv_famT) 381#define fam0L_drive (current_drive->drv_type&(drv_fam0|drv_famL)) 382#define fam0V_drive (current_drive->drv_type&(drv_fam0|drv_famV)) 383#define famLV_drive (current_drive->drv_type&(drv_famL|drv_famV)) 384#define fam0LV_drive (current_drive->drv_type&(drv_fam0|drv_famL|drv_famV)) 385#define fam1L_drive (current_drive->drv_type&(drv_fam1|drv_famL)) 386#define fam1V_drive (current_drive->drv_type&(drv_fam1|drv_famV)) 387#define fam1LV_drive (current_drive->drv_type&(drv_fam1|drv_famL|drv_famV)) 388#define fam01_drive (current_drive->drv_type&(drv_fam0|drv_fam1)) 389#define fam12_drive (current_drive->drv_type&(drv_fam1|drv_fam2)) 390#define fam2T_drive (current_drive->drv_type&(drv_fam2|drv_famT)) 391 392/* 393 * audio states: 394 */ 395#define audio_completed 3 /* Forgot this one! --AJK */ 396#define audio_playing 2 397#define audio_pausing 1 398 399/* 400 * drv_pattern, drv_options: 401 */ 402#define speed_auto 0x80 403#define speed_300 0x40 404#define speed_150 0x20 405#define audio_mono 0x04 406 407/* 408 * values of cmd_type (0 else): 409 */ 410#define READ_M1 0x01 /* "data mode 1": 2048 bytes per frame */ 411#define READ_M2 0x02 /* "data mode 2": 12+2048+280 bytes per frame */ 412#define READ_SC 0x04 /* "subchannel info": 96 bytes per frame */ 413#define READ_AU 0x08 /* "audio frame": 2352 bytes per frame */ 414 415/* 416 * sense_byte: 417 * 418 * values: 00 419 * 01 420 * 81 421 * 82 "raw audio" mode 422 * xx from infobuf[0] after 85 00 00 00 00 00 00 423 */ 424 425/* audio status (bin) */ 426#define aud_00 0x00 /* Audio status byte not supported or not valid */ 427#define audx11 0x0b /* Audio play operation in progress */ 428#define audx12 0x0c /* Audio play operation paused */ 429#define audx13 0x0d /* Audio play operation successfully completed */ 430#define audx14 0x0e /* Audio play operation stopped due to error */ 431#define audx15 0x0f /* No current audio status to return */ 432/* audio status (bcd) */ 433#define aud_11 0x11 /* Audio play operation in progress */ 434#define aud_12 0x12 /* Audio play operation paused */ 435#define aud_13 0x13 /* Audio play operation successfully completed */ 436#define aud_14 0x14 /* Audio play operation stopped due to error */ 437#define aud_15 0x15 /* No current audio status to return */ 438 439/* 440 * highest allowed drive number (MINOR+1) 441 */ 442#define NR_SBPCD 4 443 444/* 445 * we try to never disable interrupts - seems to work 446 */ 447#define SBPCD_DIS_IRQ 0 448 449/* 450 * "write byte to port" 451 */ 452#define OUT(x,y) outb(y,x) 453 454/*==========================================================================*/ 455 456#define MIXER_addr SOUND_BASE+4 /* sound card's address register */ 457#define MIXER_data SOUND_BASE+5 /* sound card's data register */ 458#define MIXER_CD_Volume 0x28 /* internal SB Pro register address */ 459 460/*==========================================================================*/ 461 462#define MAX_TRACKS 99 463 464#define ERR_DISKCHANGE 615 465 466/*==========================================================================*/ 467/* 468 * To make conversions easier (machine dependent!) 469 */ 470typedef union _msf 471{ 472 u_int n; 473 u_char c[4]; 474} MSF; 475 476typedef union _blk 477{ 478 u_int n; 479 u_char c[4]; 480} BLK; 481 482/*==========================================================================*/ 483 484 485/* 486 * commands 487 * 488 * CR-52x: CMD0_ 489 * CR-56x: CMD1_ 490 * CD200: CMD2_ 491 * LCS-7260: CMDL_ 492 * TEAC CD-55A: CMDT_ 493 * ECS-AT: CMDV_ 494 */ 495#define CMD1_RESET 0x0a 496#define CMD2_RESET 0x01 497#define CMDT_RESET 0xc0 498 499#define CMD1_LOCK_CTL 0x0c 500#define CMD2_LOCK_CTL 0x1e 501#define CMDT_LOCK_CTL CMD2_LOCK_CTL 502#define CMDL_LOCK_CTL 0x0e 503#define CMDV_LOCK_CTL CMDL_LOCK_CTL 504 505#define CMD1_TRAY_CTL 0x07 506#define CMD2_TRAY_CTL 0x1b 507#define CMDT_TRAY_CTL CMD2_TRAY_CTL 508#define CMDL_TRAY_CTL 0x0d 509#define CMDV_TRAY_CTL CMDL_TRAY_CTL 510 511#define CMD1_MULTISESS 0x8d 512#define CMDL_MULTISESS 0x8c 513#define CMDV_MULTISESS CMDL_MULTISESS 514 515#define CMD1_SUBCHANINF 0x11 516#define CMD2_SUBCHANINF 0x?? 517 518#define CMD1_ABORT 0x08 519#define CMD2_ABORT 0x08 520#define CMDT_ABORT 0x08 521 522#define CMD2_x02 0x02 523 524#define CMD2_SETSPEED 0xda 525 526#define CMD0_PATH_CHECK 0x00 527#define CMD1_PATH_CHECK 0x??? 528#define CMD2_PATH_CHECK 0x??? 529#define CMDT_PATH_CHECK 0x??? 530#define CMDL_PATH_CHECK CMD0_PATH_CHECK 531#define CMDV_PATH_CHECK CMD0_PATH_CHECK 532 533#define CMD0_SEEK 0x01 534#define CMD1_SEEK CMD0_SEEK 535#define CMD2_SEEK 0x2b 536#define CMDT_SEEK CMD2_SEEK 537#define CMDL_SEEK CMD0_SEEK 538#define CMDV_SEEK CMD0_SEEK 539 540#define CMD0_READ 0x02 541#define CMD1_READ 0x10 542#define CMD2_READ 0x28 543#define CMDT_READ CMD2_READ 544#define CMDL_READ CMD0_READ 545#define CMDV_READ CMD0_READ 546 547#define CMD0_READ_XA 0x03 548#define CMD2_READ_XA 0xd4 549#define CMD2_READ_XA2 0xd5 550#define CMDL_READ_XA CMD0_READ_XA /* really ?? */ 551#define CMDV_READ_XA CMD0_READ_XA 552 553#define CMD0_READ_HEAD 0x04 554 555#define CMD0_SPINUP 0x05 556#define CMD1_SPINUP 0x02 557#define CMD2_SPINUP CMD2_TRAY_CTL 558#define CMDL_SPINUP CMD0_SPINUP 559#define CMDV_SPINUP CMD0_SPINUP 560 561#define CMD0_SPINDOWN 0x06 /* really??? */ 562#define CMD1_SPINDOWN 0x06 563#define CMD2_SPINDOWN CMD2_TRAY_CTL 564#define CMDL_SPINDOWN 0x0d 565#define CMDV_SPINDOWN CMD0_SPINDOWN 566 567#define CMD0_DIAG 0x07 568 569#define CMD0_READ_UPC 0x08 570#define CMD1_READ_UPC 0x88 571#define CMD2_READ_UPC 0x??? 572#define CMDL_READ_UPC CMD0_READ_UPC 573#define CMDV_READ_UPC 0x8f 574 575#define CMD0_READ_ISRC 0x09 576 577#define CMD0_PLAY 0x0a 578#define CMD1_PLAY 0x??? 579#define CMD2_PLAY 0x??? 580#define CMDL_PLAY CMD0_PLAY 581#define CMDV_PLAY CMD0_PLAY 582 583#define CMD0_PLAY_MSF 0x0b 584#define CMD1_PLAY_MSF 0x0e 585#define CMD2_PLAY_MSF 0x47 586#define CMDT_PLAY_MSF CMD2_PLAY_MSF 587#define CMDL_PLAY_MSF 0x??? 588 589#define CMD0_PLAY_TI 0x0c 590#define CMD1_PLAY_TI 0x0f 591 592#define CMD0_STATUS 0x81 593#define CMD1_STATUS 0x05 594#define CMD2_STATUS 0x00 595#define CMDT_STATUS CMD2_STATUS 596#define CMDL_STATUS CMD0_STATUS 597#define CMDV_STATUS CMD0_STATUS 598#define CMD2_SEEK_LEADIN 0x00 599 600#define CMD0_READ_ERR 0x82 601#define CMD1_READ_ERR CMD0_READ_ERR 602#define CMD2_READ_ERR 0x03 603#define CMDT_READ_ERR CMD2_READ_ERR /* get audio status */ 604#define CMDL_READ_ERR CMD0_READ_ERR 605#define CMDV_READ_ERR CMD0_READ_ERR 606 607#define CMD0_READ_VER 0x83 608#define CMD1_READ_VER CMD0_READ_VER 609#define CMD2_READ_VER 0x12 610#define CMDT_READ_VER CMD2_READ_VER /* really ?? */ 611#define CMDL_READ_VER CMD0_READ_VER 612#define CMDV_READ_VER CMD0_READ_VER 613 614#define CMD0_SETMODE 0x84 615#define CMD1_SETMODE 0x09 616#define CMD2_SETMODE 0x55 617#define CMDT_SETMODE CMD2_SETMODE 618#define CMDL_SETMODE CMD0_SETMODE 619 620#define CMD0_GETMODE 0x85 621#define CMD1_GETMODE 0x84 622#define CMD2_GETMODE 0x5a 623#define CMDT_GETMODE CMD2_GETMODE 624#define CMDL_GETMODE CMD0_GETMODE 625 626#define CMD0_SET_XA 0x86 627 628#define CMD0_GET_XA 0x87 629 630#define CMD0_CAPACITY 0x88 631#define CMD1_CAPACITY 0x85 632#define CMD2_CAPACITY 0x25 633#define CMDL_CAPACITY CMD0_CAPACITY /* missing in some firmware versions */ 634 635#define CMD0_READSUBQ 0x89 636#define CMD1_READSUBQ 0x87 637#define CMD2_READSUBQ 0x42 638#define CMDT_READSUBQ CMD2_READSUBQ 639#define CMDL_READSUBQ CMD0_READSUBQ 640#define CMDV_READSUBQ CMD0_READSUBQ 641 642#define CMD0_DISKCODE 0x8a 643 644#define CMD0_DISKINFO 0x8b 645#define CMD1_DISKINFO CMD0_DISKINFO 646#define CMD2_DISKINFO 0x43 647#define CMDT_DISKINFO CMD2_DISKINFO 648#define CMDL_DISKINFO CMD0_DISKINFO 649#define CMDV_DISKINFO CMD0_DISKINFO 650 651#define CMD0_READTOC 0x8c 652#define CMD1_READTOC CMD0_READTOC 653#define CMD2_READTOC 0x??? 654#define CMDL_READTOC CMD0_READTOC 655#define CMDV_READTOC CMD0_READTOC 656 657#define CMD0_PAU_RES 0x8d 658#define CMD1_PAU_RES 0x0d 659#define CMD2_PAU_RES 0x4b 660#define CMDT_PAUSE CMD2_PAU_RES 661#define CMDL_PAU_RES CMD0_PAU_RES 662#define CMDV_PAUSE CMD0_PAU_RES 663 664#define CMD0_PACKET 0x8e 665#define CMD1_PACKET CMD0_PACKET 666#define CMD2_PACKET 0x??? 667#define CMDL_PACKET CMD0_PACKET 668#define CMDV_PACKET 0x??? 669 670/*==========================================================================*/ 671/*==========================================================================*/ 672#endif /* _LINUX_SBPCD_H */ 673/*==========================================================================*/ 674/* 675 * Overrides for Emacs so that we follow Linus's tabbing style. 676 * Emacs will notice this stuff at the end of the file and automatically 677 * adjust the settings for this buffer only. This must remain at the end 678 * of the file. 679 * --------------------------------------------------------------------------- 680 * Local variables: 681 * c-indent-level: 8 682 * c-brace-imaginary-offset: 0 683 * c-brace-offset: -8 684 * c-argdecl-indent: 8 685 * c-label-offset: -8 686 * c-continued-statement-offset: 8 687 * c-continued-brace-offset: 0 688 * End: 689 */ 690