[alsa-devel] Fwd: Writing a new plugin for ALSA

Nobin Mathew nobin.mathew at gmail.com
Tue Jul 10 12:59:44 CEST 2007

Read through this, and you can ask more to this guy. This guy
implemented alsa-lib and lot of other things in  alsa.

Please copy alsa-devel at alsa-project.org when you mail him, so that
others in mailing list will also benefit.

---------- Forwarded message ----------
From: Nobin Mathew <nobin.mathew at gmail.com>
Date: Jul 9, 2007 5:29 PM
Subject: Writing a new plugin for ALSA
To: Takashi Iwai <tiwai at suse.de>
Cc: ALSA devel <alsa-devel at alsa-project.org>


I am trying to write a new ALSA plugin, like dmix.

My intend is to give priority to streams, i will not do up sample and
down sample as we do in the case of dmix.

If we do up sample and down sample then I think it will take lot of cpu.

In my case I have three streams audio, bluetooth sco and Navigation sound data.

priority is audio < sco < Nav

audio rate is 44100hz, sco rate is 8000hz

when sco is up audio should pause playback and audio should continue
when sco is finished. I dont want to do software mixing. Thats why I
am trying to write this new plugin.

Assume that audio is active first, then sco comes to active state. So
what i will do is in the library i will put audio app in sleep(), and
re-configure the pcm for sco. Once sco is finished i will re-configure
pcm for audio again like wise.

so my question is there any api in the alsa-lib to take a copy of pcm
structures, so when audio comes back gain i can use these saved pcm
conf to that.

Is there any api in the alsa-lib to reset the pcm structure to
initialized state, means state just after open.

Nobin Mathew

More information about the Alsa-devel mailing list