On 2013-01-14 12:35, gregor herrmann wrote:
On Mon, 14 Jan 2013 00:28:22 -0500, Filipus Klutiero wrote:

After trying and reading a bit further (both in cdck and in
linux/cdrom.h) I _think_ this won't work for audio CDs. I can get a
sectors variable by removing some conditions, but than I'm ending at:

% src/cdck -t
sectors = 327782
NB! For disks written with some burners cdck might
     report about unreadable sectors at the end of the disk.
     In such cases you can just ignore those warnings.

Reading sectors 1-327782
! unable to read sector 1, reason: Input/output error
! unable to read sector 2, reason: Input/output error
! unable to read sector 3, reason: Input/output error
[..]

This is not just a documentation problem - testing audio CDs is no
less possible than testing other kinds of CDs.
Maybe bu I'm not conviced it works the way cdck uses linux/cdrom.h
...

But adapting the
documentation and the behavior when this fails would certainly be
better than nothing.

I do not understand what you wrote about ReadTOC() and sectors_tot.
Maybe provide patches showing what you tested.
With

#v+
diff --git a/src/lib_main.cpp b/src/lib_main.cpp
index 256a62a..dfb48ee 100644
--- a/src/lib_main.cpp
+++ b/src/lib_main.cpp
@@ -143,7 +143,6 @@ int Ccdrom::ReadTOC()
                 }

                 if (i == CDROM_LEADOUT) {
-                       if (toc.cdte_ctrl&  CDROM_DATA_TRACK)
                                 sectors = toc.cdte_addr.msf.frame +
                                         toc.cdte_addr.msf.second*75 +
                                         toc.cdte_addr.msf.minute*75*60 - 150;
@@ -169,7 +168,7 @@ int Ccdrom::ReadTOC()

         sectors_tot = sectors;

-       // printf("sectors = %d", sectors);
+       printf("sectors = %d", sectors);

         /* get mcn */
         /*
@@ -415,12 +414,6 @@ int Ccdrom::ReadCD ()
  {
         //DBG ("Ccdrom::ReadCD\n");

-       if (disc_status != CDS_DATA_1) {
-               // printf("disc_status != CDS_DATA_1");
-               snprintf (last_err, ERR_STR_MAX, "disc_status != CDS_DATA_1");
-               return RET_FAILED;
-       }
-
         if (sectors_tot<= 0) {
                 // printf("sectors_tot<= 0");
                 snprintf (last_err, ERR_STR_MAX, "sectors_tot<= 0");
#v-

Ah, I see. Sorry, I thought 172 was a number of sectors.
Thanks

I get:

% src/cdck -t
sectors = 253807
NB! For disks written with some burners cdck might
     report about unreadable sectors at the end of the disk.
     In such cases you can just ignore those warnings.

Reading sectors 1-253807
! unable to read sector 1, reason: Input/output error
! unable to read sector 2, reason: Input/output error
! unable to read sector 3, reason: Input/output error


Cheers,
gregor


I get the same. And corresponding errors in kern.log:

Jan 19 19:59:28 vinci kernel: [536362.482762] sr 4:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Jan 19 19:59:28 vinci kernel: [536362.482772] sr 4:0:0:0: [sr0] Sense Key : Illegal Request [current] Jan 19 19:59:28 vinci kernel: [536362.482780] sr 4:0:0:0: [sr0] Add. Sense: Illegal mode for this track Jan 19 19:59:28 vinci kernel: [536362.482791] sr 4:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00 Jan 19 19:59:28 vinci kernel: [536362.482807] end_request: I/O error, dev sr0, sector 0 Jan 19 19:59:28 vinci kernel: [536362.482815] Buffer I/O error on device sr0, logical block 0 Jan 19 19:59:28 vinci kernel: [536362.482822] Buffer I/O error on device sr0, logical block 1 Jan 19 19:59:28 vinci kernel: [536362.482830] Buffer I/O error on device sr0, logical block 2 Jan 19 19:59:28 vinci kernel: [536362.482837] Buffer I/O error on device sr0, logical block 3 Jan 19 19:59:28 vinci kernel: [536362.482846] Buffer I/O error on device sr0, logical block 4 Jan 19 19:59:28 vinci kernel: [536362.482854] Buffer I/O error on device sr0, logical block 5 Jan 19 19:59:28 vinci kernel: [536362.482861] Buffer I/O error on device sr0, logical block 6 Jan 19 19:59:28 vinci kernel: [536362.482869] Buffer I/O error on device sr0, logical block 7 Jan 19 19:59:28 vinci kernel: [536362.484594] sr 4:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Jan 19 19:59:28 vinci kernel: [536362.484607] sr 4:0:0:0: [sr0] Sense Key : Illegal Request [current] Jan 19 19:59:28 vinci kernel: [536362.484618] sr 4:0:0:0: [sr0] Add. Sense: Illegal mode for this track Jan 19 19:59:28 vinci kernel: [536362.484632] sr 4:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 01 00 Jan 19 19:59:28 vinci kernel: [536362.484652] end_request: I/O error, dev sr0, sector 0 Jan 19 19:59:28 vinci kernel: [536362.484660] Buffer I/O error on device sr0, logical block 0 Jan 19 19:59:28 vinci kernel: [536362.486845] sr 4:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Jan 19 19:59:28 vinci kernel: [536362.486856] sr 4:0:0:0: [sr0] Sense Key : Illegal Request [current] Jan 19 19:59:28 vinci kernel: [536362.486867] sr 4:0:0:0: [sr0] Add. Sense: Illegal mode for this track Jan 19 19:59:28 vinci kernel: [536362.486880] sr 4:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 01 00 00 01 00 Jan 19 19:59:28 vinci kernel: [536362.486900] end_request: I/O error, dev sr0, sector 4 Jan 19 19:59:28 vinci kernel: [536362.486908] Buffer I/O error on device sr0, logical block 1

Then the last block is pretty much repeated again and again (at the beginning, cdck reads a few blocks).


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to