2 * Written by Julian Elischer (julian@tfs.com)
3 * for TRW Financial Systems.
5 * TRW Financial Systems, in accordance with their agreement with Carnegie
6 * Mellon University, makes this software available to CMU to distribute
7 * or use in any manner that they see fit as long as this message is kept with
8 * the software. For this reason TFS also grants any other persons or
9 * organisations permission to use or modify this software.
11 * TFS supplies this software to be publicly redistributed
12 * on the understanding that TFS is not responsible for the correct
13 * functioning of this software in any circumstances.
15 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
21 * Define two bits always in the same place in byte 2 (flag byte)
23 #define CD_RELADDR 0x01
30 struct scsi_read_capacity_cd
34 u_char addr_3; /* Most Significant */
37 u_char addr_0; /* Least Significant */
67 struct scsi_play_track
93 u_char byte2; /* same as above */
100 struct scsi_play_rel_big
103 u_char byte2; /* same as above */
110 struct scsi_read_header
120 struct scsi_read_subchannel
125 #define SRS_SUBQ 0x40
126 u_char subchan_format;
144 struct scsi_read_cd_capacity
148 u_char addr_3; /* Most Significant */
151 u_char addr_0; /* Least Significant */
160 #define READ_CD_CAPACITY 0x25 /* slightly different from disk */
161 #define READ_SUBCHANNEL 0x42 /* cdrom read Subchannel */
162 #define READ_TOC 0x43 /* cdrom read TOC */
163 #define READ_HEADER 0x44 /* cdrom read header */
164 #define PLAY 0x45 /* cdrom play 'play audio' mode */
165 #define PLAY_MSF 0x47 /* cdrom play Min,Sec,Frames mode */
166 #define PLAY_TRACK 0x48 /* cdrom play track/index mode */
167 #define PLAY_TRACK_REL 0x49 /* cdrom play track/index mode */
168 #define PAUSE 0x4b /* cdrom pause in 'play audio' mode */
169 #define PLAY_BIG 0xa5 /* cdrom pause in 'play audio' mode */
170 #define PLAY_TRACK_REL_BIG 0xa9 /* cdrom play track/index mode */
174 struct scsi_read_cd_cap_data
176 u_char addr_3; /* Most significant */
179 u_char addr_0; /* Least significant */
180 u_char length_3; /* Most significant */
183 u_char length_0; /* Least significant */
191 #define CD_PAGE_CODE 0x3F
192 #define AUDIO_PAGE 0x0e
193 #define CD_PAGE_PS 0x80
196 #define CD_PA_SOTC 0x02
197 #define CD_PA_IMMED 0x04
200 #define CD_PA_FORMAT_LBA 0x0F
201 #define CD_PA_APR_VALID 0x80
202 u_char lb_per_sec[2];
211 #define LEFT_CHANNEL CHANNEL_0
212 #define RIGHT_CHANNEL CHANNEL_1
222 struct scsi_mode_header header;
223 struct blk_desc blk_desc;