This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP4 Android ALSA "lock" parameters?

We are working with a customer on an existing customer product.  This product has an OMAP4430 running Android Gingerbread, based off of the L27.INC1.13.1 OMAP4 release.

They desire a way to test the audio subsystems through an Android app, modifying ALSA parameters directly and then testing them with other Android applications (SoundRecorder, etc.).  By default, Android will adjust ALSA settings as needed with values that are in many cases hard coded into the source.

As a simple example, change the DMIC1 UL gain directly and then record some audio to verify that this input gain had changed.  Currently most Android applications would fix this gain at 120 (0dB) by default.  If it is changed to something else via alsa_amixer, say 100 (-20 dB), then fire up another test applications, it would be desired that the DMIC1 UL gain setting to remain at 100 and not be set back to 120.

Is there a clean way to "lock" or otherwise freeze ALSA settings so that other Android applications will not modify them through the media server?  Other than additional code to implement such a "lock" feature.

Thanks in advance.

  • Joe,

    There is no mechanism to lock the parameters as you wanted. This is because of Andorid design where only AudioFlineger is changing the ALSA related parameters. But it is certainly achievable by doing code changes in AudioFlinger accordingly.

    However there is some level of control available on the Android Java layer which might be helpful to you in some case.

    Regards,

    Chintan