[alsa-devel] Writing a new plugin for ALSA
Nobin Mathew
nobin.mathew at gmail.com
Mon Jul 9 13:59:17 CEST 2007
Hi,
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.
Thanks
Nobin Mathew
More information about the Alsa-devel
mailing list