xref: /netbsd-src/usr.bin/cdplay/cdplay.1 (revision e89934bbf778a6d6d6894877c4da59d0c7835b0f)
1.\"	$NetBSD: cdplay.1,v 1.24 2012/01/04 17:26:21 drochner Exp $
2.\"
3.\" Copyright (c) 1999, 2000 Andrew Doran.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" from FreeBSD: cdcontrol.1,v 1.16.2.2 1999/01/31 15:36:01 billf Exp
28.\"
29.Dd January 3, 2012
30.Dt CDPLAY 1
31.Os
32.Sh NAME
33.Nm cdplay
34.Nd compact disc player
35.Sh SYNOPSIS
36.Nm cdplay
37.Op Fl a Ar audio device
38.Op Fl f Ar device
39.Op Ar command ...
40.Sh DESCRIPTION
41.Nm
42is a program to control the audio features of a CD-ROM drive.
43.Pp
44If no command is given, then
45.Nm
46enters interactive mode, reading commands from the standard input.
47.Pp
48The following options are available:
49.Bl -tag -width indent
50.It Fl a Ar audio device
51Specify the audio device to use.
52Used only in digital transfer mode.
53If not specified, the environment variables
54.Ev AUDIODEV
55and
56.Ev SPEAKER
57will be tried (in this order) to find the device; as a last resort,
58.Pa /dev/sound
59will be used.
60If the
61.Dq Fl a
62command line option is used, or the
63.Ev CDPLAY_DIGITAL
64environment variable is present,
65digital transfer mode is switched on automatically.
66.It Fl f Ar device
67Specify the control device to use.
68Both absolute paths and paths relative to
69.Pa /dev
70are accepted.
71The suffix
72.Ql c
73(or
74.Ql d
75on some architectures, see
76.Xr disklabel 8
77for details) is added to the
78device name if needed.
79If the device not specified, the environment variables
80.Ev MUSIC_CD ,
81.Ev CD_DRIVE ,
82.Ev DISC
83and
84.Ev CDPLAY
85will be tried (in this order) to find the device.
86.El
87.Pp
88The available commands are listed below.
89Only as many characters as are required to uniquely identify a command
90need be specified.
91The word
92.Em play
93can be omitted in all cases.
94.Bl -tag -width Cm
95.It Cm play Op Ar first_track Op Ar last_track
96Play from track
97.Ar first_track
98to track
99.Ar last_track .
100The first track has number 1.
101.It Cm play Op Ar start_m:start_s.start_f Op Ar end_m:end_s.end_f
102Play from the absolute address
103(MSF) defined by
104.Ar start_m
105in minutes,
106.Ar start_s ,
107in seconds and
108.Ar start_f
109(frame number) to the absolute address defined by
110.Ar end_m
111in minutes,
112.Ar end_s ,
113in seconds and
114.Ar end_f
115(frame number).
116Minutes are in the range 0-99.
117Seconds are in the range 0-59.
118Frame numbers are in the range 0-74.
119.It Cm play Op Ar #start_block Op length
120Play starting from the logical block
121.Ar start_block
122using
123.Ar length
124logical blocks.
125.It Cm next
126Skip to the next track.
127.It Cm prev
128Skip to the previous track.
129.It Cm pause
130Stop playing.
131Do not stop the disc.
132.It Cm resume
133Resume playing.
134Used after the
135.Em pause
136command.
137.It Cm shuffle
138Select shuffle play.
139Only valid in interactive mode.
140.It Cm single Op Ar track
141Pick a single track and play it repeatedly.
142If a
143.Ar track
144argument is not given the
145.Cm single
146command will shut shuffle mode off and play the disc normally.
147Only valid in interactive mode.
148.It Cm skip
149Skip to another track.
150Only valid when shuffle play is selected.
151.It Cm stop
152Stop the disc.
153.It Cm eject
154Eject the disc.
155.It Cm close
156Inject the disc.
157.It Cm volume Ar left_channel Ar right_channel
158Set the volume of left channel to
159.Ar left_channel
160and the volume of right channel to
161.Ar right_channel .
162Allowed values are in the range 0-255.
163.It Cm volume Ar value
164Set the volume of both left channel right channel to
165.Ar value .
166Allowed values are in the range 0-255.
167.It Cm volume mute
168Turn the sound off.
169.It Cm volume mono
170Set the mono mode.
171.It Cm volume stereo
172Set the stereo mode.
173.It Cm volume left
174Play the left subtrack on both left and right channels.
175.It Cm volume right
176Play the right subtrack on both left and right channels.
177.It Cm info
178Print the table of contents.
179.It Cm status
180Display the current audio, media and volume status.
181.It Cm digital Ar n
182Turn on digital transfer mode.
183In this mode,
184.Nm
185reads digital data from disc and sends it to an audio device.
186A SCSI or ATAPI CD-ROM is required; and the audio device must
187support CD audio format (44100 Hz sampling rate, 16-bit
188stereo samples).
189Audio data are read and written in groups of
190.Ar n
191frames (5 by default, or 1/15 seconds).
192.It Cm analog
193Switch from digital back to analog mode.
194.It Cm help
195Print the list of available commands.
196.It Cm reset
197Perform the hardware reset of the device.
198.It Cm set msf
199Set minute-second-frame ioctl mode (default).
200.It Cm set lba
201Set LBA ioctl mode.
202.It Cm quit
203Quit the program.
204.El
205.Sh FILES
206.Bl -tag -width /dev/rmcd0c -compact
207.It Pa /dev/cd??
208.It Pa /dev/mcd??
209.El
210.Sh SEE ALSO
211.Xr disklabel 8 ,
212.Xr mscdlabel 8
213.Sh HISTORY
214The
215.Nm
216command first appeared in
217.Nx 1.5 .
218Support for digital transfer mode was added in
219.Nx 4.0 .
220