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