Re: Music CD's

From: David Elliott (dfe@infinite-internet.net)
Date: Wed Apr 05 2000 - 12:23:48 EST


"Dr. Kelsey Hudson" wrote:

> > Depends on your view point. There are tracks , that could be interpeted
> > as files.
> > True there are no directories , unless you count sessions as ones ...
>
> ...yeah. But in most cases one would not want to consider a track as a
> file, since they are written in raw bit format to the CD. There is no file
> descriptor, anything.
>

Yeah.. this is kind of what I have been trying to explain in other threads of
this. However, the kernel hooks *DO* exist (codafs) if someone really wanted
to do this. Doing all of this in the kernel is definitely a bad idea. So
assuming everyone agrees on that, then this is no longer a kernel related
discussion.

>
> > They wont read the data. They will send a PLAY command to the drive,
> > which would
> > then read the data, convert it to analog form, send that thru a wire to
> > the
> > sound card, where it is mixed to the Line-out if the card.
>
> this is true...
>

Worse yet, good cards may have a digital mixer which means there is an
additional A->D, mix, D->A sequence. Of course you can always use the
S/PDIF cable in that case.

>
> > <going off topic ...>
> > I prefer the normal way : read the data , send it to /dev/audio,
> > like with music from hard-drives, floppies , ZIP media , MO disks ...
>
> if you do that then you waste CPU cycles
> why read the data off the disc, (which takes cpu cycles), pipe the data to
> /dev/audio (more cpu cycles), have sound card interperet it (even MORE CPU
> cycles), and then finally output to speakers? Why not let the
> microcontrollers in the CD-ROM firmware do that for you? Makes a lot more
> sense to me.
>

USB Audio. ;) Take a look at Microsoft's WDM CDDA interface. It allows apps
to send the standard CD play commands and then actually plays the data on the
drive normally but takes the somewhat munged digital data from the cd player
and outputs it to the soundcard. By somewhat munged I mean having gone
through your basic CD player filters like interpolating or muting. This is
necessary to play a disc if you have USB audio. Of course I wouldn't use it
to grab the audio off the disc for professional copying purposes, but if you
just want to play the audio, it's a good idea.

The thing is though, that there ISN'T a standard CD play interface in the
Linux kernel, so I am of the opinion that it should probably stay that way.
Again, if someone wants to use codafs to do some sort of user space
FS hacking, more power to them. I would never use it in an audio app, but
maybe for playing around: Look ma: cat /dev/cdrom/track01 > /dev/null makes
the cd player waste CPU cycles copying the digital data into the bit bucket
and sending the digital data out to the soundcard through another means
(either through the S/PDIF cable or converting to analog then going to the
soundcard). Of course you could also cat /dev/cdrom/track01 > /dev/audio then
if your soundcard didn't have a cable connecting it to the CD-ROM.

Of course this is all non-kernel related, the kernel hooks are present
already, anyone can use them for whatever.

-Dave

-
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/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:15 EST