blob: fcb5087adee77474c5ceb2149460bc0bcde1672b [file] [log] [blame]
mike dooleye9529982018-10-17 08:06:10 +02001/*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.soundtrigger@2.2;
18
19import @2.0::ISoundTriggerHwCallback.RecognitionEvent;
20import @2.0::SoundModelHandle;
21import @2.1::ISoundTriggerHw;
22
23/**
24 * SoundTrigger HAL interface. Used for hardware recognition of hotwords.
25 */
26interface ISoundTriggerHw extends @2.1::ISoundTriggerHw {
27
28 /**
29 * Get the state of a given model.
30 * The model state is returned as a RecognitionEvent.
31 * @param modelHandle The handle of the sound model to use for recognition
32 * @return retval Operation completion status: 0 in case of success,
33 * -ENOSYS in case of invalid model handle,
34 * -ENOMEM in case of memory allocation failure,
35 * -ENODEV in case of initialization error.
36 * @return state RecognitionEvent in case of success
37 */
38 getModelState(SoundModelHandle modelHandle)
39 generates (int32_t retval, @2.0::ISoundTriggerHwCallback.RecognitionEvent state);
40};