diff --git a/hal/audio_extn/sndmonitor.c b/hal/audio_extn/sndmonitor.c index 7b3e0a05..4f27db92 100644 --- a/hal/audio_extn/sndmonitor.c +++ b/hal/audio_extn/sndmonitor.c @@ -225,6 +225,7 @@ static int enum_sndcards() (strncasecmp(card_id, "sa", 2) != 0) && (strncasecmp(card_id, "kona", 4) != 0) && (strncasecmp(card_id, "atoll", 5) != 0) && + (strncasecmp(card_id, "bengal", 6) != 0) && (strncasecmp(card_id, "lito", 4) != 0)) { ALOGW("Skip over non-ADSP snd card %s", card_id); continue; diff --git a/hal/msm8974/hw_info.c b/hal/msm8974/hw_info.c index fbdb2621..bcc5a583 100644 --- a/hal/msm8974/hw_info.c +++ b/hal/msm8974/hw_info.c @@ -520,7 +520,11 @@ static void update_hardware_info_kona( struct hardware_info *hw_info, const char *snd_card_name) { - if (!strncmp(snd_card_name, "kona-mtp-snd-card", + if (!strncmp(snd_card_name, "bengal-idp-snd-card", + sizeof("bengal-idp-snd-card"))) { + strlcpy(hw_info->name, "bengal", sizeof(hw_info->name)); + hw_info->is_stereo_spkr = false; + } else if (!strncmp(snd_card_name, "kona-mtp-snd-card", sizeof("kona-mtp-snd-card"))) { strlcpy(hw_info->name, "kona", sizeof(hw_info->name)); } else if (!strncmp(snd_card_name, "lito-mtp-snd-card", @@ -822,7 +826,7 @@ void *hw_info_init(const char *snd_card_name) ALOGV("SDA845 - variant soundcard"); update_hardware_info_sda845(hw_info, snd_card_name); } else if (strstr(snd_card_name, "kona") || strstr(snd_card_name, "lito") - || strstr(snd_card_name, "atoll")) { + || 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, "sdm439")) { diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index 264c6f64..4805f218 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -1702,7 +1702,9 @@ static void update_codec_type_and_interface(struct platform_data * my_data, !strncmp(snd_card_name, "atoll-idp-snd-card", sizeof("atoll-idp-snd-card")) || !strncmp(snd_card_name, "atoll-qrd-snd-card", - sizeof("atoll-qrd-snd-card"))) { + sizeof("atoll-qrd-snd-card")) || + !strncmp(snd_card_name, "bengal-idp-snd-card", + sizeof("bengal-idp-snd-card"))) { ALOGI("%s: snd_card_name: %s",__func__,snd_card_name); my_data->is_internal_codec = true; my_data->is_slimbus_interface = false; @@ -3525,7 +3527,8 @@ acdb_init_fail: !strncmp(snd_card_name, "kona", strlen("kona")) || !strncmp(snd_card_name, "lito", strlen("lito")) || !strncmp(snd_card_name, "atoll", strlen("atoll")) || - !strncmp(snd_card_name, "trinket", strlen("trinket"))) { + !strncmp(snd_card_name, "trinket", strlen("trinket"))|| + !strncmp(snd_card_name, "bengal", strlen("bengal"))) { my_data->current_backend_cfg[DEFAULT_CODEC_BACKEND].bitwidth_mixer_ctl = strdup("WSA_CDC_DMA_RX_0 Format"); my_data->current_backend_cfg[DEFAULT_CODEC_BACKEND].samplerate_mixer_ctl = @@ -3553,6 +3556,13 @@ acdb_init_fail: if (default_rx_backend) free(default_rx_backend); default_rx_backend = strdup("WSA_CDC_DMA_RX_0"); + if(!strncmp(snd_card_name, "bengal", strlen("bengal"))) { + my_data->current_backend_cfg[DEFAULT_CODEC_BACKEND].bitwidth_mixer_ctl = + strdup("RX_CDC_DMA_RX_1 Format"); + my_data->current_backend_cfg[DEFAULT_CODEC_BACKEND].samplerate_mixer_ctl = + strdup("RX_CDC_DMA_RX_1 SampleRate"); + default_rx_backend = strdup("RX_CDC_DMA_RX_1"); + } } else if (!strncmp(snd_card_name, "sdm660", strlen("sdm660")) || !strncmp(snd_card_name, "sdm670", strlen("sdm670")) || !strncmp(snd_card_name, "qcs605", strlen("qcs605"))) {