Subject: Re: audio interface change proposal
To: Wojciech Puchar <wojtek@chylonia.3miasto.net>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 03/24/2002 18:32:20
Yes, it would be very nice, but with the current kernel design it's very
difficult. There are several problems:
* the device driver open() function gets called on every open, but
the close() routine is only called on the final close. So you can't
keep track of how to mix channels.
* there is no way to find out to which open() a certain read()/write()
belongs to, so you can't really know how to mix anyway.
(You're not the first one who thought this would be nice. :)
Both of these problems would go away (I think) if we could do
cloning devices. With the current kernel design that's really,
really messy. But with the stuff that's on the devvp branch
(I think that's the name) it's much easier.
So get the devvp branch ready for a merge and we'll be much closer
to what you want.
-- Lennart
Wojciech Puchar wrote:
> It would be very nice to allow /dev/sound and/or /dev/audio to be opened
> twice - one for reading and one for writing instead of requiring both
> input and output to be driven by one program.
>
> it would be very nice