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.

DL1_GAIN/DL2_GAIN in alsa

It seems like the DL1_GAIN and DL2_GAIN are hard coded settings. Can these gains be changed using alsa_amixer commands in the Gingerbread release? Or does it require changing the values in file kernel/android-2.6.35/sound/soc/omap/omap-abe.c and recompiling?

Thanks

R.A.Raghuvir

  • Hi Raghuvir,

    It should be hardcoded, why do you say that?

    How are you trying to change the values?, can you provide more information on what you are doing?

  • I would like to change the gain on the fly, using alsa_amixer, in the various stages downlink path before deciding on the best values. There are three gain stages. 1. Before the DL1/DL2 mixer whose gain can be changed with alsa_amixer.  2.DL1_GAIN/DL2_GAIN whose values cannot be changed with alsa_amixer 3.  In the Codec, whose gain also can be changed with alsa_amixer.

    It looks like DL1_GAIN and DL2_GAIN cannot be changed with alsa_amixer.  Is this understanding correct?

  • Yes you are right, there is no control to change the DL1 and DL2 gains, but that doesn't mean that is not possible, probably ABE supports that but the ABE HAL doesn't have the control to do that, but probably is not needed because the gains before the DL1/DL2 mixer and in the CODEC are enough.

    What release are you using?, I can take a look into the ABE to confirm if that is possible if you need.

  • The base is L27.13.1 kernel release, but we back ported the ABE from ICS.

  • Ok, I have look at the ABE API and HAL and the gains for the DL1 and DL2 components are implemented in the API, just that in the ABE HAL there is no widget for change those values because as I previously mentioned it is not needed, currently those gains are just used to mute/unmute the stream is flowing in the path. You can see that by looking for the GAINS_DL1 and GAINS_DL2.

    Now if you want to modify those values by setting a value to an ALSA control you just need to add the control and call the ABE APIs to modify the values at ABE level (abe_write_gain). You can take other widgets as examples.

    For more information about ABE you can take a look to the following document: http://www.ti.com/litv/pdf/swpu245h