Hi all, I made a patch to be able to control my DVD-ROM drive speed from within VDR. It uses SET_STREAMING to do so. Every DVD-ROM drive should support this. I tested the patch with two ATA drives so far and it worked. One can test if it should work with mplayer: mplayer dvd:// -dvd-speed 2 (I used the mplayer function almost verbatim). I sent the patch upstream already, though I didn't receive an answer yet. The only thing I still have on my plate is to put the first function call further up in the code so that it gets executed before any other read on the disc. But I can't properly do it right now because I don't have access to a VDR box until I get home in some weeks :( Feel free and help me out with this :) There's no need to run vdr as root, all the user needs is read/write access to the drive and a kernel and linux-headers that support SG_IO and GPCMD_SET_STREAMING (Gentoo has all of that). If one is absent the function gets emptied while compiling and does nothing. Regards Sebastian Reproducible: Always
Created attachment 135874 [details, diff] dvd-0.3.5-b07-speedcontrol.diff Patch for current CVS version of the plugin
Created attachment 135876 [details, diff] dvdspeed-gentoo-appy_after_a52dynrc_patch-for_pre20070117.diff Patch for the currently stable Gentoo version of the plugin
To avoid confusion ("Why doesn't it work?!"): One needs to activate the feature in the OSD setup of the plugin. If DVD-ROM speed is set to "0" nothing is done (default). If it's set to 1, 2, 3 or 4 it gets to work.
Created attachment 135888 [details, diff] dvd-a52drc-pre20071113.diff This is mildly changed a52drc diff. All that was done was adjust translations (Turkish is available in VDR-1.5) for A52 DRC, fix some indentations and change the default value for A52dynrng to 0 (off, which is the default value of the vanilla plugin anyway). The last change makes applying additional patches much easier.
Created attachment 135890 [details, diff] dvdspeed-cvs-11-13-2007.diff Sorry up front for mistakenly uploading dvd-0.3.5-b07-speedcontrol.diff. It's not even my patch. I must've confused it with the real file (which is obsolete now anyway). OK, this is a revised patch. I applies cleanly after the a52drc diff, also it fixes indentation by trying to follow the vanilla source indentation (although the vanilla code is slightly chaotic in this regard). Also DvdSetSpeed() is called earlier in order to kick in _before_ dvdnav does its job. Regards Sebastian
Created attachment 135895 [details, diff] dvdspeed-cvs-11-13-2007-r1.diff Added one more restore call in case cDvdPlayer::Action returns prematurely after dvdnav_open failed. We need that now that we call DvdSetSpeed before dvdnav starts.
Added patches with cvs snapshot 13 Nov 2007, Thanks Sebastian
Created attachment 136059 [details, diff] dvdspeed-cvs-11-13-2007-r2.diff Slight change: Issue a cmd_len of 12 Bytes instead of 16 Bytes. 16 Bytes is wrong and libata (for now) won't let commands through with a wrong cmd_len value.
Joerg, would you be so kind and change the patch? Thank you Sebastian
Related thread on kernel-ML: http://marc.info/?l=linux-kernel&m=119497215212990&w=2 Fixed in vdr-dvd-20071113-r1.ebuild.