Subject: playing audio CD's by tracks via SCSI CD-ROMs
To: None <current-users@netbsd.org>
From: Ken Hornstein <kenh@entropic.com>
List: current-users
Date: 10/24/1994 04:39:18
I'm been trying to get my new CD-ROM drive to play audio CD's (it's one of
those NEC MultiSpin, model 510, I think).  Oh, before I forget, this is my
system:

NetBSD 1.0 (EXCALIBUR) #4: Mon Oct 24 01:51:40 EDT 1994
    kenh@excalibur:/usr/src/sys/arch/i386/compile/EXCALIBUR

(supped to Oct 20th, I think).

All of the CDIOC* ioctls work, as far as I can tell, _except_ for the
CDIOCPLAYTRACKS ioctl.  What's even more strange is that CDIOCPLAYMSF works
fine.  I can query everything about CD's in the drive, play audio by using
minute-second timings ... just by track.

When I try to play out a track, I get the following debug output (this is
via SCSIDEBUG):

cd0(bt0:6:0): command: 48,0,0,0,3,1,0,3,63,0-[0 bytes]
code70 valid0 seg0 key5 ili0 eom0 fmark0
info: 0 0 0 0 followed by 10 extra bytes
extra: 0 0 0 0 24 0 0 0 0 0

Here I'm trying to play everything from track 3, index 1, to track 3, index 99
(which according to the SCSI-2 spec should mean the end of the track), but
the actual numbers don't matter, because the error is still the same.

Reading some of the SCSI-2 spec reveals the following:

"key5" means ILLEGAL REQUEST.
The 24 in the extra sense bits (which is actually the "additional sense data")
means "INVALID FIELD IN CDB".  Now I'm stumped.  I don't know what field in the
control data block is bad; there are plenty of tracks on that disc, and any
combination of numbers yields the same results.

I didn't want to file a bug report yet, as I'm not sure it's a NetBSD problem.
FWIW, I see the exact same error when trying to use an older NEC CD-ROM drive
of an unknown model.

Has anyone got CDIOCPLAYTRACKS working?  If so, I'd love to hear from you!

Any hints/suggestions are welcome.

--Ken