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