[alsa-devel] question on hardware mixing

David Dillow dave at thedillows.org
Tue Dec 9 13:44:25 CET 2008


On Tue, 2008-12-09 at 14:25 +0530, Harsha, Priya wrote:
> If I define mixer controls to switch between each substream, I would
> not be able to handle multiple streams at time....

Check into the ALSA configuration file syntax -- there are number of
things you can do there, like define a 'voice' device that uses hooks to
set a control setting (snd_kcontrol) when you open a PCM. You can use
that control setting to let your driver know if the PCM channel is being
used for voice or audio traffic.

Look at how the EMU10K1 handles surround sound audio
in /etc/alsa/cards/EMU10K1.conf

I started to do some similar things for sis7019 surround sound, but
they've never made it out of my office due to lack of time/testing HW.

> I had asked this in my earlier follow up email as well - can I use
> snd_pcm_t->private_data to communicate if it's a voice or audio 
> I understand this private_data gets copied to substream->private data
> which will reach the driver...
> Am I right here?

I can't answer this specifically, but I believe the answer is in the
name -- 'private'. This is for the ALSA system to use, you can hang your
own data off a substream using snd_pcm_substream_chip(). Besides, how do
you plan on setting it in the snd_pcm_t type?

I think that if you set up some controls, use the config file language,
and have your audio apps open a 'voice' device, you can get where you
want. 

Dave



More information about the Alsa-devel mailing list