[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cdi-devel] Proposed Sound Infrastructure
On Sun, Nov 22, 2009 at 11:05:09PM +1000, Matthew Iselin wrote:
> Recently there was discussion on this list about a sound device
> interface, which serves the purpose of interfacing with sound hardware
> directly (ie, sending streams to the device without mixing). Before I
> continue, I would like to make clear that I approve of this interface.
> The problems pointed out with it may well be solved in this proposed
> I would like to propose a multi-tier infrastructure for sound provided by CDI:
> Applications <------> CDI Mixer <------> Sound devices (CDI)
> - The "CDI Mixer" is a generic mixer which is provided with CDI and
> can sit between hardware and applications/kernel code.
> - Sound devices would use the same interface proposed recently on this list.
> - Applications would access the mixer by some OS-defined protocol.
Right, so nobody else seems to volunteer with commenting on your mail. We
discussed the proposal of a generic mixer and came to the conclusion
that it's a good thing (surprise). However, during the discussion a few
points came up that I'd like to summarize here so they will be
considered when we actually start with the detailed design.
* We need to support at least two different kinds of OSes. This make a
difference foremost for the interface between mixer and hardware
driver. The monolithic case is easy, as usual. In other OSes, each
hardware driver might sit in its own process and the mixer in another
one. We need to support a model where the communication uses some RPC
model (and for tyndur I'd prefer to use shared memory for the data)
So both of the arrows above would end up as OS specific code.
* We need to support hardware mixers. Drivers tell the mixer how many
streams they can do in hardware and the CDI mixer sends the number as
an additional parameter. Don't know how it looks in detail, but
something like this.
I thought it would be more than these two points, but better than nothing.
> I do believe that this needs further discussion, and as such I am
> merely proposing the infrastructure at this stage. Things to still
> consider include linking the mixer to sound hardware (in a generic,
> OS-independent manner),
The mixer will need a method to enumerate all sound devices. I think
this would be part of the OS specific driver/mixer interface. The mixer
would probably expose this list to the applications so they could
select the output device they want to use.
Do you agree with our thoughts so far?