2  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 
   4  * @APPLE_LICENSE_HEADER_START@ 
   6  * The contents of this file constitute Original Code as defined in and 
   7  * are subject to the Apple Public Source License Version 1.1 (the 
   8  * "License").  You may not use this file except in compliance with the 
   9  * License.  Please obtain a copy of the License at 
  10  * http://www.apple.com/publicsource and read it before using this file. 
  12  * This Original Code and all software distributed under the License are 
  13  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
  14  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
  15  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 
  16  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the 
  17  * License for the specific language governing rights and limitations 
  20  * @APPLE_LICENSE_HEADER_END@ 
  22 /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ 
  24  * The NEXTSTEP Software License Agreement specifies the terms 
  25  * and conditions for redistribution. 
  31 /* Shared between kernel & process */ 
  42 struct cd_sub_channel_header 
{ 
  45 #define CD_AS_AUDIO_INVALID     0x00 
  46 #define CD_AS_PLAY_IN_PROGRESS  0x11 
  47 #define CD_AS_PLAY_PAUSED       0x12 
  48 #define CD_AS_PLAY_COMPLETED    0x13 
  49 #define CD_AS_PLAY_ERROR        0x14 
  50 #define CD_AS_NO_STATUS         0x15 
  54 struct cd_sub_channel_position_data 
{ 
  64 struct cd_sub_channel_media_catalog 
{ 
  74 struct cd_sub_channel_track_info 
{ 
  84 struct cd_sub_channel_info 
{ 
  85         struct cd_sub_channel_header header
; 
  87                 struct cd_sub_channel_position_data position
; 
  88                 struct cd_sub_channel_media_catalog media_catalog
; 
  89                 struct cd_sub_channel_track_info track_info
; 
  94  * Ioctls for the CD drive 
  96 struct ioc_play_track 
{ 
 103 #define CDIOCPLAYTRACKS _IOW('c', 1, struct ioc_play_track) 
 104 struct ioc_play_blocks 
{ 
 108 #define CDIOCPLAYBLOCKS _IOW('c', 2, struct ioc_play_blocks) 
 110 struct ioc_read_subchannel 
{ 
 111         u_char  address_format
; 
 112 #define CD_LBA_FORMAT           1 
 113 #define CD_MSF_FORMAT           2 
 115 #define CD_SUBQ_DATA            0 
 116 #define CD_CURRENT_POSITION     1 
 117 #define CD_MEDIA_CATALOG        2 
 118 #define CD_TRACK_INFO           3 
 121         struct  cd_sub_channel_info 
*data
; 
 123 #define CDIOCREADSUBCHANNEL _IOWR('c', 3, struct ioc_read_subchannel ) 
 125 struct ioc_toc_header 
{ 
 127         u_char  starting_track
; 
 131 #define CDIOREADTOCHEADER _IOR('c', 4, struct ioc_toc_header) 
 133 struct ioc_read_toc_entry 
{ 
 134         u_char  address_format
; 
 135         u_char  starting_track
; 
 137         struct  cd_toc_entry 
*data
; 
 139 #define CDIOREADTOCENTRYS _IOWR('c', 5, struct ioc_read_toc_entry) 
 142         u_char  patch
[4];       /* one for each channel */ 
 144 #define CDIOCSETPATCH   _IOW('c', 9, struct ioc_patch) 
 147         u_char  vol
[4]; /* one for each channel */ 
 149 #define CDIOCGETVOL     _IOR('c', 10, struct ioc_vol) 
 150 #define CDIOCSETVOL     _IOW('c', 11, struct ioc_vol) 
 151 #define CDIOCSETMONO    _IO('c', 12) 
 152 #define CDIOCSETSTEREO  _IO('c', 13) 
 153 #define CDIOCSETMUTE    _IO('c', 14) 
 154 #define CDIOCSETLEFT    _IO('c', 15) 
 155 #define CDIOCSETRIGHT   _IO('c', 16) 
 156 #define CDIOCSETDEBUG   _IO('c', 17) 
 157 #define CDIOCCLRDEBUG   _IO('c', 18) 
 158 #define CDIOCPAUSE      _IO('c', 19) 
 159 #define CDIOCRESUME     _IO('c', 20) 
 160 #define CDIOCRESET      _IO('c', 21) 
 161 #define CDIOCSTART      _IO('c', 22) 
 162 #define CDIOCSTOP       _IO('c', 23) 
 163 #define CDIOCEJECT      _IO('c', 24) 
 164 #define CDIOCALLOW      _IO('c', 25) 
 165 #define CDIOCPREVENT    _IO('c', 26) 
 167 struct ioc_play_msf 
{ 
 175 #define CDIOCPLAYMSF    _IOW('c', 25, struct ioc_play_msf) 
 177 #endif /* !_SYS_CDIO_H_ */