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