From 0b65616ad57b0175a4d85282c5eb3a9752665f50 Mon Sep 17 00:00:00 2001 From: Jasmine Cha Date: Mon, 24 Oct 2022 16:25:46 +0800 Subject: [PATCH] audio: enable 2.1 mode with Waves Bug: 226525184 Test: manual test adb shell audio_waves_custom_actions_test Signed-off-by: Jasmine Cha Change-Id: Iacb3452a5169cb19d09c47778e271762715f1726 --- .../config/audio_platform_configuration.xml | 1 + audio/tangorpro/tuning/waves/waves_config.ini | 25 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/audio/tangorpro/config/audio_platform_configuration.xml b/audio/tangorpro/config/audio_platform_configuration.xml index 7115c4a..b8af786 100644 --- a/audio/tangorpro/config/audio_platform_configuration.xml +++ b/audio/tangorpro/config/audio_platform_configuration.xml @@ -241,6 +241,7 @@ + diff --git a/audio/tangorpro/tuning/waves/waves_config.ini b/audio/tangorpro/tuning/waves/waves_config.ini index 11f4d83..7588324 100644 --- a/audio/tangorpro/tuning/waves/waves_config.ini +++ b/audio/tangorpro/tuning/waves/waves_config.ini @@ -5,7 +5,7 @@ # Putting any value other than 1 would be equivalent to not supported. ######################################################################################################## [HAL_SUPPORTED_FEATURES] -CUSTOM_ACTION_256=1 +CUSTOM_ACTION_259=1 ######################################################################################################## # This defined the options of supported sample rates. @@ -29,7 +29,9 @@ OST_SPEAKER = 0:12,90:13,180:0|12,270:0|13 SPEAKER_MUSIC = OM:1,SM:2,OST:OST_SPEAKER SPEAKER_SAFE_MUSIC = OM:10,SM:2,OST:OST_SPEAKER SPEAKER_SAFE_CALL = OM:10,SM:2,OST:OST_SPEAKER +SPEAKER_MUSIC_2_1 = OM:6,SM:2 DOCKSPEAKER_MUSIC = OM:4,SM:2 +DOCKSPEAKER_VOICE_MUSIC = OM:7,SM:2 ######################################################################################################## # This defines available CONTROL configurations. Only define the CONTROL if you need it. @@ -37,8 +39,8 @@ DOCKSPEAKER_MUSIC = OM:4,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 -DOCKSPEAKER_INSTANCE = INSTANCE:4,DEV:0,SR:SR_COMMON,PRESET:DOCKSPEAKER_MUSIC +SPEAKER_INSTANCE = INSTANCE:1,DEV:0,SR:SR_COMMON,PRESET:SPEAKER_MUSIC|SPEAKER_SAFE_MUSIC|SPEAKER_SAFE_CALL|SPEAKER_MUSIC_2_1 +DOCKSPEAKER_INSTANCE = INSTANCE:4,DEV:0,SR:SR_COMMON,PRESET:DOCKSPEAKER_MUSIC|DOCKSPEAKER_VOICE_MUSIC [COEFS_CONVERTER_SETTING] AlgFxPath=/vendor/lib/libAlgFx_HiFi3z.so @@ -51,8 +53,15 @@ AlgFxPath64=/vendor/lib64/libAlgFx_HiFi3z.so #AudioFormatSampleSize=4 #AudioFormatIncrement=8 -[CUSTOM_ACTION_256] -CASE_1=PRIORITY:0,NUMBERS:2:0|1,PRESET:SPEAKER_MUSIC -CASE_2=PRIORITY:1,NUMBERS:1|2|4194304:2|3|4,PRESET:SPEAKER_SAFE_CALL -CASE_3=PRIORITY:2,NUMBERS:1|4194304:0|1,PRESET:SPEAKER_SAFE_MUSIC -CASE_4=PRIORITY:3,NUMBERS:4096|16384|67108864:0|1|2|3|4,PRESET:DOCKSPEAKER_MUSIC +[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 + +# Action 259 parameters: audio_devices_t, audio_mode_t, is_dock_speaker_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