It's not the speed setting you should be after, but
rather CDROMSETSPINDOWN (and the equivalent GETSPINDOWN).
> Here came the first problem: we tried several kernel
> versions and some IDE drives: (a RedHat 6.0 shipped)
> 2.2.5-15, a 2.2.12, 2.3.15 and 2.3.16 and a 16x Toshiba
> CD-ROM and a 8x <I do not know which vendor> one.
>
> With 2.2.x the capability mask was 0xfff and with 2.3.15
> it was 0x3ffff, which are definitely wrong.
What do you mean? I assume you just mean the capability
bits minus the mask.
> The CDC_SELECT_DISC bit should appear only on CD
> changers, right? And the CDC_SELECT_SPEED bit appears
> on the 8x CD-ROM which fails to set its speed. :-(
> (2.3.x was not tested on this drive, yet.)
I have fixed these up in 2.3.x mostly, 2.2 was awful
when it came to this. Basically just set all capabilities.
> And the drives are CD-ROMs, not CD-R, not CD-RW
> and not DVD, so 2.3.15 is plain wrong in reporting
> capabilities.
2.3.15 is not plain wrong in reporting capabilities,
but many drives are!
> With 2.3.16, we got 0x1fef on my drive, which seems
> to reflect the correct capabilities of the drive.
It is getting better.
> But with 2.3.16, we have another problem:
> it does not play audio CDs. Starting CD player
> applications fail with packet error on a vanilla
> 2.3.16 and other lines show up in dmesg or on the
> console:
>
> /dev/cdrom: Wrong medium type
> cdrom: pid X is buggy!
> cdrom: open failed.
>
> After applying the posted cdrom fix, we do not get
> the packet error but those lines do appear.
The second patch that followed had a correction to
that error message - it just wasn't very telling what
exactly was wrong. Basically, fix the cd playing
application to open the device O_NONBLOCK.
> We tried to recompile cdp against 2.3.16.
> At first the compilation failed because there is an
> #include <linux/types.h> line in include/linux/cdrom.h.
> One of the source files of cdp includes <linux/cdrom.h>
> and <sys/types.h> and these conflict. Using
>
> #ifdef __KERNEL__
> #include <linux/types.h>
> #endif
>
> in cdrom.h solves the compilation error but the
> audio CD playing problem remains.
That's a mistake, thanks! Add the O_NONBLOCK and you
should be fine.
-- * Jens Axboe <axboe@image.dk> * Linux CD-ROM Maintainer * http://www.kernel.dk- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/