Re: Patch for video CD: porting 2.1->2.0

Erik Andersen (andersee@debian.org)
Fri, 19 Sep 1997 20:09:30 +0000


On Fri, Sep 19, 1997 at 10:45:56PM +0200, Gerd Knorr wrote:
> >to add support for these ioctls. What I am curious about is if _anybody_
> >has ever used or will ever plan on using the CDROMREADMODE1, the
> >CDROMREADMODE2, or CDROMREADRAW ioctls for anything?
>
> CDROMREADMODE2: read those 2336 byte sectors wich you can find on video CDs
> for example. Yes, you can watch video CD movies with linux.
>
> Gerd
>

Hi Gerd!

Could you check for me in the SCSI standards what _must_ be supported for
a CD-ROM drive? I don't know where they hide the specs on SCSI... Anyway,
I just checked the ATAPI spec, and it specifies that _ALL_ ATAPI drives must
support CDROMREADRAW (via the READ-CD packet command), CDROMREADMODE1,
and CDROMREADMODE2. Support for CDROMREADAUDIO (reading raw CD-DA via the
READ-CD packet command) is listed as optional. (page 144 of ATAPI 2.6)
I notice that CDROMREADRAW is included in sr_ioctl.c; is this capability
manditory?

It seems that if SCSI supports CDROMREADRAW as manditory, like ATAPI does, then
we could just drop CDROMREADMODE1, CDROMREADMODE2, and CDROMREADAUDIO, and
still have the exact same functionality. People could read all the photo CDs,
video CDs, or whatever they wanted but they would want to first check the type
of the CD's sectors (with something like the CDROM_DISC_STATUS ioctl, or just
doing the checking themselves). I would then integrate CDROMREADRAW into the
Uniform CD-ROM driver (there is a commented out stub there now) to provide
common error checking and behavior. I think it would be the Right Thing (tm).
What do you think?

-Erik

--
Erik B. Andersen   Web:    http://www.inconnect.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--