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