1/* 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::SoundModelHandle; 20import @2.1::ISoundTriggerHw; 21 22/** 23 * SoundTrigger HAL interface. Used for hardware recognition of hotwords 24 * and other sounds. 25 */ 26interface ISoundTriggerHw extends @2.1::ISoundTriggerHw { 27 28 /** 29 * Get the state of a given model. 30 * 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. 34 * @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, 37 * -ENODEV in case of initialization error, 38 * -EINVAL in case where a recognition event is already 39 * being processed. 40 */ 41 getModelState(SoundModelHandle modelHandle) generates (int32_t retval); 42}; 43