mike dooley | e952998 | 2018-10-17 08:06:10 +0200 | [diff] [blame] | 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 | |
| 17 | package android.hardware.soundtrigger@2.2; |
| 18 | |
mike dooley | e952998 | 2018-10-17 08:06:10 +0200 | [diff] [blame] | 19 | import @2.0::SoundModelHandle; |
| 20 | import @2.1::ISoundTriggerHw; |
| 21 | |
| 22 | /** |
mike dooley | 74a792e | 2018-11-07 15:51:56 +0100 | [diff] [blame] | 23 | * SoundTrigger HAL interface. Used for hardware recognition of hotwords |
| 24 | * and other sounds. |
mike dooley | e952998 | 2018-10-17 08:06:10 +0200 | [diff] [blame] | 25 | */ |
| 26 | interface ISoundTriggerHw extends @2.1::ISoundTriggerHw { |
| 27 | |
| 28 | /** |
| 29 | * Get the state of a given model. |
mike dooley | 74a792e | 2018-11-07 15:51:56 +0100 | [diff] [blame] | 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. |
mike dooley | e952998 | 2018-10-17 08:06:10 +0200 | [diff] [blame] | 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, |
mike dooley | 74a792e | 2018-11-07 15:51:56 +0100 | [diff] [blame] | 37 | * -ENODEV in case of initialization error, |
| 38 | * -EINVAL in case where a recognition event is already |
| 39 | * being processed. |
mike dooley | e952998 | 2018-10-17 08:06:10 +0200 | [diff] [blame] | 40 | */ |
mike dooley | 74a792e | 2018-11-07 15:51:56 +0100 | [diff] [blame] | 41 | getModelState(SoundModelHandle modelHandle) generates (int32_t retval); |
mike dooley | e952998 | 2018-10-17 08:06:10 +0200 | [diff] [blame] | 42 | }; |