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