hal: Update platform to select mixer_xml for sdm439

Update platform to select mixer XML file for sdm439 with pmic pm8953.

Change-Id: I5482becdfa6ae1fa8b2246640f417b5432d6149d
This commit is contained in:
Vaishnavi Kommaraju 2018-03-23 17:26:44 +05:30 committed by Gerrit - the friendly Code Review server
parent 5d1e79c687
commit 9ddcfc6232
2 changed files with 16 additions and 2 deletions

View File

@ -118,6 +118,8 @@ static void update_hardware_info_8x16(struct hardware_info *hw_info, const char
strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
} else if (!strcmp(snd_card_name, "msm8952-snd-card-mtp")) {
strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
} else if (!strcmp(snd_card_name, "sdm439-snd-card-mtp")) {
strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
} else if (!strcmp(snd_card_name, "msm8952-tomtom-snd-card")) {
strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
} else if (!strcmp(snd_card_name, "msm8952-tasha-snd-card")) {
@ -209,7 +211,8 @@ void *hw_info_init(const char *snd_card_name)
strstr(snd_card_name, "msm8937") || strstr(snd_card_name, "msm8917") ||
strstr(snd_card_name, "msm8940") || strstr(snd_card_name, "msm8920") ||
strstr(snd_card_name, "sdm660") || strstr(snd_card_name, "apq8009") ||
strstr(snd_card_name, "mdm9607") || strstr(snd_card_name, "mdm-tasha")) {
strstr(snd_card_name, "mdm9607") || strstr(snd_card_name, "mdm-tasha") ||
strstr(snd_card_name, "sdm439")) {
ALOGV("8x16 - variant soundcard");
update_hardware_info_8x16(hw_info, snd_card_name);
} else {

View File

@ -78,6 +78,7 @@
#define MIXER_XML_PATH "/etc/mixer_paths.xml"
#define MIXER_XML_PATH_MSM8909_PM8916 "/etc/mixer_paths_msm8909_pm8916.xml"
#define MIXER_XML_PATH_MTP "/etc/mixer_paths_mtp.xml"
#define MIXER_XML_PATH_SDM439_PM8953 "/etc/mixer_paths_sdm439_pm8953.xml"
#define MIXER_XML_PATH_SKU2 "/etc/mixer_paths_qrd_sku2.xml"
#define MIXER_XML_PATH_WCD9326 "/etc/mixer_paths_wcd9326.xml"
#define MIXER_XML_PATH_WCD9335 "/etc/mixer_paths_wcd9335.xml"
@ -93,6 +94,7 @@
#define MIXER_XML_PATH "/vendor/etc/mixer_paths.xml"
#define MIXER_XML_PATH_MSM8909_PM8916 "/vendor/etc/mixer_paths_msm8909_pm8916.xml"
#define MIXER_XML_PATH_MTP "/vendor/etc/mixer_paths_mtp.xml"
#define MIXER_XML_PATH_SDM439_PM8953 "/vendor/etc/mixer_paths_sdm439_pm8953.xml"
#define MIXER_XML_PATH_SKU2 "/vendor/etc/mixer_paths_qrd_sku2.xml"
#define PLATFORM_INFO_XML_PATH_EXTCODEC "/vendor/etc/audio_platform_info_extcodec.xml"
#define PLATFORM_INFO_XML_PATH_SKUSH "/vendor/etc/audio_platform_info_skush.xml"
@ -1225,6 +1227,13 @@ static void query_platform(const char *snd_card_name,
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, "sdm439-snd-card-mtp",
sizeof("sdm439-snd-card-mtp"))) {
strlcpy(mixer_xml_path, MIXER_XML_PATH_SDM439_PM8953,
sizeof(MIXER_XML_PATH_SDM439_PM8953));
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, "msm8952-tomtom-snd-card",
sizeof("msm8952-tomtom-snd-card"))) {
strlcpy(mixer_xml_path, MIXER_XML_PATH_WCD9330,
@ -7376,7 +7385,9 @@ int platform_spkr_prot_is_wsa_analog_mode(void *adev)
(!strcmp(snd_card_name, "msm8952-snd-card")) ||
(!strcmp(snd_card_name, "msm8952-snd-card-mtp")) ||
(!strcmp(snd_card_name, "msm8976-skun-snd-card")) ||
(!strcmp(snd_card_name, "msm8953-snd-card-mtp")))
(!strcmp(snd_card_name, "msm8953-snd-card-mtp")) ||
(!strcmp(snd_card_name, "msm8953-sku4-snd-card")) ||
(!strcmp(snd_card_name, "sdm439-snd-card-mtp")))
return 1;
else
return 0;