I just have some questions related to Android Architecture for audio
(ECLAIR version).
a.Can we use the ALSA mixer(DMIX-i enabled in my system) for mixing
streams instead of android mixer?If yes then how?
b.Can we use re-sampler code of alsa instead of android re-sampler?
Why this facility of alsa not exploited or given the OEM's some way to
use their own code if they have better re-sampler and mixer codes
available through ALSA?????
Best Regards,
ani
2010/1/18 ani <anish198...@gmail.com>:
> --
> unsubscribe: android-porti...@googlegroups.com
> website: http://groups.google.com/group/android-porting
>
I have compiled this c file and DMIX is working for me.
My questions are still the same:
No, dmix requires posix shared memory and Android doesn't support it.
This (http://gitorious.org/android-on-freerunner/platform_bionic/
commit/f7fc4a3c25d71017f8327563d182396e35a259cd) is the change which
we need to do to enable shared memory in android and then we need to
back port some changes which you did to eliminate shared memory support
(http://android.git.kernel.org/?p=platform/external/alsa-
lib.git;a=commitdiff;h=8cc17854263f1cd30e4ef852ae13a010ab170a2f).
DMIX is working for me and i am able to mix the streams:
alsa_aplay -D plug:DMIX some.wav | alsa_aplay -D plug:DMIX some1.wav
(If you don't agree then suppose the DMIX is supported by my platform
then how can i do the below thing)
I want to disable the AudioMixer.cpp code so that it doesn't do the
mixing and straight away pass the pcm samples to alsa.How can i do
it??
My other query can you please answer:
The simple answer to your questions below is that POSIX shared memory
will not be supported by Google, so this is all moot. The commit
mentioned below will most likely never be accepted by Google. You can
use the dmixer support if you like, but you'll have to do a number of
things in audioflinger to remove the software mixer. Eclair audio has
made some advances in hardware audio mixing, but it is not there yet
and I'm not sure what any of it will look like in future releases.
Cheers,
Sean
Based on Sean's answer, we must do mixing in Android, low level dmix/
dsnoop cannot be supported anymore.
Now, I have to run a existed library with Android UI, which need
access ALSA device, but integrate it into Android is complex. And,
maybe I can not get the source code, only binary. So, I must select
anl's solution? Do you have any other suggestion?