Merge "hal: init hw info for lahaina"

This commit is contained in:
qctecmdr 2020-02-13 02:45:41 -08:00 committed by Gerrit - the friendly Code Review server
commit 2e64f5144c
1 changed files with 19 additions and 0 deletions

View File

@ -553,6 +553,22 @@ static void update_hardware_info_kona(
}
}
static void update_hardware_info_lahaina(
struct hardware_info *hw_info,
const char *snd_card_name)
{
if (!strncmp(snd_card_name, "lahaina-mtp-snd-card",
sizeof("lahaina-mtp-snd-card"))) {
strlcpy(hw_info->name, "lahaina", sizeof(hw_info->name));
} else if (!strncmp(snd_card_name, "lahaina-qrd-snd-card",
sizeof("lahaina-qrd-snd-card"))) {
strlcpy(hw_info->name, "lahaina", sizeof(hw_info->name));
hw_info->is_stereo_spkr = true;
} else {
ALOGW("%s: Not a lahaina device", __func__);
}
}
static void update_hardware_info_sda845(struct hardware_info *hw_info, const char *snd_card_name)
{
if (!strncmp(snd_card_name, "sda845-tavil-i2s-snd-card", sizeof("sda845-tavil-i2s-snd-card"))) {
@ -856,6 +872,9 @@ void *hw_info_init(const char *snd_card_name)
|| strstr(snd_card_name, "atoll") || strstr(snd_card_name, "bengal")) {
ALOGV("KONA - variant soundcard");
update_hardware_info_kona(hw_info, snd_card_name);
} else if(strstr(snd_card_name, "lahaina")) {
ALOGV("LAHAINA - variant soundcard");
update_hardware_info_lahaina(hw_info, snd_card_name);
} else if(strstr(snd_card_name, "sdm439")) {
ALOGV("SDM439 - variant soundcard");
update_hardware_info_sdm439(hw_info, snd_card_name);