[PATCH] spin up drive at open

Steven Walter stevenrwalter at gmail.com
Wed May 10 02:54:45 CEST 2006


My DVD-ROM drive exhibits the peculiar behavior of refusing to properly
authenticate if the drive is not "spun up."  Previously I had worked around
this by starting my media player "dd if=/dev/dvd of=/dev/null; mplayer
dvd://" and just hitting Ctrl+C once the drive made enough noise :-)

However, I've found that the attached patch fixes this issue for me, and
allows the drive to authenticate and movie-viewing to proceed smoothly,
whether the drive was spinning to begin with or not.  I am not, however,
sure that this is the correct way to fix things.  Does this even belong in
libdvdcss, or in some other software component entirely?  Please advise.

Thanks
--
-Steven Walter <stevenrwalter at gmail.com>
"If you think healthcare is expensive now, you should see how much it costs
when it's free."
    - P.J. O'Rourke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.videolan.org/pipermail/libdvdcss-devel/attachments/20060509/ad25aa61/attachment.htm 
-------------- next part --------------
--- libdvdcss-1.2.9/src/device.c	2005-07-11 07:33:34.000000000 -0400
+++ libdvdcss-1.2.9~/src/device.c	2006-05-09 20:37:14.000000000 -0400
@@ -63,6 +63,8 @@
 #include "ioctl.h"
 #include "device.h"
 
+#include <linux/cdrom.h>
+
 /*****************************************************************************
  * Device reading prototypes
  *****************************************************************************/
@@ -261,6 +263,8 @@
         return -1;
     }
 
+    ioctl(dvdcss->i_fd, CDROMSTART, 0);
+
     dvdcss->i_pos = 0;
 
     return 0;


More information about the libdvdcss-devel mailing list