From 369fcd53d4ae8c9aa12df6b6205bc4ddba7badba Mon Sep 17 00:00:00 2001 From: Alexander Winkowski Date: Mon, 28 Oct 2024 17:55:26 +0000 Subject: [PATCH] hal: Ignore ultrasound usecase in select_devices() This matches stock audio HAL from veux. Change-Id: I1abb3b703024abe1b4723e11e82016fcbb9dbcc2 --- hal/audio_hw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hal/audio_hw.c b/hal/audio_hw.c index ebdfa9b3..2b8f563b 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -3054,6 +3054,14 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id) return -EINVAL; } +#ifdef ELLIPTIC_ULTRASOUND_ENABLED + if (usecase->id == USECASE_AUDIO_ULTRASOUND_RX || + usecase->id == USECASE_AUDIO_ULTRASOUND_TX) { + ALOGE("%s: Ultrasound usecase(%d)", __func__, uc_id); + return -EINVAL; + } +#endif + if ((usecase->type == VOICE_CALL) || (usecase->type == VOIP_CALL) || (usecase->type == PCM_HFP_CALL)||