[paranoia-dev] Extending paranoia for digital playback

Benjamin Herrenschmidt benh at mipsys.com
Fri Jan 14 06:50:27 PST 2000



Hi !

I'm working on the Linux/PPC kernel (more specifically on the PowerMac
support). There is "feature" of the new powermacs (iBook, new iMacs and
G4) which is that the CD/DVD player analog output is _not_ wired to the
sound chip.

Basically, when playing CDs, MacOS now reads the audio datas via the
ATAPI and routes them to the audio driver.

So we need to provide the same solution for Linux users. Basically, what
we need is to route cdparanoia output to /dev/dsp. The problem with this
approach and the current cdparanoia implementation is that it uses
blocking writes to the output device. That means that cdparanoi reads a
bunch of audio datas from the CD and is then blocked while outputing
those datas to the audio driver. Obviously this doesn't work.

So my idea was to implement an option to cdparanoia that would spawn a
separate thread for the output. The current output routines would still
write to a memory buffer, and would block when the buffer is full,
waiting for a semaphore controller by the output thread. The ouput thread
on its side would write the content of the buffer to /dev/dsp and unblock
the write thread if blocked one it have made some room in the buffer.

What do you think of this approach ? Does it look ok to you ? Should I
make a separate tool using cdparanoia lib instead of adding an option to
cdparanoi ? Is this already handled by the beta version ? (I tried only
version III for now).

Regards,
Ben.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Paranoia homepage: http://www.xiph.org/paranoia/
To unsubscribe from this list, send mail to 'paranoia-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Paranoia-dev mailing list