Deleted Added
full compact
mcdreg.h (139749) mcdreg.h (143063)
1/*-
2 * Copyright 1993 by Holger Veit (data part)
3 * Copyright 1993 by Brian Moore (audio part)
4 * Changes Copyright 1993 by Gary Clark II
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 27 unchanged lines hidden (view full) ---

36 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 *
38 * This file contains definitions for some cdrom control commands
39 * and status codes. This info was "inherited" from the DOS MTMCDE.SYS
40 * driver, and is thus not complete (and may even be wrong). Some day
41 * the manufacturer or anyone else might provide better documentation,
42 * so this file (and the driver) will then have a better quality.
43 *
1/*-
2 * Copyright 1993 by Holger Veit (data part)
3 * Copyright 1993 by Brian Moore (audio part)
4 * Changes Copyright 1993 by Gary Clark II
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 27 unchanged lines hidden (view full) ---

36 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 *
38 * This file contains definitions for some cdrom control commands
39 * and status codes. This info was "inherited" from the DOS MTMCDE.SYS
40 * driver, and is thus not complete (and may even be wrong). Some day
41 * the manufacturer or anyone else might provide better documentation,
42 * so this file (and the driver) will then have a better quality.
43 *
44 * $FreeBSD: head/sys/dev/mcd/mcdreg.h 139749 2005-01-06 01:43:34Z imp $
44 * $FreeBSD: head/sys/dev/mcd/mcdreg.h 143063 2005-03-02 21:33:29Z joerg $
45 */
46
47#ifndef MCD_H
48#define MCD_H
49
45 */
46
47#ifndef MCD_H
48#define MCD_H
49
50#if defined(__GNUC__) || defined(__INTEL_COMPILER)
51#if __GNUC__ >= 2 || defined(__INTEL_COMPILER)
52#pragma pack(1)
53#endif
54#endif
55
56/* toc */
57#define MCD_MAXTOCS 104 /* from the Linux driver */
58#define MCD_LASTPLUS1 170 /* special toc entry */
59
60typedef unsigned char bcd_t;
61#define M_msf(msf) msf[0]
62#define S_msf(msf) msf[1]
63#define F_msf(msf) msf[2]

--- 103 unchanged lines hidden (view full) ---

167
168#define MCD_DMA_DMAMODE 0x02 /* 1 = Data uses DMA */
169#define MCD_DMA_TRANSFERLENGTH 0x01 /* data0 = MSB, data1 = LSB of block length */
170
171struct mcd_dma_mode {
172 u_char dma_mode;
173 u_char data0; /* If dma_mode & 0x10: Use IRQ settings */
174 u_char data1; /* Used if dma_mode & 0x01 */
50/* toc */
51#define MCD_MAXTOCS 104 /* from the Linux driver */
52#define MCD_LASTPLUS1 170 /* special toc entry */
53
54typedef unsigned char bcd_t;
55#define M_msf(msf) msf[0]
56#define S_msf(msf) msf[1]
57#define F_msf(msf) msf[2]

--- 103 unchanged lines hidden (view full) ---

161
162#define MCD_DMA_DMAMODE 0x02 /* 1 = Data uses DMA */
163#define MCD_DMA_TRANSFERLENGTH 0x01 /* data0 = MSB, data1 = LSB of block length */
164
165struct mcd_dma_mode {
166 u_char dma_mode;
167 u_char data0; /* If dma_mode & 0x10: Use IRQ settings */
168 u_char data1; /* Used if dma_mode & 0x01 */
175};
169} __packed;
176
177struct mcd_volinfo {
178 bcd_t trk_low;
179 bcd_t trk_high;
180 bcd_t vol_msf[3];
181 bcd_t trk1_msf[3];
170
171struct mcd_volinfo {
172 bcd_t trk_low;
173 bcd_t trk_high;
174 bcd_t vol_msf[3];
175 bcd_t trk1_msf[3];
182};
176} __packed;
183
184struct mcd_qchninfo {
185 u_char addr_type:4;
186 u_char control:4;
187 u_char trk_no;
188 u_char idx_no;
189 bcd_t trk_size_msf[3];
190 u_char :8;
191 bcd_t hd_pos_msf[3];
177
178struct mcd_qchninfo {
179 u_char addr_type:4;
180 u_char control:4;
181 u_char trk_no;
182 u_char idx_no;
183 bcd_t trk_size_msf[3];
184 u_char :8;
185 bcd_t hd_pos_msf[3];
192};
186} __packed;
193
194struct mcd_volume {
195 u_char v0l;
196 u_char v0rs;
197 u_char v0r;
198 u_char v0ls;
187
188struct mcd_volume {
189 u_char v0l;
190 u_char v0rs;
191 u_char v0r;
192 u_char v0ls;
199};
193} __packed;
200
201struct mcd_holdtime {
202 u_char units_of_ten_seconds;
203 /* If this is 0, the default (12) is used */
194
195struct mcd_holdtime {
196 u_char units_of_ten_seconds;
197 /* If this is 0, the default (12) is used */
204};
198} __packed;
205
206struct mcd_read1 {
207 bcd_t start_msf[3];
208 u_char nsec[3];
199
200struct mcd_read1 {
201 bcd_t start_msf[3];
202 u_char nsec[3];
209};
203} __packed;
210
211struct mcd_read2 {
212 bcd_t start_msf[3];
213 bcd_t end_msf[3];
204
205struct mcd_read2 {
206 bcd_t start_msf[3];
207 bcd_t end_msf[3];
214};
208} __packed;
215
216struct mcd_rawsector {
217 u_char sync1[12];
218 u_char header[4];
219 u_char subheader1[4];
220 u_char subheader2[4];
221 u_char data[MCDBLK];
222 u_char ecc_bits[280];
209
210struct mcd_rawsector {
211 u_char sync1[12];
212 u_char header[4];
213 u_char subheader1[4];
214 u_char subheader2[4];
215 u_char data[MCDBLK];
216 u_char ecc_bits[280];
223};
217} __packed;
224
218
225#if defined(__GNUC__) || defined(__INTEL_COMPILER)
226#if __GNUC__ >= 2 || defined(__INTEL_COMPILER)
227#pragma pack(4)
228#endif
229#endif
230#endif /* MCD_H */
219#endif /* MCD_H */