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