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