Annotation of src/usr.bin/cdio/cdio.1, Revision 1.61
1.61 ! bentley 1: .\" $OpenBSD: cdio.1,v 1.60 2014/09/08 01:27:55 schwarze 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.61 ! bentley 32: .Dd $Mdocdate: September 8 2014 $
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.56 jmc 41: .Op Fl d Ar host : Ns Ar port
1.13 aaron 42: .Op Fl f Ar device
43: .Op Ar command args ...
1.1 downsj 44: .Sh DESCRIPTION
1.13 aaron 45: The
1.14 aaron 46: .Nm
1.37 jmc 47: program is a compact disc control utility,
48: with support for playing audio CDs and TAO CD writing.
1.1 downsj 49: .Pp
1.13 aaron 50: If no command is given,
1.14 aaron 51: .Nm
1.37 jmc 52: enters interactive mode, reading commands from the standard input.
1.1 downsj 53: .Pp
1.16 aaron 54: The options are as follows:
1.19 aaron 55: .Bl -tag -width Ds
1.28 jmc 56: .It Xo
57: .Fl d
58: .Ar host : Ns Ar port
59: .Xc
1.38 jmc 60: Specifies a CDDB host
61: .Bq default: freedb.freedb.org:cddb .
1.13 aaron 62: .It Fl f Ar device
1.38 jmc 63: Specifies the name of the CD device, such as
1.58 tedu 64: .Pa /dev/rcd0c .
1.13 aaron 65: Both absolute and relative paths to
66: .Pa /dev
1.38 jmc 67: filenames are possible;
68: the raw partition name is added if needed.
1.28 jmc 69: .It Fl s
70: Silent mode.
71: Do not print table headers or human-readable comments.
72: .It Fl v
73: Verbose mode.
1.56 jmc 74: A second occurrence of
1.55 krw 75: .Fl v
76: causes even more information to be printed.
1.1 downsj 77: .El
78: .Pp
1.17 aaron 79: The available commands are listed below.
80: Only as many characters as are required to uniquely identify a command
81: need be specified.
1.45 jmc 82: If no command is given,
83: only a track number or range,
84: then
1.17 aaron 85: .Ic play
1.45 jmc 86: is assumed.
1.29 jmc 87: .Bl -tag -width Ds
1.32 mjc 88: .It Ic blank
89: Minimally blank the disc.
1.53 naddy 90: .It Ic cddbinfo Op Ar n
1.47 jmc 91: Print the Table Of Contents (TOC) after matching the disc with the CDDB.
1.29 jmc 92: In case of multiple matches, reissue the command with
93: .Ar n .
94: .It Ic cdid
1.38 jmc 95: Print the disc ID that will be used for matching with the CDDB.
1.43 jmc 96: .It Ic cdplay Op Ar track1-trackN ...
1.42 mjc 97: Play specified tracks from disk.
98: Unlike
1.45 jmc 99: .Ic play ,
100: the CD player need not be connected to an audio device;
101: instead it rips tracks from disk and outputs audio data to
1.52 ratchov 102: the default
103: .Xr audio 4
104: device or
105: .Xr aucat 1
106: socket.
1.42 mjc 107: Both individual tracks and track ranges may be specified.
108: If range is specified in descending order tracks will be played in descending order.
109: If the first value in the range is omitted, tracks from first track on disk to the specified one will be played.
110: 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 111: .It Ic cdrip Op Ar track1-trackN ...
112: Rip specified tracks from disk.
113: Audio tracks are saved as WAVE sound files.
114: All tracks will be saved in the current working directory.
115: If parameters are omitted, all tracks are ripped.
116: Both individual tracks and track ranges may be specified, in the same format as the
117: .Ic cdplay
118: command.
1.29 jmc 119: .It Ic close
120: Inject the disc.
121: .It Ic debug Ar on | off
122: Enable/disable the debugging mode of the CD device driver.
123: .It Ic device Ar devname
124: Make
125: .Ar devname
126: the current CD device.
127: This is the equivalent of quitting
128: .Nm
129: and restarting with a different device.
130: .It Ic eject
131: Eject the disc.
1.30 robert 132: .It Ic exit
133: A synonym for
134: .Ic quit .
1.29 jmc 135: .It Ic help
136: Print the list of available commands.
137: .It Ic info
1.47 jmc 138: Print the Table Of Contents (TOC).
1.55 krw 139: If
140: .Fl v
141: is also specified,
142: the current features and current profile is printed.
143: If
144: .Fl v
145: is specified twice,
146: the complete list of supported profiles
147: and a hex dump of each current feature is printed.
1.29 jmc 148: .It Ic next
149: Play the next track.
150: If we're at the last track, stop.
151: .It Ic pause
152: Stop playing.
153: Do not stop the disc.
1.53 naddy 154: .It Xo Ic play
1.57 jmc 155: .Oo
156: .Ar track1 Ns Op Ar .index1
157: .Op Ar track2 Ns Op Ar .index2
158: .Oc
1.53 naddy 159: .Xc
1.54 jmc 160: Play from
1.53 naddy 161: .Ar track1
1.54 jmc 162: to
163: .Ar track2 ;
164: an optional index point can be specified for each track.
165: If only one track is specified, play from that track to the end of the disc.
166: If no tracks are specified, play the whole disc.
1.31 krw 167: .It Xo Ic play
1.57 jmc 168: .Oo
169: .Op Ar tr1
1.53 naddy 170: .Ar m1 : Ns Ar s1 Ns Oo
171: .Ar .f1 Oc
1.31 krw 172: .Op Ar tr2
173: .Oo Ar m2 : Ns Ar s2 Ns
1.57 jmc 174: .Op Ar .f2
175: .Oc Oc
1.31 krw 176: .Xc
1.1 downsj 177: Play from the absolute address
1.14 aaron 178: (MSF) defined by
1.31 krw 179: .Ar m1
1.14 aaron 180: in minutes,
1.31 krw 181: .Ar s1
182: in seconds,
183: frame number
184: .Ar f1 ,
185: to the absolute address defined by
186: .Ar m2
1.14 aaron 187: in minutes,
1.31 krw 188: .Ar s2
189: in seconds,
190: frame number
191: .Ar f2 .
192: If a track number is specified
193: .Pq tr Ns Ar X ,
194: then the minutes, seconds, and frame numbers
195: are relative to the start of that track.
196: Minutes are in the range 0\(en99.
197: Seconds are in the range 0\(en59.
198: Frame numbers are in the range 0\(en74.
1.53 naddy 199: .It Ic play Op Ar #block Op Ar len
1.54 jmc 200: Play starting from the logical
1.53 naddy 201: .Ar block
1.1 downsj 202: using
1.53 naddy 203: .Ar len
1.1 downsj 204: logical blocks.
1.17 aaron 205: .It Ic previous
206: Play the previous track.
207: If we're at the first track, restart.
1.29 jmc 208: .It Ic quit
209: Quit the program.
1.17 aaron 210: .It Ic replay
1.41 jmc 211: Replay the current track.
1.29 jmc 212: .It Ic reset
213: Perform a hardware reset of the device.
1.17 aaron 214: .It Ic resume
215: Resume playing.
216: Used after the
217: .Ic pause
1.4 deraadt 218: command.
1.29 jmc 219: .It Ic set Ar lba | msf
220: Set LBA
221: .Pq Ar lba
222: or minute-second-frame
223: .Pq Ar msf
224: ioctl mode.
225: The default is minute-second-frame ioctl mode.
226: .It Ic status
227: Print information about the disc:
228: the current playing status and position,
229: the current media catalog status,
230: and the current values of the volume for left and right channels.
1.17 aaron 231: .It Ic stop
1.1 downsj 232: Stop the disc.
1.32 mjc 233: .It Xo Ic tao
1.36 jmc 234: .Op Fl ad
1.51 av 235: .Op Fl s Ar speed
1.32 mjc 236: .Ar trackfile ...
237: .Xc
1.36 jmc 238: .Bq command line only
239: \ \&Write a track-at-once CD containing the specified
240: .Ar trackfile .
241: .Pp
242: The options are as follows:
1.38 jmc 243: .Pp
244: .Bl -tag -width Ds -compact
1.36 jmc 245: .It Fl a
1.49 jmc 246: Write files as audio tracks.
1.50 jmc 247: File formats of audio tracks may be CDDA or WAVE
248: with 2 channels of PCM audio,
249: signed 16-bit (little endian) values sampled at 44100 Hz.
1.36 jmc 250: .It Fl d
251: Write files as data tracks (the default).
1.51 av 252: .It Fl s Ar speed
253: Specify a write speed for tracks.
254: .Ar speed
255: may be a numerical value between 1 and
256: the maximum speed supported by the media and drive,
257: or one of the literal strings
258: .Dq auto
259: or
260: .Dq max ,
261: meaning the optimal or maximum speed detected.
1.59 stsp 262: The default speed is
263: .Dq auto .
1.36 jmc 264: .El
1.17 aaron 265: .It Ic volume Ar left_channel Ar right_channel
1.14 aaron 266: Set the volume of the left channel to
1.13 aaron 267: .Ar left_channel
1.14 aaron 268: and the volume of the right channel to
269: .Ar right_channel .
1.61 ! bentley 270: Allowed values are in the range 0\(en255.
1.34 jmc 271: .It Xo Ic volume
1.61 ! bentley 272: .Ic left | right | mono | stereo | mute
1.34 jmc 273: .Xc
274: Respectively:
275: play the left subtrack on both left and right channels;
276: play the right subtrack on both left and right channels;
277: set mono mode;
278: set stereo mode;
279: turn the sound off.
1.38 jmc 280: .El
281: .Sh ENVIRONMENT
1.52 ratchov 282: .Bl -tag -width "AUDIODEVICEXXX"
1.39 jmc 283: .It Ev DISC , CDROM
284: Specifies the name of the CD device to use.
285: If both
286: .Ev DISC
287: and
288: .Ev CDROM
289: are set,
290: .Ev DISC
291: takes precedence.
292: If neither
293: .Ev DISC
294: nor
295: .Ev CDROM
296: are set,
297: the default is
298: .Pa cd0 .
299: See also the
1.38 jmc 300: .Fl f
1.39 jmc 301: option, above.
1.52 ratchov 302: .It Ev AUDIODEVICE
303: Name of the
304: .Xr aucat 1
305: socket to connect to, or path to the
306: .Xr audio 4
307: device to use.
1.18 aaron 308: .El
1.1 downsj 309: .Sh FILES
1.58 tedu 310: .Bl -tag -width /dev/rcd0c -compact
1.10 mickey 311: .It Pa /dev/rcd0c
1.1 downsj 312: .El
1.28 jmc 313: .Sh SEE ALSO
314: .Xr aucat 1 ,
315: .Xr audioctl 1 ,
316: .Xr mixerctl 1 ,
317: .Xr audio 4
1.1 downsj 318: .Sh HISTORY
319: The
1.14 aaron 320: .Nm
1.1 downsj 321: command is based on
322: .Nm cdcontrol ,
1.22 mpech 323: which first appeared in
324: .Fx 2.1 .
1.27 jmc 325: .Sh AUTHORS
1.60 schwarze 326: .An -nosplit
327: .An Jean-Marc Zucconi ,
328: .An Andrey A. Chernov ,
329: .An Serge V. Vakulenko ,
330: .An Marc Espie