This is a multi-part message in MIME format. --------------020007040709060003080002 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit second patch set with gui support. apply within my dir structure or correct diff headers, pls. drive media hw error correction is toggled by checkbox "ignore read errors" now (for dvd read10 cmd only at this time). dont know if the reader is reset after using, apply hdparm -w /dev/(dvd) to be sure before copying data discs again. y tom --------------020007040709060003080002 Content-Type: text/x-patch; name="k3bdatatrackreader-defectdvd-02.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="k3bdatatrackreader-defectdvd-02.diff" --- usr/local/src/k3b-0.11.14/src/k3bdatatrackreader.cpp 2004-01-29 14:12:00.000000000 +0100 +++ home/schorpp/k3b-0.11.14/src/k3bdatatrackreader.cpp 2004-09-06 03:24:43.000000000 +0200 @@ -110,6 +110,12 @@ unsigned long lastReadMb = 0; int bufferLen = s_bufferSizeSectors*m_sectorSize; unsigned char* buffer = new unsigned char[bufferLen]; + + if( m_ignoreReadErrors == true ) + m_device->setIgnoreHWReadErrors(true); + else + m_device->setIgnoreHWReadErrors(false); + while( !m_canceled && currentSector <= m_lastSector ) { int readSectors = QMIN( bufferLen/m_sectorSize, m_lastSector.lba()-currentSector.lba()+1 ); --------------020007040709060003080002 Content-Type: text/x-patch; name="k3bdeviceh-defectdvd-02.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="k3bdeviceh-defectdvd-02.diff" --- usr/local/src/k3b-0.11.14/src/device/k3bdevice.h 2004-07-29 12:07:16.000000000 +0200 +++ home/schorpp/k3b-0.11.14/src/device/k3bdevice.h 2004-09-06 02:41:13.000000000 +0200 @@ -264,6 +264,8 @@ void setMountPoint( const QString& ); void setMountDevice( const QString& d ); + + void setIgnoreHWReadErrors(bool b) { m_ignoreHWReadErrors = b; }; /** @@ -673,7 +675,9 @@ int m_writeModes; bool m_supermount; - + + // HW Error Correction (OFF for defect Video discs) + bool m_ignoreHWReadErrors; class Private; Private* d; --------------020007040709060003080002 Content-Type: text/x-patch; name="k3bdevice-defectdvd-02.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="k3bdevice-defectdvd-02.diff" --- 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-06 03:02:42.000000000 +0200 @@ -133,6 +133,7 @@ m_bus = m_target = m_lun = -1; m_dvdMinusTestwrite = true; m_bufferSize = 0; + m_ignoreHWReadErrors = false; } @@ -2934,7 +2935,35 @@ bool fua ) const { ::memset( data, 0, dataLen ); - + + if( m_ignoreHWReadErrors == true ) + { + 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 +2977,8 @@ if( cmd.transport( TR_DIR_READ, data, dataLen ) ) { kdDebug() << "(K3bCdDevice::CdDevice) " << blockDeviceName() << ": READ 10 failed!" << endl; return false; + + } else return true; --------------020007040709060003080002 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kde-multimedia mailing list kde-multimedia@kde.org https://mail.kde.org/mailman/listinfo/kde-multimedia --------------020007040709060003080002--