diff options
author | rioskao <rioskao@google.com> | 2020-06-08 17:33:23 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-06-08 17:33:23 +0000 |
commit | a44b9e17c7e765aae2ceb29637f6e6f35c70aa25 (patch) | |
tree | 8e798473a680c3a18da41a2b0e1da2793b195db1 | |
parent | a864d12e105ddf90cfe76f4f3b140fd5bac4efb1 (diff) | |
parent | f32bf0d37de9e99b7703177590498320d84aa9f9 (diff) | |
download | platform_hardware_knowles_athletico_sound_trigger_hal-a44b9e17c7e765aae2ceb29637f6e6f35c70aa25.tar.gz platform_hardware_knowles_athletico_sound_trigger_hal-a44b9e17c7e765aae2ceb29637f6e6f35c70aa25.tar.bz2 platform_hardware_knowles_athletico_sound_trigger_hal-a44b9e17c7e765aae2ceb29637f6e6f35c70aa25.zip |
sthal: fix vts test failure am: f32bf0d37d
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/knowles/athletico/sound_trigger_hal/+/11716878
Change-Id: Ibe9b0af76fd841db7e64bf8800264df149278cbf
-rw-r--r-- | sound_trigger_hw_iaxxx.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound_trigger_hw_iaxxx.c b/sound_trigger_hw_iaxxx.c index 91f78fc..014c96a 100644 --- a/sound_trigger_hw_iaxxx.c +++ b/sound_trigger_hw_iaxxx.c @@ -2683,7 +2683,7 @@ static int stdev_load_sound_model(const struct sound_trigger_hw_device *dev, int ret = 0; int kw_model_sz = 0; int i = 0; - + sound_trigger_uuid_t empty_uuid = {0}; unsigned char *kw_buffer = NULL; ALOGD("+%s+", __func__); @@ -2706,6 +2706,12 @@ static int stdev_load_sound_model(const struct sound_trigger_hw_device *dev, goto exit; } + if (check_uuid_equality(sound_model->vendor_uuid, empty_uuid)) { + ALOGE("%s Invalid vendor uuid", __func__); + ret = -EINVAL; + goto exit; + } + // When a delayed CHRE/Oslo destroy process is in progress, // we should not skip the new model and return the existing handle // which will be destroyed soon. |