Merge "Audio:hal: Add support of sound card for SBC8016 platform"
diff --git a/hal/msm8916/hw_info.c b/hal/msm8916/hw_info.c
index b9525e9..1a882db 100644
--- a/hal/msm8916/hw_info.c
+++ b/hal/msm8916/hw_info.c
@@ -239,6 +239,12 @@
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, "msm8976-tasha-snd-card")) {
+ strlcpy(hw_info->type, "", sizeof(hw_info->type));
+ strlcpy(hw_info->name, "msm8976", 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-skum-snd-card")) {
strlcpy(hw_info->type, "", sizeof(hw_info->type));
strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
@@ -261,7 +267,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, "msm8909") || strstr(snd_card_name, "msm8952") ||
+ strstr(snd_card_name, "msm8976")) {
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 23dcac4..5c1c21e 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -57,6 +57,7 @@
#define MIXER_XML_PATH_I2S "/system/etc/mixer_paths_i2s.xml"
#define MIXER_XML_PATH_WCD9306 "/system/etc/mixer_paths_wcd9306.xml"
#define MIXER_XML_PATH_WCD9330 "/system/etc/mixer_paths_wcd9330.xml"
+#define MIXER_XML_PATH_WCD9335 "/system/etc/mixer_paths_wcd9335.xml"
#define PLATFORM_INFO_XML_PATH "/system/etc/audio_platform_info.xml"
#define PLATFORM_INFO_XML_PATH_I2S "/system/etc/audio_platform_info_i2s.xml"
@@ -725,7 +726,10 @@
!strncmp(snd_card_name, "msm8939-tomtom9330-snd-card",
sizeof("msm8939-tomtom9330-snd-card")) ||
!strncmp(snd_card_name, "msm8952-tomtom-snd-card",
- sizeof("msm8952-tomtom-snd-card"))) {
+ sizeof("msm8952-tomtom-snd-card")) ||
+ !strncmp(snd_card_name, "msm8976-tasha-snd-card",
+ sizeof("msm8976-tasha-snd-card")))
+ {
ALOGI("%s: snd_card_name: %s",__func__,snd_card_name);
is_external_codec = true;
}
@@ -820,6 +824,15 @@
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, "msm8976-tasha-snd-card",
+ sizeof("msm8976-tasha-snd-card"))) {
+ strlcpy(mixer_xml_path, MIXER_XML_PATH_WCD9335,
+ sizeof(MIXER_XML_PATH_WCD9335));
+ 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, "msm8909-skua-snd-card",
sizeof("msm8909-skua-snd-card"))) {
strlcpy(mixer_xml_path, MIXER_XML_PATH_SKUA,
@@ -3365,10 +3378,13 @@
int ret = 0;
const char *snd_card_name = mixer_get_name(adev->mixer);
+
if (bit_width != adev->cur_codec_backend_bit_width) {
const char * mixer_ctl_name;
if (!strncmp(snd_card_name, "msm8952-tomtom-snd-card",
- sizeof("msm8952-tomtom-snd-card"))) {
+ sizeof("msm8952-tomtom-snd-card")) ||
+ !strncmp(snd_card_name, "msm8976-tasha-snd-card",
+ sizeof("msm8976-tasha-snd-card"))) {
mixer_ctl_name = "SLIM_0_RX Format";
}
else