5700685f01
HIDL never validated these, and these will be logspam/errors now (error for interfaces where a new annotation, @SensitiveData, is important not to have typoes, but warnings where otherwise the annotation is inconsequential). Bug: 173732508 Test: builds w/o warnings/errors Change-Id: Ic95d58098fa0104a3a7f1c85644ab1a015bcdd19
90 lines
3.2 KiB
Text
90 lines
3.2 KiB
Text
/*
|
|
* Copyright 2017 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package android.hardware.soundtrigger@2.1;
|
|
|
|
import @2.0::ISoundTriggerHwCallback;
|
|
import @2.0::PhraseRecognitionExtra;
|
|
|
|
/**
|
|
* SoundTrigger HAL Callback interface. Obtained during SoundTrigger setup.
|
|
*/
|
|
interface ISoundTriggerHwCallback extends @2.0::ISoundTriggerHwCallback {
|
|
|
|
/**
|
|
* Generic recognition event sent via recognition callback.
|
|
*/
|
|
struct RecognitionEvent {
|
|
/** Event header. Any data contained in the 'header.data' field
|
|
* is ignored */
|
|
@2.0::ISoundTriggerHwCallback.RecognitionEvent header;
|
|
/** Opaque event data */
|
|
memory data;
|
|
};
|
|
|
|
/**
|
|
* Specialized recognition event for key phrase recognitions.
|
|
*/
|
|
struct PhraseRecognitionEvent {
|
|
/** Common part of the recognition event */
|
|
RecognitionEvent common;
|
|
/** List of descriptors for each recognized key phrase */
|
|
vec<PhraseRecognitionExtra> phraseExtras;
|
|
};
|
|
|
|
/**
|
|
* Event sent via load sound model callback.
|
|
*/
|
|
struct ModelEvent {
|
|
/** Event header. Any data contained in the 'header.data' field
|
|
* is ignored */
|
|
@2.0::ISoundTriggerHwCallback.ModelEvent header;
|
|
/** Opaque event data, passed transparently by the framework */
|
|
memory data;
|
|
};
|
|
|
|
/**
|
|
* Callback method called by the HAL when the sound recognition triggers.
|
|
*
|
|
* @param event A RecognitionEvent structure containing detailed results
|
|
* of the recognition triggered
|
|
* @param cookie The cookie passed by the framework when recognition was
|
|
* started (see ISoundtriggerHw.startRecognition*())
|
|
*/
|
|
recognitionCallback_2_1(RecognitionEvent event, CallbackCookie cookie);
|
|
|
|
/**
|
|
* Callback method called by the HAL when the sound recognition triggers
|
|
* for a key phrase sound model.
|
|
*
|
|
* @param event A RecognitionEvent structure containing detailed results
|
|
* of the recognition triggered
|
|
* @param cookie The cookie passed by the framework when recognition was
|
|
* started (see ISoundtriggerHw.startRecognition*())
|
|
*/
|
|
phraseRecognitionCallback_2_1(PhraseRecognitionEvent event,
|
|
CallbackCookie cookie);
|
|
|
|
/**
|
|
* Callback method called by the HAL when the sound model loading completes.
|
|
*
|
|
* @param event A ModelEvent structure containing detailed results of the
|
|
* model loading operation
|
|
* @param cookie The cookie passed by the framework when loading was
|
|
* initiated (see ISoundtriggerHw.loadSoundModel*())
|
|
*/
|
|
soundModelCallback_2_1(ModelEvent event, CallbackCookie cookie);
|
|
};
|