Merge from vendor branch SENDMAIL:
[dragonfly.git] / usr.sbin / cdcontrol / cdcontrol.1
1 .\" $FreeBSD: src/usr.sbin/cdcontrol/cdcontrol.1,v 1.21.2.14 2003/03/12 22:08:13 trhodes Exp $
2 .\" $DragonFly: src/usr.sbin/cdcontrol/cdcontrol.1,v 1.3 2005/02/15 20:23:24 cpressey Exp $
3 .\"
4 .Dd July 3, 1995
5 .Dt CDCONTROL 1
6 .Os
7 .Sh NAME
8 .Nm cdcontrol
9 .Nd compact disc control utility
10 .Sh SYNOPSIS
11 .Nm
12 .Op Fl sv
13 .Op Fl f Ar device
14 .Op Ar command ...
15 .Sh DESCRIPTION
16 The
17 .Nm
18 utility is a program to control audio features of a CD drive.
19 The device is a name such
20 as
21 .Pa cd0
22 or
23 .Pa mcd0 .
24 .Pp
25 If no
26 .Ar command
27 is given, then
28 .Nm
29 enters an interactive mode, reading commands from the standard input.
30 .Pp
31 The following options are available:
32 .Bl -tag -width indent
33 .It Fl s
34 Silent mode.
35 Do not print table headers and human readable comments.
36 .It Fl v
37 Verbose mode.
38 Print as much information as possible.
39 .It Fl f Ar device
40 Specify a device, such as
41 .Pa /dev/cd0c
42 or
43 .Pa mcd0 .
44 Both absolute path and relative to
45 .Pa /dev
46 filename are possible.
47 Suffix
48 .Pa c
49 is added to the device name if needed.
50 .El
51 .Pp
52 The available commands are listed below.
53 Only as many
54 characters as are required to uniquely identify a command
55 need be specified.
56 The word
57 .Ic play
58 can be omitted or the characters
59 .Ic +
60 and
61 .Ic -
62 can be used in the
63 place of
64 .Ic next
65 and
66 .Ic prev .
67 .Bl -tag -width indent
68 .It Ic play Ar first_track Op Ar last_track
69 Play from track
70 .Ar first_track
71 to track
72 .Ar last_track .
73 The first track has number 1.
74 Can be omitted in all cases.
75 .It Xo
76 .Ic play
77 .Ar start_m : Ns Ar start_s . Ns Ar start_f
78 .Op Ar end_m : Ns Ar end_s . Ns Ar end_f
79 .Xc
80 Play from the absolute address
81 (MSF) defined by
82 .Ar start_m
83 in minutes,
84 .Ar start_s ,
85 in seconds and
86 .Ar start_f
87 (frame number) to the absolute address defined by
88 .Ar end_m
89 in minutes,
90 .Ar end_s ,
91 in seconds and
92 .Ar end_f
93 (frame number).
94 Minutes are in the range 0-99.
95 Seconds are in the range 0-59.
96 Frame numbers are in the range 0-74.
97 .It Ic play Op # Ns Ar start_block Op Ar length
98 Play starting from the logical block
99 .Ar start_block
100 using
101 .Ar length
102 logical blocks.
103 .It Ic next Op Ar tracks
104 Skip forward a number of tracks (default 1).
105 .It Ic prev Op Ar tracks
106 Skip backward a number of tracks (default 1).
107 .It Ic pause
108 Stop playing.
109 Do not stop the disc.
110 .It Ic resume
111 Resume playing.
112 Used after the
113 .Ic pause
114 command.
115 .It Ic stop
116 Stop the disc.
117 .It Ic eject
118 Eject the disc.
119 .It Ic close
120 Inject the disc.
121 .It Ic volume Ar left_channel right_channel
122 Set the volume of left channel to
123 .Ar left_channel
124 and the volume of right channel to
125 .Ar right_channel .
126 Allowed values are in the range 0-255.
127 .It Ic volume Cm mute
128 Turn the sound off.
129 .It Ic volume Cm mono
130 Set the mono mode.
131 .It Ic volume Cm stereo
132 Set the stereo mode.
133 .It Ic volume Cm left
134 Play the left subtrack on both left and right channels.
135 .It Ic volume Cm right
136 Play the right subtrack on both left and right channels.
137 .It Ic info
138 Print the table of contents.
139 .It Ic status Op Cm audio | media | volume
140 Print the information about the disc:
141 .Pp
142 .Bl -tag -width ".Cm volume" -compact
143 .It Cm audio
144 the current playing status and position
145 .It Cm media
146 the current media catalog status
147 .It Cm volume
148 the current values of the volume for left and right channels.
149 .El
150 .It Ic cdid
151 Display the serial number of the CD using the method used by the
152 .Tn CDDB
153 project
154 .Pq Pa http://www.cddb.org/ .
155 .It Ic help
156 Print the list of available commands.
157 .It Ic debug Cm on
158 Enable the debugging mode of the CD device driver.
159 .It Ic debug Cm off
160 Disable the driver debugging mode.
161 .It Ic reset
162 Perform the hardware reset of the device.
163 .It Ic set Cm msf
164 Set minute-second-frame ioctl mode (default).
165 .It Ic set Cm lba
166 Set LBA ioctl mode.
167 .It Ic speed Ar s
168 Set the highest speed that the drive should use for reading data.
169 The units are multiples of a single speed CDROM (150 KB/s).
170 Specify
171 .Dq Li max
172 to use the drive's fastest speed.
173 .It Ic quit
174 Quit the program.
175 .It Ic exit
176 A synonym for
177 .Ic quit .
178 .El
179 .Sh ENVIRONMENT
180 The following environment variables affect the execution of
181 .Nm :
182 .Bl -tag -width ".Ev CD_DRIVE"
183 .It Ev CDROM
184 The CD device to use, if one is not specified with the
185 .Fl f
186 option.
187 .It Ev CDPLAY , CD_DRIVE , DISC , MUSIC_CD
188 These variables have been deprecated in favour of
189 .Ev CDROM .
190 .El
191 .Sh FILES
192 .Bl -tag -width ".Pa /dev/mcd0c" -compact
193 .It Pa /dev/cd0c
194 .It Pa /dev/mcd0c
195 .It Pa /dev/acd0c
196 .El
197 .Sh AUTHORS
198 .An Jean-Marc Zucconi
199 .An Andrey A. Chernov
200 .An Serge V. Vakulenko
201 .Sh HISTORY
202 The
203 .Nm
204 command appeared in
205 .Fx 2.1 .