Promotion of audio-userspace.lnx.3.0-00011.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
2037158   I5b106ff5d166c5aa2691e70646adfd02ca816103   sdm845: update configs
2038027   I0f4a219da1fe71cfc921215498952d797ae0f6d7   audio: Fix compilation issue on HFP disable
2035510   I7c259b96f2fb86b8a6ccb1510301f0a67ac80a6a   hal: Compilation fix
2035510   I8661efd69588dc01216aba86278f5d2adba9b784   msm8953/37:audio:config: enable audio HIDL component

Change-Id: I27ac5cacf0df98ba5c2628c3d72a29d831462357
CRs-Fixed: 2037158, 2038027, 2035510
diff --git a/configs/msm8937/msm8937.mk b/configs/msm8937/msm8937.mk
index bf28b8c..6204998 100644
--- a/configs/msm8937/msm8937.mk
+++ b/configs/msm8937/msm8937.mk
@@ -235,3 +235,10 @@
 #flac sw decoder 24 bit decode capability
 PRODUCT_PROPERTY_OVERRIDES += \
 flac.sw.decoder.24bit.support=true
+
+# for HIDL related packages
+PRODUCT_PACKAGES += \
+    android.hardware.audio@2.0-service \
+    android.hardware.audio@2.0-impl \
+    android.hardware.audio.effect@2.0-impl \
+    android.hardware.soundtrigger@2.0-impl
diff --git a/configs/msm8953/msm8953.mk b/configs/msm8953/msm8953.mk
index abcc1d2..42bead6 100644
--- a/configs/msm8953/msm8953.mk
+++ b/configs/msm8953/msm8953.mk
@@ -234,3 +234,10 @@
 #flac sw decoder 24 bit decode capability
 PRODUCT_PROPERTY_OVERRIDES += \
 flac.sw.decoder.24bit.support=true
+
+# for HIDL related packages
+PRODUCT_PACKAGES += \
+    android.hardware.audio@2.0-service \
+    android.hardware.audio@2.0-impl \
+    android.hardware.audio.effect@2.0-impl \
+    android.hardware.soundtrigger@2.0-impl
diff --git a/configs/sdm845/sdm845.mk b/configs/sdm845/sdm845.mk
index 2a08c02..7a9888e 100644
--- a/configs/sdm845/sdm845.mk
+++ b/configs/sdm845/sdm845.mk
@@ -57,7 +57,7 @@
 TARGET_USES_QCOM_MM_AUDIO := true
 AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
 AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
-BOARD_SUPPORTS_QAHW := true
+BOARD_SUPPORTS_QAHW := false
 AUDIO_FEATURE_ENABLED_RAS := true
 ##AUDIO_FEATURE_FLAGS
 
@@ -65,7 +65,7 @@
 DEVICE_PACKAGE_OVERLAYS += hardware/qcom/audio/configs/common/overlay
 
 # Audio configuration file
-ifeq ($(TARGET_USES_AOSP), true)
+ifeq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
 PRODUCT_COPY_FILES += \
     device/qcom/common/media/audio_policy.conf:system/etc/audio_policy.conf
 else
@@ -74,8 +74,8 @@
 endif
 
 PRODUCT_COPY_FILES += \
-    hardware/qcom/audio/configs/sdm845/audio_output_policy.conf:system/vendor/etc/audio_output_policy.conf \
-    hardware/qcom/audio/configs/sdm845/audio_effects.conf:system/vendor/etc/audio_effects.conf \
+    hardware/qcom/audio/configs/sdm845/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
+    hardware/qcom/audio/configs/sdm845/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
     hardware/qcom/audio/configs/sdm845/mixer_paths_tavil.xml:system/etc/mixer_paths_tavil.xml \
     hardware/qcom/audio/configs/msm8998/mixer_paths_skuk.xml:system/etc/mixer_paths_skuk.xml \
     hardware/qcom/audio/configs/sdm845/mixer_paths_i2s.xml:system/etc/mixer_paths_i2s.xml \
@@ -88,7 +88,7 @@
 
 #XML Audio configuration files
 ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
-ifeq ($(TARGET_USES_AOSP), true)
+ifeq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
 PRODUCT_COPY_FILES += \
     $(TOPDIR)hardware/qcom/audio/configs/common/audio_policy_configuration.xml:/system/etc/audio_policy_configuration.xml
 else
@@ -224,3 +224,10 @@
 #offload pausetime out duration to 3 secs to inline with other outputs
 PRODUCT_PROPERTY_OVERRIDES += \
 audio.offload.pstimeout.secs=3
+
+# for HIDL related packages
+PRODUCT_PACKAGES += \
+    android.hardware.audio@2.0-service \
+    android.hardware.audio@2.0-impl \
+    android.hardware.audio.effect@2.0-impl \
+    android.hardware.soundtrigger@2.0-impl
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 8d7132c..73689eb 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -4461,7 +4461,7 @@
     native_audio_set_params(platform, parms, value, sizeof(value));
     audio_extn_spkr_prot_set_parameters(parms, value, len);
     audio_extn_usb_set_sidetone_gain(parms, value, len);
-    audio_extn_hfp_set_parameters(adev, parms);
+    audio_extn_hfp_set_parameters(my_data->adev, parms);
     true_32_bit_set_params(parms, value, len);
     ALOGV("%s: exit with code(%d)", __func__, ret);
     return ret;
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index 3a032d0..03b3c2e 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -333,11 +333,11 @@
 #define PLAYBACK_OFFLOAD_DEVICE 9
 
 // Direct_PCM
-#if defined (PLATFORM_MSM8994) || defined (PLATFORM_MSM8996) || defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8998)
+#if defined (PLATFORM_MSM8994) || defined (PLATFORM_MSM8996) || defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8998) || defined (PLATFORM_MSMSKUNK)
 #define PLAYBACK_OFFLOAD_DEVICE2 17
 #endif
 
-#if defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8996) || defined (PLATFORM_MSM8998)
+#if defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8996) || defined (PLATFORM_MSM8998) || defined (PLATFORM_MSMSKUNK)
 #define PLAYBACK_OFFLOAD_DEVICE3 18
 #define PLAYBACK_OFFLOAD_DEVICE4 34
 #define PLAYBACK_OFFLOAD_DEVICE5 35