Home | History | Annotate | Line # | Download | only in common
linux_cdrom.h revision 1.2
      1  1.2       erh /*	$NetBSD: linux_cdrom.h,v 1.2 1998/10/01 02:30:37 erh Exp $ */
      2  1.1  christos 
      3  1.1  christos /*
      4  1.1  christos  * Copyright (c) 1997 The NetBSD Foundation, Inc.
      5  1.1  christos  * All rights reserved.
      6  1.1  christos  *
      7  1.1  christos  * Redistribution and use in source and binary forms, with or without
      8  1.1  christos  * modification, are permitted provided that the following conditions
      9  1.1  christos  * are met:
     10  1.1  christos  * 1. Redistributions of source code must retain the above copyright
     11  1.1  christos  *    notice, this list of conditions and the following disclaimer.
     12  1.1  christos  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  christos  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  christos  *    documentation and/or other materials provided with the distribution.
     15  1.1  christos  * 3. All advertising materials mentioning features or use of this software
     16  1.1  christos  *    must display the following acknowledgement:
     17  1.1  christos  *        This product includes software developed by the NetBSD
     18  1.1  christos  *        Foundation, Inc. and its contributors.
     19  1.1  christos  * 4. Neither the name of The NetBSD Foundation nor the names of its
     20  1.1  christos  *    contributors may be used to endorse or promote products derived
     21  1.1  christos  *    from this software without specific prior written permission.
     22  1.1  christos  *
     23  1.1  christos  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     24  1.1  christos  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     25  1.1  christos  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     26  1.1  christos  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     27  1.1  christos  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     28  1.1  christos  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     29  1.1  christos  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     30  1.1  christos  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     31  1.1  christos  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     32  1.1  christos  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     33  1.1  christos  * POSSIBILITY OF SUCH DAMAGE.
     34  1.1  christos  */
     35  1.1  christos 
     36  1.2       erh #ifndef _COMMON_LINUX_CDROM_H
     37  1.2       erh #define _COMMON_LINUX_CDROM_H
     38  1.2       erh 
     39  1.1  christos #define LINUX_CDROMPAUSE	0x5301
     40  1.1  christos #define LINUX_CDROMRESUME	0x5302
     41  1.1  christos #define LINUX_CDROMPLAYMSF	0x5303	/* (struct linux_cdrom_msf) */
     42  1.1  christos #define LINUX_CDROMPLAYTRKIND	0x5304	/* (struct linux_cdrom_ti) */
     43  1.1  christos #define LINUX_CDROMREADTOCHDR	0x5305	/* (struct linux_cdrom_tochdr) */
     44  1.1  christos #define LINUX_CDROMREADTOCENTRY	0x5306	/* (struct linux_cdrom_tocentry) */
     45  1.1  christos #define LINUX_CDROMSTOP		0x5307
     46  1.1  christos #define LINUX_CDROMSTART	0x5308
     47  1.1  christos #define LINUX_CDROMEJECT	0x5309
     48  1.1  christos #define LINUX_CDROMVOLCTRL	0x530a	/* (struct linux_cdrom_volctrl) */
     49  1.1  christos #define LINUX_CDROMSUBCHNL	0x530b	/* (struct linux_cdrom_subchnl) */
     50  1.1  christos #define LINUX_CDROMEJECT_SW	0x530f	/* arg: 0 or 1 */
     51  1.1  christos #define LINUX_CDROMRESET	0x5312
     52  1.1  christos #define LINUX_CDROMVOLREAD	0x5313	/* (struct linux_cdrom_volctrl) */
     53  1.1  christos #define LINUX_CDROMPLAYBLK	0x5317	/* (struct linux_cdrom_blk) */
     54  1.1  christos 
     55  1.1  christos struct linux_cdrom_blk {
     56  1.1  christos 	unsigned from;
     57  1.1  christos 	unsigned short len;
     58  1.1  christos };
     59  1.1  christos 
     60  1.1  christos struct linux_cdrom_msf {
     61  1.1  christos 	u_char	cdmsf_min0;	/* start minute */
     62  1.1  christos 	u_char	cdmsf_sec0;	/* start second */
     63  1.1  christos 	u_char	cdmsf_frame0;	/* start frame */
     64  1.1  christos 	u_char	cdmsf_min1;	/* end minute */
     65  1.1  christos 	u_char	cdmsf_sec1;	/* end second */
     66  1.1  christos 	u_char	cdmsf_frame1;	/* end frame */
     67  1.1  christos };
     68  1.1  christos 
     69  1.1  christos struct linux_cdrom_ti {
     70  1.1  christos 	u_char	cdti_trk0;	/* start track */
     71  1.1  christos 	u_char	cdti_ind0;	/* start index */
     72  1.1  christos 	u_char	cdti_trk1;	/* end track */
     73  1.1  christos 	u_char	cdti_ind1;	/* end index */
     74  1.1  christos };
     75  1.1  christos 
     76  1.1  christos struct linux_cdrom_tochdr {
     77  1.1  christos 	u_char	cdth_trk0;	/* start track */
     78  1.1  christos 	u_char	cdth_trk1;	/* end track */
     79  1.1  christos };
     80  1.1  christos 
     81  1.1  christos struct linux_cdrom_msf0 {
     82  1.1  christos 	u_char	minute;
     83  1.1  christos 	u_char	second;
     84  1.1  christos 	u_char	frame;
     85  1.1  christos };
     86  1.1  christos 
     87  1.1  christos union linux_cdrom_addr {
     88  1.1  christos 	struct	linux_cdrom_msf0 msf;
     89  1.1  christos 	int	lba;
     90  1.1  christos };
     91  1.1  christos 
     92  1.1  christos struct linux_cdrom_tocentry {
     93  1.1  christos 	u_char	cdte_track;
     94  1.1  christos 	u_char	cdte_adr	:4;
     95  1.1  christos 	u_char	cdte_ctrl	:4;
     96  1.1  christos 	u_char	cdte_format;
     97  1.1  christos 	union	linux_cdrom_addr cdte_addr;
     98  1.1  christos 	u_char	cdte_datamode;
     99  1.1  christos };
    100  1.1  christos 
    101  1.1  christos struct linux_cdrom_subchnl {
    102  1.1  christos 	u_char	cdsc_format;
    103  1.1  christos 	u_char	cdsc_audiostatus;
    104  1.1  christos 	u_char	cdsc_adr:	4;
    105  1.1  christos 	u_char	cdsc_ctrl:	4;
    106  1.1  christos 	u_char	cdsc_trk;
    107  1.1  christos 	u_char	cdsc_ind;
    108  1.1  christos 	union	linux_cdrom_addr cdsc_absaddr;
    109  1.1  christos 	union	linux_cdrom_addr cdsc_reladdr;
    110  1.1  christos };
    111  1.1  christos 
    112  1.1  christos struct linux_cdrom_volctrl {
    113  1.1  christos 	u_char	channel0;
    114  1.1  christos 	u_char	channel1;
    115  1.1  christos 	u_char	channel2;
    116  1.1  christos 	u_char	channel3;
    117  1.1  christos };
    118  1.2       erh 
    119  1.2       erh #endif /* !_COMMON_LINUX_CDROM_H */
    120