Subject: Re: cdplay don't work
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Rafal Boni <rafal@mediaone.net>
List: current-users
Date: 01/07/2002 18:27:26
In message <20020107183249.GA8672@antioche.eu.org>, you write: 

-> On Tue, Jan 08, 2002 at 12:43:31AM +0800, Rui-Xiang Guo wrote:
-> > Hi, all
-> > I find cdplay no more work for me.
-> > When I insert a CD into cdrom and type 'cdplay', I get:
-> > 
[...]
-> > Then I try again, type 'cdplay p', I get:
-> > 
-> > cd0(trm0:0:0:0):  Check Condition on CDB: 0x15 10 00 00 1c 00
-> >     SENSE KEY:  Illegal Request
-> >      ASC/ASCQ:  Invalid Field In Parameter List
-> > 
-> > cd0(trm0:0:0:0):  Check Condition on CDB: 0x15 10 00 00 1c 00
-> >     SENSE KEY:  Illegal Request
-> >      ASC/ASCQ:  Invalid Field In Parameter List
-> > 
-> > cdplay: ioctl(CDIOCPLAYTRACKS): Invalid argument
-> > 
-> > It seems the problem of 'cdplay'. I can mount data CD normally.
-> > Does anyone also get this?
-> 
-> On what system is this ? It seems cdplay has problems on big-endian 
-> platforms these days ...

I get this same issue (x86, fairly recent -current, and it's been happening
for at least 3-6 months, though it may have been longer than that), and the
following workaround did it for me (assuming your drive is SCSI).

It appears that for some reason the MODE_SELECT is failing with the error
you show above (for more detail, see my previous mails on this subject,
URLs to which are at the end of the mail).

--- cd_scsi.c.orig	Mon Jan  7 18:01:49 2002
+++ cd_scsi.c	Mon Jan  7 18:02:08 2002
@@ -166,6 +166,8 @@ cd_scsibus_set_pa_immed(cd, flags)
 	struct scsi_cd_mode_data data;
 	int error;
 
+	return 0;	/* XXXrkb */
+
 	if ((error = scsipi_mode_sense(cd->sc_periph, 0, AUDIO_PAGE,
 	    &data.header, AUDIOPAGESIZE, flags | XS_CTL_DATA_ONSTACK,
 	    CDRETRIES, 20000)) != 0)

I sent a fairly thorough trace of this with SCSIDEBUG output a while ago
to the lists... My initial post and a follow up with a bit more analysis
can be found at:

	http://mail-index.netbsd.org/current-users/2001/12/14/0027.html
and	http://mail-index.netbsd.org/current-users/2001/12/16/0001.html

--rafal

----
Rafal Boni                                                  rafal@mediaone.net