hal: add support to override volume gain to step mapping table
- if customer mapping is added in platform info file, use that
- in absence of customer table use default mapping
CRs-fixed: 1089771
Change-Id: I2139a085235f4c8f7bd99eba61bd02e4d7a3920b
diff --git a/configs/msm8998/audio_platform_info.xml b/configs/msm8998/audio_platform_info.xml
index a8bce46..bdf6a46 100644
--- a/configs/msm8998/audio_platform_info.xml
+++ b/configs/msm8998/audio_platform_info.xml
@@ -74,6 +74,13 @@
<!-- In the below value string, the value indicates sidetone gain in dB -->
<param key="usb_sidetone_gain" value="35"/>
</config_params>
+ <gain_db_to_level_mapping>
+ <gain_level_map db="-59" level="5"/>
+ <gain_level_map db="-17.4" level="4"/>
+ <gain_level_map db="-13.8" level="3"/>
+ <gain_level_map db="-10.2" level="2"/>
+ <gain_level_map db="0" level="1"/>
+ </gain_db_to_level_mapping>
<backend_names>
<device name="SND_DEVICE_OUT_HEADPHONES" backend="headphones" interface="SLIMBUS_6_RX"/>
<device name="SND_DEVICE_OUT_LINE" backend="headphones" interface="SLIMBUS_6_RX"/>