Re: CDROM: Hardware tray movement detection

Gerhard Mack (gmack@mail.chill.org)
Wed, 27 Aug 1997 01:13:07 -0700 (PDT)


On Tue, 26 Aug 1997, Ricky Beam wrote:

> Letting the chips fall where they may, I quote Tim P. Gerla:
> >My question:
> >
> >Is there any way to detect *hardware* tray movement, and afterward, detect
> >a disk change?
>
> I'm sure there the drive will generate any async event to notify you of a
> disk being inserted -- well, some SCSI drives might. The easiest way would
> be to install a self-renewing kernel timer to "poll" the drive for a disk
> change. Most other OSs that support media change detection do that -- Win95,
> WinNT, Solaris, ... And, it has the virtue of being down-right simple.
>
Why not poll the drive right before you intend to access it? Timeing a
poll imho is a wast of processor time. Win95 and NT do that for the
purpose of auto loading "auto start" cds this fits into the category of
annoying in my books.

> Once auto media change detection is available, all sorts of things become
> possible. I, for one, have a drive that closes the tray when polled, so
> workman is constantly closing the drive while I'm change the CD -- not good.
>
> --Ricky
>

Gerhard Mack
gmack@mail.chill.org

---Linux means not having to deal with Microsoft screwups--
http://www.linux.org