Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: cdrom.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* -- <linux/cdrom.h>
[2] Fix | Delete
* General header file for linux CD-ROM drivers
[3] Fix | Delete
* Copyright (C) 1992 David Giller, rafetmad@oxy.edu
[4] Fix | Delete
* 1994, 1995 Eberhard Mönkeberg, emoenke@gwdg.de
[5] Fix | Delete
* 1996 David van Leeuwen, david@tm.tno.nl
[6] Fix | Delete
* 1997, 1998 Erik Andersen, andersee@debian.org
[7] Fix | Delete
* 1998-2002 Jens Axboe, axboe@suse.de
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef _LINUX_CDROM_H
[11] Fix | Delete
#define _LINUX_CDROM_H
[12] Fix | Delete
[13] Fix | Delete
#include <linux/types.h>
[14] Fix | Delete
#include <asm/byteorder.h>
[15] Fix | Delete
[16] Fix | Delete
/*******************************************************
[17] Fix | Delete
* As of Linux 2.1.x, all Linux CD-ROM application programs will use this
[18] Fix | Delete
* (and only this) include file. It is my hope to provide Linux with
[19] Fix | Delete
* a uniform interface between software accessing CD-ROMs and the various
[20] Fix | Delete
* device drivers that actually talk to the drives. There may still be
[21] Fix | Delete
* 23 different kinds of strange CD-ROM drives, but at least there will
[22] Fix | Delete
* now be one, and only one, Linux CD-ROM interface.
[23] Fix | Delete
*
[24] Fix | Delete
* Additionally, as of Linux 2.1.x, all Linux application programs
[25] Fix | Delete
* should use the O_NONBLOCK option when opening a CD-ROM device
[26] Fix | Delete
* for subsequent ioctl commands. This allows for neat system errors
[27] Fix | Delete
* like "No medium found" or "Wrong medium type" upon attempting to
[28] Fix | Delete
* mount or play an empty slot, mount an audio disc, or play a data disc.
[29] Fix | Delete
* Generally, changing an application program to support O_NONBLOCK
[30] Fix | Delete
* is as easy as the following:
[31] Fix | Delete
* - drive = open("/dev/cdrom", O_RDONLY);
[32] Fix | Delete
* + drive = open("/dev/cdrom", O_RDONLY | O_NONBLOCK);
[33] Fix | Delete
* It is worth the small change.
[34] Fix | Delete
*
[35] Fix | Delete
* Patches for many common CD programs (provided by David A. van Leeuwen)
[36] Fix | Delete
* can be found at: ftp://ftp.gwdg.de/pub/linux/cdrom/drivers/cm206/
[37] Fix | Delete
*
[38] Fix | Delete
*******************************************************/
[39] Fix | Delete
[40] Fix | Delete
/* When a driver supports a certain function, but the cdrom drive we are
[41] Fix | Delete
* using doesn't, we will return the error EDRIVE_CANT_DO_THIS. We will
[42] Fix | Delete
* borrow the "Operation not supported" error from the network folks to
[43] Fix | Delete
* accomplish this. Maybe someday we will get a more targeted error code,
[44] Fix | Delete
* but this will do for now... */
[45] Fix | Delete
#define EDRIVE_CANT_DO_THIS EOPNOTSUPP
[46] Fix | Delete
[47] Fix | Delete
/*******************************************************
[48] Fix | Delete
* The CD-ROM IOCTL commands -- these should be supported by
[49] Fix | Delete
* all the various cdrom drivers. For the CD-ROM ioctls, we
[50] Fix | Delete
* will commandeer byte 0x53, or 'S'.
[51] Fix | Delete
*******************************************************/
[52] Fix | Delete
#define CDROMPAUSE 0x5301 /* Pause Audio Operation */
[53] Fix | Delete
#define CDROMRESUME 0x5302 /* Resume paused Audio Operation */
[54] Fix | Delete
#define CDROMPLAYMSF 0x5303 /* Play Audio MSF (struct cdrom_msf) */
[55] Fix | Delete
#define CDROMPLAYTRKIND 0x5304 /* Play Audio Track/index
[56] Fix | Delete
(struct cdrom_ti) */
[57] Fix | Delete
#define CDROMREADTOCHDR 0x5305 /* Read TOC header
[58] Fix | Delete
(struct cdrom_tochdr) */
[59] Fix | Delete
#define CDROMREADTOCENTRY 0x5306 /* Read TOC entry
[60] Fix | Delete
(struct cdrom_tocentry) */
[61] Fix | Delete
#define CDROMSTOP 0x5307 /* Stop the cdrom drive */
[62] Fix | Delete
#define CDROMSTART 0x5308 /* Start the cdrom drive */
[63] Fix | Delete
#define CDROMEJECT 0x5309 /* Ejects the cdrom media */
[64] Fix | Delete
#define CDROMVOLCTRL 0x530a /* Control output volume
[65] Fix | Delete
(struct cdrom_volctrl) */
[66] Fix | Delete
#define CDROMSUBCHNL 0x530b /* Read subchannel data
[67] Fix | Delete
(struct cdrom_subchnl) */
[68] Fix | Delete
#define CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes)
[69] Fix | Delete
(struct cdrom_read) */
[70] Fix | Delete
#define CDROMREADMODE1 0x530d /* Read CDROM mode 1 data (2048 Bytes)
[71] Fix | Delete
(struct cdrom_read) */
[72] Fix | Delete
#define CDROMREADAUDIO 0x530e /* (struct cdrom_read_audio) */
[73] Fix | Delete
#define CDROMEJECT_SW 0x530f /* enable(1)/disable(0) auto-ejecting */
[74] Fix | Delete
#define CDROMMULTISESSION 0x5310 /* Obtain the start-of-last-session
[75] Fix | Delete
address of multi session disks
[76] Fix | Delete
(struct cdrom_multisession) */
[77] Fix | Delete
#define CDROM_GET_MCN 0x5311 /* Obtain the "Universal Product Code"
[78] Fix | Delete
if available (struct cdrom_mcn) */
[79] Fix | Delete
#define CDROM_GET_UPC CDROM_GET_MCN /* This one is deprecated,
[80] Fix | Delete
but here anyway for compatibility */
[81] Fix | Delete
#define CDROMRESET 0x5312 /* hard-reset the drive */
[82] Fix | Delete
#define CDROMVOLREAD 0x5313 /* Get the drive's volume setting
[83] Fix | Delete
(struct cdrom_volctrl) */
[84] Fix | Delete
#define CDROMREADRAW 0x5314 /* read data in raw mode (2352 Bytes)
[85] Fix | Delete
(struct cdrom_read) */
[86] Fix | Delete
/*
[87] Fix | Delete
* These ioctls are used only used in aztcd.c and optcd.c
[88] Fix | Delete
*/
[89] Fix | Delete
#define CDROMREADCOOKED 0x5315 /* read data in cooked mode */
[90] Fix | Delete
#define CDROMSEEK 0x5316 /* seek msf address */
[91] Fix | Delete
[92] Fix | Delete
/*
[93] Fix | Delete
* This ioctl is only used by the scsi-cd driver.
[94] Fix | Delete
It is for playing audio in logical block addressing mode.
[95] Fix | Delete
*/
[96] Fix | Delete
#define CDROMPLAYBLK 0x5317 /* (struct cdrom_blk) */
[97] Fix | Delete
[98] Fix | Delete
/*
[99] Fix | Delete
* These ioctls are only used in optcd.c
[100] Fix | Delete
*/
[101] Fix | Delete
#define CDROMREADALL 0x5318 /* read all 2646 bytes */
[102] Fix | Delete
[103] Fix | Delete
/*
[104] Fix | Delete
* These ioctls are (now) only in ide-cd.c for controlling
[105] Fix | Delete
* drive spindown time. They should be implemented in the
[106] Fix | Delete
* Uniform driver, via generic packet commands, GPCMD_MODE_SELECT_10,
[107] Fix | Delete
* GPCMD_MODE_SENSE_10 and the GPMODE_POWER_PAGE...
[108] Fix | Delete
* -Erik
[109] Fix | Delete
*/
[110] Fix | Delete
#define CDROMGETSPINDOWN 0x531d
[111] Fix | Delete
#define CDROMSETSPINDOWN 0x531e
[112] Fix | Delete
[113] Fix | Delete
/*
[114] Fix | Delete
* These ioctls are implemented through the uniform CD-ROM driver
[115] Fix | Delete
* They _will_ be adopted by all CD-ROM drivers, when all the CD-ROM
[116] Fix | Delete
* drivers are eventually ported to the uniform CD-ROM driver interface.
[117] Fix | Delete
*/
[118] Fix | Delete
#define CDROMCLOSETRAY 0x5319 /* pendant of CDROMEJECT */
[119] Fix | Delete
#define CDROM_SET_OPTIONS 0x5320 /* Set behavior options */
[120] Fix | Delete
#define CDROM_CLEAR_OPTIONS 0x5321 /* Clear behavior options */
[121] Fix | Delete
#define CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */
[122] Fix | Delete
#define CDROM_SELECT_DISC 0x5323 /* Select disc (for juke-boxes) */
[123] Fix | Delete
#define CDROM_MEDIA_CHANGED 0x5325 /* Check is media changed */
[124] Fix | Delete
#define CDROM_DRIVE_STATUS 0x5326 /* Get tray position, etc. */
[125] Fix | Delete
#define CDROM_DISC_STATUS 0x5327 /* Get disc type, etc. */
[126] Fix | Delete
#define CDROM_CHANGER_NSLOTS 0x5328 /* Get number of slots */
[127] Fix | Delete
#define CDROM_LOCKDOOR 0x5329 /* lock or unlock door */
[128] Fix | Delete
#define CDROM_DEBUG 0x5330 /* Turn debug messages on/off */
[129] Fix | Delete
#define CDROM_GET_CAPABILITY 0x5331 /* get capabilities */
[130] Fix | Delete
[131] Fix | Delete
/* Note that scsi/scsi_ioctl.h also uses 0x5382 - 0x5386.
[132] Fix | Delete
* Future CDROM ioctls should be kept below 0x537F
[133] Fix | Delete
*/
[134] Fix | Delete
[135] Fix | Delete
/* This ioctl is only used by sbpcd at the moment */
[136] Fix | Delete
#define CDROMAUDIOBUFSIZ 0x5382 /* set the audio buffer size */
[137] Fix | Delete
/* conflict with SCSI_IOCTL_GET_IDLUN */
[138] Fix | Delete
[139] Fix | Delete
/* DVD-ROM Specific ioctls */
[140] Fix | Delete
#define DVD_READ_STRUCT 0x5390 /* Read structure */
[141] Fix | Delete
#define DVD_WRITE_STRUCT 0x5391 /* Write structure */
[142] Fix | Delete
#define DVD_AUTH 0x5392 /* Authentication */
[143] Fix | Delete
[144] Fix | Delete
#define CDROM_SEND_PACKET 0x5393 /* send a packet to the drive */
[145] Fix | Delete
#define CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */
[146] Fix | Delete
#define CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc */
[147] Fix | Delete
[148] Fix | Delete
/*******************************************************
[149] Fix | Delete
* CDROM IOCTL structures
[150] Fix | Delete
*******************************************************/
[151] Fix | Delete
[152] Fix | Delete
/* Address in MSF format */
[153] Fix | Delete
struct cdrom_msf0
[154] Fix | Delete
{
[155] Fix | Delete
__u8 minute;
[156] Fix | Delete
__u8 second;
[157] Fix | Delete
__u8 frame;
[158] Fix | Delete
};
[159] Fix | Delete
[160] Fix | Delete
/* Address in either MSF or logical format */
[161] Fix | Delete
union cdrom_addr
[162] Fix | Delete
{
[163] Fix | Delete
struct cdrom_msf0 msf;
[164] Fix | Delete
int lba;
[165] Fix | Delete
};
[166] Fix | Delete
[167] Fix | Delete
/* This struct is used by the CDROMPLAYMSF ioctl */
[168] Fix | Delete
struct cdrom_msf
[169] Fix | Delete
{
[170] Fix | Delete
__u8 cdmsf_min0; /* start minute */
[171] Fix | Delete
__u8 cdmsf_sec0; /* start second */
[172] Fix | Delete
__u8 cdmsf_frame0; /* start frame */
[173] Fix | Delete
__u8 cdmsf_min1; /* end minute */
[174] Fix | Delete
__u8 cdmsf_sec1; /* end second */
[175] Fix | Delete
__u8 cdmsf_frame1; /* end frame */
[176] Fix | Delete
};
[177] Fix | Delete
[178] Fix | Delete
/* This struct is used by the CDROMPLAYTRKIND ioctl */
[179] Fix | Delete
struct cdrom_ti
[180] Fix | Delete
{
[181] Fix | Delete
__u8 cdti_trk0; /* start track */
[182] Fix | Delete
__u8 cdti_ind0; /* start index */
[183] Fix | Delete
__u8 cdti_trk1; /* end track */
[184] Fix | Delete
__u8 cdti_ind1; /* end index */
[185] Fix | Delete
};
[186] Fix | Delete
[187] Fix | Delete
/* This struct is used by the CDROMREADTOCHDR ioctl */
[188] Fix | Delete
struct cdrom_tochdr
[189] Fix | Delete
{
[190] Fix | Delete
__u8 cdth_trk0; /* start track */
[191] Fix | Delete
__u8 cdth_trk1; /* end track */
[192] Fix | Delete
};
[193] Fix | Delete
[194] Fix | Delete
/* This struct is used by the CDROMVOLCTRL and CDROMVOLREAD ioctls */
[195] Fix | Delete
struct cdrom_volctrl
[196] Fix | Delete
{
[197] Fix | Delete
__u8 channel0;
[198] Fix | Delete
__u8 channel1;
[199] Fix | Delete
__u8 channel2;
[200] Fix | Delete
__u8 channel3;
[201] Fix | Delete
};
[202] Fix | Delete
[203] Fix | Delete
/* This struct is used by the CDROMSUBCHNL ioctl */
[204] Fix | Delete
struct cdrom_subchnl
[205] Fix | Delete
{
[206] Fix | Delete
__u8 cdsc_format;
[207] Fix | Delete
__u8 cdsc_audiostatus;
[208] Fix | Delete
__u8 cdsc_adr: 4;
[209] Fix | Delete
__u8 cdsc_ctrl: 4;
[210] Fix | Delete
__u8 cdsc_trk;
[211] Fix | Delete
__u8 cdsc_ind;
[212] Fix | Delete
union cdrom_addr cdsc_absaddr;
[213] Fix | Delete
union cdrom_addr cdsc_reladdr;
[214] Fix | Delete
};
[215] Fix | Delete
[216] Fix | Delete
[217] Fix | Delete
/* This struct is used by the CDROMREADTOCENTRY ioctl */
[218] Fix | Delete
struct cdrom_tocentry
[219] Fix | Delete
{
[220] Fix | Delete
__u8 cdte_track;
[221] Fix | Delete
__u8 cdte_adr :4;
[222] Fix | Delete
__u8 cdte_ctrl :4;
[223] Fix | Delete
__u8 cdte_format;
[224] Fix | Delete
union cdrom_addr cdte_addr;
[225] Fix | Delete
__u8 cdte_datamode;
[226] Fix | Delete
};
[227] Fix | Delete
[228] Fix | Delete
/* This struct is used by the CDROMREADMODE1, and CDROMREADMODE2 ioctls */
[229] Fix | Delete
struct cdrom_read
[230] Fix | Delete
{
[231] Fix | Delete
int cdread_lba;
[232] Fix | Delete
char *cdread_bufaddr;
[233] Fix | Delete
int cdread_buflen;
[234] Fix | Delete
};
[235] Fix | Delete
[236] Fix | Delete
/* This struct is used by the CDROMREADAUDIO ioctl */
[237] Fix | Delete
struct cdrom_read_audio
[238] Fix | Delete
{
[239] Fix | Delete
union cdrom_addr addr; /* frame address */
[240] Fix | Delete
__u8 addr_format; /* CDROM_LBA or CDROM_MSF */
[241] Fix | Delete
int nframes; /* number of 2352-byte-frames to read at once */
[242] Fix | Delete
__u8 *buf; /* frame buffer (size: nframes*2352 bytes) */
[243] Fix | Delete
};
[244] Fix | Delete
[245] Fix | Delete
/* This struct is used with the CDROMMULTISESSION ioctl */
[246] Fix | Delete
struct cdrom_multisession
[247] Fix | Delete
{
[248] Fix | Delete
union cdrom_addr addr; /* frame address: start-of-last-session
[249] Fix | Delete
(not the new "frame 16"!). Only valid
[250] Fix | Delete
if the "xa_flag" is true. */
[251] Fix | Delete
__u8 xa_flag; /* 1: "is XA disk" */
[252] Fix | Delete
__u8 addr_format; /* CDROM_LBA or CDROM_MSF */
[253] Fix | Delete
};
[254] Fix | Delete
[255] Fix | Delete
/* This struct is used with the CDROM_GET_MCN ioctl.
[256] Fix | Delete
* Very few audio discs actually have Universal Product Code information,
[257] Fix | Delete
* which should just be the Medium Catalog Number on the box. Also note
[258] Fix | Delete
* that the way the codeis written on CD is _not_ uniform across all discs!
[259] Fix | Delete
*/
[260] Fix | Delete
struct cdrom_mcn
[261] Fix | Delete
{
[262] Fix | Delete
__u8 medium_catalog_number[14]; /* 13 ASCII digits, null-terminated */
[263] Fix | Delete
};
[264] Fix | Delete
[265] Fix | Delete
/* This is used by the CDROMPLAYBLK ioctl */
[266] Fix | Delete
struct cdrom_blk
[267] Fix | Delete
{
[268] Fix | Delete
unsigned from;
[269] Fix | Delete
unsigned short len;
[270] Fix | Delete
};
[271] Fix | Delete
[272] Fix | Delete
#define CDROM_PACKET_SIZE 12
[273] Fix | Delete
[274] Fix | Delete
#define CGC_DATA_UNKNOWN 0
[275] Fix | Delete
#define CGC_DATA_WRITE 1
[276] Fix | Delete
#define CGC_DATA_READ 2
[277] Fix | Delete
#define CGC_DATA_NONE 3
[278] Fix | Delete
[279] Fix | Delete
/* for CDROM_PACKET_COMMAND ioctl */
[280] Fix | Delete
struct cdrom_generic_command
[281] Fix | Delete
{
[282] Fix | Delete
unsigned char cmd[CDROM_PACKET_SIZE];
[283] Fix | Delete
unsigned char *buffer;
[284] Fix | Delete
unsigned int buflen;
[285] Fix | Delete
int stat;
[286] Fix | Delete
struct request_sense *sense;
[287] Fix | Delete
unsigned char data_direction;
[288] Fix | Delete
int quiet;
[289] Fix | Delete
int timeout;
[290] Fix | Delete
void *reserved[1]; /* unused, actually */
[291] Fix | Delete
};
[292] Fix | Delete
[293] Fix | Delete
/*
[294] Fix | Delete
* A CD-ROM physical sector size is 2048, 2052, 2056, 2324, 2332, 2336,
[295] Fix | Delete
* 2340, or 2352 bytes long.
[296] Fix | Delete
[297] Fix | Delete
* Sector types of the standard CD-ROM data formats:
[298] Fix | Delete
*
[299] Fix | Delete
* format sector type user data size (bytes)
[300] Fix | Delete
* -----------------------------------------------------------------------------
[301] Fix | Delete
* 1 (Red Book) CD-DA 2352 (CD_FRAMESIZE_RAW)
[302] Fix | Delete
* 2 (Yellow Book) Mode1 Form1 2048 (CD_FRAMESIZE)
[303] Fix | Delete
* 3 (Yellow Book) Mode1 Form2 2336 (CD_FRAMESIZE_RAW0)
[304] Fix | Delete
* 4 (Green Book) Mode2 Form1 2048 (CD_FRAMESIZE)
[305] Fix | Delete
* 5 (Green Book) Mode2 Form2 2328 (2324+4 spare bytes)
[306] Fix | Delete
*
[307] Fix | Delete
*
[308] Fix | Delete
* The layout of the standard CD-ROM data formats:
[309] Fix | Delete
* -----------------------------------------------------------------------------
[310] Fix | Delete
* - audio (red): | audio_sample_bytes |
[311] Fix | Delete
* | 2352 |
[312] Fix | Delete
*
[313] Fix | Delete
* - data (yellow, mode1): | sync - head - data - EDC - zero - ECC |
[314] Fix | Delete
* | 12 - 4 - 2048 - 4 - 8 - 276 |
[315] Fix | Delete
*
[316] Fix | Delete
* - data (yellow, mode2): | sync - head - data |
[317] Fix | Delete
* | 12 - 4 - 2336 |
[318] Fix | Delete
*
[319] Fix | Delete
* - XA data (green, mode2 form1): | sync - head - sub - data - EDC - ECC |
[320] Fix | Delete
* | 12 - 4 - 8 - 2048 - 4 - 276 |
[321] Fix | Delete
*
[322] Fix | Delete
* - XA data (green, mode2 form2): | sync - head - sub - data - Spare |
[323] Fix | Delete
* | 12 - 4 - 8 - 2324 - 4 |
[324] Fix | Delete
*
[325] Fix | Delete
*/
[326] Fix | Delete
[327] Fix | Delete
/* Some generally useful CD-ROM information -- mostly based on the above */
[328] Fix | Delete
#define CD_MINS 74 /* max. minutes per CD, not really a limit */
[329] Fix | Delete
#define CD_SECS 60 /* seconds per minute */
[330] Fix | Delete
#define CD_FRAMES 75 /* frames per second */
[331] Fix | Delete
#define CD_SYNC_SIZE 12 /* 12 sync bytes per raw data frame */
[332] Fix | Delete
#define CD_MSF_OFFSET 150 /* MSF numbering offset of first frame */
[333] Fix | Delete
#define CD_CHUNK_SIZE 24 /* lowest-level "data bytes piece" */
[334] Fix | Delete
#define CD_NUM_OF_CHUNKS 98 /* chunks per frame */
[335] Fix | Delete
#define CD_FRAMESIZE_SUB 96 /* subchannel data "frame" size */
[336] Fix | Delete
#define CD_HEAD_SIZE 4 /* header (address) bytes per raw data frame */
[337] Fix | Delete
#define CD_SUBHEAD_SIZE 8 /* subheader bytes per raw XA data frame */
[338] Fix | Delete
#define CD_EDC_SIZE 4 /* bytes EDC per most raw data frame types */
[339] Fix | Delete
#define CD_ZERO_SIZE 8 /* bytes zero per yellow book mode 1 frame */
[340] Fix | Delete
#define CD_ECC_SIZE 276 /* bytes ECC per most raw data frame types */
[341] Fix | Delete
#define CD_FRAMESIZE 2048 /* bytes per frame, "cooked" mode */
[342] Fix | Delete
#define CD_FRAMESIZE_RAW 2352 /* bytes per frame, "raw" mode */
[343] Fix | Delete
#define CD_FRAMESIZE_RAWER 2646 /* The maximum possible returned bytes */
[344] Fix | Delete
/* most drives don't deliver everything: */
[345] Fix | Delete
#define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE) /*2340*/
[346] Fix | Delete
#define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE) /*2336*/
[347] Fix | Delete
[348] Fix | Delete
#define CD_XA_HEAD (CD_HEAD_SIZE+CD_SUBHEAD_SIZE) /* "before data" part of raw XA frame */
[349] Fix | Delete
#define CD_XA_TAIL (CD_EDC_SIZE+CD_ECC_SIZE) /* "after data" part of raw XA frame */
[350] Fix | Delete
#define CD_XA_SYNC_HEAD (CD_SYNC_SIZE+CD_XA_HEAD) /* sync bytes + header of XA frame */
[351] Fix | Delete
[352] Fix | Delete
/* CD-ROM address types (cdrom_tocentry.cdte_format) */
[353] Fix | Delete
#define CDROM_LBA 0x01 /* "logical block": first frame is #0 */
[354] Fix | Delete
#define CDROM_MSF 0x02 /* "minute-second-frame": binary, not bcd here! */
[355] Fix | Delete
[356] Fix | Delete
/* bit to tell whether track is data or audio (cdrom_tocentry.cdte_ctrl) */
[357] Fix | Delete
#define CDROM_DATA_TRACK 0x04
[358] Fix | Delete
[359] Fix | Delete
/* The leadout track is always 0xAA, regardless of # of tracks on disc */
[360] Fix | Delete
#define CDROM_LEADOUT 0xAA
[361] Fix | Delete
[362] Fix | Delete
/* audio states (from SCSI-2, but seen with other drives, too) */
[363] Fix | Delete
#define CDROM_AUDIO_INVALID 0x00 /* audio status not supported */
[364] Fix | Delete
#define CDROM_AUDIO_PLAY 0x11 /* audio play operation in progress */
[365] Fix | Delete
#define CDROM_AUDIO_PAUSED 0x12 /* audio play operation paused */
[366] Fix | Delete
#define CDROM_AUDIO_COMPLETED 0x13 /* audio play successfully completed */
[367] Fix | Delete
#define CDROM_AUDIO_ERROR 0x14 /* audio play stopped due to error */
[368] Fix | Delete
#define CDROM_AUDIO_NO_STATUS 0x15 /* no current audio status to return */
[369] Fix | Delete
[370] Fix | Delete
/* capability flags used with the uniform CD-ROM driver */
[371] Fix | Delete
#define CDC_CLOSE_TRAY 0x1 /* caddy systems _can't_ close */
[372] Fix | Delete
#define CDC_OPEN_TRAY 0x2 /* but _can_ eject. */
[373] Fix | Delete
#define CDC_LOCK 0x4 /* disable manual eject */
[374] Fix | Delete
#define CDC_SELECT_SPEED 0x8 /* programmable speed */
[375] Fix | Delete
#define CDC_SELECT_DISC 0x10 /* select disc from juke-box */
[376] Fix | Delete
#define CDC_MULTI_SESSION 0x20 /* read sessions>1 */
[377] Fix | Delete
#define CDC_MCN 0x40 /* Medium Catalog Number */
[378] Fix | Delete
#define CDC_MEDIA_CHANGED 0x80 /* media changed */
[379] Fix | Delete
#define CDC_PLAY_AUDIO 0x100 /* audio functions */
[380] Fix | Delete
#define CDC_RESET 0x200 /* hard reset device */
[381] Fix | Delete
#define CDC_DRIVE_STATUS 0x800 /* driver implements drive status */
[382] Fix | Delete
#define CDC_GENERIC_PACKET 0x1000 /* driver implements generic packets */
[383] Fix | Delete
#define CDC_CD_R 0x2000 /* drive is a CD-R */
[384] Fix | Delete
#define CDC_CD_RW 0x4000 /* drive is a CD-RW */
[385] Fix | Delete
#define CDC_DVD 0x8000 /* drive is a DVD */
[386] Fix | Delete
#define CDC_DVD_R 0x10000 /* drive can write DVD-R */
[387] Fix | Delete
#define CDC_DVD_RAM 0x20000 /* drive can write DVD-RAM */
[388] Fix | Delete
#define CDC_MO_DRIVE 0x40000 /* drive is an MO device */
[389] Fix | Delete
#define CDC_MRW 0x80000 /* drive can read MRW */
[390] Fix | Delete
#define CDC_MRW_W 0x100000 /* drive can write MRW */
[391] Fix | Delete
#define CDC_RAM 0x200000 /* ok to open for WRITE */
[392] Fix | Delete
[393] Fix | Delete
/* drive status possibilities returned by CDROM_DRIVE_STATUS ioctl */
[394] Fix | Delete
#define CDS_NO_INFO 0 /* if not implemented */
[395] Fix | Delete
#define CDS_NO_DISC 1
[396] Fix | Delete
#define CDS_TRAY_OPEN 2
[397] Fix | Delete
#define CDS_DRIVE_NOT_READY 3
[398] Fix | Delete
#define CDS_DISC_OK 4
[399] Fix | Delete
[400] Fix | Delete
/* return values for the CDROM_DISC_STATUS ioctl */
[401] Fix | Delete
/* can also return CDS_NO_[INFO|DISC], from above */
[402] Fix | Delete
#define CDS_AUDIO 100
[403] Fix | Delete
#define CDS_DATA_1 101
[404] Fix | Delete
#define CDS_DATA_2 102
[405] Fix | Delete
#define CDS_XA_2_1 103
[406] Fix | Delete
#define CDS_XA_2_2 104
[407] Fix | Delete
#define CDS_MIXED 105
[408] Fix | Delete
[409] Fix | Delete
/* User-configurable behavior options for the uniform CD-ROM driver */
[410] Fix | Delete
#define CDO_AUTO_CLOSE 0x1 /* close tray on first open() */
[411] Fix | Delete
#define CDO_AUTO_EJECT 0x2 /* open tray on last release() */
[412] Fix | Delete
#define CDO_USE_FFLAGS 0x4 /* use O_NONBLOCK information on open */
[413] Fix | Delete
#define CDO_LOCK 0x8 /* lock tray on open files */
[414] Fix | Delete
#define CDO_CHECK_TYPE 0x10 /* check type on open for data */
[415] Fix | Delete
[416] Fix | Delete
/* Special codes used when specifying changer slots. */
[417] Fix | Delete
#define CDSL_NONE (INT_MAX-1)
[418] Fix | Delete
#define CDSL_CURRENT INT_MAX
[419] Fix | Delete
[420] Fix | Delete
/* For partition based multisession access. IDE can handle 64 partitions
[421] Fix | Delete
* per drive - SCSI CD-ROM's use minors to differentiate between the
[422] Fix | Delete
* various drives, so we can't do multisessions the same way there.
[423] Fix | Delete
* Use the -o session=x option to mount on them.
[424] Fix | Delete
*/
[425] Fix | Delete
#define CD_PART_MAX 64
[426] Fix | Delete
#define CD_PART_MASK (CD_PART_MAX - 1)
[427] Fix | Delete
[428] Fix | Delete
/*********************************************************************
[429] Fix | Delete
* Generic Packet commands, MMC commands, and such
[430] Fix | Delete
*********************************************************************/
[431] Fix | Delete
[432] Fix | Delete
/* The generic packet command opcodes for CD/DVD Logical Units,
[433] Fix | Delete
* From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */
[434] Fix | Delete
#define GPCMD_BLANK 0xa1
[435] Fix | Delete
#define GPCMD_CLOSE_TRACK 0x5b
[436] Fix | Delete
#define GPCMD_FLUSH_CACHE 0x35
[437] Fix | Delete
#define GPCMD_FORMAT_UNIT 0x04
[438] Fix | Delete
#define GPCMD_GET_CONFIGURATION 0x46
[439] Fix | Delete
#define GPCMD_GET_EVENT_STATUS_NOTIFICATION 0x4a
[440] Fix | Delete
#define GPCMD_GET_PERFORMANCE 0xac
[441] Fix | Delete
#define GPCMD_INQUIRY 0x12
[442] Fix | Delete
#define GPCMD_LOAD_UNLOAD 0xa6
[443] Fix | Delete
#define GPCMD_MECHANISM_STATUS 0xbd
[444] Fix | Delete
#define GPCMD_MODE_SELECT_10 0x55
[445] Fix | Delete
#define GPCMD_MODE_SENSE_10 0x5a
[446] Fix | Delete
#define GPCMD_PAUSE_RESUME 0x4b
[447] Fix | Delete
#define GPCMD_PLAY_AUDIO_10 0x45
[448] Fix | Delete
#define GPCMD_PLAY_AUDIO_MSF 0x47
[449] Fix | Delete
#define GPCMD_PLAY_AUDIO_TI 0x48
[450] Fix | Delete
#define GPCMD_PLAY_CD 0xbc
[451] Fix | Delete
#define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
[452] Fix | Delete
#define GPCMD_READ_10 0x28
[453] Fix | Delete
#define GPCMD_READ_12 0xa8
[454] Fix | Delete
#define GPCMD_READ_BUFFER 0x3c
[455] Fix | Delete
#define GPCMD_READ_BUFFER_CAPACITY 0x5c
[456] Fix | Delete
#define GPCMD_READ_CDVD_CAPACITY 0x25
[457] Fix | Delete
#define GPCMD_READ_CD 0xbe
[458] Fix | Delete
#define GPCMD_READ_CD_MSF 0xb9
[459] Fix | Delete
#define GPCMD_READ_DISC_INFO 0x51
[460] Fix | Delete
#define GPCMD_READ_DVD_STRUCTURE 0xad
[461] Fix | Delete
#define GPCMD_READ_FORMAT_CAPACITIES 0x23
[462] Fix | Delete
#define GPCMD_READ_HEADER 0x44
[463] Fix | Delete
#define GPCMD_READ_TRACK_RZONE_INFO 0x52
[464] Fix | Delete
#define GPCMD_READ_SUBCHANNEL 0x42
[465] Fix | Delete
#define GPCMD_READ_TOC_PMA_ATIP 0x43
[466] Fix | Delete
#define GPCMD_REPAIR_RZONE_TRACK 0x58
[467] Fix | Delete
#define GPCMD_REPORT_KEY 0xa4
[468] Fix | Delete
#define GPCMD_REQUEST_SENSE 0x03
[469] Fix | Delete
#define GPCMD_RESERVE_RZONE_TRACK 0x53
[470] Fix | Delete
#define GPCMD_SEND_CUE_SHEET 0x5d
[471] Fix | Delete
#define GPCMD_SCAN 0xba
[472] Fix | Delete
#define GPCMD_SEEK 0x2b
[473] Fix | Delete
#define GPCMD_SEND_DVD_STRUCTURE 0xbf
[474] Fix | Delete
#define GPCMD_SEND_EVENT 0xa2
[475] Fix | Delete
#define GPCMD_SEND_KEY 0xa3
[476] Fix | Delete
#define GPCMD_SEND_OPC 0x54
[477] Fix | Delete
#define GPCMD_SET_READ_AHEAD 0xa7
[478] Fix | Delete
#define GPCMD_SET_STREAMING 0xb6
[479] Fix | Delete
#define GPCMD_START_STOP_UNIT 0x1b
[480] Fix | Delete
#define GPCMD_STOP_PLAY_SCAN 0x4e
[481] Fix | Delete
#define GPCMD_TEST_UNIT_READY 0x00
[482] Fix | Delete
#define GPCMD_VERIFY_10 0x2f
[483] Fix | Delete
#define GPCMD_WRITE_10 0x2a
[484] Fix | Delete
#define GPCMD_WRITE_12 0xaa
[485] Fix | Delete
#define GPCMD_WRITE_AND_VERIFY_10 0x2e
[486] Fix | Delete
#define GPCMD_WRITE_BUFFER 0x3b
[487] Fix | Delete
/* This is listed as optional in ATAPI 2.6, but is (curiously)
[488] Fix | Delete
* missing from Mt. Fuji, Table 57. It _is_ mentioned in Mt. Fuji
[489] Fix | Delete
* Table 377 as an MMC command for SCSi devices though... Most ATAPI
[490] Fix | Delete
* drives support it. */
[491] Fix | Delete
#define GPCMD_SET_SPEED 0xbb
[492] Fix | Delete
/* This seems to be a SCSI specific CD-ROM opcode
[493] Fix | Delete
* to play data at track/index */
[494] Fix | Delete
#define GPCMD_PLAYAUDIO_TI 0x48
[495] Fix | Delete
/*
[496] Fix | Delete
* From MS Media Status Notification Support Specification. For
[497] Fix | Delete
* older drives only.
[498] Fix | Delete
*/
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function