Annotation of src/usr.bin/cdio/cdio.1, Revision 1.54
1.54 ! jmc 1: .\" $OpenBSD: cdio.1,v 1.53 2009/06/03 00:45:59 naddy Exp $
1.26 jmc 2: .\"
3: .\" Copyright (c) 1995 Serge V. Vakulenko
4: .\" All rights reserved.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\"
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by Serge V. Vakulenko.
18: .\" 4. The name of the author may not be used to endorse or promote products
19: .\" derived from this software without specific prior written permission.
20: .\"
21: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26: .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27: .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28: .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30: .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.21 aaron 31: .\"
1.54 ! jmc 32: .Dd $Mdocdate: June 3 2009 $
1.1 downsj 33: .Dt CDIO 1
1.14 aaron 34: .Os
1.1 downsj 35: .Sh NAME
36: .Nm cdio
1.37 jmc 37: .Nd compact disc control utility
1.1 downsj 38: .Sh SYNOPSIS
39: .Nm cdio
1.21 aaron 40: .Op Fl sv
1.37 jmc 41: .Oo Fl d Ar host :
42: .Ar port Oc
1.13 aaron 43: .Op Fl f Ar device
44: .Op Ar command args ...
1.1 downsj 45: .Sh DESCRIPTION
1.13 aaron 46: The
1.14 aaron 47: .Nm
1.37 jmc 48: program is a compact disc control utility,
49: with support for playing audio CDs and TAO CD writing.
1.1 downsj 50: .Pp
1.13 aaron 51: If no command is given,
1.14 aaron 52: .Nm
1.37 jmc 53: enters interactive mode, reading commands from the standard input.
1.1 downsj 54: .Pp
1.16 aaron 55: The options are as follows:
1.19 aaron 56: .Bl -tag -width Ds
1.28 jmc 57: .It Xo
58: .Fl d
59: .Ar host : Ns Ar port
60: .Xc
1.38 jmc 61: Specifies a CDDB host
62: .Bq default: freedb.freedb.org:cddb .
1.13 aaron 63: .It Fl f Ar device
1.38 jmc 64: Specifies the name of the CD device, such as
1.40 jmc 65: .Pa /dev/rcd0c
1.13 aaron 66: or
67: .Pa mcd0 .
68: Both absolute and relative paths to
69: .Pa /dev
1.38 jmc 70: filenames are possible;
71: the raw partition name is added if needed.
1.28 jmc 72: .It Fl s
73: Silent mode.
74: Do not print table headers or human-readable comments.
75: .It Fl v
76: Verbose mode.
77: Print as much information as possible.
1.1 downsj 78: .El
79: .Pp
1.17 aaron 80: The available commands are listed below.
81: Only as many characters as are required to uniquely identify a command
82: need be specified.
1.45 jmc 83: If no command is given,
84: only a track number or range,
85: then
1.17 aaron 86: .Ic play
1.45 jmc 87: is assumed.
1.29 jmc 88: .Bl -tag -width Ds
1.32 mjc 89: .It Ic blank
90: Minimally blank the disc.
1.53 naddy 91: .It Ic cddbinfo Op Ar n
1.47 jmc 92: Print the Table Of Contents (TOC) after matching the disc with the CDDB.
1.29 jmc 93: In case of multiple matches, reissue the command with
94: .Ar n .
95: .It Ic cdid
1.38 jmc 96: Print the disc ID that will be used for matching with the CDDB.
1.43 jmc 97: .It Ic cdplay Op Ar track1-trackN ...
1.42 mjc 98: Play specified tracks from disk.
99: Unlike
1.45 jmc 100: .Ic play ,
101: the CD player need not be connected to an audio device;
102: instead it rips tracks from disk and outputs audio data to
1.52 ratchov 103: the default
104: .Xr audio 4
105: device or
106: .Xr aucat 1
107: socket.
1.42 mjc 108: Both individual tracks and track ranges may be specified.
109: If range is specified in descending order tracks will be played in descending order.
110: If the first value in the range is omitted, tracks from first track on disk to the specified one will be played.
111: If the last value in the range is omitted, tracks from the specified track to the last track on disk will be played.
1.46 sobrado 112: .It Ic cdrip Op Ar track1-trackN ...
113: Rip specified tracks from disk.
114: Audio tracks are saved as WAVE sound files.
115: All tracks will be saved in the current working directory.
116: If parameters are omitted, all tracks are ripped.
117: Both individual tracks and track ranges may be specified, in the same format as the
118: .Ic cdplay
119: command.
1.29 jmc 120: .It Ic close
121: Inject the disc.
122: .It Ic debug Ar on | off
123: Enable/disable the debugging mode of the CD device driver.
124: .It Ic device Ar devname
125: Make
126: .Ar devname
127: the current CD device.
128: This is the equivalent of quitting
129: .Nm
130: and restarting with a different device.
131: .It Ic eject
132: Eject the disc.
1.30 robert 133: .It Ic exit
134: A synonym for
135: .Ic quit .
1.29 jmc 136: .It Ic help
137: Print the list of available commands.
138: .It Ic info
1.47 jmc 139: Print the Table Of Contents (TOC).
1.29 jmc 140: .It Ic next
141: Play the next track.
142: If we're at the last track, stop.
143: .It Ic pause
144: Stop playing.
145: Do not stop the disc.
1.53 naddy 146: .It Xo Ic play
1.54 ! jmc 147: .Oo Ar track1 Ns Op Ar .index1
! 148: .Op Ar track2 Ns Op Ar .index2 Oc
1.53 naddy 149: .Xc
1.54 ! jmc 150: Play from
1.53 naddy 151: .Ar track1
1.54 ! jmc 152: to
! 153: .Ar track2 ;
! 154: an optional index point can be specified for each track.
! 155: If only one track is specified, play from that track to the end of the disc.
! 156: If no tracks are specified, play the whole disc.
1.31 krw 157: .It Xo Ic play
1.54 ! jmc 158: .Oo Op Ar tr1
1.53 naddy 159: .Ar m1 : Ns Ar s1 Ns Oo
160: .Ar .f1 Oc
1.31 krw 161: .Op Ar tr2
162: .Oo Ar m2 : Ns Ar s2 Ns
1.54 ! jmc 163: .Op Ar .f2 Oc Oc
1.31 krw 164: .Xc
1.1 downsj 165: Play from the absolute address
1.14 aaron 166: (MSF) defined by
1.31 krw 167: .Ar m1
1.14 aaron 168: in minutes,
1.31 krw 169: .Ar s1
170: in seconds,
171: frame number
172: .Ar f1 ,
173: to the absolute address defined by
174: .Ar m2
1.14 aaron 175: in minutes,
1.31 krw 176: .Ar s2
177: in seconds,
178: frame number
179: .Ar f2 .
180: If a track number is specified
181: .Pq tr Ns Ar X ,
182: then the minutes, seconds, and frame numbers
183: are relative to the start of that track.
184: Minutes are in the range 0\(en99.
185: Seconds are in the range 0\(en59.
186: Frame numbers are in the range 0\(en74.
1.53 naddy 187: .It Ic play Op Ar #block Op Ar len
1.54 ! jmc 188: Play starting from the logical
1.53 naddy 189: .Ar block
1.1 downsj 190: using
1.53 naddy 191: .Ar len
1.1 downsj 192: logical blocks.
1.17 aaron 193: .It Ic previous
194: Play the previous track.
195: If we're at the first track, restart.
1.29 jmc 196: .It Ic quit
197: Quit the program.
1.17 aaron 198: .It Ic replay
1.41 jmc 199: Replay the current track.
1.29 jmc 200: .It Ic reset
201: Perform a hardware reset of the device.
1.17 aaron 202: .It Ic resume
203: Resume playing.
204: Used after the
205: .Ic pause
1.4 deraadt 206: command.
1.29 jmc 207: .It Ic set Ar lba | msf
208: Set LBA
209: .Pq Ar lba
210: or minute-second-frame
211: .Pq Ar msf
212: ioctl mode.
213: The default is minute-second-frame ioctl mode.
214: .It Ic status
215: Print information about the disc:
216: the current playing status and position,
217: the current media catalog status,
218: and the current values of the volume for left and right channels.
1.17 aaron 219: .It Ic stop
1.1 downsj 220: Stop the disc.
1.32 mjc 221: .It Xo Ic tao
1.36 jmc 222: .Op Fl ad
1.51 av 223: .Op Fl s Ar speed
1.32 mjc 224: .Ar trackfile ...
225: .Xc
1.36 jmc 226: .Bq command line only
227: \ \&Write a track-at-once CD containing the specified
228: .Ar trackfile .
229: .Pp
230: The options are as follows:
1.38 jmc 231: .Pp
232: .Bl -tag -width Ds -compact
1.36 jmc 233: .It Fl a
1.49 jmc 234: Write files as audio tracks.
1.50 jmc 235: File formats of audio tracks may be CDDA or WAVE
236: with 2 channels of PCM audio,
237: signed 16-bit (little endian) values sampled at 44100 Hz.
1.36 jmc 238: .It Fl d
239: Write files as data tracks (the default).
1.51 av 240: .It Fl s Ar speed
241: Specify a write speed for tracks.
242: .Ar speed
243: may be a numerical value between 1 and
244: the maximum speed supported by the media and drive,
245: or one of the literal strings
246: .Dq auto
247: or
248: .Dq max ,
249: meaning the optimal or maximum speed detected.
1.36 jmc 250: .El
1.17 aaron 251: .It Ic volume Ar left_channel Ar right_channel
1.14 aaron 252: Set the volume of the left channel to
1.13 aaron 253: .Ar left_channel
1.14 aaron 254: and the volume of the right channel to
255: .Ar right_channel .
1.29 jmc 256: Allowed values are in the range 0\-255.
1.34 jmc 257: .It Xo Ic volume
258: .Ic left \*(Ba
259: .Ic right \*(Ba
260: .Ic mono \*(Ba
261: .Ic stereo \*(Ba
262: .Ic mute
263: .Xc
264: Respectively:
265: play the left subtrack on both left and right channels;
266: play the right subtrack on both left and right channels;
267: set mono mode;
268: set stereo mode;
269: turn the sound off.
1.38 jmc 270: .El
271: .Sh ENVIRONMENT
1.52 ratchov 272: .Bl -tag -width "AUDIODEVICEXXX"
1.39 jmc 273: .It Ev DISC , CDROM
274: Specifies the name of the CD device to use.
275: If both
276: .Ev DISC
277: and
278: .Ev CDROM
279: are set,
280: .Ev DISC
281: takes precedence.
282: If neither
283: .Ev DISC
284: nor
285: .Ev CDROM
286: are set,
287: the default is
288: .Pa cd0 .
289: See also the
1.38 jmc 290: .Fl f
1.39 jmc 291: option, above.
1.52 ratchov 292: .It Ev AUDIODEVICE
293: Name of the
294: .Xr aucat 1
295: socket to connect to, or path to the
296: .Xr audio 4
297: device to use.
1.18 aaron 298: .El
1.1 downsj 299: .Sh FILES
300: .Bl -tag -width /dev/rmcd0c -compact
1.10 mickey 301: .It Pa /dev/rcd0c
302: .It Pa /dev/rmcd0c
1.1 downsj 303: .El
1.28 jmc 304: .Sh SEE ALSO
305: .Xr aucat 1 ,
306: .Xr audioctl 1 ,
307: .Xr mixerctl 1 ,
308: .Xr audio 4
1.1 downsj 309: .Sh HISTORY
310: The
1.14 aaron 311: .Nm
1.1 downsj 312: command is based on
313: .Nm cdcontrol ,
1.22 mpech 314: which first appeared in
315: .Fx 2.1 .
1.27 jmc 316: .Sh AUTHORS
317: Jean-Marc Zucconi,
318: Andrey A. Chernov,
319: Serge V. Vakulenko,
320: Marc Espie