WORMCONTROL(8)

NAME
wormcontrol - control the CD-R driver

SYNOPSIS
wormcontrol [-f device] command [params...]

DESCRIPTION

  Options

-f device
    Use device instead of the default /dev/rworm0.

  Overview
The wormcontrol utility is used to control the behaviour of the worm(4) driver in order to adjust various parameters of a recordable CD (CD-R).

Unlike many other devices, CD-R's require a very strict handling order. Prior to writing data, the speed of the drive must be selected, and the drive can also be turned into a ‘dummy’ mode, where every action is only performed with the laser turned off. This way, it's possible to test whether the environment provides a sufficiently high data flow rate in order to actually burn the CD-R, without destroying the medium in case of a catastrophic failure.

In order to write a new track, the drive must be told whether the new track will become an audio or a data track. Audio tracks are written with a block size of 2352 bytes, while data tracks have 2048 bytes per block. There are actually more data formats available, but the driver currently does only support this Yellow Book Mode 1 format. For audio tracks, the driver does further need to know whether the data are recorded with a preemphasis.

Once all tracks of a session have been written, the disk must be fixated. This writes the table of contents and leadout information to the disk. The disk won't be usable without doing this.

  Commands

select vendor-id model-id
    Unfortunately, each CD-R drive vendor decided to implement a set of SCSI commands of his own. Thus, the worm(4) driver needs to know which set of ‘quirk’ functions to use for a particular device. Currently, only devices that have quirk information statically compiled into the driver will work; it is however planned to make them available as loadable modules in the future. The select command causes the driver to lookup the appropriate quirks. The driver matches the provided vendor-id and model-id against the list of known quirks. An error will be returned if no quirk record matches, and the device won't be usable for anything else until a quirk record has been successfully selected.

    By now, the vendor/model names of “PLASMON” / “RF4100”, and “HP” / “4020i” are known.

prepdisk single | double [dummy]
    Prepare the disk for recording. This must be done before any tracks can be prepared, and remains in effect until the session has been fixated. Either single speed (for audio data) or double speed (for CD-ROM data) must be selected, and optionally, the argument dummy can be used to tell the drive to keep the laser turned off, for testing.

track audio | data [preemp]
    Inform the driver about the format of the next track. Either audio or data (CD-ROM) must be selected, with an optional argument preemp that must be specified for an audio track where data records with preemphasis are being used. Once this command has been successfully specified, the track is ready for being written.

fixate toc-type [onp]
    Once all tracks have been written, this closes the current session. The argument toc-type is a single digit between 0 and 4, with the following meaning:

    0 CD audio

    1 CD-ROM

    2 CD-ROM with first track in mode 1

    3 CD-ROM with first track in mode 2

    4 CDI

    The optional argument onp stands for “open next program area”, which means that the next session on the CD-R will be opened and can be recorded in the future. Otherwise, the CD-R will be closed and remains unchangeable.

DIAGNOSTICS
Error codes for the underlying ioctl(2) commands are printed by the perror(3) facility.

EXAMPLES
The typical sequence of burning a data CD-R looks like:

    # wormcontrol select PLASMON RF4100
    # wormcontrol prepdisk double
    # wormcontrol track data
    # rtprio 5 team -v 1m 5 < cdrom.image | dd of=/dev/rworm0 obs=20k
    # wormcontrol fixate 1

Note that the dd(1) command above is mainly used in order to “slice” the data stream. It's particularly useful when recording audio data with their rather unusual blocksize. Since the underlying device is a raw device, the blocksize used in that command must be an integral multiple of the CD-R blocksize.

The mentioned command team(1) is not part of the base system, but comes extremely handy in order to pipe a constant data stream into the CD recorder.

SEE ALSO
worm(4), ioctl(2), dd(1), team(1), perror(3).

HISTORY
Wormcontrol is currently under development.

AUTHOR
The program has been contributed by Joerg Wunsch, Dresden.