Sun CD-ROM FAQ: Multimedia

Can I use a CD-ROM to play audio CDs? What programs are available?

Playing audio CD from CD-ROM in the first approximation means to instruct the CD-ROM drive to play back audio tracks and output the audio onto the headphone-out line.

[courtesy Toerless Eckert (Toerless.Eckert@Informatik.Uni-Erlangen.de) 03/11/97]

Look for applications such as x_cdplayer, xcdplayer, xcd and Workman.

"The best CD player program I've seen is Workman, a complete CD player with a song database, a variety of play options, and even the kitchen sink! You can get Workman 3.1beta and a starter song database by anonymous ftp to ftp.hyperion.com in the /Workman directory. Enjoy!"

[courtesy Joe Backo (jback@East.Sun.COM)]

Why does my (old) CD-ROM drive work properly for data but not for audio CDs?

Very early CD-ROM drives (such as the NEC CDR-1750) were not SCSI-2 compliant and use vendor-unique commands for audio playback. The only UNIX-based CD player that supports the Hitachi is xmcd, written by yours truly. The source code to xmcd-1.1 is available via anonymous FTP from ftp.x.org. Also available for xmcd is a 1600+ CD database.

Xmcd requires Motif to compile.

Special Note for SunOS 4.1.x/Solaris 1.x (sparc): Although xmcd-1.1 supports SunOS 4.1.x, you will run into problems playing audio using the Hitachi CDR-1750S. This is because SunOS 4.1.x has a bug in its SCSI CD-ROM driver that makes it malfunction when delivering 12-byte SCSI commands, which the Hitachi require for audio playback. "

[courtesy ti@bazooka.amb.org (Ti Kan)]

Can I record audio tracks on a SPARCstation?

If you have the proper cabling, you can simply plug the audio output into the audio input on the Sparcstation and use Audiotool to record normally. This is not the same as digitizing.

Can I digitize audio tracks over the SCSI bus?

Today (1997) most CD-ROM drives implement vendor-specific commands to allow for reading of audio-data via the SCSI-interface. There are at least 2 incompatible types of command sets. The first vendors to implement audio-via-scsi from CD-ROM were Sony and Toshiba. They have different commands for it. Other vendors may use one of this commands sets or even another one of his own making.

There are a lot of detail as to how good this feature CAN work with different CD-ROM drives. To cut a long story short: Most drives today will read audio at single-speed. Some of the newer Toshiba drives will read audio at their native speed but then they do often have accuracy problems. The one CD-ROM brand definitely to recommend for nearly error-free native-rate (up to 8-times speed) audio-read is Plextor. Plextor uses the Sony command set for audio and can also externally be jumpered for 512 byte blocksize operation. It is the ideal Sun CD-ROM drive, but it is more expensive than Toshiba, that is why Sun sticks to Toshiba.

The driver requirements to read audio are not very strong. Since SunOS 4.1.x there is a ioctl implemented in the sr driver that allows for any kind of SCSI-command to be passed to the drive. This ioctl is called "USCSICMD - User Level SCSI Command Ioctl". Given appropriate application software you need no driver modification. In SunOS >= 5.4 there are also specific ioctls implemented to directly use the Sony and Toshiba commands to read audio from CD-ROM via SCSI. The USCSICMD in SunOS >= 5.4 is now only available for root processes, whereas it was available to normal user processes in 4.1.x.

[courtesy Toerless Eckert (Toerless.Eckert@Informatik.Uni-Erlangen.de) 03/11/97]

Rob Kroeger (rjkroege@cgl.uwaterloo.ca) has also sent me a couple of utilities which may be useful in dealing with digital audio from a Sun CD-ROM drive. These applications are available from my FTP site:

mpegaudio.tar.gz and read_cdda-1.02.tar.gz

Does Sun's built-in audio hardware support a mixer input for CD audio?

No, the Sun audio adapter does not support this seemingly common feature of most PC soundcards. Use either the front panel headphone jack on your Sun CD-ROM drive or if your drive has RCA outputs (as most external drives do), feed that to an external amplifier with speakers.


Return to Sun CD-ROM FAQ Home Page