Subject: Re: Problem with audio CD's on SS4
To: NetBSD port-sparc mailing list <port-sparc@netbsd.org>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: current-users
Date: 01/21/1999 16:10:07
On port-sparc, Christian Dueholm Christensen wrote:

> I have some problems playing audio cd's on my SS4.
...
> If I try /dev/rcd0c I get (after a little wait) an error message on the
> console saying:
...
> cd0(esp0:6:0):  Check Condition on CDB: 0x15 10 00 00 1c 00
>     SENSE KEY:  Unit Attention
>      ASC/ASCQ:  Power On, Reset, or Bus Device Reset Occurred

I've noticed a few messages (on various lists) about problems playing
audio CD's.  Just another data point, if I try to play to audio CD's on
a Toshiba 4101 (connected to an Atari), I get :

cd0(ncrscsi0:6:0):  Check Condition on opcode 0x15
    SENSE KEY:  Illegal Request
     ASC/ASCQ:  Invalid Field In Parameter List
         SKSV:  Error in Parameters, Offset 25, bit 7

but the CD plays.  My NEC drives (sparc/i386) won't play at all and my
Pioneer drive (sparc) plays with an SCSI error.

The problem appears to be with the CDIOCPLAYTRACKS ioctl [1].  I've had a
quick look but I'm not sure why 'Offset 25, bit 7' is incorrect.  The
smallest program that I can generate the problem with is :

#include <fcntl.h>
#include <sys/cdio.h>
#include <sys/ioctl.h>

#define CD_PART "/dev/cd0c"
main()
{
    int d;
    struct ioc_play_track cmd;

    cmd.start_index = 1;
    cmd.end_index = 1;
    cmd.start_track = 1;
    cmd.end_track = 1;

    d = open (CD_PART, O_RDONLY);
    ioctl (d, CDIOCPLAYTRACKS, &cmd);
    close (d);
}

Any pointers on where to look?

J

PS.  This came up on port-sparc originally, but it doesn't seem to be port
specific.

[1] AFAIK xmcd doesn't use CDIOCPLAYTRACKS, so that's why it works but
xcdplayer et al. fail.
-- 
"Railways have always been plagued by politicians, and it is not hard to
think that Robert Stephenson had the right idea when he drove his engine
over one of them at the opening of the Liverpool & Manchester Railway"