[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: R. Bernstein
Subject: Re: [Libcdio-devel] Using major/minor device numbers to determine SCSI or ATAPI
Date: Thu, 28 Apr 2005 20:47:15 -0400

Thanks for the info. I probably need to clarify just a little bit
more. But I'll also confess I'm not completely sure of what I write
since it is inferred from the paranoia code. 

In contrast to the way other things that read audio data off of a CD
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
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
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.

It's for this "drive endianness" that we go through the hassle of SCSI

On GNU/Linux it's not the device name that's important (/dev/sg0 or
/dev/scd0 vs /dev/hda) it's the major number on the device. For
example on my home box:

# 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

so the claim is that /dev/hdc is some sort of IDE device which
cdparanoia then uses to determine drive endian-ness.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]