Date Augest 10 1989 To: X3T9.2 SCSI Committee Members From: Rita Lin/ M. Yokoyama Sony Corp. of America Subject: CD-ROM Read Subchannel Command Read Error Recovery Parameters Ref: X3T9.2/89-95 Rev 0, X3T9.2/89-98 The document is to explain the intention of Sony's proposal so that the members of the SCSI committee can understand the reason behind our concept. 1)READ SUB-CHANNEL Command(SUB-Q CODE READ COMMAND) 1-1) Background of this proposal On our proposal we submitted in June (X3T9.2/89-98) this year, Mr. Paul Boulay presented to choose one idea out of three ideas. (Option-1 to 3 in X3T9.2/89-095) The option-1 is his proposal, the option-2 is Sony's proposal, and the option-3 is a proposal with different approach. Therefore we, as Sony, would like to propose the second best idea, which covers both ideas. 1-2) Problem with the present format With present SCSI-2 (Rev. 10), the CD-ROM drive always has to look for if the following two data existing on the media, i.e., a) Media Catalog Number (UPC/Bar Code) b) Track International-Standard-Recording Code (ISRC) The drive also has to return other information, such as the address data of the sector. The drive is reading the data at the time of command execution from the host. From our experience, the type of disc with these data is very rare and we do not think there are many cases which require these type of informations from the disc. In other words, the most of applications will be using this command just to get the data other than these two informations, i.e., UPC/Bar Code, and ISRC. For argument sake, let's call the data other than UPC/Bar Code and ISRC as "main data". As explained below, we believe that the present implementation creates some extra work load for CD-ROM drive manufacturers as well as for users. REASONS FOR INCONVENIENCE a) The length of the returned value Most applications or users will require the main data (mentioned above, and the length is 16 bytes), however more data are always returned, which could be as long as 32 extra bytes. It is possible to cut these unwanted data by setting the allocation length to limit the data length, but we know that most of SCSI users set this allocation length to the maximum. This means most of users/applications have to read these redundant 32 bytes of data all the time. We believe this not only creates some confusions to users, but also it deteriorates the throughput of the software. It is much easier and less confusing if the length of the return value is always known to the users, i.e. if it is allowed to have a command which can specify the data that the user needs. This also contributes to the CD-ROM drive vendors as it simplifies the design of controller, which in tern, contributes to the reliability, the cost, or to the performance. b) The recorded frequency of UPC/Bar Code or ISRC Both UPC/Bar Code and ISRC are not recorded in every block. The frequency of these data are at least in every 100 blocks, therefore the drive has to read up to 100 blocks to find these data. For example, with SCSI-2 Rev. 10 or Mr. Boulay's proposal, the drive may not be able to read this data with Read Sub-Channel command if the optical head is at innermost track in the hold track state before it reaches 100 block or before it finds UPC/Bar Code and ISRC. To avoid confusion and misunderstanding, it is necessary to add some cautions to users, which will make the SCSI documents more complicated and awkward to users. The only way to avoid the problem mentioned above is to have scan commands as shown in the table. =============================================================== Sub-Q Data Format Code Return Data --------------------------------------------------------------- 00 h Same as Rev. 10 or Mr. Boulay's idea 01 h Main data (Location data) only 02 h UPC/Bar Code only 03 h ISRC only =============================================================== c) Low cost version of CD-ROM drive There may be a case to eliminate the feature to read UPC/Bar code or ISRC on some low cost version of CD-ROM drive. If the drive supports Sub-Channel command formatted according to SCSI-2 Rev. 10 or to Mr. Boulay's proposal, it is impossible for users to judge whether the drive supports this function or not unless he has a document for the drive with him. It is easy to find if the drive supports this function or not with our proposal, i.e., by using different command format for each return value, because the drive will return the Illegal Request when the host request one of these data which is not supported. d) The concept of our proposal Our proposal is to define one byte as "Sub-Q Data Format Byte" in the CDB of the command packet as this idea will support both Mr. Boulay's proposal (X3T9.2/89-95/Option-1) as well as our previous proposal (X3T9.2/89-98 / his Option-2). The followings are our proposal on the code, from which you will be able to see how we tried to maintain the compatibility with either Mr. Boulay's proposal or SCSI-2 Rev. 10. We propose to modify table 13-17 and table 13-18 and four more table as table 13-17A, table 13-18A, table 13-18B, table 13-18C, and to add following sentence to SCSI2 REV 10 page 13-28 into the first IMPLEMENTORS NOTE(X3T9.2/86-109): "IMPLEMENTORS NOTE: Usual values for sub-channel data length are 0, 12, 28, and 44 bytes. Subchannel data length does not include the subchannel Header." 2) ERROR RECOVERY PARAMETERS (MODE SELECT PAGE 1) 2-1) The problems with the present specification: With type of applications, where a real time data transfer or a continuous data transfer is required even if the data has some errors, present SCSI-2 specification (Rev. 10) will not be able to implement this application. The CD-ROM drive stops the data transfer as soon as it detects some errors. This is rather inconvenient for the users who wish to control the way of the data transfer. The following are some sample of the applications: a) XA application with sound data. b) An application with bit map graphic data which requires fast data transfer, or real time data transfer without any interrupt. c) Some applications which errors can be handled within the host computer rather than in the CD-ROM drive. 2-2) Our proposal Our proposal is to support RC bit (Table 13-35 Bit 4) so that the CD-ROM drive will not stop the data transfer even if the data has some errors providing RC bit is set to "1". For this purpose, we would like to add four values as Table 13-34 Byte 2 value which are 10, 11, 14 and 15. The point is that this proposal has backward compatibility with the original format, therefore we are proposing the format as shown in the Table 13-35, namely, we added four parameters.(Please see attached table 13-35 and table 13-37A). 2-3) Two missing value found in the SCSI document We found there were two values missing in the Rev 10 Table 13-35. The two values 24 and 25 are missing on the original document. 2-4) Comment on CD-ROM Error Recovery Parameters 04h, 07h, 24h,27h We suggest to add a word "last" to the final sentence at the final paragraph of SCSI2 Rev 10 page 13-42, page 13-43, page 13-44, and page 13-45 as follow: "The information bytes give the address of the last block where the uncorrectable error was detected." 13.2.10. READ SUB-CHANNEL Command * Table 13-17: READ SUB-CHANNEL Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (42h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | MSF |Reserved| -----|-----------------------------------------------------------------------| 2 |Reserved| SubQ | Reserved | -----|-----------------------------------------------------------------------| 3 | * Sub Channel Data Format | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Track Number | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Allocation Length ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control | ============================================================================== The Sub Channel Data Format field specifies the returned Sub Channel Data. If this field is set to 00h, the whole Sub-Q Channel data following to the sub channel header is returned. See Table 13-18. If this field is set to 01h, 02h or 03h, a part of the Sub-Q Channel data following to the sub channel header is returned. See Table 13-18A, 13-18B and 13-18C. * Table 13-17A: Sub Channel Data Format field ============================================================================== Format Code | Returned data | ----------------|------------------------------------------------------------| 00h | Sub-Q Channel data ----------------|------------------------------------------------------------| 01h | CD-ROM address ----------------|------------------------------------------------------------| 02h | Media Catalog Number (UPC/Bar Code) ----------------|------------------------------------------------------------| 03h | Track International-Standard-Recording-Code (ISRC) ----------------|------------------------------------------------------------| 04h - EFh | Reserved ----------------|------------------------------------------------------------| F0h - FFh | Vendor Unique ============================================================================== The Track Number field specifies the track number from which the ISR Code is transferred. This field must have the value between 01h and 63h (99bcd), and is valid only when the Sub Channel Data Format field has 03h. In this case, the target returns the ISR Code of the Track if it is detected. In other cases, CHECK CONDITION status is reported. The sense key and additional sense code are set to ILLEGAL REQUEST/Illegal value in CDB. IMPLEMENTORS NOTE: Sub-Q Channel Data returned responding to this command with Sub Channel Data Format field code 00h may be from the last appropriate sector encountered by a Read or Play command or drive level seeking or position holding operation. The target is responsible that the data returned are consistent. For example, the International-standard-Recording-Code (ISRC) data reported must have been read from the same track as the reported current position data. CD-Rom Address Data returned responding to this command with Sub Channel Data Format field code 01h shall be from the sub-channel Q information of the current block. Media Catalog Number Data returned responding to this command with Sub Channel Data Format field code 02h may be from the sub-channel Q information of any block including UPC/Bar Code data. (This code is constant anywhere in every applicable disc.) Track ISRC data returned responding this command with Sub Channel Data Format field code 03h may be from the sub-channel Q information of any block including ISRC in the specified track. * Table 13-18: SUB-Q CHANNEL Data Format Sub Channel Header ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Audio Status | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Sub-Channel Data Length ---| 3 | (LSB) | ============================================================================== | * Sub-Q channel Data Block | ============================================================================== 4 | * Sub Channel Data Format code (00h) | -----|-----------------------------------------------------------------------| 5 | ADR | Control | -----|-----------------------------------------------------------------------| 6 | Track Number | -----|-----------------------------------------------------------------------| 7 | Index Number | -----|-----------------------------------------------------------------------| 8 | (MSB) | - - -|- - - - Absolute CD-ROM Address - - - -| 11 | (LSB) | -----|-----------------------------------------------------------------------| 12 | (MSB) | - - -|- - - - Track Relative CD-ROM Address - - - -| 15 | (LSB) | -----|-----------------------------------------------------------------------| 16 | MCVal | Reserved | -----|-----------------------------------------------------------------------| 17 | (MSB) | - - -|- - - - Media Catalog Number (UPC/Bar Code) - - - -| 31 | (LSB) | -----|-----------------------------------------------------------------------| 32 | TCVal | Reserved | -----|-----------------------------------------------------------------------| 33 | (MSB) | - - -|- - - - Track International-Standard-Recording-Code (ISRC) - - - -| 47 | (LSB) | ============================================================================== * Table 13-18A: CD-ROM ADDRESS Data Format Sub Channel Header ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Audio Status | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Sub-Channel Data Length ---| 3 | (LSB) | ============================================================================== | CD-ROM ADDRESS Data Block | ============================================================================== 4 | Sub Channel Data Format code (01h) | -----|-----------------------------------------------------------------------| 5 | ADR | Control | -----|-----------------------------------------------------------------------| 6 | Track Number | -----|-----------------------------------------------------------------------| 7 | Index Number | -----|-----------------------------------------------------------------------| 8 | (MSB) | - - -|- - - - Absolute CD-ROM Address - - - -| 11 | (LSB) | -----|-----------------------------------------------------------------------| 12 | (MSB) | - - -|- - - - Track Relative CD-ROM Address - - - -| 15 | (LSB) | ============================================================================== IMPLEMENTORS NOTE: Usual values for Sub-channel data length, which does not include the Sub Channel Header, is 0 or 12 bytes. When the Sub-Q bit in the CDB is set to zero, the target returns the Sub Channel Header. However other data are not returned. * Table 13-18B: MEDIA CATALOG NUMBER Data Format Sub Channel Header ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Audio Status | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Sub-Channel Data Length ---| 3 | (LSB) | ============================================================================== | MEDIA CATALOG NUMBER Data Block | ============================================================================== 4 | Sub Channel Data Format code (02h) | ------------------------------------------------------------------------------ 5 | Reserved | ------------------------------------------------------------------------------ 6 | Reserved | ------------------------------------------------------------------------------ 7 | Reserved | ------------------------------------------------------------------------------ 8 | MCVal | Reserved | -----|-----------------------------------------------------------------------| 9 | (MSB) | - - -|- - - - Media Catalog Number (UPC/Bar Code) - - - -| 23 | (LSB) | ============================================================================== When the Media Catalog Number is detected, the MCVal bit is set to one. If the number is not detected, the MCVal bit is set to zero to indicate the Media Catalog Number is invalid. IMPLEMENTORS NOTE: Usual values for Sub-channel data length, which does not include the Sub Channel Header, is 0 or 20 bytes. When the Sub-Q bit in the CDB is set to zero, the target returns the Sub Channel Header. However other data are not returned. * Table 13-18C: TRACK-INTERNATIONAL-STANDARD-RECORDING Data Format Sub Channel Header ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Audio Status | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- Sub-Channel Data Length ---| 3 | (LSB) | ============================================================================== | TRACK-INTERNATIONAL-STANDARD-RECORDING Data Block ============================================================================== 4 | Sub Channel Data Format code (03h) | ------------------------------------------------------------------------------ 5 | ADR | Control | ------------------------------------------------------------------------------ 6 | Track Number | ------------------------------------------------------------------------------ 7 | Reserved | ------------------------------------------------------------------------------ 8 | TCVal | Reserved | -----|-----------------------------------------------------------------------| 9 | (MSB) | - - -|- - - - Track-International-Standard-Recording-Code (ISRC) - - - -| 23 | (LSB) | ============================================================================== When the ISRC is detected, the TCVal bit is set to one. If the ISRC is not detected, the TCVal bit is set to zero to indicate the ISRC is invalid. IMPLEMENTORS NOTE: Usual values for Sub-channel data length, which does not include the Sub Channel Header, is 0 or 20 bytes. When the Sub-Q bit in the CDB is set to zero, the target returns the Sub Channel Header. However other data are not returned. 13.3.3.3. Read Error Recovery Parameters * Table 13-35: Error Recovery Parameter Bit Settings ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | * | | | | | 2 | | | TB | RC | | PER | DTE | DCR | Value| | | | | | | | | ============================================================================== 00 | 0 0 0 0 0 | -----+--------+--------+--------+--------+--------+--------+--------+--------| 01 | 0 0 0 0 1 | -----+--------+--------+--------+--------+--------+--------+--------+--------| 04 | 0 0 1 0 0 | -----+--------+--------+--------+--------+--------+--------+--------+--------| 05 | 0 0 1 0 1 | -----+--------+--------+--------+--------+--------+--------+--------+--------| 06 | 0 0 1 1 0 | -----+--------+--------+--------+--------+--------+--------+--------+--------| 07 | 0 0 1 1 1 | -----+--------+--------+--------+--------+--------+--------+--------+--------| 20 | 1 0 0 0 0 | -----+--------+--------+--------+--------+--------+--------+--------+--------| 21 | 1 0 0 0 1 | -----+--------+--------+--------+--------+--------+--------+--------+--------| * 24 | 1 0 1 0 0 | -----+--------+--------+--------+--------+--------+--------+--------+--------| * 25 | 1 0 1 0 1 | -----+--------+--------+--------+--------+--------+--------+--------+--------| 26 | 1 0 1 1 0 | -----+--------+--------+--------+--------+--------+--------+--------+--------| 27 | 1 0 1 1 1 | +----+--------+--------+--------+--------+--------+--------+--------+--------| * 10 | 0 1 0 0 0 | -----+--------+--------+--------+--------+--------+--------+--------+--------| * 11 | 0 1 0 0 1 | -----+--------+--------+--------+--------+--------+--------+--------+--------| * 14 | 0 1 1 0 0 | -----+--------+--------+--------+--------+--------+--------+--------+--------| * 15 | 0 1 1 0 1 | -----+--------+--------+--------+--------+--------+--------+--------+--------| ============================================================================== NOTE: Reserved bits are not shown and shall be zero. * Table 13-37A: CD-ROM Error Recovery Parameters 10h - 15h ============================================================================== Error Recovery Description ------------------------------------------------------------------------------ 10h The maximum error recovery procedures available are used. If an error occurs which is uncorrectable with the error correction codes (ECC) on the media, data transfer is not terminated. However, when the data transfer has completed CHECK CONDITION status is reported. The sense key is set to MEDIUM ERROR. The information bytes give the address of the last block where the unrecovered error was detected. Recovered errors are not reported. 11h Only retries of the read operation and CIRC are used (layered error correction is not used). Only CIRC unrecovered data errors are reported. If an CIRC unrecovered data error occurs data transfer is not terminated. However, when the data transfer has completed CHECK CONDITION status is reported. The sense key is set to MEDIUM ERROR. The information bytes give the address of the last block where the unrecovered error was detected. Recovered errors are not reported. 14h The maximum error recovery procedures available are used. Recovered data errors are reported. If a recovered data error occurs data transfer is not terminated. However, when the data transfer has completed CHECK CONDITION status is reported. The sense key is set to RECOVERED ERROR. The information bytes give the address of the last block where a recovered data error was detected. If an data error occurs which is uncorrectable with the ECC information available on the media, data transfer is not terminated. However, when the date transfer has completed CHECK CONDITION status is reported. The sense key is set to MEDIUM ERROR. The information bytes give the address of the last block where the uncorrectable error was detected. 15h Only retries of the read operation and CIRC are used (layered error correction is not used). Recovered data errors are reported. If a recovered data error occurs data transfer is not terminated. However, when the data transfer has completed CHECK CONDITION status is reported. The sense key is set to RECOVERED ERROR. The information bytes give the address of the last block where a CIRC recovered data error was detected. If an unrecovered data error occurs data transfer is not terminated. However, when the data transfer has completed CHECK CONDITION status is reported. The sense key is set to MEDIUM ERROR. The information bytes give the address of the last block where the unrecovered error was detected. =============================================================================