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