[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libcdio-devel] Using major/minor device numbers to determine SCSI o
From: |
Steven M. Schultz |
Subject: |
Re: [Libcdio-devel] Using major/minor device numbers to determine SCSI or ATAPI |
Date: |
Thu, 28 Apr 2005 17:59:34 -0700 (PDT) |
On Thu, 28 Apr 2005, R. Bernstein wrote:
> where the access (at leat in in media players) is bytes, cdparanoia
> wants to see data read as 16-bit integers, I guess so it can analyze
Ok - that makes sense.
> the audio data (which right now I believe it does very little
> of). According to paranoia (but hey, it might be true as well), there
> some drives that return audio data big endian and some drives that
Ahhhh. I guess we've all seen stranger things in the world of
computer gear ;)
> return data little endian. In particular it thinks that ATAPI is
> defined to return data little endian while a true SCSI drive (i.e. not
> an ATAPI drive with SCSI emulation) is big endian.
Ah, I don't think that's necessarily the case. But without otherwise
identical drives with the difference interface electronics (at one
time there were numerous SCSI CDROM drives available - haven't seen
one in a long time).
In any case I am not sure it's the transport needs to be checked, but
the capabilities of the drive. Isn't there a bit/byte in the
drive that can be fetched that says what order the audio data is
presented in? The MMC specs are online (had a copy - hundreds of
pages - printed out at one time but tossed it a while back).
> On GNU/Linux it's not the device name that's important (/dev/sg0 or
True - and I should have been a little more clear. I used the device
name as a shortcut to the major device number since for those systems
I know about the name is in 1-1 mapping to the major device number.
Thus 'sr' is always major 18 and sr0 could be either ATAPI or SCSI.
> # ls -l /dev/hdc
> brw------- 1 rocky disk 22, 0 Apr 25 14:41 /dev/hdc
> and from /usr/include/linux/major.h:
>
> #define IDE1_MAJOR 22
Right - and on BSDI /dev/rsr0c is 18 (as you can check on 'awds1' ;)).
That happens to be an ATAPI drive but a long time ago when it was
a SCSI CD burner it was still 18 for a major number.
> so the claim is that /dev/hdc is some sort of IDE device which
> cdparanoia then uses to determine drive endian-ness.
A more portable way would be to query the drive - I can't escape the
feeling there's a MMC{2,3} 'mode sense' or 'inquiry' command that
will get the info from the drive.
Cheers,
Steven