10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _SYS_CDIO_H
28 #define _SYS_CDIO_H
29
30 #pragma ident "%Z%%M% %I% %E% SMI"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /*
37 * CDROM io controls type definitions
38 */
39 struct cdrom_msf {
40 unsigned char cdmsf_min0; /* starting minute */
41 unsigned char cdmsf_sec0; /* starting second */
42 unsigned char cdmsf_frame0; /* starting frame */
43 unsigned char cdmsf_min1; /* ending minute */
44 unsigned char cdmsf_sec1; /* ending second */
45 unsigned char cdmsf_frame1; /* ending frame */
46 };
47
48 struct cdrom_ti {
49 unsigned char cdti_trk0; /* starting track */
50 unsigned char cdti_ind0; /* starting index */
51 unsigned char cdti_trk1; /* ending track */
365 #define READ_CD_EST_RSVD2 0x7 /* reserved */
366
367
368 /*
369 *
370 * Group 6 Commands
371 *
372 */
373 #define SCMD_CD_PLAYBACK_CONTROL 0xC9 /* SONY unique SCSI command */
374 #define SCMD_CD_PLAYBACK_STATUS 0xC4 /* SONY unique SCSI command */
375 #define SCMD_READ_CDDA 0xD8 /* Vendor unique SCSI command */
376 #define SCMD_READ_CDXA 0xDB /* Vendor unique SCSI command */
377 #define SCMD_READ_ALL_SUBCODES 0xDF /* Vendor unique SCSI command */
378
379 #define CDROM_MODE2_SIZE 2336
380
381 /*
382 * scsi_key_strings for CDROM cdio SCMD_ definitions
383 */
384 #define SCSI_CMDS_KEY_STRINGS_CDIO \
385 /* 0x42 */ SCMD_READ_SUBCHANNEL, "read_subchannel", \
386 /* 0x43 */ SCMD_READ_TOC, "read_toc", \
387 /* 0x44 */ SCMD_REPORT_DENSITIES | \
388 SCMD_READ_HEADER, "report_densities/read_header", \
389 /* 0x45 */ SCMD_PLAYAUDIO10, "playaudio", \
390 /* 0x46 */ SCMD_GET_CONFIGURATION, "get_configuration", \
391 /* 0x47 */ SCMD_PLAYAUDIO_MSF, "playaudio_msf", \
392 /* 0x48 */ SCMD_PLAYAUDIO_TI, "playaudio_ti", \
393 /* 0x49 */ SCMD_PLAYTRACK_REL10, "playaudio_rel", \
394 /* 0x4b */ SCMD_PAUSE_RESUME, "pause_resume", \
395 \
396 /* 0xa5 */ SCMD_PLAYAUDIO12, "playaudio(12)", \
397 /* 0xa9 */ SCMD_PLAYTRACK_REL12, "playtrack_rel", \
398 /* 0xbb */ SCMD_SET_CDROM_SPEED, "set_cd_speed", \
399 /* 0xbe */ SCMD_READ_CD, "read_cd", \
400 \
401 /* 0xc4 */ SCMD_CD_PLAYBACK_STATUS, "cd_playback_status", \
402 /* 0xc9 */ SCMD_CD_PLAYBACK_CONTROL, "cd_playback_control", \
403 /* 0xd8 */ SCMD_READ_CDDA, "read_cdda", \
404 /* 0xdb */ SCMD_READ_CDXA, "read_cdxa", \
405 /* 0xdf */ SCMD_READ_ALL_SUBCODES, "read_all_subcodes"
406
407 #ifdef __cplusplus
408 }
409 #endif
410
411 #endif /* _SYS_CDIO_H */
|
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _SYS_CDIO_H
28 #define _SYS_CDIO_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /*
35 * CDROM io controls type definitions
36 */
37 struct cdrom_msf {
38 unsigned char cdmsf_min0; /* starting minute */
39 unsigned char cdmsf_sec0; /* starting second */
40 unsigned char cdmsf_frame0; /* starting frame */
41 unsigned char cdmsf_min1; /* ending minute */
42 unsigned char cdmsf_sec1; /* ending second */
43 unsigned char cdmsf_frame1; /* ending frame */
44 };
45
46 struct cdrom_ti {
47 unsigned char cdti_trk0; /* starting track */
48 unsigned char cdti_ind0; /* starting index */
49 unsigned char cdti_trk1; /* ending track */
363 #define READ_CD_EST_RSVD2 0x7 /* reserved */
364
365
366 /*
367 *
368 * Group 6 Commands
369 *
370 */
371 #define SCMD_CD_PLAYBACK_CONTROL 0xC9 /* SONY unique SCSI command */
372 #define SCMD_CD_PLAYBACK_STATUS 0xC4 /* SONY unique SCSI command */
373 #define SCMD_READ_CDDA 0xD8 /* Vendor unique SCSI command */
374 #define SCMD_READ_CDXA 0xDB /* Vendor unique SCSI command */
375 #define SCMD_READ_ALL_SUBCODES 0xDF /* Vendor unique SCSI command */
376
377 #define CDROM_MODE2_SIZE 2336
378
379 /*
380 * scsi_key_strings for CDROM cdio SCMD_ definitions
381 */
382 #define SCSI_CMDS_KEY_STRINGS_CDIO \
383 /* 0x42 */ { SCMD_READ_SUBCHANNEL, "read_subchannel" }, \
384 /* 0x43 */ { SCMD_READ_TOC, "read_toc" }, \
385 /* 0x44 */ { SCMD_REPORT_DENSITIES | \
386 SCMD_READ_HEADER, "report_densities/read_header" }, \
387 /* 0x45 */ { SCMD_PLAYAUDIO10, "playaudio" }, \
388 /* 0x46 */ { SCMD_GET_CONFIGURATION, "get_configuration" }, \
389 /* 0x47 */ { SCMD_PLAYAUDIO_MSF, "playaudio_msf" }, \
390 /* 0x48 */ { SCMD_PLAYAUDIO_TI, "playaudio_ti" }, \
391 /* 0x49 */ { SCMD_PLAYTRACK_REL10, "playaudio_rel" }, \
392 /* 0x4b */ { SCMD_PAUSE_RESUME, "pause_resume" }, \
393 \
394 /* 0xa5 */ { SCMD_PLAYAUDIO12, "playaudio(12)" }, \
395 /* 0xa9 */ { SCMD_PLAYTRACK_REL12, "playtrack_rel" }, \
396 /* 0xbb */ { SCMD_SET_CDROM_SPEED, "set_cd_speed" }, \
397 /* 0xbe */ { SCMD_READ_CD, "read_cd" }, \
398 \
399 /* 0xc4 */ { SCMD_CD_PLAYBACK_STATUS, "cd_playback_status" }, \
400 /* 0xc9 */ { SCMD_CD_PLAYBACK_CONTROL, "cd_playback_control" }, \
401 /* 0xd8 */ { SCMD_READ_CDDA, "read_cdda" }, \
402 /* 0xdb */ { SCMD_READ_CDXA, "read_cdxa" }, \
403 /* 0xdf */ { SCMD_READ_ALL_SUBCODES, "read_all_subcodes" }
404
405 #ifdef __cplusplus
406 }
407 #endif
408
409 #endif /* _SYS_CDIO_H */
|