10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 50Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 60Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 70Sstevel@tonic-gate * with the License. 80Sstevel@tonic-gate * 90Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 100Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 110Sstevel@tonic-gate * See the License for the specific language governing permissions 120Sstevel@tonic-gate * and limitations under the License. 130Sstevel@tonic-gate * 140Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 150Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 160Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 170Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 180Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 190Sstevel@tonic-gate * 200Sstevel@tonic-gate * CDDL HEADER END 210Sstevel@tonic-gate */ 220Sstevel@tonic-gate /* 23*722Smuffin * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*722Smuffin * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 280Sstevel@tonic-gate 290Sstevel@tonic-gate /* 300Sstevel@tonic-gate * 310Sstevel@tonic-gate * Defines for SCSI direct access devices modified for CDROM, based on sddef.h 320Sstevel@tonic-gate * 330Sstevel@tonic-gate */ 340Sstevel@tonic-gate 350Sstevel@tonic-gate /* 360Sstevel@tonic-gate * CDROM io controls type definitions 370Sstevel@tonic-gate */ 380Sstevel@tonic-gate struct cdrom_msf { 390Sstevel@tonic-gate unsigned char cdmsf_min0; /* starting minute */ 400Sstevel@tonic-gate unsigned char cdmsf_sec0; /* starting second */ 410Sstevel@tonic-gate unsigned char cdmsf_frame0; /* starting frame */ 420Sstevel@tonic-gate unsigned char cdmsf_min1; /* ending minute */ 430Sstevel@tonic-gate unsigned char cdmsf_sec1; /* ending second */ 440Sstevel@tonic-gate unsigned char cdmsf_frame1; /* ending frame */ 450Sstevel@tonic-gate }; 460Sstevel@tonic-gate 470Sstevel@tonic-gate struct cdrom_ti { 480Sstevel@tonic-gate unsigned char cdti_trk0; /* starting track */ 490Sstevel@tonic-gate unsigned char cdti_ind0; /* starting index */ 500Sstevel@tonic-gate unsigned char cdti_trk1; /* ending track */ 510Sstevel@tonic-gate unsigned char cdti_ind1; /* ending index */ 520Sstevel@tonic-gate }; 530Sstevel@tonic-gate 540Sstevel@tonic-gate struct cdrom_tochdr { 550Sstevel@tonic-gate unsigned char cdth_trk0; /* starting track */ 560Sstevel@tonic-gate unsigned char cdth_trk1; /* ending track */ 570Sstevel@tonic-gate }; 580Sstevel@tonic-gate 590Sstevel@tonic-gate struct cdrom_tocentry { 600Sstevel@tonic-gate unsigned char cdte_track; 610Sstevel@tonic-gate unsigned char cdte_adr :4; 620Sstevel@tonic-gate unsigned char cdte_ctrl :4; 630Sstevel@tonic-gate unsigned char cdte_format; 640Sstevel@tonic-gate union { 650Sstevel@tonic-gate struct { 660Sstevel@tonic-gate unsigned char minute; 670Sstevel@tonic-gate unsigned char second; 680Sstevel@tonic-gate unsigned char frame; 690Sstevel@tonic-gate } msf; 700Sstevel@tonic-gate int lba; 710Sstevel@tonic-gate } cdte_addr; 720Sstevel@tonic-gate unsigned char cdte_datamode; 730Sstevel@tonic-gate }; 740Sstevel@tonic-gate 750Sstevel@tonic-gate struct cdrom_subchnl { 760Sstevel@tonic-gate unsigned char cdsc_format; 770Sstevel@tonic-gate unsigned char cdsc_audiostatus; 780Sstevel@tonic-gate unsigned char cdsc_adr: 4; 790Sstevel@tonic-gate unsigned char cdsc_ctrl: 4; 800Sstevel@tonic-gate unsigned char cdsc_trk; 810Sstevel@tonic-gate unsigned char cdsc_ind; 820Sstevel@tonic-gate union { 830Sstevel@tonic-gate struct { 840Sstevel@tonic-gate unsigned char minute; 850Sstevel@tonic-gate unsigned char second; 860Sstevel@tonic-gate unsigned char frame; 870Sstevel@tonic-gate } msf; 880Sstevel@tonic-gate int lba; 890Sstevel@tonic-gate } cdsc_absaddr; 900Sstevel@tonic-gate union { 910Sstevel@tonic-gate struct { 920Sstevel@tonic-gate unsigned char minute; 930Sstevel@tonic-gate unsigned char second; 940Sstevel@tonic-gate unsigned char frame; 950Sstevel@tonic-gate } msf; 960Sstevel@tonic-gate int lba; 970Sstevel@tonic-gate } cdsc_reladdr; 980Sstevel@tonic-gate }; 990Sstevel@tonic-gate 1000Sstevel@tonic-gate /* 1010Sstevel@tonic-gate * definition of audio volume control structure 1020Sstevel@tonic-gate */ 1030Sstevel@tonic-gate struct cdrom_volctrl { 1040Sstevel@tonic-gate unsigned char channel0; 1050Sstevel@tonic-gate unsigned char channel1; 1060Sstevel@tonic-gate unsigned char channel2; 1070Sstevel@tonic-gate unsigned char channel3; 1080Sstevel@tonic-gate }; 1090Sstevel@tonic-gate 1100Sstevel@tonic-gate struct cdrom_read { 1110Sstevel@tonic-gate int cdread_lba; 1120Sstevel@tonic-gate caddr_t cdread_bufaddr; 1130Sstevel@tonic-gate int cdread_buflen; 1140Sstevel@tonic-gate }; 1150Sstevel@tonic-gate 1160Sstevel@tonic-gate /* 1170Sstevel@tonic-gate * CDROM io control commands 1180Sstevel@tonic-gate */ 119*722Smuffin #define CDROMPAUSE _IO('c', 10) /* Pause Audio Operation */ 1200Sstevel@tonic-gate 121*722Smuffin #define CDROMRESUME _IO('c', 11) /* Resume paused Audio Operation */ 1220Sstevel@tonic-gate 123*722Smuffin #define CDROMPLAYMSF _IOW('c', 12, struct cdrom_msf) /* Play Audio MSF */ 124*722Smuffin #define CDROMPLAYTRKIND _IOW('c', 13, struct cdrom_ti) /* 1250Sstevel@tonic-gate * Play Audio 1260Sstevel@tonic-gate ` * Track/index 1270Sstevel@tonic-gate */ 1280Sstevel@tonic-gate #define CDROMREADTOCHDR \ 129*722Smuffin _IOR('c', 103, struct cdrom_tochdr) /* Read TOC header */ 1300Sstevel@tonic-gate #define CDROMREADTOCENTRY \ 131*722Smuffin _IOWR('c', 104, struct cdrom_tocentry) /* Read a TOC entry */ 1320Sstevel@tonic-gate 133*722Smuffin #define CDROMSTOP _IO('c', 105) /* Stop the cdrom drive */ 1340Sstevel@tonic-gate 135*722Smuffin #define CDROMSTART _IO('c', 106) /* Start the cdrom drive */ 1360Sstevel@tonic-gate 137*722Smuffin #define CDROMEJECT _IO('c', 107) /* Ejects the cdrom caddy */ 1380Sstevel@tonic-gate 1390Sstevel@tonic-gate #define CDROMVOLCTRL \ 140*722Smuffin _IOW('c', 14, struct cdrom_volctrl) /* control output volume */ 1410Sstevel@tonic-gate 1420Sstevel@tonic-gate #define CDROMSUBCHNL \ 143*722Smuffin _IOWR('c', 108, struct cdrom_subchnl) /* read the subchannel data */ 1440Sstevel@tonic-gate 1450Sstevel@tonic-gate #define CDROMREADMODE2 \ 146*722Smuffin _IOW('c', 110, struct cdrom_read) /* read CDROM mode 2 data */ 1470Sstevel@tonic-gate 1480Sstevel@tonic-gate #define CDROMREADMODE1 \ 149*722Smuffin _IOW('c', 111, struct cdrom_read) /* read CDROM mode 1 data */ 150