cd-rom changer updates....

Daniel Garcia (dgarcia@hollyfeld.org)
Sun, 5 Oct 1997 11:13:07 -0400 (EDT)


I'm not sure who is currently resposible for maintaining the ide cdrom
code. I have an ALPS 4x4 cd rom changer. Nice drive actually, but it
has a problem with the cd-changer code (in drives/block/ide-cd.c in
2.1.56). It seems that when select disc is called and sent to the
drive, the drive doesn't actually change the disc, until it is
accessed (i.e. mount or start attempt). This wrecks havoc with the
table of contents for the CD, since it (correctly) invalidates the TOC
for the CD when it does the select disc. Unfortunately, it
immediately re-reads the TOC - since the disc hasn't physically
changed, the wrong TOC is read in.

I've made a change to ide-cd.c that basically kicks the changer,
forcing it to change when select disc is called.

--------8<-----------cut here---------------->8-------------------
--- ide-cd.c.orig Sun Oct 5 10:40:11 1997
+++ ide-cd.c Sun Oct 5 10:40:23 1997
@@ -2457,6 +2457,10 @@
}

stat = cdrom_load_unload (drive, slot, NULL);
+ /* Kick the cd to force it to change, otherwise toc
+ * doesn't update correctly */
+ cdrom_startstop( drive, 1, NULL );
+ cdrom_startstop( drive, 0, NULL );
cdrom_saw_media_change (drive);
if (stat)
return stat;
-------8<-----------------cut here----------------->8-------------------

Is there a better way to do this? And if not, who do I send this to
as maintainer of the cd code? (last email comment in there was from
mid-96 if i recall correctly).

Cheers,

--Dg