From 78b70c0a0515a7e1b43abaea79b5f7935bef3d89 Mon Sep 17 00:00:00 2001 From: Vidyakumar Athota Date: Mon, 29 Jun 2015 17:19:45 -0700 Subject: hal: add support for fluence in voice recognition Add support to use 3 or 4 mic devices with fluence processing for voice recognition use case. CRs-Fixed: 866947 Change-Id: I028d9cf60e235481030bfea06ab67aa15eb7d7be --- hal/msm8974/platform.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index d9e7745c..c8edd3ee 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -2686,11 +2686,16 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC) { if (channel_count == 2) { snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_STEREO; - } else if (adev->active_input->enable_ns) - snd_device = SND_DEVICE_IN_VOICE_REC_MIC_NS; - else if (my_data->fluence_type != FLUENCE_NONE && + } else if (my_data->fluence_type != FLUENCE_NONE && my_data->fluence_in_voice_rec) { - snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE; + if (my_data->fluence_type & FLUENCE_QUAD_MIC) { + snd_device = SND_DEVICE_IN_HANDSET_QMIC; + } else { + snd_device = SND_DEVICE_IN_VOICE_REC_DMIC_FLUENCE; + } + platform_set_echo_reference(adev->platform, true, out_device); + } else if (adev->active_input->enable_ns) { + snd_device = SND_DEVICE_IN_VOICE_REC_MIC_NS; } else { snd_device = SND_DEVICE_IN_VOICE_REC_MIC; } -- cgit v1.2.3