Discussion:
[PATCH] spin up drive at open
Steven Walter
2006-05-10 00:54:45 UTC
Permalink
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 <***@gmail.com>
"If you think healthcare is expensive now, you should see how much it costs
when it's free."
- P.J. O'Rourke
Diego Biurrun
2006-05-10 10:57:45 UTC
Permalink
Post by Steven Walter
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.
I suggest you to propose this on the libdvcss-devel mailing list. Given
that this appears to be Linux-specific I wouldn't have high hopes of the
patch getting accepted. But possibly a different solution can be found.

Diego
--
This is the libdvdcss-devel mailing-list, see http://developers.videolan.org/
To unsubscribe, go to: http://developers.videolan.org/lists.html
Diego Biurrun
2006-05-10 11:02:29 UTC
Permalink
Post by Diego Biurrun
I suggest you to propose this on the libdvcss-devel mailing list.
Seems like I desperately need glasses...

Diego
--
This is the libdvdcss-devel mailing-list, see http://developers.videolan.org/
To unsubscribe, go to: http://developers.videolan.org/lists.html
Christophe Massiot
2006-05-16 23:02:42 UTC
Permalink
Post by Diego Biurrun
Post by Steven Walter
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.
I suggest you to propose this on the libdvcss-devel mailing list. Given
that this appears to be Linux-specific I wouldn't have high hopes of the
patch getting accepted. But possibly a different solution can be found.
libdvdcss is the place to put system-specific stuff, so things like
that definitely belong here. However I'm wondering if the patch is
correct, because from what I understand of kernel documentation,
CDROMSTART 1. only applies to drives capable of reading CD audio 2.
instructs the drive to play the first audio track, which is
definitely not what we want. So I'm wondering 1. whether it wouldn't
yield problems with some other type of DVD drive than yours, and 2.
whether the positive effect you're seeing isn't just a side-effect of
the fact that CDROMSTART waits for the drive to spin up before
returning. In that case the correct fix might just be to raise the
timeout duration on the read() call to the DVD drive before it
reports an error.
--
Christophe Massiot.
--
This is the libdvdcss-devel mailing-list, see http://developers.videolan.org/
To unsubscribe, go to: http://developers.videolan.org/lists.html
Steven Walter
2006-05-17 00:08:48 UTC
Permalink
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.
Post by Steven Walter
Post by Diego Biurrun
Post by Steven Walter
My DVD-ROM drive exhibits the peculiar behavior of refusing to
properly
Post by Diego Biurrun
Post by Steven Walter
authenticate if the drive is not "spun up." Previously I had worked
around
Post by Diego Biurrun
Post by Steven Walter
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
Post by Diego Biurrun
Post by Steven Walter
allows the drive to authenticate and movie-viewing to proceed
smoothly,
Post by Diego Biurrun
Post by Steven Walter
whether the drive was spinning to begin with or not. I am not,
however,
Post by Diego Biurrun
Post by Steven Walter
sure that this is the correct way to fix things. Does this even
belong in
Post by Diego Biurrun
Post by Steven Walter
libdvdcss, or in some other software component entirely? Please
advise.
Post by Diego Biurrun
I suggest you to propose this on the libdvcss-devel mailing list. Given
that this appears to be Linux-specific I wouldn't have high hopes of the
patch getting accepted. But possibly a different solution can be found.
libdvdcss is the place to put system-specific stuff, so things like
that definitely belong here. However I'm wondering if the patch is
correct, because from what I understand of kernel documentation,
CDROMSTART 1. only applies to drives capable of reading CD audio 2.
instructs the drive to play the first audio track, which is
definitely not what we want. So I'm wondering 1. whether it wouldn't
yield problems with some other type of DVD drive than yours, and 2.
whether the positive effect you're seeing isn't just a side-effect of
the fact that CDROMSTART waits for the drive to spin up before
returning. In that case the correct fix might just be to raise the
timeout duration on the read() call to the DVD drive before it
reports an error.
--
Christophe Massiot.
--
This is the libdvdcss-devel mailing-list, see
http://developers.videolan.org/
To unsubscribe, go to: http://developers.videolan.org/lists.html
--
-Steven Walter <***@gmail.com>
"If you think healthcare is expensive now, you should see how much it costs
when it's free."
- P.J. O'Rourke
Loading...