blob: a26896a0f4d5d931cf25bb3917b4e120a26fd58b [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
mike dooleye9529982018-10-17 08:06:10 +020019import @2.0::SoundModelHandle;
20import @2.1::ISoundTriggerHw;
21
22/**
mike dooley74a792e2018-11-07 15:51:56 +010023 * SoundTrigger HAL interface. Used for hardware recognition of hotwords
24 * and other sounds.
mike dooleye9529982018-10-17 08:06:10 +020025 */
26interface ISoundTriggerHw extends @2.1::ISoundTriggerHw {
27
28 /**
29 * Get the state of a given model.
mike dooley74a792e2018-11-07 15:51:56 +010030 * The model state is returned asynchronously as a RecognitionEvent via
31 * the callback that was registered in StartRecognition().
32 * @param modelHandle The handle of the sound model whose state is being
33 * queried.
mike dooleye9529982018-10-17 08:06:10 +020034 * @return retval Operation completion status: 0 in case of success,
35 * -ENOSYS in case of invalid model handle,
36 * -ENOMEM in case of memory allocation failure,
mike dooley74a792e2018-11-07 15:51:56 +010037 * -ENODEV in case of initialization error,
38 * -EINVAL in case where a recognition event is already
39 * being processed.
mike dooleye9529982018-10-17 08:06:10 +020040 */
mike dooley74a792e2018-11-07 15:51:56 +010041 getModelState(SoundModelHandle modelHandle) generates (int32_t retval);
mike dooleye9529982018-10-17 08:06:10 +020042};