Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc136bd3 authored by Walter Yang's avatar Walter Yang
Browse files

hal: Fix input device selection for stereo recording

Only if the fluence type is dual mic or quad mic and the channel
count is 2, the dmic device is selected as input device.

Change-Id: I22f9d2f154e9b6348ef547ff68014b5e68ae7e5f
CRs-fixed: 599947
parent 60d65d1d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1175,7 +1175,8 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
        if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC) {
            if (audio_extn_ssr_get_enabled() && channel_count == 6)
                snd_device = SND_DEVICE_IN_QUAD_MIC;
            else if (channel_count == 2)
            else if (my_data->fluence_type & (FLUENCE_DUAL_MIC | FLUENCE_QUAD_MIC) &&
                    channel_count == 2)
                snd_device = SND_DEVICE_IN_HANDSET_STEREO_DMIC;
            else
                snd_device = SND_DEVICE_IN_HANDSET_MIC;