[Paranoia] Bug reading audio cd without -g parameter

Stefan Fleiter stefan.fleiter at web.de
Fri Aug 24 17:17:58 PDT 2007


Hi,

cdparanoia-III-10pre0 (self compiled, downloaded from xiph.org) does not work
as expected when the -g parameter is not given.

It hangs at this stage:
# cdparanoia -B -d/dev/scd0
cdparanoia III release 10pre0 (August 29, 2006)
[..]
 (== PROGRESS == [> | ...... 32 ] == :-P o ==)

The strace output can be found here:
http://launchpadlibrarian.net/8971713/cdparanoia.log

The following lines get written to syslog when using cdparanoia:

Aug 24 14:17:25 localhost kernel: [ 6114.874753] sg_write: data in/out 56/56 
bytes for SCSI command 0x12--guessing data in;
Aug 24 14:17:25 localhost kernel: [ 6114.874757] program cdparanoia not 
setting count
and/or reply_len properly
Aug 24 14:17:25 localhost kernel: [ 6114.875746] sg_write: data in/out 22/22 
bytes for SCSI
command 0x1a--guessing data in;
Aug 24 14:17:25 localhost kernel: [ 6114.875748] program cdparanoia not 
setting count
and/or reply_len properly
Aug 24 14:17:25 localhost kernel: [ 6114.874753] sg_write: data in/out 56/56 
bytes for SCSI
command 0x12--guessing data in;
Aug 24 14:17:25 localhost kernel: [ 6114.874757] program cdparanoia not 
setting count
and/or reply_len properly
Aug 24 14:17:25 localhost kernel: [ 6114.875746] sg_write: data in/out 22/22 
bytes for SCSI
command 0x1a--guessing data in;
Aug 24 14:17:25 localhost kernel: [ 6114.875748] program cdparanoia not 
setting count
and/or reply_len properly
Aug 24 14:17:30 localhost kernel: [ 6119.960910] sg_write: data in/out 
30576/30576 bytes for
SCSI command 0xd8--guessing data in;
Aug 24 14:17:30 localhost kernel: [ 6119.960913] program cdparanoia not 
setting count
and/or reply_len properly

And many more of these...

Ripping with "-Z" does not hang and is super fast but the resulting wav files 
could damage ones speakers.
There is nothing which sounds like the music to be ripped.

Using cdparanoia-III-alpha9.8 the music is ripped like it should be.
Even with "-Z" (which is not nearly as fast as with 3.10) everything sounds 
ok.



Ripping the cd works fine if I add the "-g" parameter
(the problem is that programs which use cdparanoia do not set this parameter):

# cdparanoia -d /dev/scd0 -v -g /dev/sg0 -B -- 1
cdparanoia III release 10pre0 (August 29, 2006)
[..]
        Testing /dev/sg0 for SCSI/MMC interface
                generic device forced; not testing for SG_IO interface
                generic device: /dev/sg0
                ioctl device: /dev/scd0

Found an accessible SCSI CDROM drive.
Looking at revision of the SG interface in use...
        SG interface version 3.5.34; OK.

CDROM model sensed sensed: PLEXTOR CD-ROM PX-12TS 1.02

Checking for SCSI emulation...
        Drive is SCSI

Checking for MMC style command set...
        Drive does not have MMC CDDA support
        DMA scatter/gather table entries: 128
        table entry size: 524288 bytes
        maximum theoretical transfer: 28532 sectors
        Setting default read size to 13 sectors (30576 bytes).

Verifying CDDA command set...
        Expected command set reads OK.
This command set may use a Force Unit Access bit.
Checking drive for FUA bit support...
        Drive rejected FUA bit.


If I remove the "-g" parameter cdparanoia thinks I have an ATAPI drive
but not a SCSI drive:

cdparanoia -d /dev/scd0 -v -B -- 1
cdparanoia III release 10pre0 (August 29, 2006)
(C) 2006 Monty <monty at xiph.org> and Xiph.Org
[..]
Checking /dev/scd0 for cdrom...
        Testing /dev/scd0 for SCSI/MMC interface
                SG_IO device: /dev/scd0

CDROM model sensed sensed: PLEXTOR CD-ROM PX-12TS 1.02

Checking for SCSI emulation...
        Drive is ATAPI (using SG_IO host adaptor emulation)

Checking for MMC style command set...
        Drive does not have MMC CDDA support
        DMA scatter/gather table entries: 1
        table entry size: 524288 bytes
        maximum theoretical transfer: 222 sectors
        Setting default read size to 13 sectors (30576 bytes).

Verifying CDDA command set...
        Expected command set reads OK.

So cdparanoia's bug can be worked around by setting the "-g" parameter for 
SCSI drives.


The whole bug report can also be found at
https://bugs.launchpad.net/ubuntu/+source/cdparanoia/+bug/106000


I would be happy to provide further information or test patches.

Thanks a lot in advance,
Stefan Fleiter


More information about the Paranoia mailing list