Does the read() call in Linux use a timeout? A braindead grep for "timeout" in the code base only showed hits in areas relevant to BSD, QNX, and another non-Linux OS. Another thing, looking at the strace from mplayer, I see open("/dev/dvd") followed immediately by ioctl(DVD_READ_STRUCT); no intervening read. And even if there were, I see no guarantee that the read wouldn't be filled from cache, keeping the drive spun-down.
<br><br><div><span class="gmail_quote">On 5/16/06, <b class="gmail_sendername">Christophe Massiot</b> <<a href="mailto:massiot@via.ecp.fr">massiot@via.ecp.fr</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At 12:57 +0200 10/05/06, Diego Biurrun wrote:<br><br>> > My DVD-ROM drive exhibits the peculiar behavior of refusing to properly<br>>> authenticate if the drive is not "spun up." Previously I had worked around
<br>>> this by starting my media player "dd if=/dev/dvd of=/dev/null; mplayer<br>>> dvd://" and just hitting Ctrl+C once the drive made enough noise :-)<br>>><br>>> However, I've found that the attached patch fixes this issue for me, and
<br>>> allows the drive to authenticate and movie-viewing to proceed smoothly,<br>>> whether the drive was spinning to begin with or not. I am not, however,<br>>> sure that this is the correct way to fix things. Does this even belong in
<br>>> libdvdcss, or in some other software component entirely? Please advise.<br>><br>>I suggest you to propose this on the libdvcss-devel mailing list. Given<br>>that this appears to be Linux-specific I wouldn't have high hopes of the
<br>>patch getting accepted. But possibly a different solution can be found.<br><br>libdvdcss is the place to put system-specific stuff, so things like<br>that definitely belong here. However I'm wondering if the patch is
<br>correct, because from what I understand of kernel documentation,<br>CDROMSTART 1. only applies to drives capable of reading CD audio 2.<br>instructs the drive to play the first audio track, which is<br>definitely not what we want. So I'm wondering 1. whether it wouldn't
<br>yield problems with some other type of DVD drive than yours, and 2.<br>whether the positive effect you're seeing isn't just a side-effect of<br>the fact that CDROMSTART waits for the drive to spin up before<br>returning. In that case the correct fix might just be to raise the
<br>timeout duration on the read() call to the DVD drive before it<br>reports an error.<br><br>--<br>Christophe Massiot.<br><br>--<br>This is the libdvdcss-devel mailing-list, see <a href="http://developers.videolan.org/">
http://developers.videolan.org/</a><br>To unsubscribe, go to: <a href="http://developers.videolan.org/lists.html">http://developers.videolan.org/lists.html</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>-Steven Walter <
<a href="mailto:stevenrwalter@gmail.com">stevenrwalter@gmail.com</a>><br>"If you think healthcare is expensive now, you should see how much it costs when it's free."<br> - P.J. O'Rourke