hal: add support for I2S based external modem
There are specific xml files used for I2S based external modem.
Add check to load the correct xml file.
For I2S based external modem, voice sample rate can be 8k or
16k based on vocoder type. Call csd client api to get the
correct sample rate to configure voice call.
Change-Id: Ie9799336620f49a890355be74fe1830eb348cabe
diff --git a/hal/msm8974/hw_info.c b/hal/msm8974/hw_info.c
index 128e4af..59bdb56 100644
--- a/hal/msm8974/hw_info.c
+++ b/hal/msm8974/hw_info.c
@@ -125,7 +125,9 @@
static void update_hardware_info_8084(struct hardware_info *hw_info, const char *snd_card_name)
{
- if (!strcmp(snd_card_name, "apq8084-taiko-mtp-snd-card")) {
+ if (!strcmp(snd_card_name, "apq8084-taiko-mtp-snd-card") ||
+ !strncmp(snd_card_name, "apq8084-taiko-i2s-mtp-snd-card",
+ sizeof("apq8084-taiko-i2s-mtp-snd-card"))) {
strlcpy(hw_info->type, "mtp", sizeof(hw_info->type));
strlcpy(hw_info->name, "apq8084", sizeof(hw_info->name));
hw_info->snd_devices = NULL;
@@ -137,6 +139,13 @@
hw_info->snd_devices = (snd_device_t *)taiko_apq8084_CDP_variant_devices;
hw_info->num_snd_devices = ARRAY_SIZE(taiko_apq8084_CDP_variant_devices);
strlcpy(hw_info->dev_extn, "-cdp", sizeof(hw_info->dev_extn));
+ } else if (!strncmp(snd_card_name, "apq8084-taiko-i2s-cdp-snd-card",
+ sizeof("apq8084-taiko-i2s-cdp-snd-card"))) {
+ strlcpy(hw_info->type, " cdp", sizeof(hw_info->type));
+ strlcpy(hw_info->name, "apq8084", sizeof(hw_info->name));
+ hw_info->snd_devices = NULL;
+ hw_info->num_snd_devices = 0;
+ strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
} else if (!strcmp(snd_card_name, "apq8084-taiko-liquid-snd-card")) {
strlcpy(hw_info->type , " liquid", sizeof(hw_info->type));
strlcpy(hw_info->name, "apq8084", sizeof(hw_info->type));