clover: Use voice speaker ACDB id for speaker

* Speaker isn't properly calibrated with ACDB from O-based MIUI (while
   it was on N), pop is heard when disabling speaker.
 * MIUI has speaker protection enabled, hence this route isn't even
   used by Xiaomi. However, with speaker protection enabled on Lineage,
   the volume curve became very strange, maybe Xiaomi uses Dirac audio
   effect to address this issue on MIUI, but it's not supported on AOSP.
 * Fortunately voice speaker seems to be properly calibrated, so apply
   that route to fix the issue.
 * Voice speaker gain in ACDB seems to be lower than speaker, so
   slightly increase gain in mixer paths to make it sound like a "normal"
   speaker.

Change-Id: Ic674973933595db0ae797a7fa767539a321664ff
This commit is contained in:
dianlujitao 2018-10-02 19:46:38 +08:00 committed by Max Weffers
parent 6399b3ff6b
commit 7c657543be
No known key found for this signature in database
GPG key ID: 795F73D22FB93FAE
2 changed files with 3 additions and 3 deletions

View file

@ -75,7 +75,7 @@
<param key="input_mic_max_count" value="4"/>
</config_params>
<acdb_ids>
<device name="SND_DEVICE_OUT_SPEAKER" acdb_id="15"/>
<device name="SND_DEVICE_OUT_SPEAKER" acdb_id="14"/>
<device name="SND_DEVICE_OUT_SPEAKER_PROTECTED" acdb_id="124"/>
<device name="SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED" acdb_id="101"/>
<device name="SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT" acdb_id="124"/>

View file

@ -318,8 +318,8 @@
<ctl name="RX1 Digital Volume" value="84" />
<ctl name="RX2 Digital Volume" value="84" />
<ctl name="RX3 Digital Volume" value="84" />
<ctl name="RX4 Digital Volume" value="84" />
<ctl name="RX5 Digital Volume" value="84" />
<ctl name="RX4 Digital Volume" value="88" />
<ctl name="RX5 Digital Volume" value="88" />
<ctl name="ADC1 Volume" value="4" />
<ctl name="ADC2 Volume" value="4" />
<ctl name="ADC3 Volume" value="4" />