hal: Add support for sm8150+sdxprairies
Make hal layer changes to support for hanasdx55 target.
Change-Id: Id2c7cbfe2a879c5de7b0260fa9895e4606a805b0
Signed-off-by: Pallavi Mishra <pallavim@codeaurora.org>
diff --git a/hal/msm8974/hw_info.c b/hal/msm8974/hw_info.c
index 5113cff..709c69c 100644
--- a/hal/msm8974/hw_info.c
+++ b/hal/msm8974/hw_info.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -511,6 +511,9 @@
hw_info->snd_devices = (snd_device_t *)auto_variant_devices;
hw_info->num_snd_devices = ARRAY_SIZE(auto_variant_devices);
strlcpy(hw_info->dev_extn, "-custom", sizeof(hw_info->dev_extn));
+ } else if (strstr(snd_card_name, "hana55")) {
+ strlcpy(hw_info->name, "msmnile", sizeof(hw_info->name));
+ hw_info->is_stereo_spkr = false;
} else {
ALOGW("%s: Not a msmnile device", __func__);
}
@@ -808,6 +811,7 @@
ALOGV("SDX - variant soundcard");
update_hardware_info_sdx(hw_info, snd_card_name);
} else if (strstr(snd_card_name, "pahu") || strstr(snd_card_name, "tavil") ||
+ strstr(snd_card_name, "hana55") ||
strstr(snd_card_name, "sa8155")) {
ALOGV("MSMNILE - variant soundcard");
update_hardware_info_msmnile(hw_info, snd_card_name);
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 3de01b3..300afe6 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2013 The Android Open Source Project
@@ -2035,6 +2035,8 @@
sizeof("sdx-tavil-i2s-snd-card")) ||
!strncmp(snd_card_name, "sda845-tavil-i2s-snd-card",
sizeof("sda845-tavil-i2s-snd-card")) ||
+ !strncmp(snd_card_name, "sm8150-hana55-snd-card",
+ sizeof("sm8150-hana55-snd-card")) ||
!strncmp(snd_card_name, "sa6155-adp-star-snd-card",
sizeof("sa6155-adp-star-snd-card"))) {
plat_data->is_i2s_ext_modem = true;
@@ -3401,6 +3403,8 @@
if ((!strncmp("apq8084", platform, sizeof("apq8084")) ||
!strncmp("msm8996", platform, sizeof("msm8996")) ||
!strncmp("sm6150", platform, sizeof("sm6150")) ||
+ (!strncmp("msmnile", platform, sizeof("msmnile")) &&
+ !strncmp("hana55", snd_card_name, sizeof("hana55"))) ||
!strncmp("sdx", platform, sizeof("sdx")) ||
!strncmp("sdm845", platform, sizeof("sdm845"))) &&
( !strncmp("mdm", baseband, (sizeof("mdm")-1)) ||
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index dc2dc5c..1a56ece 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2013 The Android Open Source Project
@@ -607,6 +607,8 @@
#define QCHAT_CALL_PCM_DEVICE -1
#define VOWLAN_CALL_PCM_DEVICE -1
#else
+#define HOST_LESS_RX_ID 44
+#define HOST_LESS_TX_ID 45
#define VOICE_CALL_PCM_DEVICE 2
#define VOICE2_CALL_PCM_DEVICE 22
#define VOLTE_CALL_PCM_DEVICE 14
@@ -617,6 +619,9 @@
#ifdef PLATFORM_MSM8996
#define VOICEMMODE1_CALL_PCM_DEVICE 2
#define VOICEMMODE2_CALL_PCM_DEVICE 22
+#elif PLATFORM_MSMNILE
+#define VOICEMMODE1_CALL_PCM_DEVICE 46
+#define VOICEMMODE2_CALL_PCM_DEVICE 47
#else
#define VOICEMMODE1_CALL_PCM_DEVICE 44
#define VOICEMMODE2_CALL_PCM_DEVICE 45