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