1 Hi dear cdrom drive users,
3 This README describes hardware related matters as well as the installation of
4 icedax, the sampling utility.
6 This icedax utility comes with the Cdrkit project. Cdrkit is a spinoff from
7 cdrtools. However, the cdrtools developers are not involved in the
8 development of this spinoff and therefore shall not be made responsible for
9 any problem caused by it. Please do not try to get support for this program by
10 contacting the original authors.
15 For SCSI cdroms and CD-writers, as well as SCSI-emulated ATAPIS and parallel
17 1s. kernel support for SCSI, the host adapter, SCSI cdroms and the
18 generic SCSI interface (if under Linux). You need to have the proper device
19 descriptors (get them under Linux with the MAKEDEV script from /dev).
21 For ATAPI cdroms under Linux
22 1a. kernel support for the ATAPI cdrom driver or alternatively ide-scsi
23 emulation. You need to have the proper device descriptors (get them
24 with the MAKEDEV script from /dev).
26 For parallel port cdroms under Linux
27 With newer kernels icedax uses the same parallel port access
28 as does wodim. Please refer additionally to the wodim documentation.
29 There are generally two drivers to access the cdrom through the parallel
30 port: the ATAPI cd emulation (called pcd), and the SCSI device emulation
31 (called pg). The pcd driver does NOT support cdda reading (kernel 2.2.12),
32 while the pg driver has no restriction. So you have to use pg for that.
35 For cdrom drives with proprietary busses under Linux
36 1p. Please check the CDROM-HOWTO for features of the respective
37 drivers. The sbpcd driver is very demanding due to the lack of
40 optionally currently for Solaris and all platforms running 4fronts
42 2. kernel sound card support.
45 Recommendations for higher throughput on Linux SCSI systems
46 ===========================================================
48 Higher throughput will give better chances for non-interrupted
49 sampling. This should avoid typical interruption errors (cracklings
50 at buffer boundaries).
52 1. Increase SG_BIG_BUFF to (128*1024) in /usr/src/linux/include/scsi/sg.h
53 (and recompile your kernel and boot it :-).
54 NOTE: Some kernel configurations will lead to 'out of kernel memory' errors.
55 If you encounter this message regularly, better leave SG_BIG_BUFF at
58 1a.There is a patch for multiple sg device access under Linux. It uses
59 up to 128 K buffer for each device. See here:
60 ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha/sg*
62 2. Ensure your harddisk has write cache enabled (For SCSI hard disks I
63 switched it on with the scsiinfo program from tsx-11.mit.edu), but
64 enable this only if it is correctly working ;-)
66 This has boosted the throughput of icedax considerably.
72 Non SCSI drives (Linux only):
74 The greatest group nowadays are ATAPI (EIDE) cdrom drives.
75 Support is only limited by the drive. Kernel and icedax
76 are ready for them (unless the drive uses a very uncommon method).
78 Newer kernels can do an scsi emulation for ATAPI devices.
79 This interface is supported.
81 Parallel port interface:
82 There is a driver that maps the parallel port driver to an generic
83 scsi like driver. Should work with newer kernels.
85 Proprietary interfaces:
86 Older drives with proprietary interfaces are supported only
87 if the kernel driver allows reading cdda audio data via ioctl().
88 Currently only Eberhard Moenkeberg's sbpcd and Corey Minyard's
89 cdu31a driver do allow this. The sbpcd driver of kernels earlier than
90 2.0.30 and 2.1.57 needs a patch before satisfying output can be
91 obtained (see README.sbpcd).
94 For these drives the SCSI library from Joerg Schilling is used.
95 Thus we need kernel support (compiled-in or as a module) for it.
96 The generic SCSI interface allows multi sector transfers (max. 128 KB)
97 which lowers cpu load considerably.
100 I added a script 'scsi_scan.linux' to find the generic devices for all
101 SCSI CDROM- or WORM-type drives.
106 There are some adjustable parameters in the beginning of the Makefile
107 (which is called local.cnf.in) . They describe default settings of icedax:
109 INTERFACE: How the cdrom is accessed. Choose one method for INTERFACE.
110 DEVICE: The default cdrom device is set in DEF_DEVICE.
112 SOUND FILE FORMAT DEFAULTS:
113 The default format can be 'wav', 'sun pcm au', 'aiff', 'aifc', or
114 'raw bigendian samples'.
115 It is determined by the Makefile variable DEF_TYPE.
118 The default filename is given by DEF_FILE. Unless 'cdr' format is being used,
119 this name is appended with '.wav', '.au', '.aiff' or '.aifc'.
121 RATE: the default rate is given by setting DEF_UNDERSAMPLING to the divisor
122 for the audio cd sampling frequency (44100 Hz).
124 RATE = 44100 Hz / DEF_UNDERSAMPLING
126 DEF_UNDERSAMPLING can be any multiple of a half greater than one half.
128 DYNAMIC: The default dynamic range of one sample in one channel is defined in
129 DEF_BITS which can be one of 8, 12 or 16.
131 CHANNELS: set DEF_CHANNELS to 1 for mono and 2 for stereo.
133 RECORDING TIME: set DEF_TIME to the amount of seconds to record (or 0 for
136 SOUND DEVICE: set SOUND_DEVICE to the device name of your sound card.
137 The line containing HAVESOUND should be
138 uncommented also, if you want the option to hear
141 All of those values can be overridden by command line parameters.
147 Adjust the Makefile (named local.cnf.in) for your cdrom interface and
148 device setting first.
155 This will compile icedax and copy the binary to /usr/local/bin and the
156 man page to /usr/local/man/man1 (defaults).
162 You can setgid the binary, if you want to allow access to a CDROM's
163 scsi_generic interface for icedax but not for arbitrary programs.
164 Giving away permissions to send SCSI commands directly to a device is
165 not something you want to do lightly on a multi-user server system.
166 The setgid privileges will only be used to access the scsi generic
167 interface; for cooked_ioctl, the setgid privileges are not necessary
168 and they are simply dropped.
170 Previous versions of icedax had to be setuid to root. Such privileges
171 are no longer necessary and will be dropped if present.
176 By default icedax uses the generic SCSI interface and a device tripel for
177 SCSI bus, id, and lun.
178 This setting can be overridden by specifying '-Iinterface' and
180 The following command line example uses the generic_scsi interface and the
181 SCSI device with bus 1, id 2 and lun 3:
182 icedax -Igeneric_scsi -D1,2,3
184 The shell script 'scan_scsi.linux' will report the generic devices for
185 all SCSI cdrom drives.
187 If you need to use another interface, check the device setting also as they
188 need to fit together.
189 Here is an example for an ATAPI cdrom using the cooked_ioctl interface and
190 the cdrom device /dev/hdb:
191 icedax -Icooked_ioctl -D/dev/hdb
197 I added an optional on-the-fly correction for pre-emphasized samples
198 (available for original CDDA format only).
199 If the -T option is given, the samples will be filtered before they
200 are written to disk. The samples then have a linear frequency response again.
202 When recording in mono, both channels are summed with halved amplitude.
204 Undersampling is done by summing several samples with reduced amplitude to
205 prevent overflows. This damps higher freqencies as well. Compared to
206 exact resampling icedax does not use a very sophisticated (expensive)
207 filter algorithm. It currently uses quadratic interpolation for
208 noninteger subsampling factors.
210 Sampling can be aborted by pressing the Interrupt-Key (eg control-C)
211 at anytime. Unless streaming to a pipe, the wav header will be updated
212 to contain the actual length of the sample. The same will happen, if
213 disk space becomes exhausted.
218 The options can also influence the performance greatly.
219 The fastest case is given when the samples don't need to be changed from
220 their original form or analysed, that is the output format uses the same
221 parameters as the drive: 16-bit samples, stereo at 44100 Hz sample rate
222 AND with the same endianess (-Cbig and -Ebig, or -Clittle and -Elittle).
223 To be sure all parameters can be given explicitly on the command line.
224 This avoids an analysis of icedax.
226 icedax -P0 -q -S<maximum speed>
227 run as root will read with maximum speed and copy its output into the
228 wav file, taking advantage of realtime scheduling as well.
230 For throughput testing the additional option -N can be used. Write
231 operations will be suppressed then.
233 Options that slow down initially
234 ================================
235 -v<level> needs some time for analysis before the actual sampling starts
237 Options that slow down during sampling
238 ======================================
239 -P1 causes overlap reading, the slowdown depends on the amount of jitter
240 -e synchronous output to a sound card slows down to onefold speed
242 Options that need more cpu power
243 ================================
244 -p<rate> resamples the output send to the sound card
245 -M<count> calculates checksums
246 -T on-the-fly preemphasis filtering
247 -F checking for extremal samples
248 -G checking for differences in both channels
249 -C<endianess> if a conversion is required (see below)
250 -E<endianess> if a conversion is required (see below)
251 -Oaudiotype if a conversion is required (see below)
260 When are one or two endianess (byte order) conversions required?
261 ================================================================
262 There are three stages where the endianess matters:
263 1.) on the input side the cd drive can deliver in two flavors (called F1).
264 When the flavor is unknown, icedax needs to find out the endianess.
265 A simple voting method is used. Successive samples are compared in both
266 flavors and the flavor with the statistically smaller changes is taken.
267 The flavor can be defined with the -C option, avoiding the analysis.
268 2.) For any calculation with samples (and echoing to the sound card),
269 the samples are needed in the byte order of the machine (in this case
270 I set 'need_host_order' to yes). The flavor of the machine endianess
272 3.) Finally, there are two flavors of output sound formats (called F3):
273 wav uses little endian samples
274 cdr and au use big endian samples
275 If the samples currently in memory have the wrong endianess a
276 (possibly second) conversion is required.
278 This gives the following table:
279 F1 F2 need_host_order F3 conversions
280 little little no little 0
281 little little yes little 0
282 little little no big 1
283 little little yes big 1
284 little big no little 0
285 little big yes little 2
288 big little no little 1
289 big little yes little 1
303 Audible errors caused by hesitations:
305 When recording the same audio track twice, recordings can slightly differ.
306 Furthermore depending on the firmware in the cdrom drive, positioning
307 errors can be so severe that they cannot be easily corrected by icedax.
308 This will unfortunately lead to audible errors.
310 In this case some overlap or even underlap between successive portions
311 is introduced from the cdrom drive.
312 Here is this case demonstrated graphically:
315 |----------------------| first read delivered
316 |------------------------| second read wanted
317 |------------------------| second read delivered
318 |-| extra bogus bytes
321 This is due to synchronisation problems between sectors inside the cdrom
322 drive. When the drive has been forced to wait, these problems arise.
324 Audio cds are lacking sector headers, so it's a difficult job to do the
325 positioning right (in the firmware). The frequency of these errors is
326 reduced when the reading process can continue undisturbed for longer periods.
327 So, a high throughput is essential.
329 You may want to fine-tune your update daemon to use shorter intervals
330 (see 'man 8 update'). Shorter intervals are better because the update
331 interruptions are shorter when not so much write requests can pile up.
333 The plextor 4plexplus drive (PX-4XCE) and newer models, newer pioneer
334 models as well as CD-writers with large buffers don't suffer from this
335 errors. Here the default is to switch off overlap reading.
337 If you cannot get good samples from your drives you might consider an
338 alternative program. Monty's cdparanoia program goes to great lengths
339 in order to seperate the good bits from the bad ones.
341 2. The index scanner has caused timeouts on my toshiba 3401 due to fast
344 3. Retrieval of media catalog numbers and International Standard Recording
345 Codes may fail due to firmware bugs.
347 Audio Format Conversion
348 =======================
349 Currently wav, sun (au-pcm), Apple/SGI aiff/aifc, and raw formats are supported.
351 I try to write correct wav files (little endian samples), but some
352 cd-writers might swap them, which would result in sort of white noise
353 instead of the original sounds. icedax has an endianness detector
354 for these cases, but as for all automatics, it might fail on bizarre samples.
356 Hint: icedax can be forced to use a given input endianness with the
357 -C option (arguments are 'little', 'big' or 'guess').
359 The sun format is a pcm variant, and uses big endian samples.
360 The other more common sun format with logarithmically scaled samples (au)
361 is not supported but can be obtained from sox's conversion.
363 The raw format is like the sun format except it has no header. I
364 changed the endianness to big endian samples in order to comply
365 with popular cd burning software like the wodim program.
367 The sound converter 'sox' can be used to obtain other sound formats.
368 (Note however, that the current sox player and a newer sound driver do not
369 harmonize well, use the player from the wavplay package instead (available
376 Tested patches, any hardware information regarding drives as well as success/
377 failure reports are always welcome at heiko@colossus.escape.de.
380 known cdda capable drives
381 =========================
382 Check out these web pages for uptodate information:
384 <http://www.tardis.ed.ac.uk/~psyche/pc/cdrom/CDDA.html>
388 <http://www.anime.net/~goemon/linux-cd/cdda-list.html>
390 From a news posting from Björn Wiberg
392 > The following table was generated using the CDROM.CFG file from Nero
395 > It shows different CD-ROM models and what speeds they can do DAE at. I
396 > guess the values are "safe ones"; i.e. the speeds at which each drive
397 > can perform DAE reliably.
399 > A value of "0x" means the drive doesn't support DAE.
401 > For your convenience, the maximum data transfer speed of the drives
402 > (for reading conventional files and data from the CD-ROM) are also
405 > Hopefully, this will help some of you who are looking for a good
406 > CD-ROM drive to choose a model which seems fast enough both for data
409 > The models which support DAE:
410 > (Sorted by DAE speed, data speed and model)
412 > CD-ROM model DAE Data Interface
413 > ---------------------------------------------------------
414 > PLEXTOR CD-ROM PX-32TS 16x 16x SCSI
415 > TEAC CD-524E 14x 24x IDE
416 > CREATIVE CD620E 12x 5x IDE
417 > MITSUMI CD-ROM FX320S !B 12x 32x IDE
418 > TEAC CD-532E 12x 32x IDE
419 > HITACHI CDR-8335 12x 24x IDE
420 > PIONEER CD-ROM DR-A02S 12x 24x IDE
421 > TEAC CD-ROM CD-532S 12x 14x SCSI
422 > PIONEER CD-ROM DR-A12X 12x 12x IDE
423 > PIONEER CD-ROM DR-U06S 12x 12x SCSI
424 > PLEXTOR CD-ROM PX-20TS 12x 12x SCSI
425 > MITSUMI CD-ROM FX120T !B 11x 12x IDE
426 > PIONEER CD-ROM DR-A04S 11x 32x IDE
427 > PIONEER CD-ROM DR-U12X 10x 12x SCSI
428 > HITACHI CDR-8330 9x 24x IDE
429 > SONY CD-ROM CDU711 9x 14x IDE
430 > MATSHITA CD-ROM CR-584 9x 12x IDE
431 > MATSHITA CD-ROM CR-586 8x 32x IDE
432 > CDM-T531 Ver1.041 8x 18x IDE
433 > TEAC CD-516E 8x 16x IDE
434 > TOSHIBA CD-ROM XM-6201TA 8x 16x SCSI
435 > PLEXTOR CD-ROM PX-12CS 8x 12x SCSI
436 > PLEXTOR CD-ROM PX-12TS 8x 12x SCSI
437 > PIONEER CD-ROM DR-U10X 8x 10x SCSI
438 > SONY CD-ROM CDU611 8x 10x IDE
439 > FUNAI E285X 8x 8x IDE
440 > MITSUMI CD-ROM FX810T4!B 8x 8x IDE
441 > SONY CD-ROM CDU511 8x 8x IDE
442 > SONY CD-ROM CDU571-Q 8x 8x IDE
443 > TEAC CD-C68E 8x 8x IDE
444 > MITSUMI CD-ROM FX400E !B 8x 4x IDE
445 > HITACHI CDR-8130 7x 16x IDE
446 > MATSHITA CD-ROM CR-585 6x 24x IDE
447 > CREATIVE CD2422E MC102 6x 12x IDE
448 > MATSHITA CD-ROM CR-508 6x 12x SCSI
449 > IBM PD-1 LF-1195 6x 6x IDE
450 > PLEXTOR CD-ROM PX-6XCS 6x 6x SCSI
451 > LITEON CD-ROM LTN301 5x 32x IDE
452 > LITEON CD-ROM LTN242F 5x 24x IDE
453 > HITACHI CDR-7930 5x 8x IDE
454 > ASUS CD-S340 4x 34x IDE
455 > E-IDE CD-ROM 32X/AKU 4x 32x IDE
456 > ATAPI CDROM 4x 24x IDE
457 > LITEON CD-ROM LTN244 4x 24x IDE
458 > PHILIPS PCA248CD 4x 24x IDE
459 > TEAC CD-524EA 4x 24x IDE
460 > LITEON CD-ROM LTN202 4x 21x IDE
461 > ATAPI CD-ROM DRIVE-24X 4x 20x IDE
462 > CREATIVE CD2423E NC101 4x 20x IDE
463 > SAMSUNG CD-ROM SCR-2431 4x 20x IDE
464 > TAE IL CD-ROM CDD-7240J 4x 20x IDE
465 > TEAC CD-220E 4x 20x IDE
466 > CREATIVE CD1620E SL970404 4x 16x IDE
467 > LITEON CD-ROM LTN262 4x 16x IDE
468 > TEAC CD-ROM CD-516S 4x 16x SCSI
469 > ATAPI CD-ROM DRIVE 4x 15x IDE
470 > BCD 16XA CD-ROM 4x 10x IDE
471 > MATSHITA CD-ROM CR-506 4x 8x SCSI
472 > SONY CD-ROM CDU311 4x 8x IDE
473 > MATSHITA CD-ROM CR-504-J 4x 4x SCSI
474 > MITSBISH CDRW226 4x 4x SCSI
475 > SONY CD-ROM CDU625-S 4x 4x SCSI
476 > SONY CD-ROM CDU-76S 4x 4x SCSI
477 > SONY CD-ROM CDU77E 4x 4x IDE
478 > PLEXTOR CD-ROM PX-4XCE 4x 4x SCSI
479 > SONY CD-ROM CDU55E 4x 2x IDE
480 > PIONEER CD-ROM DR-U24X 3x 24x SCSI
481 > LITEON CD-ROM LTN204 3x 21x IDE
482 > PIONEER CD-ROM DR-A01S 3x 20x IDE
483 > PIONEER CD-ROM DR-A24X 3x 20x IDE
484 > FUNAI E295X 3x 16x IDE
485 > PIONEER CD-ROM DR-U03S 3x 12x SCSI
486 > BTC 24X CD-ROM SLL24 3x 10x IDE
487 > PLEXTOR CD-ROM PX-8XCS 3x 4x SCSI
488 > CyberDrv CD-ROM TW240S 3x 3x SCSI
489 > COMPAQ CRD-8320B 2x 32x IDE
490 > LG CD-ROM CRD-8320B 2x 32x IDE
491 > TOSHIBA CD-ROM XM-6202B 2x 32x IDE
492 > CREATIVE DVD-ROM DVD2240E 2x 24x IDE
493 > TOSHIBA CD-ROM XM-6102D 2x 24x IDE
494 > BTC 16X CD-ROM SLL16 1x 10x IDE
495 > NEC CD-ROM DRIVE:282 2x 8x IDE
496 > HITACHI GD-2000 2x 4x IDE
497 > MATSHITA CD-ROM CR-581 2x 4x IDE
498 > NEC CD-ROM DRIVE:222 2x 4x SCSI
499 > MATSHITA CD-ROM CR-8004 2x 2x SCSI
500 > GoldStar CD-ROM CRD-8240B 1x 24x IDE
501 > TOSHIBA CD-ROM XM-6102B 1x 24x IDE
502 > CyberDrv IDE CD-ROM 120D 1x 12x IDE
503 > I DE CD-ROM TW120D 1x 12x IDE
504 > NEC CD-ROM DRIVE:464 1x 12x SCSI
505 > TORiSAN CD-ROM CDR_U112 1x 12x IDE
506 > TOSHIBA CD-ROM XM-5701TA 1x 12x SCSI
507 > TOSHIBA CD-ROM XM-5702B 1x 12x IDE
508 > CyberDrv SCSI CD-ROM 120S 1x 10x IDE
509 > NEC CD-ROM DRIVE:463 1x 10x SCSI
510 > COMPAQ DVD-ROM SD-M1002 1x 8x IDE
511 > MATSHITA CD-ROM CR-583 1x 8x IDE
512 > NEC CD-ROM DRIVE:462 1x 8x SCSI
513 > TEAC CD-58E 1x 8x IDE
514 > OPTICS_S 8622 SCSI 1x 8x SCSI
515 > TOSHIBA CD-ROM XM-5602B 1x 8x IDE
516 > TOSHIBA CD-ROM XM-3801TA 1x 7x SCSI
517 > NEC CD-ROM DRIVE:461 1x 6x SCSI
518 > IBM CDRM00203 1x 6x SCSI
519 > TEAC CD-46E 1x 6x IDE
520 > TEAC CD-56E 1x 6x IDE
521 > TEAC CD-ROM CD-56S 1x 6x SCSI
522 > TOSHIBA CD-ROM XM-5502TA 1x 6x IDE
523 > TOSHIBA CD-ROM XM-3701TA 1x 6x SCSI
524 > NEC CD-ROM DRIVE:502 1x 4x SCSI
525 > TOSHIBA CD-ROM XM-1502BN 1x 4x IDE
526 > TOSHIBA CD-ROM XM-5302TA 1x 4x IDE
527 > TOSHIBA CD-ROM XM-5401TA 1x 4x SCSI
528 > TOSHIBA CD-ROM XM-5402TA 1x 4x IDE
529 > TOSHIBA CD-ROM XM-1502B 1x 4x IDE
530 > TOSHIBA CD-ROM XM-3501TA 1x 4x SCSI
531 > TOSHIBA CD-ROM XM-5301TA 1x 4x SCSI
532 > TOSHIBA CD-ROM XM-5201TA 1x 2x SCSI
534 known cdda uncapable drives
535 ===========================
537 Pioneer DRM-602X, DRM-604X
538 Teac CD-55A (panasonic bus)
539 Philips CM206/10 serial RS-422
541 CM226/10 serial RS-422
542 CDD462/01 serial RS-422
545 Additions to the tables above are welcome.
547 and now catch your sounds,
548 Heiko heiko@colossus.escape.de (Original author)
549 Changes for the Cdrkit project by Christian Fromme <kaner@strace.org>, Eduard Bloch