hal: add audio support for msmnile
Add audio support for msmnile.
Change-Id: I742d9acbc42221476d1364e9c7bcce8a5d782bf4
diff --git a/hal/msm8974/hw_info.c b/hal/msm8974/hw_info.c
index 7b17ae4..4b70fb7 100644
--- a/hal/msm8974/hw_info.c
+++ b/hal/msm8974/hw_info.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2018, 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
@@ -420,6 +420,11 @@
}
}
+static void update_hardware_info_msmnile(struct hardware_info *hw_info __unused, const char *snd_card_name __unused)
+{
+ ALOGW("%s: Not a msmnile device", __func__);
+}
+
static void update_hardware_info_sdx(struct hardware_info *hw_info __unused, const char *snd_card_name __unused)
{
ALOGW("%s: Not a sdx device", __func__);
@@ -584,6 +589,9 @@
} else if (strstr(snd_card_name, "sdx")) {
ALOGV("SDX - variant soundcard");
update_hardware_info_sdx(hw_info, snd_card_name);
+ } else if (strstr(snd_card_name, "pahu")) {
+ ALOGV("MSMNILE - variant soundcard");
+ update_hardware_info_msmnile(hw_info, snd_card_name);
} else {
ALOGE("%s: Unsupported target %s:",__func__, snd_card_name);
free(hw_info);
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index da2ccb6..6c42494 100755
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -77,7 +77,7 @@
#endif
#include <linux/msm_audio.h>
-#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605)
+#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE)
#include <sound/devdep_params.h>
#endif
@@ -7801,7 +7801,7 @@
return sample_rate;
}
-#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605)
+#if defined (PLATFORM_MSM8998) || (PLATFORM_SDM845) || (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE)
int platform_get_mmap_data_fd(void *platform, int fe_dev, int dir, int *fd,
uint32_t *size)
{
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index 6efeebe..8151ea6 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2013 The Android Open Source Project
@@ -368,11 +368,11 @@
#define PLAYBACK_OFFLOAD_DEVICE 9
// Direct_PCM
-#if defined (PLATFORM_MSM8994) || defined (PLATFORM_MSM8996) || defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) ||defined (PLATFORM_QCS605) ||defined (PLATFORM_SDX24)
+#if defined (PLATFORM_MSM8994) || defined (PLATFORM_MSM8996) || defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) ||defined (PLATFORM_QCS605) ||defined (PLATFORM_SDX24) || defined (PLATFORM_MSMNILE)
#define PLAYBACK_OFFLOAD_DEVICE2 17
#endif
-#if defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8996) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) || defined(PLATFORM_QCS605) || defined (PLATFORM_SDX24)
+#if defined (PLATFORM_APQ8084) || defined (PLATFORM_MSM8996) || defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_SDM670) || defined(PLATFORM_QCS605) || defined (PLATFORM_SDX24) || defined (PLATFORM_MSMNILE)
#define PLAYBACK_OFFLOAD_DEVICE3 18
#define PLAYBACK_OFFLOAD_DEVICE4 34
#define PLAYBACK_OFFLOAD_DEVICE5 35
@@ -497,7 +497,7 @@
#define FM_RX_VOLUME "PRI MI2S LOOPBACK Volume"
#elif PLATFORM_MSM8996
#define FM_RX_VOLUME "Tert MI2S LOOPBACK Volume"
-#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM670) || defined (PLATFORM_QCS605)
+#elif defined (PLATFORM_MSM8998) || defined (PLATFORM_SDM845) || defined (PLATFORM_MSMFALCON) || defined (PLATFORM_SDM670) || defined (PLATFORM_QCS605) || defined (PLATFORM_MSMNILE)
#define FM_RX_VOLUME "SLIMBUS_8 LOOPBACK Volume"
#else
#define FM_RX_VOLUME "Internal FM RX Volume"