Skip to content

Commit

Permalink
cancro: dynamic mixer paths and mtp
Browse files Browse the repository at this point in the history
Load device-specific audio configs if running on mi3 or mi4 as miui does

Inspired by Virooque and MrBanks work

Change-Id: Ic01ae1ccc47fb7154c60e4cffee244c64b037687
Signed-off-by: jrizzoli <[email protected]>
  • Loading branch information
jrizzoli committed Feb 3, 2016
1 parent 4a5ce0c commit 936a495
Show file tree
Hide file tree
Showing 19 changed files with 1,560 additions and 43 deletions.
Binary file modified audio/acdb/MTP/MTP_Bluetooth_cal.acdb
Binary file not shown.
Binary file modified audio/acdb/MTP/MTP_General_cal.acdb
Binary file not shown.
Binary file modified audio/acdb/MTP/MTP_Global_cal.acdb
Binary file not shown.
Binary file modified audio/acdb/MTP/MTP_Handset_cal.acdb
Binary file not shown.
Binary file modified audio/acdb/MTP/MTP_Hdmi_cal.acdb
Binary file not shown.
Binary file modified audio/acdb/MTP/MTP_Headset_cal.acdb
Binary file not shown.
Binary file modified audio/acdb/MTP/MTP_Speaker_cal.acdb
Binary file not shown.
Binary file added audio/acdb/MTP_4/MTP_Bluetooth_cal.acdb
Binary file not shown.
Binary file added audio/acdb/MTP_4/MTP_General_cal.acdb
Binary file not shown.
Binary file added audio/acdb/MTP_4/MTP_Global_cal.acdb
Binary file not shown.
Binary file added audio/acdb/MTP_4/MTP_Handset_cal.acdb
Binary file not shown.
Binary file added audio/acdb/MTP_4/MTP_Hdmi_cal.acdb
Binary file not shown.
Binary file added audio/acdb/MTP_4/MTP_Headset_cal.acdb
Binary file not shown.
Binary file added audio/acdb/MTP_4/MTP_Speaker_cal.acdb
Binary file not shown.
83 changes: 54 additions & 29 deletions audio/mixer_paths.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
<ctl name="LINEOUT2 Volume" value="12" />
<ctl name="LINEOUT3 Volume" value="12" />
<ctl name="LINEOUT4 Volume" value="12" />
<ctl name="HPHL Volume" value="22" />
<ctl name="HPHR Volume" value="22" />
<ctl name="RX1 Digital Volume" value="89" />
<ctl name="RX2 Digital Volume" value="89" />
<ctl name="HPHL Volume" value="20" />
<ctl name="HPHR Volume" value="20" />
<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" />
Expand Down Expand Up @@ -57,7 +57,7 @@
<ctl name="SLIMBUS_0_RX Port Mixer SLIM_0_TX" value="0" />
<ctl name="INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2" value="0" />
<ctl name="INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3" value="0" />
<ctl name="SLIMBUS_0_RX Port Mixer INT_BT_SCO_TX" value="0" />
<ctl name="SLIMBUS_0_RX Port Mixer INTERNAL_BT_SCO_TX" value="0" />
<ctl name="AUX_PCM_RX Audio Mixer MultiMedia5" value="0" />
<ctl name="AUX_PCM_RX_Voice Mixer CSVoice" value="0" />
<ctl name="SEC_AUX_PCM_RX_Voice Mixer CSVoice" value="0" />
Expand All @@ -71,7 +71,7 @@
<!-- Voice BTSCO -->
<ctl name="Internal BTSCO SampleRate" value="8000" />
<ctl name="INTERNAL_BT_SCO_RX_Voice Mixer CSVoice" value="0" />
<ctl name="INTERNAL_BT_SCO_RX Audio Mixer Multimedia6" value="0" />
<ctl name="INTERNAL_BT_SCO_RX Audio Mixer MultiMedia6" value="0" />
<ctl name="MultiMedia6 Mixer SLIM_0_TX" value="0" />
<ctl name="Voice_Tx Mixer INTERNAL_BT_SCO_TX_Voice" value="0" />
<ctl name="HDMI_RX_Voice Mixer CSVoice" value="0" />
Expand All @@ -80,7 +80,7 @@
<ctl name="SLIMBUS_4_RX Audio Mixer MultiMedia2" value="0" />
<ctl name="MultiMedia5 Mixer SLIM_0_TX" value="0" />
<ctl name="MultiMedia5 Mixer AFE_PCM_TX" value="0" />
<ctl name="MultiMedia4 Mixer MI2S_TX" value="0" />
<ctl name="MultiMedia2 Mixer MI2S_TX" value="0" />
<ctl name="MultiMedia1 Mixer MI2S_TX" value="0" />
<ctl name="MultiMedia1 Mixer SLIM_0_TX" value="0" />
<ctl name="MultiMedia1 Mixer SLIM_4_TX" value="0" />
Expand Down Expand Up @@ -209,10 +209,6 @@
<!-- QCHAT End -->

<!-- anc headset -->
<!-- speaker anc combo -->
<ctl name="RX4 DSM MUX" value="CIC_OUT" />
<ctl name="RX6 DSM MUX" value="CIC_OUT" />
<!-- speaker anc combo end -->
<!-- IIR/voice anc -->
<ctl name="IIR1 Band1" id ="0" value="268435456" />
<ctl name="IIR1 Band1" id ="1" value="0" />
Expand Down Expand Up @@ -280,7 +276,7 @@
<ctl name="SLIMBUS_5_TX LSM Function" value="None" />
<ctl name="MADONOFF Switch" value="0" />
<ctl name="VIONOFF Switch" value="0" />
<ctl name="MAD Input" value="DMIC1" />
<ctl name="MAD Input" value="ADC5" />
<!-- listen end-->
<!-- afe-proxy -->
<ctl name="AFE_PCM_RX Audio Mixer MultiMedia2" value="0" />
Expand All @@ -300,6 +296,10 @@
<path name="deep-buffer-playback" />
</path>

<path name="deep-buffer-playback speaker-and-headphones">
<path name="deep-buffer-playback" />
</path>

<path name="deep-buffer-playback speaker-and-hdmi">
<path name="deep-buffer-playback hdmi" />
<path name="deep-buffer-playback speaker" />
Expand Down Expand Up @@ -352,6 +352,10 @@
<path name="low-latency-playback" />
</path>

<path name="low-latency-playback speaker-and-headphones">
<path name="low-latency-playback" />
</path>

<path name="low-latency-playback speaker-and-hdmi">
<path name="low-latency-playback hdmi" />
<path name="low-latency-playback speaker" />
Expand Down Expand Up @@ -472,6 +476,10 @@
<ctl name="Voice_Tx Mixer SLIM_0_TX_Voice" value="1" />
</path>

<path name="voice-call speaker">
<path name="voice-call" />
</path>

<path name="voice-call hdmi">
<ctl name="HDMI_RX_Voice Mixer CSVoice" value="1" />
<ctl name="Voice_Tx Mixer SLIM_0_TX_Voice" value="1" />
Expand Down Expand Up @@ -674,6 +682,11 @@
<ctl name="Voip_Tx Mixer SLIM_0_TX_Voip" value="1" />
</path>

<path name="compress-voip-call speaker">
<ctl name="SLIM_0_RX_Voice Mixer Voip" value="1" />
<ctl name="Voip_Tx Mixer SLIM_0_TX_Voip" value="1" />
</path>

<path name="compress-voip-call bt-sco">
<ctl name="INTERNAL_BT_SCO_RX_Voice Mixer Voip" value="1" />
<ctl name="Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip" value="1" />
Expand Down Expand Up @@ -781,7 +794,7 @@
<ctl name="SLIM TX7 MUX" value="DEC2" />
<ctl name="DEC2 MUX" value="ADC5" />
<ctl name="DEC2 Volume" value="84" />
<ctl name="ADC5 Volume" value="0" />
<ctl name="ADC5 Volume" value="3" />
<ctl name="IIR1 INP1 MUX" value="DEC2" />
</path>

Expand All @@ -808,7 +821,7 @@
<ctl name="RX7 MIX1 INP1" value="RX1" />
<ctl name="COMP0 Switch" value="1" />
<ctl name="RX7 Digital Volume" value="84" />
<ctl name="SPK DRV Volume" value="10" />
<ctl name="SPK DRV Volume" value="8" />
</path>

<path name="speaker-fluid">
Expand All @@ -827,17 +840,17 @@
<ctl name="SLIM_0_RX Channels" value="Two" />
<ctl name="RX3 MIX1 INP1" value="RX1" />
<ctl name="RX5 MIX1 INP1" value="RX2" />
<ctl name="LINEOUT1 Volume" value="22" />
<ctl name="LINEOUT2 Volume" value="22" />
<ctl name="LINEOUT1 Volume" value="20" />
<ctl name="LINEOUT2 Volume" value="20" />
</path>

<path name="speaker-liquid">
<path name="speaker-DB" />
<ctl name="RDAC5 MUX" value="DEM3_INV" />
<ctl name="RDAC7 MUX" value="DEM5_INV" />
<ctl name="COMP2 Switch" value="1" />
<ctl name="LINEOUT3 Volume" value="22" />
<ctl name="LINEOUT4 Volume" value="22" />
<ctl name="LINEOUT3 Volume" value="20" />
<ctl name="LINEOUT4 Volume" value="20" />
</path>

<path name="sidetone-iir">
Expand Down Expand Up @@ -885,7 +898,7 @@
<ctl name="RX7 MIX1 INP1" value="RX1" />
<ctl name="COMP0 Switch" value="1" />
<ctl name="RX7 Digital Volume" value="84" />
<ctl name="SPK DRV Volume" value="10" />
<ctl name="SPK DRV Volume" value="8" />
</path>

<path name="vi-feedback">
Expand All @@ -912,11 +925,11 @@
<ctl name="SLIM TX7 MUX" value="DEC2" />
<ctl name="DEC2 MUX" value="ADC5" />
<ctl name="DEC2 Volume" value="84" />
<ctl name="ADC5 Volume" value="12" />
<ctl name="ADC5 Volume" value="3" />
<ctl name="SLIM TX8 MUX" value="DEC3" />
<ctl name="DEC3 MUX" value="ADC4" />
<ctl name="DEC3 Volume" value="84" />
<ctl name="ADC4 Volume" value="12" />
<ctl name="ADC4 Volume" value="3" />
<ctl name="SLIM_0_TX Channels" value="Two" />
</path>

Expand Down Expand Up @@ -995,14 +1008,28 @@
</path>

<path name="speaker-and-headphones">
<path name="headphones" />
<ctl name="SLIM RX1 MUX" value="AIF1_PB" />
<ctl name="SLIM_0_RX Channels" value="One" />
<ctl name="RX1 MIX1 INP1" value="RX1" />
<ctl name="RX2 MIX1 INP1" value="RX1" />
<ctl name="COMP1 Switch" value="1" />
<ctl name="CLASS_H_DSM MUX" value="DSM_HPHL_RX1" />
<ctl name="RX1 Digital Volume" value="84" />
<ctl name="RX2 Digital Volume" value="84" />
<ctl name="HPHL DAC Switch" value="1" />
<ctl name="HPHL Volume" value="20" />
<ctl name="HPHR Volume" value="20" />
<ctl name="RX7 MIX1 INP1" value="RX1" />
<ctl name="COMP0 Switch" value="1" />
<ctl name="RX7 Digital Volume" value="84" />
<ctl name="SPK DRV Volume" value="8" />
<ctl name="TI PA Gain" value="19" />
</path>

<path name="speaker-protected-and-headphones">
<path name="speaker-and-headphones" />
</path>

<path name="speaker-and-headphones-fluid">
<path name="headphones" />
<ctl name="RX7 MIX1 INP1" value="RX1" />
Expand Down Expand Up @@ -1067,8 +1094,6 @@
<ctl name="SLIM_0_RX Channels" value="Two" />
<ctl name="RX3 MIX1 INP1" value="RX1" />
<ctl name="RX5 MIX1 INP1" value="RX2" />
<ctl name="RX4 DSM MUX" value="DSM_INV" />
<ctl name="RX6 DSM MUX" value="DSM_INV" />
<ctl name="LINEOUT1 Volume" value="12" />
<ctl name="LINEOUT2 Volume" value="12" />
<ctl name="LINEOUT3 Volume" value="12" />
Expand All @@ -1079,8 +1104,8 @@
<ctl name="HPHL DAC Switch" value="1" />
<ctl name="HPHL Volume" value="14" />
<ctl name="HPHR Volume" value="14" />
<ctl name="RX1 Digital Volume" value="84" />
<ctl name="RX2 Digital Volume" value="84" />
<ctl name="RX1 Digital Volume" value="81" />
<ctl name="RX2 Digital Volume" value="81" />
<ctl name="ANC Slot" value="0" />
<ctl name="ANC1 FB MUX" value="EAR_HPH_L" />
<ctl name="ANC1 MUX" value="ADC3" />
Expand Down Expand Up @@ -1168,11 +1193,11 @@
<ctl name="SLIM TX7 MUX" value="DEC2" />
<ctl name="DEC2 MUX" value="ADC5" />
<ctl name="DEC2 Volume" value="84" />
<ctl name="ADC5 Volume" value="12" />
<ctl name="ADC5 Volume" value="3" />
<ctl name="SLIM TX8 MUX" value="DEC3" />
<ctl name="DEC3 MUX" value="ADC4" />
<ctl name="DEC3 Volume" value="84" />
<ctl name="ADC4 Volume" value="12" />
<ctl name="ADC4 Volume" value="3" />
<ctl name="SLIM_0_TX Channels" value="Two" />
</path>

Expand Down Expand Up @@ -1441,7 +1466,7 @@

<path name="listen-handset-mic">
<ctl name="MADONOFF Switch" value="1" />
<ctl name="MAD Input" value="DMIC1" />
<ctl name="MAD Input" value="ADC5" />
</path>

</mixer>
Loading

0 comments on commit 936a495

Please sign in to comment.