[vox-tech] update on the audio CD problem

Bill Kendrick nbs at sonic.net
Fri Jan 27 17:20:48 PST 2006


On Fri, Jan 27, 2006 at 07:38:30PM -0500, Peter Jay Salzman wrote:
> > So in this case, the only time the PC's CPU is used is to tell the CD player
> > "Play", then it sits idle.  Everything is done by the CDROM drive.
> 
> you're not thinking low level enough.  system calls are performed by the
> kernel.  when a read() is performed, the kernel reads data from a file
> abstraction of a hardware device.  the data is in kernel space.  the data
> must be recopied into user space.
> 
> now the kernel must execute write().  it reads data in user space back into
> kernel space to perform the write() to the sound card's file abstraction.

This is not at all what I understood as "analog extraction."  Maybe I
misunderstood the terminology used earlier.

However, what you describe above _sounds_ like what was called "digital"
earlier in the thread, and is therefore far less efficient (CPU-wise) than
what I understood as "analog".  Which was the only comment I was making. :^)

(The playback that I'm describing as _more_ efficient, CPU-wise, is where
the CPU simply instructs the CD drive to "play" (probably an ioctl()?), and
that's the end of it.  The rest is handled by the CD drive itself, and
even the sound card has little involvement, except as the physical
place where the CD's Line-Out and your speakers are connected.
I think I've even shut down my Linux box, and the CD audio was still playing
right up until the end, long after all of the userspace apps were terminated.)


> not quite.  with digital extraction, DMA transfer is used to transfer data
> directly from the ATA device to userland memory.  that's the whole point of
> DMA transfer.

Yeah, but again my point was: that's a hell of a lot less efficient than
when you don't have the CPU involved at _all_[*].

And I think like Micah said (or maybe that Y-connector website he ref'd did),
some CD drives have "play" buttons on them.  Pressing that button is about
the same as telling KsCD to play the CD.  (And this is _different_ from what
I was understanding "digital extraction" -- with or without DMA involvement --
to be.)

Hopefully I'm not being too unclear.  I'm kinda distracted by 9-5 work.

[*] Except for sending commands ("Play", "Seek", "Stop", etc.) to the drive.

-- 
-bill!                                    Tux Paint 2006 wall calendar,
bill at newbreedsoftware.com                CDROM, bumper sticker & apparel
http://www.newbreedsoftware.com/       http://www.cafepress.com/newbreedsw


More information about the vox-tech mailing list