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

Commit e40bf8d9 authored by Ashish Jain's avatar Ashish Jain
Browse files

hal: Update EC support for HPF usecase

- Ensure reference device is set if audio is routed
to speaker/headset during HFP usecase.

Change-Id: Ia404aaa8ec8b80e9f4be14840dfef3bf9afef435
CRs-Fixed: 641513
parent b0b915f8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1432,6 +1432,7 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
            }
        } else if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET) {
            snd_device = SND_DEVICE_IN_VOICE_HEADSET_MIC;
            set_echo_reference(adev->mixer, EC_REF_RX);
        } else if (out_device & AUDIO_DEVICE_OUT_ALL_SCO) {
            if (my_data->btsco_sample_rate == SAMPLE_RATE_16KHZ)
                snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB;
@@ -1453,6 +1454,7 @@ snd_device_t platform_get_input_snd_device(void *platform, audio_devices_t out_d
                }
            } else {
                snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC;
                set_echo_reference(adev->mixer, EC_REF_RX);
            }
        }
    } else if (source == AUDIO_SOURCE_CAMCORDER) {