1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
|
'\" te
.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH CDIO 7I "Oct 4, 2001"
.SH NAME
cdio \- CD-ROM control operations
.SH SYNOPSIS
.LP
.nf
\fB#include <sys/cdio.h>\fR
.fi
.SH DESCRIPTION
.sp
.LP
The set of \fBioctl\fR(2) commands described below are used to perform audio
and \fBCD-ROM\fR specific operations. Basic to these \fBcdio\fR ioctl requests
are the definitions in \fB<sys/cdio.h>\fR\&.
.sp
.LP
Several \fBCD-ROM\fR specific commands can report addresses either in \fBLBA\fR
(Logical Block Address) format or in \fBMSF\fR (Minute, Second, Frame) format.
The \fBREAD HEADER\fR, \fBREAD SUBCHANNEL\fR, and \fBREAD TABLE OF CONTENTS\fR
commands have this feature.
.sp
.LP
\fBLBA\fR format represents the logical block address for the \fBCD-ROM\fR
absolute address field or for the offset from the beginning of the current
track expressed as a number of logical blocks in a \fBCD-ROM\fR track relative
address field. \fBMSF\fR format represents the physical address written on
\fBCD-ROM\fR discs, expressed as a sector count relative to either the
beginning of the medium or the beginning of the current track.
.SH IOCTLS
.sp
.LP
The following \fBI/O\fR controls do not have any additional data passed into or
received from them.
.sp
.ne 2
.na
\fB\fBCDROMSTART\fR\fR
.ad
.RS 18n
This \fBioctl()\fR spins up the disc and seeks to the last address requested.
.RE
.sp
.ne 2
.na
\fB\fBCDROMSTOP\fR\fR
.ad
.RS 18n
This \fBioctl()\fR spins down the disc.
.RE
.sp
.ne 2
.na
\fB\fBCDROMPAUSE\fR\fR
.ad
.RS 18n
This \fBioctl()\fR pauses the current audio play operation.
.RE
.sp
.ne 2
.na
\fB\fBCDROMRESUME\fR\fR
.ad
.RS 18n
This \fBioctl()\fR resumes the paused audio play operation.
.RE
.sp
.ne 2
.na
\fB\fBCDROMEJECT\fR\fR
.ad
.RS 18n
This \fBioctl()\fR ejects the caddy with the disc.
.RE
.sp
.ne 2
.na
\fB\fBCDROMCLOSETRAY\fR\fR
.ad
.RS 18n
This \fBioctl()\fR closes the caddy with the disc.
.RE
.sp
.LP
The following \fBI/O\fR controls require a pointer to the structure for that
\fBioctl()\fR, with data being passed into the \fBioctl()\fR.
.sp
.ne 2
.na
\fB\fBCDROMPLAYMSF\fR\fR
.ad
.RS 19n
This \fBioctl()\fR command requests the drive to output the audio signals at
the specified starting address and continue the audio play until the specified
ending address is detected. The address is in \fBMSF\fR format. The third
argument of this \fBioctl()\fR call is a pointer to the type \fBstruct
cdrom_msf\fR.
.sp
.in +2
.nf
/*
* definition of play audio msf structure
*/
struct cdrom_msf {
unsigned char cdmsf_min0; /* starting minute*/
unsigned char cdmsf_sec0; /* starting second*/
unsigned char cdmsf_frame0; /*starting frame*/
unsigned char cdmsf_min1; /* ending minute */
unsigned char cdmsf_sec1; /* ending second */
unsigned char cdmsf_frame1; /* ending frame */
};
.fi
.in -2
The \fBCDROMREADTOCENTRY\fR ioctl request may be used to obtain the start time
for a track. An approximation of the finish time can be obtained by using the
\fBCDROMREADTOCENTRY\fR ioctl request to retrieve the start time of the track
following the current track.
.sp
The leadout track is the next consecutive track after the last audio track.
Hence, the start time of the leadout track may be used as the effective finish
time of the last audio track.
.RE
.sp
.ne 2
.na
\fB\fBCDROMPLAYTRKIND\fR\fR
.ad
.RS 19n
This \fBioctl()\fR command is similar to \fBCDROMPLAYMSF\fR. The starting and
ending address is in track/index format. The third argument of the
\fBioctl()\fR call is a pointer to the type \fBstruct cdrom_ti\fR.
.sp
.in +2
.nf
/*
* definition of play audio track/index structure
*/
struct cdrom_ti {
unsigned char cdti_trk0; /* starting track*/
unsigned char cdti_ind0; /* starting index*/
unsigned char cdti_trk1; /* ending track */
unsigned char cdti_ind1; /* ending index */
};
.fi
.in -2
.RE
.sp
.ne 2
.na
\fB\fBCDROMVOLCTRL\fR\fR
.ad
.RS 19n
This \fBioctl()\fR command controls the audio output level. The \fBSCSI\fR
command allows the control of up to four channels. The current implementation
of the supported \fBCD-ROM\fR drive only uses channel 0 and channel 1. The
valid values of volume control are between 0x00 and 0xFF, with a value of 0xFF
indicating maximum volume. The third argument of the \fBioctl()\fR call is a
pointer to \fBstruct\fR \fBcdrom_volctrl\fR which contains the output volume
values.
.sp
.in +2
.nf
/*
* definition of audio volume control structure
*/
struct cdrom_volctrl {
unsigned char channel0;
unsigned char channel1;
unsigned char channel2;
unsigned char channel3;
};
.fi
.in -2
.RE
.sp
.LP
The following \fBI/O\fR controls take a pointer that will have data returned to
the user program from the \fBCD-ROM\fR driver.
.sp
.ne 2
.na
\fB\fBCDROMREADTOCHDR\fR\fR
.ad
.RS 21n
This \fBioctl()\fR command returns the header of the table of contents (TOC).
The header consists of the starting tracking number and the ending track number
of the disc. These two numbers are returned through a pointer of \fBstruct
cdrom_tochdr\fR. While the disc can start at any number, all tracks between the
first and last tracks are in contiguous ascending order.
.sp
.in +2
.nf
/*
* definition of read toc header structure
*/
struct cdrom_tochdr {
unsigned char cdth_trk0; /* starting track*/
unsigned char cdth_trk1; /* ending track*/
};
.fi
.in -2
.RE
.sp
.ne 2
.na
\fB\fBCDROMREADTOCENTRY\fR\fR
.ad
.RS 21n
This \fBioctl()\fR command returns the information of a specified track. The
third argument of the function call is a pointer to the type \fBstruct
cdrom_tocentry\fR. The caller needs to supply the track number and the address
format. This command will return a 4-bit \fBadr\fR field, a 4-bit \fBctrl\fR
field, the starting address in \fBMSF\fR format or \fBLBA\fR format, and the
data mode if the track is a data track. The \fBctrl\fR field specifies whether
the track is data or audio.
.sp
.in +2
.nf
/*
* definition of read toc entry structure
*/
struct cdrom_tocentry {
unsigned char cdte_track;
unsigned char cdte_adr :4;
unsigned char cdte_ctrl :4;
unsigned char cdte_format;
union {
struct {
unsigned char minute;
unsigned char second;
unsigned char frame;
} msf;
int lba;
} cdte_addr;
unsigned char cdte_datamode;
};
.fi
.in -2
To get the information from the leadout track, the following value is
appropriate for the \fBcdte_track\fR field:
.sp
.ne 2
.na
\fB\fBCDROM_LEADOUT\fR\fR
.ad
.RS 17n
Leadout track
.RE
To get the information from the data track, the following value is appropriate
for the \fBcdte_ctrl\fR field:
.sp
.ne 2
.na
\fB\fBCDROM_DATA_TRACK\fR\fR
.ad
.RS 20n
Data track
.RE
The following values are appropriate for the \fBcdte_format\fR field:
.sp
.ne 2
.na
\fB\fBCDROM_LBA\fR\fR
.ad
.RS 13n
\fBLBA\fR format
.RE
.sp
.ne 2
.na
\fB\fBCDROM_MSF\fR\fR
.ad
.RS 13n
\fBMSF\fR format
.RE
.RE
.sp
.ne 2
.na
\fB\fBCDROMSUBCHNL\fR\fR
.ad
.RS 21n
This \fBioctl()\fR command reads the Q sub-channel data of the current block.
The subchannel data includes track number, index number, absolute \fBCD-ROM\fR
address, track relative \fBCD-ROM\fR address, control data and audio status.
All information is returned through a pointer to \fBstruct cdrom_subchnl\fR.
The caller needs to supply the address format for the returned address.
.sp
.in +2
.nf
struct cdrom_subchnl {
unsigned char cdsc_format;
unsigned char cdsc_audiostatus;
unsigned char cdsc_adr: 4;
unsigned char cdsc_ctrl: 4;
unsigned char cdsc_trk;
unsigned char cdsc_ind;
union {
struct {
unsigned char minute;
unsigned char second;
unsigned char frame;
} msf;
int lba;
} cdsc_absaddr;
union {
struct {
unsigned char minute;
unsigned char second;
unsigned char frame;
} msf;
int lba;
} cdsc_reladdr;
};
.fi
.in -2
The following values are valid for the audio status field returned from
\fBREAD\fR \fBSUBCHANNEL\fR command:
.sp
.ne 2
.na
\fB\fBCDROM_AUDIO_INVALID\fR\fR
.ad
.RS 25n
Audio status not supported.
.RE
.sp
.ne 2
.na
\fB\fBCDROM_AUDIO_PLAY\fR\fR
.ad
.RS 25n
Audio play operation in progress.
.RE
.sp
.ne 2
.na
\fB\fBCDROM_AUDIO_PAUSED\fR\fR
.ad
.RS 25n
Audio play operation paused.
.RE
.sp
.ne 2
.na
\fB\fBCDROM_AUDIO_COMPLETED\fR\fR
.ad
.RS 25n
Audio play successfully completed.
.RE
.sp
.ne 2
.na
\fB\fBCDROM_AUDIO_ERROR\fR\fR
.ad
.RS 25n
Audio play stopped due to error.
.RE
.sp
.ne 2
.na
\fB\fBCDROM_AUDIO_NO_STATUS\fR\fR
.ad
.RS 25n
No current audio status to return.
.RE
.RE
.sp
.ne 2
.na
\fB\fBCDROMREADOFFSET\fR\fR
.ad
.RS 21n
This \fBioctl()\fR command returns the absolute \fBCD-ROM\fR address of the
first track in the last session of a Multi-Session \fBCD-ROM\fR. The third
argument of the \fBioctl()\fR call is a pointer to an \fBint\fR.
.RE
.sp
.ne 2
.na
\fB\fBCDROMCDDA\fR\fR
.ad
.RS 21n
This \fBioctl()\fR command returns the \fBCD-DA\fR data or the subcode data.
The third argument of the \fBioctl()\fR call is a pointer to the type \fBstruct
cdrom_cdda\fR. In addition to allocating memory and supplying its address, the
caller needs to supply the starting address of the data, the transfer length in
terms of the number of blocks to be transferred, and the subcode options. The
caller also needs to issue the \fBCDROMREADTOCENTRY\fR \fBioctl()\fR to find
out which tracks contain \fBCD-DA\fR data before issuing this \fBioctl()\fR.
.sp
.in +2
.nf
/*
* Definition of CD-DA structure
*/
struct cdrom_cdda {
unsigned int cdda_addr;
unsigned int cdda_length;
caddr_t cdda_data;
unsigned char cdda_subcode;
};
.fi
.in -2
\fBcdda_addr\fR signifies the starting logical block address.
.sp
\fBcdda_length\fR signifies the transfer length in blocks. The length of the
block depends on the \fBcdda_subcode\fR selection, which is explained below.
.sp
To get the subcode information related to \fBCD-DA\fR data, the following
values are appropriate for the \fBcdda_subcode\fR field:
.sp
.ne 2
.na
\fB\fBCDROM_DA_NO_SUBCODE\fR\fR
.ad
.RS 25n
\fBCD-DA\fR data with no subcode.
.RE
.sp
.ne 2
.na
\fB\fBCDROM_DA_SUBQ\fR\fR
.ad
.RS 25n
\fBCD-DA\fR data with sub Q code.
.RE
.sp
.ne 2
.na
\fB\fBCDROM_DA_ALL_SUBCODE\fR\fR
.ad
.RS 25n
\fBCD-DA\fR data with all subcode.
.RE
.sp
.ne 2
.na
\fB\fBCDROM_DA_SUBCODE_ONLY\fR\fR
.ad
.RS 25n
All subcode only.
.RE
To allocate the memory related to \fBCD-DA\fR and/or subcode data, the
following values are appropriate for each data block transferred:
.sp
.ne 2
.na
\fB\fBCD-DA\fR data with no subcode\fR
.ad
.sp .6
.RS 4n
2352 bytes
.RE
.sp
.ne 2
.na
\fB\fBCD-DA\fR data with sub Q code\fR
.ad
.sp .6
.RS 4n
2368 bytes
.RE
.sp
.ne 2
.na
\fB\fBCD-DA\fR data with all subcode\fR
.ad
.sp .6
.RS 4n
2448 bytes
.RE
.sp
.ne 2
.na
\fBAll subcode only\fR
.ad
.sp .6
.RS 4n
96 bytes
.RE
.RE
.sp
.ne 2
.na
\fB\fBCDROMCDXA\fR\fR
.ad
.RS 21n
This \fBioctl()\fR command returns the \fBCD-ROM\fR \fBXA\fR (CD-ROM Extended
Architecture) data according to \fBCD-ROM\fR \fBXA\fR format. The third
argument of the \fBioctl()\fR call is a pointer to the type \fBstruct
cdrom_cdxa\fR. In addition to allocating memory and supplying its address, the
caller needs to supply the starting address of the data, the transfer length
in terms of number of blocks, and the format. The caller also needs to issue
the \fBCDROMREADTOCENTRY\fR \fBioctl()\fR to find out which tracks contain
\fBCD-ROM\fR \fBXA\fR data before issuing this \fBioctl()\fR.
.sp
.in +2
.nf
/*
* Definition of CD-ROM XA structure
*/
struct cdrom_cdxa {
unsigned int cdxa_addr;
unsigned int cdxa_length;
caddr_t cdxa_data;
unsigned char cdxa_format;
};
.fi
.in -2
To get the proper \fBCD-ROM\fR \fBXA\fR data, the following values are
appropriate for the \fBcdxa_format\fR field:
.sp
.ne 2
.na
\fB\fBCDROM_XA_DATA\fR\fR
.ad
.RS 25n
\fBCD-ROM\fR \fBXA\fR data only
.RE
.sp
.ne 2
.na
\fB\fBCDROM_XA_SECTOR_DATA\fR\fR
.ad
.RS 25n
\fBCD-ROM\fR \fBXA\fR all sector data
.RE
.sp
.ne 2
.na
\fB\fBCDROM_XA_DATA_W_ERROR\fR\fR
.ad
.RS 25n
\fBCD-ROM\fR \fBXA\fR data with error flags data
.RE
To allocate the memory related to \fBCD-ROM\fR \fBXA\fR format, the following
values are appropriate for each data block transferred:
.sp
.ne 2
.na
\fB\fBCD-ROM XA\fR data only\fR
.ad
.sp .6
.RS 4n
2048 bytes
.RE
.sp
.ne 2
.na
\fB\fBCD-ROM XA\fR all sector data\fR
.ad
.sp .6
.RS 4n
2352 bytes
.RE
.sp
.ne 2
.na
\fB\fBCD-ROM XA\fR data with error flags data\fR
.ad
.sp .6
.RS 4n
2646 bytes
.RE
.RE
.sp
.ne 2
.na
\fB\fBCDROMSUBCODE\fR\fR
.ad
.RS 21n
This \fBioctl()\fR command returns raw subcode data (subcodes P ~ W are
described in the "Red Book," see \fBSEE ALSO\fR) to the initiator while the
target is playing audio. The third argument of the \fBioctl()\fR call is a
pointer to the type \fBstruct cdrom_subcode\fR. The caller needs to supply the
transfer length in terms of number of blocks and allocate memory for subcode
data. The memory allocated should be a multiple of 96 bytes depending on the
transfer length.
.sp
.in +2
.nf
/*
* Definition of subcode structure
*/
struct cdrom_subcode {
unsigned int cdsc_length;
caddr_t cdsc_addr;
};
.fi
.in -2
.RE
.sp
.LP
The next group of \fBI/O\fR controls get and set various \fBCD-ROM\fR drive
parameters.
.sp
.ne 2
.na
\fB\fBCDROMGBLKMODE\fR\fR
.ad
.RS 18n
This \fBioctl()\fR command returns the current block size used by the
\fBCD-ROM\fR drive. The third argument of the \fBioctl()\fR call is a pointer
to an integer.
.RE
.sp
.ne 2
.na
\fB\fBCDROMSBLKMODE\fR\fR
.ad
.RS 18n
This \fBioctl()\fR command requests the \fBCD-ROM\fR drive to change from the
current block size to the requested block size. The third argument of the
\fBioctl()\fR call is an integer which contains the requested block size.
.sp
This \fBioctl()\fR command operates in exclusive-use mode only. The caller must
ensure that no other processes can operate on the same \fBCD-ROM\fR device
before issuing this \fBioctl()\fR. \fBread\fR(2) behavior subsequent to this
\fBioctl()\fR remains the same: the caller is still constrained to read the raw
device on block boundaries and in block multiples.
.sp
To set the proper block size, the following values are appropriate:
.sp
.ne 2
.na
\fB\fBCDROM_BLK_512\fR\fR
.ad
.RS 18n
512 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_1024\fR\fR
.ad
.RS 18n
1024 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_2048\fR\fR
.ad
.RS 18n
2048 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_2056\fR\fR
.ad
.RS 18n
2056 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_2336\fR\fR
.ad
.RS 18n
2336 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_2340\fR\fR
.ad
.RS 18n
2340 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_2352\fR\fR
.ad
.RS 18n
2352 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_2368\fR\fR
.ad
.RS 18n
2368 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_2448\fR\fR
.ad
.RS 18n
2448 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_2646\fR\fR
.ad
.RS 18n
2646 bytes
.RE
.sp
.ne 2
.na
\fB\fBCDROM_BLK_2647\fR\fR
.ad
.RS 18n
2647 bytes
.RE
.RE
.sp
.ne 2
.na
\fB\fBCDROMGDRVSPEED\fR\fR
.ad
.RS 18n
This \fBioctl()\fR command returns the current \fBCD-ROM\fR drive speed. The
third argument of the \fBioctl()\fR call is a pointer to an integer.
.RE
.sp
.ne 2
.na
\fB\fBCDROMSDRVSPEED\fR\fR
.ad
.RS 18n
This \fBioctl()\fR command requests the \fBCD-ROM\fR drive to change the
current drive speed to the requested drive speed. This speed setting is only
applicable when reading data areas. The third argument of the \fBioctl()\fR is
an integer which contains the requested drive speed.
.sp
To set the \fBCD-ROM\fR drive to the proper speed, the following values are
appropriate:
.sp
.ne 2
.na
\fB\fBCDROM_NORMAL_SPEED\fR\fR
.ad
.RS 23n
150k/second
.RE
.sp
.ne 2
.na
\fB\fBCDROM_DOUBLE_SPEED\fR\fR
.ad
.RS 23n
300k/second
.RE
.sp
.ne 2
.na
\fB\fBCDROM_QUAD_SPEED\fR\fR
.ad
.RS 23n
600k/second
.RE
.sp
.ne 2
.na
\fB\fBCDROM_MAXIMUM_SPEED\fR\fR
.ad
.RS 23n
300k/second (2x drive) 600k/second (4x drive)
.RE
Note that these numbers are only accurate when reading 2048 byte blocks. The
\fBCD-ROM\fR drive will automatically switch to normal speed when playing audio
tracks and will switch back to the speed setting when accessing data.
.RE
.SH SEE ALSO
.sp
.LP
\fBioctl\fR(2), \fBread\fR(2)
.sp
.LP
N. V. Phillips and Sony Corporation, \fISystem Description Compact Disc Digital
Audio\fR, ("Red Book").
.sp
.LP
N. V. Phillips and Sony Corporation, \fISystem Description of Compact Disc Read
Only Memory\fR, ("Yellow Book").
.sp
.LP
N. V. Phillips, Microsoft, and Sony Corporation, \fISystem Description CD-ROM
XA\fR, 1991.
.sp
.LP
\fIVolume and File Structure of CD-ROM for Information Interchange\fR, ISO
9660:1988(E).
.sp
.LP
\fISCSI-2\fR \fIStandard,\fR \fIdocument\fR \fIX3T9.2/86-109\fR
.sp
.LP
\fISCSI Multimedia Commands, Version 2 (MMC-2)\fR
.SH NOTES
.sp
.LP
The \fBCDROMCDDA\fR, \fBCDROMCDXA\fR, \fBCDROMSUBCODE\fR,
\fBCDROMGDRVSPEED\fR, \fBCDROMSDRVSPEED\fR, and some of the block sizes in
\fBCDROMSBLKMODE\fR are designed for new Sun-supported \fBCD-ROM\fR drives and
might not work on some of the older \fBCD-ROM\fR drives.
.sp
.LP
CDROMCDDA, CDROMCDXA and CDROMSUBCODE will return error if the transfer length
exceeds valid limits as determined appropriate. Example: for MMC-2 drives,
length can not exceed 3 bytes (i.e. 0xffffff). The same restriction is
enforced for older, pre-MMC-2 drives, as no limit was published for these older
drives (and 3 bytes is reasonable for all media). Note that enforcing this
limit does not imply that values passed in below this limit will actually be
applicable for each and every piece of media.
.sp
.LP
The interface to this device is preliminary and subject to change in future
releases. Programs should be written in a modular fashion so that future
changes can be easily incorporated.
|