androidalsamixertinyalsa

How can i change the gains of the mic and pcm in android


I successfully completed the integration of my own aec into android.

But what i need is i have to set the gains of the mic and pcm of the android because in my aec i am applying agc to the farend and nearend signal and then i procees the output of that agc for echo cancelation.

After that i will apply noise reduction on the output of the aec.

When i integrate my aec into the gstreamer there is a command like

alsamixer

for setting the gain levels.

When i set some gain levels my aec is working fine.

But in android how can i set this to make my aec work well.


Solution

  • Use mixer_open to open the control device, find the pointer(s) to your control(s) with the mixer_get_* functions, and use mixer_ctl_set_value to change it.

    See tinymix.c for an example.