From 4dfbfbaa57d53801560a1dbaa8438f11edbbbde9 Mon Sep 17 00:00:00 2001 From: Jasmine Cha Date: Tue, 13 Jun 2023 11:31:37 +0800 Subject: [PATCH] audio: spatial audio on spk - Enable EP4 (dev1 = 3) - Change Stereo Spatialier component id to 26 - Enable spatial audio on speaker - Add one more parameter for waves custom action. (OM=1, SM=3) Bug: 295577176 Test: manual test Change-Id: I7e14776b34571eed5a632a7b5769d1ea784fa8ee Signed-off-by: Jasmine Cha --- .../config/audio_platform_configuration.xml | 5 +++-- .../config/audio_policy_configuration.xml | 2 +- audio/tangorpro/config/mixer_paths.xml | 6 ++--- audio/tangorpro/tuning/waves/waves_config.ini | 21 ++++++++++-------- audio/tangorpro/tuning/waves/waves_preset.mps | Bin 44398 -> 71008 bytes device-tangorpro.mk | 3 ++- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/audio/tangorpro/config/audio_platform_configuration.xml b/audio/tangorpro/config/audio_platform_configuration.xml index fea8544..a8afc4c 100644 --- a/audio/tangorpro/config/audio_platform_configuration.xml +++ b/audio/tangorpro/config/audio_platform_configuration.xml @@ -188,7 +188,7 @@ - + @@ -288,6 +288,7 @@ + @@ -300,7 +301,7 @@ - + diff --git a/audio/tangorpro/config/audio_policy_configuration.xml b/audio/tangorpro/config/audio_policy_configuration.xml index 4c35125..15c529b 100644 --- a/audio/tangorpro/config/audio_policy_configuration.xml +++ b/audio/tangorpro/config/audio_policy_configuration.xml @@ -193,7 +193,7 @@ + sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx,ultrasound output,immersive_out"/> - + - + - + diff --git a/audio/tangorpro/tuning/waves/waves_config.ini b/audio/tangorpro/tuning/waves/waves_config.ini index 21b7a19..61f1cc4 100644 --- a/audio/tangorpro/tuning/waves/waves_config.ini +++ b/audio/tangorpro/tuning/waves/waves_config.ini @@ -30,6 +30,7 @@ SPEAKER_MUSIC = OM:1,SM:2,OST:OST_SPEAKER SPEAKER_SAFE_MUSIC = OM:1,SM:2,OST:OST_SPEAKER SPEAKER_SAFE_CALL = OM:1,SM:2,OST:OST_SPEAKER SPEAKER_MUSIC_2_1 = OM:6,SM:2 +SPEAKER_RESERVED_MUSIC = OM:1,SM:3,OST:OST_SPEAKER DOCKSPEAKER_MUSIC = OM:4,SM:2 DOCKSPEAKER_VOICE_MUSIC = OM:7,SM:2 @@ -39,7 +40,7 @@ DOCKSPEAKER_VOICE_MUSIC = OM:7,SM:2 # This can be configured by Waves or platform vendor. ######################################################################################################## [HAL_SUPPORTED_CONTROLS] -SPEAKER_INSTANCE = INSTANCE:1,DEV:0,SR:SR_COMMON,PRESET:SPEAKER_MUSIC|SPEAKER_SAFE_MUSIC|SPEAKER_SAFE_CALL|SPEAKER_MUSIC_2_1 +SPEAKER_INSTANCE = INSTANCE:1,DEV:0,SR:SR_COMMON,PRESET:SPEAKER_MUSIC|SPEAKER_SAFE_MUSIC|SPEAKER_SAFE_CALL|SPEAKER_MUSIC_2_1|SPEAKER_RESERVED_MUSIC DOCKSPEAKER_INSTANCE = INSTANCE:4,DEV:0,SR:SR_COMMON,PRESET:DOCKSPEAKER_MUSIC|DOCKSPEAKER_VOICE_MUSIC [COEFS_CONVERTER_SETTING] @@ -54,14 +55,16 @@ AlgFxPath64=/vendor/lib64/libAlgFx_HiFi3z.so #AudioFormatIncrement=8 [CUSTOM_ACTION_259] -CASE_1=PRIORITY:0,NUMBERS:2:0|1:0,PRESET:SPEAKER_MUSIC -CASE_2=PRIORITY:1,NUMBERS:1|2|4194304:2|3|4:0|1,PRESET:SPEAKER_SAFE_CALL -CASE_3=PRIORITY:2,NUMBERS:1|4194304:0|1:0|1,PRESET:SPEAKER_SAFE_MUSIC -CASE_4=PRIORITY:3,NUMBERS:4096|16384|67108864:0|1|4:0|1,PRESET:DOCKSPEAKER_MUSIC -CASE_5=PRIORITY:4,NUMBERS:2:0|1:1,PRESET:SPEAKER_MUSIC_2_1 -CASE_6=PRIORITY:5,NUMBERS:4096|16384|67108864:2|3:0|1,PRESET:DOCKSPEAKER_VOICE_MUSIC +CASE_1=PRIORITY:0,NUMBERS:2:0|1:0:0,PRESET:SPEAKER_MUSIC +CASE_2=PRIORITY:1,NUMBERS:1|2|4194304:2|3|4:0|1:0|1,PRESET:SPEAKER_SAFE_CALL +CASE_3=PRIORITY:2,NUMBERS:1|4194304:0|1:0|1:0|1,PRESET:SPEAKER_SAFE_MUSIC +CASE_4=PRIORITY:3,NUMBERS:4096|16384|67108864:0|1|4:0|1:0|1,PRESET:DOCKSPEAKER_MUSIC +CASE_5=PRIORITY:4,NUMBERS:2:0|1:1:0|1,PRESET:SPEAKER_MUSIC_2_1 +CASE_6=PRIORITY:5,NUMBERS:4096|16384|67108864:2|3:0|1:0|1,PRESET:DOCKSPEAKER_VOICE_MUSIC +CASE_7=PRIORITY:6,NUMBERS:2:0|1:0:1,PRESET:SPEAKER_RESERVED_MUSIC -# Action 259 parameters: audio_devices_t, audio_mode_t, is_dock_speaker_active_t +# Action 259 parameters: audio_devices_t, audio_mode_t, is_dock_speaker_active_t, is_spatial_audio_active_t # - audio_devices_t : current active device # - audio_mode_t : 0 - normal, 1 - incoming, 2 - voice call, 3 - voip -# - is_dock_speaker_active_t: 0 - Disabled, 1 - Enabled \ No newline at end of file +# - is_dock_speaker_active_t: 0 - Disabled, 1 - Enabled +# - is_spatial_audio_active_t: 0 - Disabled, 1 - Enabled diff --git a/audio/tangorpro/tuning/waves/waves_preset.mps b/audio/tangorpro/tuning/waves/waves_preset.mps index 36d7de5a16e7d6296efd7747f920aa6492dcddb4..50e9600853ea99ed82db1f161df3c689cf5ef339 100644 GIT binary patch delta 1858 zcmeH{&rcIU6vt=Ux~&xoBw&c46z~UX5Gw=(1$IRY7$~i=8X<*Ep{OLKG=M!25+JEi z6GI@6n;5+qp+$)9g~Wrz8%a5EBgP*bkc-A}GTv~eGrMi|Utp3>zHdG=+qdt#Z+?B! z?L-arjjn5sdwCe;A%w7zOh~Uo_!vSKs>#?OKi%Ql&y+Mpn8hA&=^ip8FQDqE)7Rk<*AmmhM&x0nq^mos6uw^+q( z)9N$Bu)1u6=#m+_d~OX#LR>19eNLOOZN}T?p+r(#(xjM7Pl{uj6qht9E@@IsrYFTQ zO^V6%q*NRUWieTWuntp4U@MZFL4-*)McIwKEHZi)v1ic|hRra2vu=UKV2RFf)C5wG z4L(K-dF+FmQ#KG{4LqKQ=OiwVW=YSfmbRq47GAS5->V6E`+k6UYd;*BKP7r}MvG(HRG3>D{tuO&wk z<*&EX;C^EK7M)45FDltL_HZtJ6NC&>D2e{SxbP@*eS)qW92|Uz$9Dl6143dade@SJ zaXAEM^WlZbg3FW@)3`tiqFl^sv_R)8ixRKj(w8ipB(=&$sEZhkQBIpT;2ZAs2K!`Q zHH4rHj~~_zDbC@I3{tm;%EW}uAULhqX`M`TD3`QDnN01_t|M%t*fYo#?N5G$_9v66 z{aL~{()MIDwLR~sG!iOh^cl6Vh+0UU&vp$CjSPAFM-CnQ_sdUraBLor&3{ff$R%}< z$y5hD0>|`@<&t{HCH0WWR1b?)Oig4s)kL?3$sNluxnuR(9eaWpsok;2g|%Q`{0pT0 B27>?q delta 518 zcmaE`isjucCUvI(N8hxy3=EcB6qBkj1PL zVixahrVx^vTac4jlByq)T3n*w8xX9Zt6*ecWTb0osB2`Hv4(+xg>ADDfeiFPn%VqzJLc{i~Q#{Acs2V>q%@`EuAlfz)l-ekDw!(_M#u_<*h1rJkTqMKt= z{pH!t&u2V8-v(?mlnJsK$^_XAWrA#mi2`kgGC?*&nIM~?Opwh`Cdg)(XiAw9gsH*6 z$ixT?ClF>};Po%cOwB7vEXmBzi#OaX-MK)4Ek2JiKCg4~!IgFF5ayK0_Y&nNr>@F_ z@?9qXZ+{Fp;~+<3x1TJT)9>as2rpQ0NFpY-T(jq diff --git a/device-tangorpro.mk b/device-tangorpro.mk index bec0315..57dd148 100644 --- a/device-tangorpro.mk +++ b/device-tangorpro.mk @@ -114,7 +114,8 @@ PRODUCT_PROPERTY_OVERRIDES += \ # declare use of spatial audio PRODUCT_PROPERTY_OVERRIDES += \ - ro.audio.spatializer_enabled=true + ro.audio.spatializer_enabled=true \ + persist.vendor.audio.spatializer.speaker_enabled=true # Bluetooth OPUS codec PRODUCT_PRODUCT_PROPERTIES += \