hal: add support for msm8917 tmo, msm8917 sku5 and msm8940 sku6
add sound card entry for the following devices:
msm8917 tmo,msm8917 sku5 and msm8940 sku6.
CRs-Fixed: 1002168
Change-Id: Ifc08af12c9d86031fba11128323c9f40d1d92e5e
diff --git a/hal/msm8916/hw_info.c b/hal/msm8916/hw_info.c
index e18f2ec..07a060f 100644
--- a/hal/msm8916/hw_info.c
+++ b/hal/msm8916/hw_info.c
@@ -197,13 +197,13 @@
strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
} else if (!strcmp(snd_card_name, "msm8952-sku1-snd-card")) {
strlcpy(hw_info->type, "", sizeof(hw_info->type));
- strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
+ strlcpy(hw_info->name, "msm8937", 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, "msm8952-sku2-snd-card")) {
strlcpy(hw_info->type, "", sizeof(hw_info->type));
- strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
+ strlcpy(hw_info->name, "msm8937", 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));
@@ -267,8 +267,26 @@
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, "msm8917-sku5-snd-card")) {
+ strlcpy(hw_info->type, "", sizeof(hw_info->type));
+ strlcpy(hw_info->name, "msm8917", 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, "msm8917-tmo-snd-card")) {
+ strlcpy(hw_info->type, "", sizeof(hw_info->type));
+ strlcpy(hw_info->name, "msm8917", 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, "msm8940-sku6-snd-card")) {
+ strlcpy(hw_info->type, "", sizeof(hw_info->type));
+ strlcpy(hw_info->name, "msm8940", 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 {
- ALOGW("%s: Not an 8x16/8939/8909/8952 device", __func__);
+ ALOGW("%s: Not an 8x16/8909/8917/8937/8939/8940/8952/8953 device", __func__);
}
hw_info->is_wsa_combo_suppported = false;
@@ -287,7 +305,8 @@
if (strstr(snd_card_name, "msm8x16") || strstr(snd_card_name, "msm8939") ||
strstr(snd_card_name, "msm8909") || strstr(snd_card_name, "msm8952") ||
strstr(snd_card_name, "msm8976") || strstr(snd_card_name, "msm8953") ||
- strstr(snd_card_name, "msm8937")) {
+ strstr(snd_card_name, "msm8937") || strstr(snd_card_name, "msm8917") ||
+ strstr(snd_card_name, "msm8940") ) {
ALOGV("8x16 - variant soundcard");
update_hardware_info_8x16(hw_info, snd_card_name);
} else {
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index c66fd38..40f26de 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -1086,6 +1086,27 @@
msm_device_to_be_id = msm_device_to_be_id_external_codec;
msm_be_id_array_len =
sizeof(msm_device_to_be_id_external_codec) / sizeof(msm_device_to_be_id_external_codec[0]);
+ } else if (!strncmp(snd_card_name, "msm8917-tmo-snd-card",
+ sizeof("msm8917-tmo-snd-card"))) {
+ strlcpy(mixer_xml_path, MIXER_XML_PATH_SKU2,
+ MAX_MIXER_XML_PATH);
+ msm_device_to_be_id = msm_device_to_be_id_internal_codec;
+ msm_be_id_array_len =
+ sizeof(msm_device_to_be_id_internal_codec) / sizeof(msm_device_to_be_id_internal_codec[0]);
+ } else if (!strncmp(snd_card_name, "msm8917-sku5-snd-card",
+ sizeof("msm8917-sku5-snd-card"))) {
+ strlcpy(mixer_xml_path, MIXER_XML_PATH_SKU2,
+ MAX_MIXER_XML_PATH);
+ msm_device_to_be_id = msm_device_to_be_id_internal_codec;
+ msm_be_id_array_len =
+ sizeof(msm_device_to_be_id_internal_codec) / sizeof(msm_device_to_be_id_internal_codec[0]);
+ } else if (!strncmp(snd_card_name, "msm8940-sku6-snd-card",
+ sizeof("msm8940-sku6-snd-card"))) {
+ strlcpy(mixer_xml_path, MIXER_XML_PATH_SKU1,
+ MAX_MIXER_XML_PATH);
+ msm_device_to_be_id = msm_device_to_be_id_internal_codec;
+ msm_be_id_array_len =
+ sizeof(msm_device_to_be_id_internal_codec) / sizeof(msm_device_to_be_id_internal_codec[0]);
} else {
strlcpy(mixer_xml_path, MIXER_XML_PATH,
sizeof(MIXER_XML_PATH));