From cfef658f578ac9e447342f654f1e7da85b8469cc Mon Sep 17 00:00:00 2001 From: Ruchit M Date: Mon, 16 May 2022 14:25:55 +0530 Subject: [PATCH] Update audio HAL to v7 and disable DRC --- common.mk | 6 +-- configs/audio/audio_policy_configuration.xml | 47 ++++++++++---------- vibrator/Vibrator.h | 2 +- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/common.mk b/common.mk index 89150a7..f21430b 100644 --- a/common.mk +++ b/common.mk @@ -67,8 +67,8 @@ PRODUCT_PACKAGES += \ # Audio PRODUCT_PACKAGES += \ android.hardware.audio.service \ - android.hardware.audio@6.0-impl \ - android.hardware.audio.effect@6.0-impl \ + android.hardware.audio@7.0-impl \ + android.hardware.audio.effect@7.0-impl \ android.hardware.soundtrigger@2.2-impl \ audio.a2dp.default \ audio.r_submix.default \ @@ -98,7 +98,7 @@ PRODUCT_COPY_FILES += \ $(COMMON_PATH)/configs/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \ $(COMMON_PATH)/configs/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \ frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \ + frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration_7_0.xml \ frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \ frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \ frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ diff --git a/configs/audio/audio_policy_configuration.xml b/configs/audio/audio_policy_configuration.xml index 41feef5..2a6235e 100644 --- a/configs/audio/audio_policy_configuration.xml +++ b/configs/audio/audio_policy_configuration.xml @@ -1,8 +1,8 @@ - + - + @@ -17,7 +17,7 @@ Speaker - + @@ -27,8 +27,8 @@ + samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" + channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/> @@ -47,7 +47,8 @@ + samplingRates="44100 48000 64000 88200 96000 128000 176400 192000" + channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> + samplingRates="44100 48000 64000 88200 96000 128000 176400 192000" + channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_2POINT1 AUDIO_CHANNEL_OUT_QUAD AUDIO_CHANNEL_OUT_PENTA AUDIO_CHANNEL_OUT_5POINT1 AUDIO_CHANNEL_OUT_6POINT1 AUDIO_CHANNEL_OUT_7POINT1"/> + samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" + channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/> + samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" + channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/> + samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" + channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/> + samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" + channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/> + samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" + channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/> + samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" + channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/> + samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000" + channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/> @@ -114,7 +115,7 @@ - + diff --git a/vibrator/Vibrator.h b/vibrator/Vibrator.h index e9332f2..e21f34b 100644 --- a/vibrator/Vibrator.h +++ b/vibrator/Vibrator.h @@ -10,7 +10,7 @@ #define INTENSITY_MIN 40 #define INTENSITY_MAX 10000 -#define INTENSITY_DEFAULT INTENSITY_MAX +#define INTENSITY_DEFAULT 7000 #define VIBRATOR_TIMEOUT_PATH "/sys/class/timed_output/vibrator/enable" #define VIBRATOR_INTENSITY_PATH "/sys/class/timed_output/vibrator/intensity"