Annotation of kernel/bsd/sys/cdio.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
                      7:  * Reserved.  This file contains Original Code and/or Modifications of
                      8:  * Original Code as defined in and that are subject to the Apple Public
                      9:  * Source License Version 1.1 (the "License").  You may not use this file
                     10:  * except in compliance with the License.  Please obtain a copy of the
                     11:  * License at http://www.apple.com/publicsource and read it before using
                     12:  * this file.
                     13:  * 
                     14:  * The Original Code and all software distributed under the License are
                     15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     19:  * License for the specific language governing rights and limitations
                     20:  * under the License.
                     21:  * 
                     22:  * @APPLE_LICENSE_HEADER_END@
                     23:  */
                     24: 
                     25: /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
                     26: /*
                     27:  * The NEXTSTEP Software License Agreement specifies the terms
                     28:  * and conditions for redistribution.
                     29:  */
                     30:  
                     31: #ifndef _SYS_CDIO_H_
                     32: #define _SYS_CDIO_H_
                     33: 
                     34: /* Shared between kernel & process */
                     35: 
                     36: struct cd_toc_entry {
                     37:        u_char  nothing1;
                     38:        u_char  control:4;
                     39:        u_char  addr_type:4;
                     40:        u_char  track;
                     41:        u_char  nothing2;
                     42:        u_char  addr[4];
                     43: };
                     44: 
                     45: struct cd_sub_channel_header {
                     46:        u_char  nothing1;
                     47:        u_char  audio_status;
                     48: #define CD_AS_AUDIO_INVALID    0x00
                     49: #define CD_AS_PLAY_IN_PROGRESS 0x11
                     50: #define CD_AS_PLAY_PAUSED      0x12
                     51: #define CD_AS_PLAY_COMPLETED   0x13
                     52: #define CD_AS_PLAY_ERROR       0x14
                     53: #define CD_AS_NO_STATUS                0x15
                     54:        u_char  data_len[2];
                     55: };
                     56: 
                     57: struct cd_sub_channel_position_data {
                     58:        u_char  data_format;
                     59:        u_char  control:4;
                     60:        u_char  addr_type:4;
                     61:        u_char  track_number;
                     62:        u_char  index_number;
                     63:        u_char  absaddr[4];
                     64:        u_char  reladdr[4];
                     65: };
                     66: 
                     67: struct cd_sub_channel_media_catalog {
                     68:        u_char  data_format;
                     69:        u_char  nothing1;
                     70:        u_char  nothing2;
                     71:        u_char  nothing3;
                     72:        u_char  :7;
                     73:        u_char  mc_valid:1;
                     74:        u_char  mc_number[15];
                     75: };
                     76: 
                     77: struct cd_sub_channel_track_info {
                     78:        u_char  data_format;
                     79:        u_char  nothing1;
                     80:        u_char  track_number;
                     81:        u_char  nothing2;
                     82:        u_char  :7;
                     83:        u_char  ti_valid:1;
                     84:        u_char  ti_number[15];
                     85: };
                     86: 
                     87: struct cd_sub_channel_info {
                     88:        struct cd_sub_channel_header header;
                     89:        union {
                     90:                struct cd_sub_channel_position_data position;
                     91:                struct cd_sub_channel_media_catalog media_catalog;
                     92:                struct cd_sub_channel_track_info track_info;
                     93:        } what;
                     94: };
                     95: 
                     96: /*
                     97:  * Ioctls for the CD drive
                     98:  */
                     99: struct ioc_play_track {
                    100:        u_char  start_track;
                    101:        u_char  start_index;
                    102:        u_char  end_track;
                    103:        u_char  end_index;
                    104: };
                    105: 
                    106: #define        CDIOCPLAYTRACKS _IOW('c', 1, struct ioc_play_track)
                    107: struct ioc_play_blocks {
                    108:        int     blk;
                    109:        int     len;
                    110: };
                    111: #define        CDIOCPLAYBLOCKS _IOW('c', 2, struct ioc_play_blocks)
                    112: 
                    113: struct ioc_read_subchannel {
                    114:        u_char  address_format;
                    115: #define CD_LBA_FORMAT          1
                    116: #define CD_MSF_FORMAT          2
                    117:        u_char  data_format;
                    118: #define CD_SUBQ_DATA           0
                    119: #define CD_CURRENT_POSITION    1
                    120: #define CD_MEDIA_CATALOG       2
                    121: #define CD_TRACK_INFO          3
                    122:        u_char  track;
                    123:        int     data_len;
                    124:        struct  cd_sub_channel_info *data;
                    125: };
                    126: #define CDIOCREADSUBCHANNEL _IOWR('c', 3, struct ioc_read_subchannel )
                    127: 
                    128: struct ioc_toc_header {
                    129:        u_short len;
                    130:        u_char  starting_track;
                    131:        u_char  ending_track;
                    132: };
                    133: 
                    134: #define CDIOREADTOCHEADER _IOR('c', 4, struct ioc_toc_header)
                    135: 
                    136: struct ioc_read_toc_entry {
                    137:        u_char  address_format;
                    138:        u_char  starting_track;
                    139:        u_short data_len;
                    140:        struct  cd_toc_entry *data;
                    141: };
                    142: #define CDIOREADTOCENTRYS _IOWR('c', 5, struct ioc_read_toc_entry)
                    143: 
                    144: struct ioc_patch {
                    145:        u_char  patch[4];       /* one for each channel */
                    146: };
                    147: #define        CDIOCSETPATCH   _IOW('c', 9, struct ioc_patch)
                    148: 
                    149: struct ioc_vol {
                    150:        u_char  vol[4]; /* one for each channel */
                    151: };
                    152: #define        CDIOCGETVOL     _IOR('c', 10, struct ioc_vol)
                    153: #define        CDIOCSETVOL     _IOW('c', 11, struct ioc_vol)
                    154: #define        CDIOCSETMONO    _IO('c', 12)
                    155: #define        CDIOCSETSTEREO  _IO('c', 13)
                    156: #define        CDIOCSETMUTE    _IO('c', 14)
                    157: #define        CDIOCSETLEFT    _IO('c', 15)
                    158: #define        CDIOCSETRIGHT   _IO('c', 16)
                    159: #define        CDIOCSETDEBUG   _IO('c', 17)
                    160: #define        CDIOCCLRDEBUG   _IO('c', 18)
                    161: #define        CDIOCPAUSE      _IO('c', 19)
                    162: #define        CDIOCRESUME     _IO('c', 20)
                    163: #define        CDIOCRESET      _IO('c', 21)
                    164: #define        CDIOCSTART      _IO('c', 22)
                    165: #define        CDIOCSTOP       _IO('c', 23)
                    166: #define        CDIOCEJECT      _IO('c', 24)
                    167: #define        CDIOCALLOW      _IO('c', 25)
                    168: #define        CDIOCPREVENT    _IO('c', 26)
                    169: 
                    170: struct ioc_play_msf {
                    171:        u_char  start_m;
                    172:        u_char  start_s;
                    173:        u_char  start_f;
                    174:        u_char  end_m;
                    175:        u_char  end_s;
                    176:        u_char  end_f;
                    177: };
                    178: #define        CDIOCPLAYMSF    _IOW('c', 25, struct ioc_play_msf)
                    179: 
                    180: #endif /* !_SYS_CDIO_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.