VDR Portal
Register Calendar Members List Team Members Search Frequently Asked Questions Gallery Go to the Main Page

VDR Portal » Developer » Patches » SET_STREAMING in vdr-dvd (DVD-ROM-Geschwindigkeit setzen) » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites
Pages (2): [1] 2 next » Post New Thread Post Reply
Go to the bottom of this page SET_STREAMING in vdr-dvd (DVD-ROM-Geschwindigkeit setzen)
Author
Post « Previous Thread | Next Thread »
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Pfeil SET_STREAMING in vdr-dvd (DVD-ROM-Geschwindigkeit setzen) Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Der Patch bedarf keiner root-Rechte um die Geschwindigkeit zu setzen, es werden jedoch Schreib- und Lese-Rechte auf dem DVD-ROM benötigt. Die Geschwindigkeit lässt sich im Plugin-Setup einstellen.

Gruß
mic

Versionen:

23.11.2007: r3 (Patch nach MPlayer-Vorgabe vereinfacht, sense-Puffer fällt erstmal weg wg. fehlender Auswertung)
11.01.2008: dvdspeed-cvs-11.01.2008.diff (beim diff-Kommando von r3 nicht richtig aufgepasst)

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
diff -Nu dvd.old/i18n.c dvd/i18n.c
--- dvd.old/i18n.c      2007-09-16 18:36:41.000000000 +0200
+++ dvd/i18n.c  2008-01-11 10:44:40.000000000 +0100
@@ -280,6 +280,32 @@
 #endif
     },
     {
+     "Setup.DVD$DVD-ROM Speed",                             // English
+        "DVD-ROM-Geschwindigkeit",                          // Deutsch
+        "DVD-ROM Speed",                                    // Slovenski
+        "DVD-ROM Speed",                                    // Italiano
+        "DVD-ROM Speed",                                    // Nederlands
+        "DVD-ROM Speed",                                    // Português
+        "DVD-ROM Speed",                                    // Français
+        "DVD-ROM Speed",                                    // Norsk
+        "DVD-ROM Speed",                                    // suomi
+        "DVD-ROM Speed",                                    // Polski
+        "DVD-ROM Speed",                                    // Español
+        "DVD-ROM Speed",                                    // ÅëëçíéêÜ (Greek)
+        "DVD-ROM Speed",                                    // Svenska
+        "DVD-ROM Speed",                                    // Romaneste
+        "DVD-ROM Speed",                                    // Magyar
+        "DVD-ROM Speed",                                    // Català
+        "DVD-ROM Speed",                                    // ÀãááÚØÙ (Russian)
+        "DVD-ROM Speed",                                    // Hrvatski (Croatian)
+        "DVD-ROM Speed",                                    // Eesti
+        "DVD-ROM Speed",                                    // Dansk
+        "DVD-ROM Speed",                                    // Czech
+#if VDRVERSNUM >= 10502
+        "DVD-ROM Speed"                                     // Türkçe
+#endif
+    },
+    {
     "Setup.DVD$Gain (analog)",
         "Verstärkung (analog)",                             // Deutsch
         "Ojaèanje (analogno)",                              // Slovenski
Gemeinsame Unterverzeichnisse: dvd.old/patches und dvd/patches.
diff -Nu dvd.old/player-dvd.c dvd/player-dvd.c
--- dvd.old/player-dvd.c        2007-09-17 21:04:43.000000000 +0200
+++ dvd/player-dvd.c    2008-01-11 10:44:41.000000000 +0100
@@ -35,6 +35,11 @@
 #include "control-dvd.h"
 #include "dvd.h"

+/* Needed for DvdSetSpeed() */
+#include <linux/cdrom.h>
+#include <scsi/sg.h>
+#include <sys/ioctl.h>
+
 /**
  * this was "weak"'s solution of a forced
  * SPU only stream choice,
@@ -252,6 +257,7 @@
 bool cDvdPlayer::HasBitStreamOut = false;
 bool cDvdPlayer::HasSoftDeviceOut = false;
 bool cDvdPlayer::SoftDeviceOutActive = false;
+bool cDvdPlayer::DvdSetSpeedActive = false;

 const int cDvdPlayer::MaxAudioTracks    = 0x20;
 const int cDvdPlayer::AudioTrackMask    = 0x1F;
@@ -565,6 +571,88 @@
 #endif
 }

+/* This function was inspired by mplayer */
+void cDvdPlayer::DvdSetSpeed(const char *device, int speed)
+{
+#if defined(SG_IO) && defined(GPCMD_SET_STREAMING)
+    int fd;
+    unsigned char buffer[28];
+    unsigned char cmd[12];
+    struct sg_io_hdr sghdr;
+    struct stat st;
+
+    memset(&st, 0, sizeof(st));
+
+    if (stat(device, &st) == -1) {
+        esyslog("ERROR: dvd-plugin: DVD device %s doesn't exist", device);
+        return;
+    }
+
+    if (!S_ISBLK(st.st_mode)) {
+        esyslog("ERROR: dvd-plugin: DVD device %s is not a block device", device);
+        return;
+    }
+
+    switch (speed) {
+        case 0: /* don't touch speed setting */
+            return;
+        case -1: /* restore default value */
+            isyslog("dvd-plugin: Restoring initial DVD drive speed");
+            break;
+        default: /* limit to <speed> KB/s */
+            /* speed times 1350KB/s (DVD single speed) */
+            speed *= 1350;
+            isyslog("dvd-plugin: Limiting speed to %d KB/s", speed);
+            break;
+    }
+
+    memset(&sghdr, 0, sizeof(sghdr));
+    sghdr.interface_id = 'S';
+    sghdr.timeout = 5000;
+    sghdr.dxfer_direction = SG_DXFER_TO_DEV;
+    sghdr.dxfer_len = sizeof(buffer);
+    sghdr.dxferp = buffer;
+    sghdr.cmd_len = sizeof(cmd);
+    sghdr.cmdp = cmd;
+
+    memset(cmd, 0, sizeof(cmd));
+    cmd[0] = GPCMD_SET_STREAMING;
+    cmd[10] = sizeof(buffer);
+
+    memset(buffer, 0, sizeof(buffer));
+
+    if (speed == -1)
+        buffer[0] = 4; /* restore default */
+    else {
+        buffer[8] = 0xff;  /* first sector 0, last sector 0xffffffff */
+        buffer[9] = 0xff;
+        buffer[10] = 0xff;
+        buffer[11] = 0xff;
+
+        buffer[12] = buffer[20] = (speed >> 24) & 0xff; /* <speed> kilobyte */
+        buffer[13] = buffer[21] = (speed >> 16) & 0xff;
+        buffer[14] = buffer[22] = (speed >> 8)  & 0xff;
+        buffer[15] = buffer[23] = speed & 0xff;
+
+        buffer[18] = buffer[26] = 0x03; /* 1 second */
+        buffer[19] = buffer[27] = 0xe8;
+    }
+
+    if ((fd = open(device, O_RDWR | O_NONBLOCK)) == -1) {
+        esyslog("ERROR: dvd-plugin: Failed to open DVD device %s O_RDWR | O_NONBLOCK", device);
+        return;
+    }
+
+    if (ioctl(fd, SG_IO, &sghdr) < 0)
+        esyslog("ERROR: dvd-plugin: DVD speed limiting failed");
+    else {
+        isyslog("dvd-plugin: DVD speed limiting successful");
+        DvdSetSpeedActive = true;
+    }
+    close(fd);
+#endif
+}
+
 void cDvdPlayer::Action(void) {
     memset(event_buf, 0, sizeof(uint8_t)*4096);

@@ -590,12 +678,21 @@
     }
     dsyslog("dvd-plugin: SoftDeviceOutActive=%d, HasSoftDeviceOut=%d", SoftDeviceOutActive, HasSoftDeviceOut);

+    /* Try to reduce drive speed if the user wants us to */
+    if (DVDSetup.Speed)
+        DvdSetSpeed(const_cast<char *>(cDVD::getDVD()->DeviceName()), DVDSetup.Speed);
+
     if (dvdnav_open(&nav, const_cast<char *>(cDVD::getDVD()->DeviceName())) != DVDNAV_STATUS_OK) {
         Skins.Message(mtError, tr("Error.DVD$Error opening DVD!"));
         esyslog("ERROR: dvd-plugin cannot open dvdnav device %s -> input thread ended (pid=%d) !", const_cast<char *>(cDVD::getDVD()->DeviceName()), getpid());
         active = running = false;
         nav=NULL;
         fflush(NULL);
+        /* Try to restore drive speed if it was previously changed */
+        if (DvdSetSpeedActive) {
+            DvdSetSpeed(const_cast<char *>(cDVD::getDVD()->DeviceName()), -1);
+            DvdSetSpeedActive = false;
+        }
         return;
     }
     dvdnav_set_readahead_flag(nav, DVDSetup.ReadAHead);
@@ -1203,6 +1300,12 @@
   dvdnav_close(nav);
   nav=NULL;

+  /* Try to restore drive speed if it was previously changed */
+  if (DvdSetSpeedActive) {
+      DvdSetSpeed(const_cast<char *>(cDVD::getDVD()->DeviceName()), -1);
+      DvdSetSpeedActive = false;
+  }
+
   DEBUGDVD("%s:%d: input thread ended (pid=%d)\n", __FILE__, __LINE__, getpid());
   fflush(NULL);
 }
diff -Nu dvd.old/player-dvd.h dvd/player-dvd.h
--- dvd.old/player-dvd.h        2007-09-17 21:04:43.000000000 +0200
+++ dvd/player-dvd.h    2008-01-11 10:44:41.000000000 +0100
@@ -168,6 +168,7 @@
     static bool HasBitStreamOut;
     static bool SoftDeviceOutActive; // currently used to switch for xine
     static bool HasSoftDeviceOut;    // currently used to switch for xine
+    static bool DvdSetSpeedActive;

     //dvd stuff
     int currButtonN;
@@ -229,6 +230,7 @@
     void DrawSPU();
     void HideSPU();
     void EmptySPU();
+    void DvdSetSpeed(const char*, int);

     void Pause(void);
     void Play(void);
diff -Nu dvd.old/setup-dvd.c dvd/setup-dvd.c
--- dvd.old/setup-dvd.c 2007-08-12 18:57:22.000000000 +0200
+++ dvd/setup-dvd.c     2008-01-11 10:44:41.000000000 +0100
@@ -35,6 +35,7 @@
     Gain          = 4;

     AC3dynrng     = 0;
+    Speed         = 0;
 }

 bool cDVDSetup::SetupParse(const char *Name, const char *Value)
@@ -47,6 +48,7 @@
     else if (!strcasecmp(Name, "ShowSubtitles")) ShowSubtitles = atoi(Value);
     else if (!strcasecmp(Name, "HideMainMenu"))  HideMainMenu  = atoi(Value);
     else if (!strcasecmp(Name, "ReadAHead"))     ReadAHead     = atoi(Value);
+    else if (!strcasecmp(Name, "Speed"))         Speed         = atoi(Value);
     else if (!strcasecmp(Name, "Gain"))          Gain          = atoi(Value);
     else
        return false;
@@ -72,6 +74,7 @@
     Add(new cMenuEditBoolItem(tr("Setup.DVD$Display subtitles"),           &data.ShowSubtitles));
     Add(new cMenuEditBoolItem(tr("Setup.DVD$Hide Mainmenu Entry"),         &data.HideMainMenu));
     Add(new cMenuEditBoolItem(tr("Setup.DVD$ReadAHead"),                   &data.ReadAHead));
+    Add(new cMenuEditIntItem( tr("Setup.DVD$DVD-ROM Speed"),               &data.Speed, 0, 4));
     Add(new cMenuEditIntItem( tr("Setup.DVD$Gain (analog)"),               &data.Gain, 0, 10));
 }

@@ -85,6 +88,7 @@
     SetupStore("ShowSubtitles", DVDSetup.ShowSubtitles );
     SetupStore("HideMainMenu",  DVDSetup.HideMainMenu  );
     SetupStore("ReadAHead",     DVDSetup.ReadAHead  );
+    SetupStore("Speed",         DVDSetup.Speed  );
     SetupStore("Gain",          DVDSetup.Gain  );
 }

diff -Nu dvd.old/setup-dvd.h dvd/setup-dvd.h
--- dvd.old/setup-dvd.h 2005-01-05 17:32:21.000000000 +0100
+++ dvd/setup-dvd.h     2008-01-11 10:44:41.000000000 +0100
@@ -23,6 +23,7 @@
     int HideMainMenu;
     int ReadAHead;
     int Gain;
+    int Speed;

     // AC3 stuff
     int AC3dynrng;


Attachment:
unknown dvdspeed-cvs-11.01.2008.diff (9.15 KB, 66 downloads)

This post has been edited 16 time(s), it was last edited by micmac: 10.02.2008 15:30.

04.11.2007 13:09 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
thenktor thenktor is a male
Foren Ass


Registration Date: 13.01.2006
Posts: 96

Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
patch -p1 < dvdspeed.diff
patching file i18n.c
Hunk #1 FAILED at 268.
1 out of 1 hunk FAILED -- saving rejects to file i18n.c.rej
patching file player-dvd.c
Hunk #2 succeeded at 571 (offset -2 lines).
Hunk #4 succeeded at 1290 (offset -3 lines).
patching file player-dvd.h
Hunk #1 succeeded at 229 (offset 3 lines).
patching file setup-dvd.c
Hunk #1 FAILED at 35.
Hunk #3 succeeded at 74 (offset 6 lines).
1 out of 4 hunks FAILED -- saving rejects to file setup-dvd.c.rej
patching file setup-dvd.h


Vielelicht solltest du den Patch gegen das aktuelle CVS erstellen?

cvs -d:pserver:anonymous@dvdplugin.cvs.sourceforge.net:/cvsroot/dvdplugin login
cvs -z3 -d:pserver:anonymous@dvdplugin.cvs.sourceforge.net:/cvsroot/dvdplugin co -P dvd

EDIT: Kompilieren konnte ich es, aber ich merke keine Auswirkungen. Habe 2x und 4x getestet.

__________________
burnCDDA
(brennt komfortabel M3U playlists (XMMS und amaroK) in der console)

This post has been edited 1 time(s), it was last edited by thenktor: 08.11.2007 21:08.

08.11.2007 20:58 thenktor is offline Send an Email to thenktor Homepage of thenktor Search for Posts by thenktor Add thenktor to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Hi thenktor,

ich habe jetzt wieder ein neues "altes" NEC-Laufwerk (ND-3550 wenn ich mich recht entsinne). Probiere das morgen mal.

Gruß
mic
09.11.2007 20:42 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Hi!

Ich habe den Patch etwas geändert und jetzt funktioniert es. Ich habe den anderen Thread bzgl. SET_STREAMING natürlich auch schon gefunden smile Der Vorteil von meinem Patch (dessen Code letztendlich nur von MPlayer abgekupfert ist) dürfte sein, daß er auch unter einem normalen Benutzerkonto funktioniert (wg. SG_IO-Benutzung) und man die Geschwindigkeit im OSD-Setup einstellen kann.

Ich säubere den noch ein wenig und lade ihn danach hier hoch.

Gruß
mic
10.11.2007 11:33 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
thenktor thenktor is a male
Foren Ass


Registration Date: 13.01.2006
Posts: 96

Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

quote:
Original von micmac
Der Vorteil von meinem Patch (dessen Code letztendlich nur von MPlayer abgekupfert ist) dürfte sein, daß er auch unter einem normalen Benutzerkonto funktioniert (wg. SG_IO-Benutzung) und man die Geschwindigkeit im OSD-Setup einstellen kann.

Ich säubere den noch ein wenig und lade ihn danach hier hoch.

Gruß
mic


Das wäre natürlich perfekt Augenzwinkern Ich werd's dann testen.

__________________
burnCDDA
(brennt komfortabel M3U playlists (XMMS und amaroK) in der console)
10.11.2007 15:06 thenktor is offline Send an Email to thenktor Homepage of thenktor Search for Posts by thenktor Add thenktor to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Hi thenktor!

Ich hänge mal den Patch für die CVS-Version an. Aber den (verbesserten) Patch für die momentan stabile Gentoo-Version hänge ich auch wieder an.

Den CVS-Patch habe ich leider nur erstellt, nicht getestet.

Würde mich in jedem Fall über Feedback (vor allem negatives) und Verbesserungsvorschläge freuen, bevor ich den Patch Richtung Upstream schicke.

Gruß
mic

Edit: Ich habe die möglichen Geschwindigkeiten mal auf 1x, 2x, 3x und 4x reduziert. Das sollte meiner Meinung nach reichen.
Edit 2: VDR muß nicht unter root laufen, aber der Nutzer muß Lese- und Schreibrechte auf dem DVD-Laufwerk haben. Wenn der Benutzer z.B. in der Gruppe "cdrom" ist und das Laufwerk wie folgt in /dev erscheint, sollte es funktionieren:
code:
1:
brw-rw---- 1 root cdrom 22, 0 2007-11-10 10:05 /dev/hdc

Edit 3: Diffs entfernt, neue Versionen weiter unten.

This post has been edited 5 time(s), it was last edited by micmac: 10.11.2007 17:52.

10.11.2007 16:01 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Hi nochmal!

Neue Version: Der file descriptor wird wieder geschlossen, damit man zwischendurch auch mal die DVD wechseln kann. Macht Sinn :-)

Ich glaube mehr fällt mir erstmal nicht ein.

Gruß
mic

Edit: Ach ja, Euer Kernel und eure Kernel-Header in /usr/include müssen SG_IO und SET_STREAMING unterstützen, sonst passiert nichts. Das Plugin sollte aber in jedem Fall kompilieren und laufen.
Edit: Neuer Patch weiter unten

This post has been edited 3 time(s), it was last edited by micmac: 13.11.2007 17:52.

10.11.2007 17:50 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
thenktor thenktor is a male
Foren Ass


Registration Date: 13.01.2006
Posts: 96

Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

quote:
Original von micmac
Edit: Ach ja, Euer Kernel und eure Kernel-Header in /usr/include müssen SG_IO und SET_STREAMING unterstützen, sonst passiert nichts. Das Plugin sollte aber in jedem Fall kompilieren und laufen.


Wie finde ich das raus? Bis jetzt will es noch nicht funktionieren.

__________________
burnCDDA
(brennt komfortabel M3U playlists (XMMS und amaroK) in der console)
11.11.2007 14:36 thenktor is offline Send an Email to thenktor Homepage of thenktor Search for Posts by thenktor Add thenktor to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

quote:
Original von thenktor
quote:
Original von micmac
Edit: Ach ja, Euer Kernel und eure Kernel-Header in /usr/include müssen SG_IO und SET_STREAMING unterstützen, sonst passiert nichts. Das Plugin sollte aber in jedem Fall kompilieren und laufen.


Wie finde ich das raus? Bis jetzt will es noch nicht funktionieren.


Hi!

code:
1:
2:
3:
4:
sk@section-eight ~ $ grep "define SG_IO" /usr/include/scsi/sg.h
#define SG_IO 0x2285   /* similar effect as write() followed by read() */
sk@section-eight ~ $ grep GPCMD_SET_STREAMING /usr/include/linux/cdrom.h
#define GPCMD_SET_STREAMING                 0xb6

Hast du denn im dvd-Plugin-Setup den Eintrag "DVD-ROM-Geschwindigkeit" auf einen Wert ungleich 0 gesetzt? Wenn du den vdr mit loglevel 2 (info and errors) startest, sollte der Patch auch im Syslog sichtbar werden (aber nur dann wenn dein Kernel SG_IO und SET_STREAMING unterstützt und DVD-ROM-Geschwindigkeit ungleich 0 gesetzt ist).

Gruß
mic

This post has been edited 1 time(s), it was last edited by micmac: 11.11.2007 15:05.

11.11.2007 15:03 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
thenktor thenktor is a male
Foren Ass


Registration Date: 13.01.2006
Posts: 96

Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Hallo
Also die includes habe ich. Muss man vielleicht noch etwas in der Kernel Config aktivieren?

Die VDR Log Ausgabe ist der Meinung, dass die Drosselung funktioniert:
code:
1:
2:
3:
4:
Nov 11 22:30:39 (none) vdr: [7944] dvd-plugin: Limiting speed to 2700 KB/s
Nov 11 22:30:39 (none) vdr: [7944] dvd-plugin: DVD speed limiting successful
Nov 11 22:31:37 (none) vdr: [7944] dvd-plugin: Restoring initial DVD drive speed
Nov 11 22:31:37 (none) vdr: [7944] dvd-plugin: DVD speed limiting successful

oder
code:
1:
2:
3:
4:
Nov 11 22:32:20 (none) vdr: [8005] dvd-plugin: Limiting speed to 1350 KB/s
Nov 11 22:32:20 (none) vdr: [8005] dvd-plugin: DVD speed limiting successful
Nov 11 22:33:05 (none) vdr: [8005] dvd-plugin: Restoring initial DVD drive speed
Nov 11 22:33:05 (none) vdr: [8005] dvd-plugin: DVD speed limiting successful


Allerdings dreht das Laufwerk immernoch hoch und auch das Spulen klappt trotz 1x Geschwindigkeit noch ruckelfrei. Mit dem anderen Patch (der bei mir als root funktioniert, aber eben nicht als vdr user) läuft das Laufwerk langsam und es ruckelt beim Spulen.

Und noch diese Infos:
code:
1:
2:
3:
4:
root[vdr]# ls -l /dev/dvd
lrwxrwxrwx 1 root root 3 2007-10-19 11:42 /dev/dvd -> sr0
root[vdr]# ls -l /dev/sr0
brw-rw---- 1 root cdrom 11, 0 2007-10-19 13:42 /dev/sr0


code:
1:
2:
root[vdr]# groups vdr
vdr audio video cdrom

Sollte also eigentlich alles passen.

Laufwerk:
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
root[vdr]# wodim dev=/dev/dvd -checkdrive
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : 'PLEXTOR '
Identification : 'DVDR   PX-712A  '
Revision       : '1.09'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE
Supported modes: PACKET SAO


__________________
burnCDDA
(brennt komfortabel M3U playlists (XMMS und amaroK) in der console)
11.11.2007 22:41 thenktor is offline Send an Email to thenktor Homepage of thenktor Search for Posts by thenktor Add thenktor to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Hi!

Mmh, das sieht tatsächlich gut aus. Falls du einen Bildschirm mit X an den VDR angeschlossen hast und mplayer installiert ist, könntest du mal bei eingelegter DVD probieren, ob
code:
1:
mplayer -dvd-speed <X> -dvd-device /dev/sr0 dvd://

die LW-Geschwindigkeit erfolgreich runterregelt?

Wir haben auch einen Recher mit SATA-DVD zu Hause, allerdings komme ich erst in ein paar Wochen wieder nach Hause. Sonst würde ich das selber eben probieren. SG_IO scheint libata aber zu unterstützen.

Gruß
mic

This post has been edited 1 time(s), it was last edited by micmac: 12.11.2007 09:47.

12.11.2007 05:31 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
thenktor thenktor is a male
Foren Ass


Registration Date: 13.01.2006
Posts: 96

Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Ja, ich habe X. Der vdr läuft im Hintergrund auf meinem Desktop Rechner Augenzwinkern
Mit MPlayer passiert genau das gleiche:
code:
1:
2:
URL: dvd://
Limiting DVD speed to 1350KB/s... successful

Aber die Drehzahl wird nicht gedrosselt.

Ist übrigens kein SATA Brenner, wird aber über libata angesprochen. Das ist in neuen Kerneln auch die Standardeinstellung.

__________________
burnCDDA
(brennt komfortabel M3U playlists (XMMS und amaroK) in der console)
12.11.2007 11:50 thenktor is offline Send an Email to thenktor Homepage of thenktor Search for Posts by thenktor Add thenktor to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

quote:
Original von thenktorIst übrigens kein SATA Brenner, wird aber über libata angesprochen. Das ist in neuen Kerneln auch die Standardeinstellung.


Mmh, es könnte natürlich daran liegen, dass libata (zumindest für PATA) noch Fehler hat. AFAIK ist PATA im Kernel noch immer experimentell. Das der Patch aus dem anderen Beitrag funktioniert wundert mich nicht, setzt er doch die Register selbst (wofür er dann aber root-Rechte benötigt).

This post has been edited 2 time(s), it was last edited by micmac: 12.11.2007 15:01.

12.11.2007 15:00 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Interessehalber noch folgende Frage: Welchen Kernel nutzt du denn und welche Distri? Ich habe selber Kernel 2.6.22 und Gentoo.
12.11.2007 15:13 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
thenktor thenktor is a male
Foren Ass


Registration Date: 13.01.2006
Posts: 96

Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

code:
1:
2:
root[vdradmin-am]# uname -a
Linux pinkfloyd 2.6.22.1-cfs-v19 #5 SMP PREEMPT Sat Aug 4 19:40:12 CEST 2007 i686 AMD Athlon(tm) MP 1900+ AuthenticAMD GNU/Linux


2.6.22.1 mit CFS Scheduler Patch. Selbst kompiliert.
Ich könnte natürlich mal auf den aktuellen umsteigen, ich galube aber nicht, dass es etwas bringt.
Distribution ist Zenwalk (Slackware basierend).

Zu libata und PATA. Ich denke das ist nicht mehr experimentell. Wird auch von den meisten aktuellen Linux Distributionen genutzt. Aber das Problem kann natürlich trotzdem damit zusammenhängen (die Funktion wird wohl nicht oft benutzt).

Vielleicht möchte noch jemand das mal testen Augenzwinkern

__________________
burnCDDA
(brennt komfortabel M3U playlists (XMMS und amaroK) in der console)
12.11.2007 15:49 thenktor is offline Send an Email to thenktor Homepage of thenktor Search for Posts by thenktor Add thenktor to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Hi!

Mit Hilfe einer OpenSuSe LiveCD habe ich mal mein Gentoo auf libata/PATA umgestellt. Und siehe da, es funktioniert hier dann auch nicht mehr. Zumindest mit 2.6.22.12. Ich habe mal eine Mail an die Kernel-Liste geschrieben, vielleicht bringt jemand etwas Licht ins Dunkel: Link.

Gruß
mic
13.11.2007 17:49 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Neuer Patch:

- Indentation dem Quellcode angepasst
- früherer Aufruf von DvdSetSpeed()
- ein weiterer Reset-Aufruf falls dvdnav abbricht

Edit: Patch entfernt, neuer Patch weiter unten

This post has been edited 1 time(s), it was last edited by micmac: 15.11.2007 21:38.

13.11.2007 17:55 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
thenktor thenktor is a male
Foren Ass


Registration Date: 13.01.2006
Posts: 96

Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

quote:
Original von micmac
Hi!

Mit Hilfe einer OpenSuSe LiveCD habe ich mal mein Gentoo auf libata/PATA umgestellt. Und siehe da, es funktioniert hier dann auch nicht mehr. Zumindest mit 2.6.22.12. Ich habe mal eine Mail an die Kernel-Liste geschrieben, vielleicht bringt jemand etwas Licht ins Dunkel: Link.

Gruß
mic


Sehr gut smile

__________________
burnCDDA
(brennt komfortabel M3U playlists (XMMS und amaroK) in der console)
13.11.2007 18:49 thenktor is offline Send an Email to thenktor Homepage of thenktor Search for Posts by thenktor Add thenktor to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Hi!

Gentoo-Benutzer können den Patch jetzt ganz einfach testen, indem sie vdr-dvd-0.3.7_pre20071113 installieren.

Gruß
mic
14.11.2007 11:22 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
micmac
Veteran


Registration Date: 14.10.2002
Posts: 787

Thread Starter Thread Started by micmac
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

thenktor,

funktioniert dieser Patch mit deinem Kernel?

Gruß
mic

Edit: Patch entfern. Aktueller Patch oben im ersten Beitrag.

This post has been edited 1 time(s), it was last edited by micmac: 19.11.2007 13:38.

14.11.2007 19:34 micmac is offline Search for Posts by micmac Add micmac to your Buddy List
Pages (2): [1] 2 next » Tree Structure | Board Structure
Jump to:
Post New Thread Post Reply
VDR Portal » Developer » Patches » SET_STREAMING in vdr-dvd (DVD-ROM-Geschwindigkeit setzen)

www.vdr-portal.de VDR Portal © 2002-2006 by genka
Forum Software: Burning Board 2.3.4, Developed by WoltLab GmbH