MLK-19617 sound: asoc: fix amixer output gain control
authorCosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Mon, 24 Sep 2018 11:20:32 +0000 (14:20 +0300)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit664f512abe184150c7bf5f1b0b58e974230dc6b3
treeacadbac54b61938d36f926a7c7db26afea0d45fa
parentb09d2c771a49fa758dea46075117f6ff1e4d09d3
MLK-19617 sound: asoc: fix amixer output gain control

This bitfield represents a signed value gain and 0-7 represents +0 to +7
bits shift for output gain and 8-15 represents -8 to -1 bits shift for
output gain. Before this fix 0-47% was translated into 0 to +100% and
47% - 100% was translated into -100% to 0%.
We have added gain controls that remaps the each channel gain values
such that we go from lowest volume to highest.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit a5b612e9162b911b1965763167692c7ab1523466)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
sound/soc/fsl/fsl_micfil.c