Subject: Re: playing audio CDs
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: tech-kern
Date: 09/29/1999 21:30:47
der Mouse wrote:
> I just got myself a CD drive, specifically because I want to play audio
> CDs. It's
>
> cd0 at scsibus0 targ 4 lun 0: <SONY, CD-ROM CDU-541, 2.6a> SCSI2 5/cdrom removable
> But when I used CDIOCPLAYMSF, I saw
>
> # ./play
> Playing 1..14, 0/2/0..73/39/51
> cd0(esp0:4:0): esp0: timed out [ecb 0xf02918fc (flags 0x3, dleft 42, stat 0)], <state 4, nexus 0xf02918fc, phase(l 3, c 3, p 3), resid 26, msg(q 0,o 40) >
> cd0(esp0:4:0): esp0: timed out [ecb 0xf02918fc (flags 0x43, dleft 42, stat 0)], <state 4, nexus 0xf02918fc, phase(l 3, c 3, p 3), resid 26, msg(q 20,o 40) > AGAIN
> esp0: SCSI bus reset
> sd0(esp0:0:0): max sync rate 4.03Mb/s
> #
I also have a problem playing audio CD's. See PR kern/7299.
> I got similar errors out of CDIOCPLAYTRACKS.
IIRC, this ends up calling CDIOCPLAYMSF.
> Turning on all four of the SDEV_DBx bits, I get voluminous debugging
> output on the console. Fortunately, the machine I'm doing this on has
> serial console, so I could capture it. :) Full output is available if
> anyone is interested; the most interesting thing I see in it is that
> the command that seems to be timing out is a mode select:
> 15,10,00,00,1c,00. Noting that SMS_PF is set, I searched the source
> for SMS_PF. This pointed the finger at cd_scsibus_set_mode. Tracing
> the control flow in the other direction, I found they met in
> cd_scsibus_set_pa_immed. Dummying out that function (making it simply
> "return(0);") makes CDIOCPLAYMSF start working for me.
Ah! Slightly different problem than the one I saw in the PR above, then, but
it looks like the one I have with :
cd0 at scsibus0 targ 6 lun 0: <TOSHIBA, XM-4101TASUNSLCD, 1755> SCSI2 5/cdrom removable
(Sun CD2, I think - SS20 internal anyway.)
> Problem with the drive? Problem with the software? Did perhaps this
> set_pa_immed stuff show up about when the scsi/atapi merge happened?
> Recommendations from anyone? I've now seen this with two different
> drives on two different machines, so it's probably not anything
> seriously idiosyncratic (though I do think both affected drives are
> from Sony).
I see the problem in the PR (drives don't work with 4 audio channels) on
several drives (NEC, Toshiba & Panasonic on sparc, atari & i386). The
SS20 drive is the only one I have that has a problem with
cd_scsibus_set_pa_immed(). Actually, it has problems with all the calls :
return (cd_scsibus_set_mode(cd, &data, AUDIOPAGESIZE, flags));
so I'm running a kernel with all instances commented out. Means I have to
use the external volume control ;-)
I can only guess that some of the bits in the audio page that we send are
invalid in some way. I've been meaning to look at them and then sit down
with the specs some time ...
Sorry this isn't much more information, but I think it answers the `drive or
software' question above.
J
--
Of course it runs NetBSD
http://www.netbsd.org/