lkml.org 
[lkml]   [1996]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: IDECD RAW mode support?
From
(Cc:d to the maintainer of the ide-cd driver due to the question at the
end.)

trn@gate.net wrote:
>I compiled a program that can read raw audio tracks on Linux and Slowaris
>machines., called cdda. When I ran it, it said an ioctl() call wasn't
>supported. It appears reading raw tracks from a CD is only supported in
>DOS, and the SCSI and SBCD drivers. Could we implement this under the
>ATAPI driver????

It is implemented in 2.0.0 (not in 1.2.13). The ioctl() is CDROMREADAUDIO,
and it's fairly straightforward to use - see <linux/cdrom.h>. Cdda2wav
supports it for Linux, though to get version 0.3alpha to compile, you need
to add the IDE major numbers to the device detection check (search for
"idecd" in interface.c and add "case 3: case 22:" there).
ftp://sunsite.unc.edu/pub/Linux/apps/sound/cds/cdda2wav-0.3alpha.tar.gz, I
think.

However, ide-cd.c seems to read only one frame (CD_FRAMESIZE_RAW=2352 bytes)
at a time (when asked to read multiple frames, it reads them one at a time),
and most CD-ROM drives (including my Hitachi 7730 :() can't position the
head at exactly one sector, so you get 2352-byte chunks of audio data from
somewhere near the sectors you requested... :(

It should be possible to fix this in software (looking for overlapping
chunks and working for there), and cdda2wav-sbpcd (a hack created by the
author of the sbpcd driver) does part of it, though I haven't been able to
get it to work yet (it read for a while and segfaulted, saving only one or
two sectors).

But I'm still left wondering as to why ide-cd.c reads raw audio only one
sector at a time. Is it something in the ATAPI specification, or has no one
implemented multi-sector raw reads? I imagine a multi-sector read would read
either proper consecutive frames or at least frames with something
resembling a constant amount of data missing between them...

--
-=- Rjs -=- rjs@spider.compart.fi - http://isil.lloke.dna.fi/rjs/
Which is better: well-written software or heavily marketed software?


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.043 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site