[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: Re: [K3b] [PATCH] defect dvd copy problems V0.1
From: Thomas Schorpp <t.schorpp () gmx ! de>
Date: 2004-09-02 0:09:11
Message-ID: 413664A7.1090305 () gmx ! de
[Download RAW message or body]
heres the first patch to k3b to solve read and copy problems with defect
dvds.
use only at low speeds.
--- usr/local/src/k3b-0.11.14/src/device/k3bdevice.cpp 2004-08-10
09:45:21.000000000 +0200
+++ home/schorpp/k3b-0.11.14/src/device/k3bdevice.cpp 2004-09-02
01:14:08.000000000 +0200
@@ -2934,7 +2934,32 @@
bool fua ) const
{
::memset( data, 0, dataLen );
-
+
+ ScsiCommand cmd1( this );
+ cmd1[0] = MMC::MODE_SELECT;
+ cmd1[1] = 0x00; //Mode Parameter Header -Mode Data Length MSB
+ cmd1[2] = 0x00; //Mode Data Length lSB - both reserved due cmd
mode-select
+ cmd1[3] = 0x00;
+ cmd1[4] = 0x00;
+ cmd1[5] = 0x00;
+ cmd1[6] = 0x00;
+ cmd1[7] = 0x00;
+ cmd1[8] = 0x00;
+ cmd1[9] = 0x01; //Read/Write Error Recovery Parameters Page
+ cmd1[10] = 0x0A;
+ cmd1[11] = 0x10; //FIXME Error Recovery modes (RC set), (speed)
+ cmd1[12] = 0x00;
+ cmd1[13] = 0x00;
+ cmd1[14] = 0x00;
+ cmd1[15] = 0x00;
+ cmd1[16] = 0x00;
+ cmd1[17] = 0x00;
+ cmd1[18] = 0x00;
+ cmd1[19] = 0x00;
+ cmd1[20] = 0x00; //End
+ cmd1.transport();
+
+
ScsiCommand cmd( this );
cmd[0] = MMC::READ_10;
cmd[1] = ( fua ? 0x8 : 0x0 );
@@ -2948,6 +2973,8 @@
if( cmd.transport( TR_DIR_READ, data, dataLen ) ) {
kdDebug() << "(K3bCdDevice::CdDevice) " << blockDeviceName() << ":
READ 10 failed!" << endl;
return false;
+
+
}
else
return true;
Thomas Schorpp wrote:
> Thomas Schorpp wrote:
>
>> hi yours,
>>
>> i got one problem with my dvd reader under k3b:
>>
>> in spite set ignore read errors and retries to 1 (0 isnt possible) the
>> drive slows down and tries to recalibrate on reading in dvd images, so
>> the process is to be aborted cos only 1sector/2sec speed left.
>>
>> i can do c,c++ but i have no knowlegde about those drive cmds.
>>
>> which and which sequence do you suggest to keep the drive at full speed?
>>
>> same problem using dd with noerr option.
>>
>> thx,
>> tom
>>
>
> ive implemented read retries =0 yesterday, no success, drive spun down.
>
> i like to try mmc mode-select RC=1 to turn off hw error correction and
> implement a sw scratches error correction in k3b.
> is there oss code for sw sector correction anywhere?
>
> got the mmc-2/-3 specs, bunch of paper...
>
> a quick reference or the correct cmd sequence for RC mode-select would
> be helpful here.
>
>
>
>
> _______________________________________________
> kde-multimedia mailing list
> kde-multimedia@kde.org
> https://mail.kde.org/mailman/listinfo/kde-multimedia
>
>
["k3bdevice-readerr-01.diff" (text/x-patch)]
--- usr/local/src/k3b-0.11.14/src/device/k3bdevice.cpp 2004-08-10 09:45:21.000000000 +0200
+++ home/schorpp/k3b-0.11.14/src/device/k3bdevice.cpp 2004-09-02 01:14:08.000000000 +0200
@@ -2934,7 +2934,32 @@
bool fua ) const
{
::memset( data, 0, dataLen );
-
+
+ ScsiCommand cmd1( this );
+ cmd1[0] = MMC::MODE_SELECT;
+ cmd1[1] = 0x00; //Mode Parameter Header -Mode Data Length MSB
+ cmd1[2] = 0x00; //Mode Data Length lSB - both reserved due cmd mode-select
+ cmd1[3] = 0x00;
+ cmd1[4] = 0x00;
+ cmd1[5] = 0x00;
+ cmd1[6] = 0x00;
+ cmd1[7] = 0x00;
+ cmd1[8] = 0x00;
+ cmd1[9] = 0x01; //Read/Write Error Recovery Parameters Page
+ cmd1[10] = 0x0A;
+ cmd1[11] = 0x10; //FIXME Error Recovery modes (RC set), (speed)
+ cmd1[12] = 0x00;
+ cmd1[13] = 0x00;
+ cmd1[14] = 0x00;
+ cmd1[15] = 0x00;
+ cmd1[16] = 0x00;
+ cmd1[17] = 0x00;
+ cmd1[18] = 0x00;
+ cmd1[19] = 0x00;
+ cmd1[20] = 0x00; //End
+ cmd1.transport();
+
+
ScsiCommand cmd( this );
cmd[0] = MMC::READ_10;
cmd[1] = ( fua ? 0x8 : 0x0 );
@@ -2948,6 +2973,8 @@
if( cmd.transport( TR_DIR_READ, data, dataLen ) ) {
kdDebug() << "(K3bCdDevice::CdDevice) " << blockDeviceName() << ": READ 10 failed!" << endl;
return false;
+
+
}
else
return true;
_______________________________________________
kde-multimedia mailing list
kde-multimedia@kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic