[paranoia] cdparanoia: non-repeatable incorrectable sectors

Wolfgang Weisselberg weissel at ph-cip.uni-koeln.de
Sat Mar 4 16:52:31 PST 2000



Hi, Monty, (cd)paranoia-team!

Having recently developed an interest in MP3 and having my own
CDs on my HD, I looked into cdparanoia.  While I very much
like the correcting capabilities in cdparanoia III alpha 9,
to my dismay my CDrom decided that it would like to pop up some
'V's every now and then, but not consistently.

Switching from ide-cdrom to ide-scsi seems to have helped and
not restricting the default read size (it seems my 2.2.13 does
not dislike large DMA settings) in interface/scsi_interface.c
and increasing MAX_RETRIES to 64 in interface/low_interface.h
did seem to help too.  Unluckily, I still got non-repeatable
errors, even when setting cdparanoia to realtime scheduling.

I whipped up 2 perl scripts[1] which do basically the following:

for each track{
    start cdparanoia, ripping to raw (-p), and -e
    if (AUDIO_ERROR) {  # [2]
        stop cdparanoia, save partial file
        back up 100 sectors before the last "[write]"
            (up to 5 times, then give up)       # [3]
        start a new cdparanoia from there
    }
    
    if (HAD_AN_AUDIO_ERROR) { call second script
    } else { rename outputfile }
}

econd script: 
    copy first partial file up to about 50 sectors from the
        end to the output
    read a 20 KB part (also -> output)
    find the 20 KB part within the beginning of the next
        partial file    # [4]
    from after that part, copy second partial file up to
        about 50 sectors ... (repeat ... )

    and the last part gets the tail, too. 

As this works (and seems to produce error-free rips) I consider
it a shortcoming (or even bug) of cdparanoia ... especially
as cdparanoia will twiddle it's thumbs till EOTime with -z on
my drive.  I am no good as a C programmer, so I'd be of little
help patching cdparanoia itself.

If you are interested in the scripts, I'll send them along.
It's under 10K. 

Output of cdparanoia -g /dev/sg2 -v -Q:
cdparanoia III release 9.7 (December 13, 1999)
(C) 1999 Monty <monty at xiph.org> and Xiphophorus

Report bugs to paranoia at xiph.org
http://www.xiph.org/paranoia/

        Testing /dev/sg2 for SCSI interface
                generic device: /dev/sg2
                ioctl device: /dev/scd0
                CDROM sensed: LITEON CD-ROM LTN382 WL2A 

Checking for SCSI emulation and transport revision...
        Drive is ATAPI (using SCSI host adaptor emulation)

Checking for MMC style command set...
        Drive is MMC style
Verifying CDDA command set...
        Expected command set reads OK.

Looking at revision of the SG interface in use...
        New style SG with scatter/gather memory management
        DMA scatter/gather table entries: 256
        table entry size: 32768 bytes
        maximum theoretical transfer: 3566 sectors
        Setting default read size to 3566 sectors (8387232 bytes).

Table of contents (audio tracks only):
[snip]

-Wolfgang

PS: Thanks to cdparanoia I can now rip (almost)[5] error-free
    wavs.  I love it!

[1] just as proof of concept.  They still contain bugs and
    misfeatures, I am sure, even though they seem to work
    for me.  They are not nice in style and are not well
    documented either.
[2] currently only "[skip]".  Are any other condition (apart
    from scratch) able to produce audible defects?
[3] It always seems to work on the first retry for my drive,
    though.
[4] I know, this is not 100%, especially with zeros and computed
    (i.e. digital calculated sines, which would repeat 100%
    exactly).  This part is brute-force coded, too.  Bad code,
    no cookie :-)
[5] Even tracks that were not 'corrected' by my scripts (and
    had no [skip]) can produce differences ... but not due
    to mis-alignment at the beginning, it seems.  Maybe check
    it later.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Paranoia homepage: http://www.xiph.org/paranoia/
To unsubscribe from this list, send a message to 'paranoia-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Paranoia mailing list