/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_CDIO_H
#define _SYS_CDIO_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* CDROM io controls type definitions
*/
struct cdrom_msf {
};
struct cdrom_ti {
};
struct cdrom_tochdr {
};
struct cdrom_tocentry {
unsigned char cdte_track;
unsigned char cdte_format;
union {
struct {
unsigned char minute;
unsigned char second;
unsigned char frame;
} msf;
int lba;
} cdte_addr;
unsigned char cdte_datamode;
};
/*
* CDROM address format definition, for use with struct cdrom_tocentry
*/
/*
* Bitmask for CD-ROM data track in the cdte_ctrl field
* A track is either data or audio.
*/
/*
* For CDROMREADTOCENTRY, set the cdte_track to CDROM_LEADOUT to get
* the information for the leadout track.
*/
struct cdrom_subchnl {
unsigned char cdsc_format;
unsigned char cdsc_audiostatus;
unsigned char cdsc_trk;
unsigned char cdsc_ind;
union {
struct {
unsigned char minute;
unsigned char second;
unsigned char frame;
} msf;
int lba;
} cdsc_absaddr;
union {
struct {
unsigned char minute;
unsigned char second;
unsigned char frame;
} msf;
int lba;
} cdsc_reladdr;
};
/*
* Definition for audio status returned from Read Sub-channel
*/
/*
* definition of audio volume control structure
*/
struct cdrom_volctrl {
unsigned char channel0;
unsigned char channel1;
unsigned char channel2;
unsigned char channel3;
};
struct cdrom_read {
int cdread_lba;
int cdread_buflen;
};
#if defined(_SYSCALL32)
struct cdrom_read32 {
int cdread_lba;
int cdread_buflen;
};
#endif /* _SYSCALL32 */
/*
*/
struct cdrom_cdda {
unsigned int cdda_addr;
unsigned int cdda_length;
unsigned char cdda_subcode;
};
#if defined(_SYSCALL32)
struct cdrom_cdda32 {
unsigned int cdda_addr;
unsigned int cdda_length;
unsigned char cdda_subcode;
};
#endif /* _SYSCALL32 */
/*
* Definitions for cdda_subcode field
*/
/*
*/
struct cdrom_cdxa {
unsigned int cdxa_addr;
unsigned int cdxa_length;
unsigned char cdxa_format;
};
#if defined(_SYSCALL32)
struct cdrom_cdxa32 {
unsigned int cdxa_addr;
unsigned int cdxa_length;
unsigned char cdxa_format;
};
#endif /* _SYSCALL32 */
/*
* Definitions for cdxa_format field
*/
/*
* Definition of subcode structure
*/
struct cdrom_subcode {
unsigned int cdsc_length;
};
#if defined(_SYSCALL32)
struct cdrom_subcode32 {
unsigned int cdsc_length;
};
#endif /* _SYSCALL32 */
/*
* Definitions for block size supported
*/
/*
* Definitions for drive speed supported
*/
/*
* CDROM io control commands
*/
/*
* Additional commands for CD-ROM
*/
/*
*
* Group 2 Commands
*
*/
/*
*
* Group 5 Commands
*
*/
/*
* These defines are for SCMD_READ_CD command.
* See Expected Sector Type Field Definition (SCSI MMC-2 Spec section 6.1.15)
* This information is used to figure out which block size to use.
*/
/*
*
* Group 6 Commands
*
*/
/*
* scsi_key_strings for CDROM cdio SCMD_ definitions
*/
#define SCSI_CMDS_KEY_STRINGS_CDIO \
/* 0x44 */ SCMD_REPORT_DENSITIES | \
\
\
#ifdef __cplusplus
}
#endif
#endif /* _SYS_CDIO_H */