summaryrefslogtreecommitdiffstats
path: root/soundtrigger
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2017-03-28 16:19:16 -0700
committerAndreas Huber <andih@google.com>2017-03-29 08:53:58 -0700
commit40d3a9bd8c62714ee58f9363c4456f764aa5a95d (patch)
treeda47e5b4448e44385919af0effbd49a5d1b415e8 /soundtrigger
parent2f44ec6c868b220be1b566e7ccfbb251beec70ec (diff)
downloadplatform_hardware_interfaces-40d3a9bd8c62714ee58f9363c4456f764aa5a95d.tar.gz
platform_hardware_interfaces-40d3a9bd8c62714ee58f9363c4456f764aa5a95d.tar.bz2
platform_hardware_interfaces-40d3a9bd8c62714ee58f9363c4456f764aa5a95d.zip
Convert all comments into "doxygen-ready" comments.
Bug: 36453077 Test: mma Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
Diffstat (limited to 'soundtrigger')
-rw-r--r--soundtrigger/2.0/ISoundTriggerHw.hal86
-rw-r--r--soundtrigger/2.0/ISoundTriggerHwCallback.hal50
-rw-r--r--soundtrigger/2.0/types.hal43
3 files changed, 94 insertions, 85 deletions
diff --git a/soundtrigger/2.0/ISoundTriggerHw.hal b/soundtrigger/2.0/ISoundTriggerHw.hal
index cf35ef1cff..0c235c9d55 100644
--- a/soundtrigger/2.0/ISoundTriggerHw.hal
+++ b/soundtrigger/2.0/ISoundTriggerHw.hal
@@ -22,106 +22,110 @@ import ISoundTriggerHwCallback;
interface ISoundTriggerHw {
- /*
+ /**
* Sound trigger implementation descriptor read by the framework via
* getProperties(). Used by SoundTrigger service to report to applications
* and manage concurrency and policy.
*/
struct Properties {
- /* Implementor name */
+ /** Implementor name */
string implementor;
- /* Implementation description */
+ /** Implementation description */
string description;
- /* Implementation version */
+ /** Implementation version */
uint32_t version;
- /* Unique implementation ID. The UUID must change with each version of
+ /**
+ * Unique implementation ID. The UUID must change with each version of
the engine implementation */
Uuid uuid;
- /* Maximum number of concurrent sound models loaded */
+ /** Maximum number of concurrent sound models loaded */
uint32_t maxSoundModels;
- /* Maximum number of key phrases */
+ /** Maximum number of key phrases */
uint32_t maxKeyPhrases;
- /* Maximum number of concurrent users detected */
+ /** Maximum number of concurrent users detected */
uint32_t maxUsers;
- /* All supported modes. e.g RecognitionMode.VOICE_TRIGGER */
+ /** All supported modes. e.g RecognitionMode.VOICE_TRIGGER */
uint32_t recognitionModes;
- /* Supports seamless transition from detection to capture */
+ /** Supports seamless transition from detection to capture */
bool captureTransition;
- /* Maximum buffering capacity in ms if captureTransition is true */
+ /** Maximum buffering capacity in ms if captureTransition is true */
uint32_t maxBufferMs;
- /* Supports capture by other use cases while detection is active */
+ /** Supports capture by other use cases while detection is active */
bool concurrentCapture;
- /* Returns the trigger capture in event */
+ /** Returns the trigger capture in event */
bool triggerInEvent;
- /* Rated power consumption when detection is active with TDB
+ /**
+ * Rated power consumption when detection is active with TDB
* silence/sound/speech ratio */
uint32_t powerConsumptionMw;
};
- /*
+ /**
* Base sound model descriptor. This struct is the header of a larger block
* passed to loadSoundModel() and contains the binary data of the
* sound model.
*/
struct SoundModel {
- /* Model type. e.g. SoundModelType.KEYPHRASE */
+ /** Model type. e.g. SoundModelType.KEYPHRASE */
SoundModelType type;
- /* Unique sound model ID. */
+ /** Unique sound model ID. */
Uuid uuid;
- /* Unique vendor ID. Identifies the engine the sound model
+ /**
+ * Unique vendor ID. Identifies the engine the sound model
* was build for */
Uuid vendorUuid;
- /* Opaque data transparent to Android framework */
+ /** Opaque data transparent to Android framework */
vec<uint8_t> data;
};
- /* Key phrase descriptor */
+ /** Key phrase descriptor */
struct Phrase {
- /* Unique keyphrase ID assigned at enrollment time */
+ /** Unique keyphrase ID assigned at enrollment time */
uint32_t id;
- /* Recognition modes supported by this key phrase */
+ /** Recognition modes supported by this key phrase */
uint32_t recognitionModes;
- /* List of users IDs associated with this key phrase */
+ /** List of users IDs associated with this key phrase */
vec<uint32_t> users;
- /* Locale - Java Locale style (e.g. en_US) */
+ /** Locale - Java Locale style (e.g. en_US) */
string locale;
- /* Phrase text in UTF-8 format. */
+ /** Phrase text in UTF-8 format. */
string text;
};
- /*
+ /**
* Specialized sound model for key phrase detection.
* Proprietary representation of key phrases in binary data must match
* information indicated by phrases field
*/
struct PhraseSoundModel {
- /* Common part of sound model descriptor */
+ /** Common part of sound model descriptor */
SoundModel common;
- /* List of descriptors for key phrases supported by this sound model */
+ /** List of descriptors for key phrases supported by this sound model */
vec<Phrase> phrases;
};
- /*
+ /**
* Configuration for sound trigger capture session passed to
* startRecognition() method
*/
struct RecognitionConfig {
- /* IO handle that will be used for capture. N/A if captureRequested
+ /**
+ * IO handle that will be used for capture. N/A if captureRequested
* is false */
AudioIoHandle captureHandle;
- /* Input device requested for detection capture */
+ /** Input device requested for detection capture */
AudioDevice captureDevice;
- /* Capture and buffer audio for this recognition instance */
+ /** Capture and buffer audio for this recognition instance */
bool captureRequested;
- /* Configuration for each key phrase */
+ /** Configuration for each key phrase */
vec<PhraseRecognitionExtra> phrases;
- /* Opaque capture configuration data transparent to the framework */
+ /** Opaque capture configuration data transparent to the framework */
vec<uint8_t> data;
};
- /*
+ /**
* Retrieve implementation properties.
* @return retval Operation completion status: 0 in case of success,
* -ENODEV in case of initialization error.
@@ -130,7 +134,7 @@ interface ISoundTriggerHw {
*/
getProperties() generates (int32_t retval, Properties properties);
- /*
+ /**
* Load a sound model. Once loaded, recognition of this model can be
* started and stopped. Only one active recognition per model at a time.
* The SoundTrigger service must handle concurrent recognition requests by
@@ -158,7 +162,7 @@ interface ISoundTriggerHw {
CallbackCookie cookie)
generates (int32_t retval, SoundModelHandle modelHandle);
- /*
+ /**
* Load a key phrase sound model. Once loaded, recognition of this model can
* be started and stopped. Only one active recognition per model at a time.
* The SoundTrigger service must handle concurrent recognition requests by
@@ -186,7 +190,7 @@ interface ISoundTriggerHw {
CallbackCookie cookie)
generates (int32_t retval, SoundModelHandle modelHandle);
- /*
+ /**
* Unload a sound model. A sound model may be unloaded to make room for a
* new one to overcome implementation limitations.
* @param modelHandle the handle of the sound model to unload
@@ -197,7 +201,7 @@ interface ISoundTriggerHw {
unloadSoundModel(SoundModelHandle modelHandle)
generates (int32_t retval);
- /*
+ /**
* Start recognition on a given model. Only one recognition active
* at a time per model. Once recognition succeeds of fails, the callback
* is called.
@@ -221,7 +225,7 @@ interface ISoundTriggerHw {
CallbackCookie cookie)
generates (int32_t retval);
- /*
+ /**
* Stop recognition on a given model.
* The implementation must not call the recognition callback when stopped
* via this method.
@@ -233,7 +237,7 @@ interface ISoundTriggerHw {
stopRecognition(SoundModelHandle modelHandle)
generates (int32_t retval);
- /*
+ /**
* Stop recognition on all models.
* @return retval Operation completion status: 0 in case of success,
* -ENODEV in case of initialization error.
diff --git a/soundtrigger/2.0/ISoundTriggerHwCallback.hal b/soundtrigger/2.0/ISoundTriggerHwCallback.hal
index c6555f6c55..90132d9a8b 100644
--- a/soundtrigger/2.0/ISoundTriggerHwCallback.hal
+++ b/soundtrigger/2.0/ISoundTriggerHwCallback.hal
@@ -29,62 +29,66 @@ interface ISoundTriggerHwCallback {
UPDATED = 0,
};
- /*
+ /**
* Generic recognition event sent via recognition callback
*/
struct RecognitionEvent {
- /* Recognition status e.g. SUCCESS */
+ /** Recognition status e.g. SUCCESS */
RecognitionStatus status;
- /* Sound model type for this event. e.g SoundModelType.TYPE_KEYPHRASE */
+ /** Sound model type for this event. e.g SoundModelType.TYPE_KEYPHRASE */
SoundModelType type;
- /* Handle of loaded sound model which triggered the event */
+ /** Handle of loaded sound model which triggered the event */
SoundModelHandle model;
- /* It is possible to capture audio from this */
- /* utterance buffered by the implementation */
+ /** It is possible to capture audio from this */
+ /** utterance buffered by the implementation */
bool captureAvailable;
- /* Audio session ID. framework use */
+ /** Audio session ID. framework use */
int32_t captureSession;
- /* Delay in ms between end of model detection and start of audio
- /* available for capture. A negative value is possible
+ /**
+ * Delay in ms between end of model detection and start of audio
+ /**
+ * available for capture. A negative value is possible
* (e.g. if key phrase is also available for capture */
int32_t captureDelayMs;
- /* Duration in ms of audio captured before the start of the trigger.
+ /**
+ * Duration in ms of audio captured before the start of the trigger.
* 0 if none. */
int32_t capturePreambleMs;
- /* The opaque data is the capture of the trigger sound */
+ /** The opaque data is the capture of the trigger sound */
bool triggerInData;
- /* Audio format of either the trigger in event data or to use for
+ /**
+ * Audio format of either the trigger in event data or to use for
* capture of the rest of the utterance */
AudioConfig audioConfig;
- /* Opaque event data */
+ /** Opaque event data */
vec<uint8_t> data;
};
- /*
+ /**
* Specialized recognition event for key phrase recognitions
*/
struct PhraseRecognitionEvent {
- /* Common part of the recognition event */
+ /** Common part of the recognition event */
RecognitionEvent common;
- /* List of descriptors for each recognized key phrase */
+ /** List of descriptors for each recognized key phrase */
vec<PhraseRecognitionExtra> phraseExtras;
};
- /*
+ /**
* Event sent via load sound model callback
*/
struct ModelEvent {
- /* Sound model status e.g. SoundModelStatus.UPDATED */
+ /** Sound model status e.g. SoundModelStatus.UPDATED */
SoundModelStatus status;
- /* Loaded sound model that triggered the event */
+ /** Loaded sound model that triggered the event */
SoundModelHandle model;
- /* Opaque event data, passed transparently by the framework */
+ /** Opaque event data, passed transparently by the framework */
vec<uint8_t> data;
};
typedef int32_t CallbackCookie;
- /*
+ /**
* Callback method called by the HAL when the sound recognition triggers
* @param event A RecognitionEvent structure containing detailed results
* of the recognition triggered
@@ -93,7 +97,7 @@ interface ISoundTriggerHwCallback {
*/
recognitionCallback(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
@@ -103,7 +107,7 @@ interface ISoundTriggerHwCallback {
*/
phraseRecognitionCallback(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
diff --git a/soundtrigger/2.0/types.hal b/soundtrigger/2.0/types.hal
index 26928ba302..fc7d019353 100644
--- a/soundtrigger/2.0/types.hal
+++ b/soundtrigger/2.0/types.hal
@@ -16,66 +16,67 @@
package android.hardware.soundtrigger@2.0;
-/*
+/**
* Sound model types modes used in ISoundTriggerHw.SoundModel
*/
enum SoundModelType : int32_t {
- /* use for unspecified sound model type */
+ /** use for unspecified sound model type */
UNKNOWN = -1,
- /* use for key phrase sound models */
+ /** use for key phrase sound models */
KEYPHRASE = 0,
- /* use for all models other than keyphrase */
+ /** use for all models other than keyphrase */
GENERIC = 1,
};
typedef int32_t SoundModelHandle;
-/*
+/**
* Recognition modes used in ISoundTriggerHw.RecognitionConfig,
* ISoundTriggerHw.Properties or PhraseRecognitionExtra
*/
enum RecognitionMode : uint32_t {
- /* simple voice trigger */
+ /** simple voice trigger */
VOICE_TRIGGER = (1 << 0),
- /* trigger only if one user in model identified */
+ /** trigger only if one user in model identified */
USER_IDENTIFICATION = (1 << 1),
- /* trigger only if one user in mode authenticated */
+ /** trigger only if one user in mode authenticated */
USER_AUTHENTICATION = (1 << 2),
- /* generic sound trigger */
+ /** generic sound trigger */
GENERIC_TRIGGER = (1 << 3),
};
-/*
+/**
* Confidence level for each user in structure PhraseRecognitionExtra
*/
struct ConfidenceLevel {
- /* user ID */
+ /** user ID */
uint32_t userId;
- /* confidence level in percent (0 - 100): */
- /* - min level for recognition configuration */
- /* - detected level for recognition event */
+ /** confidence level in percent (0 - 100): */
+ /** - min level for recognition configuration */
+ /** - detected level for recognition event */
uint32_t levelPercent;
};
-/*
+/**
* Specialized recognition event for key phrase detection
*/
struct PhraseRecognitionExtra {
- /* keyphrase ID */
+ /** keyphrase ID */
uint32_t id;
- /* recognition modes used for this keyphrase */
+ /** recognition modes used for this keyphrase */
uint32_t recognitionModes;
- /* confidence level for mode RecognitionMode.VOICE_TRIGGER */
+ /** confidence level for mode RecognitionMode.VOICE_TRIGGER */
uint32_t confidenceLevel;
- /* list of confidence levels per user for
+ /**
+ * list of confidence levels per user for
* RecognitionMode.USER_IDENTIFICATION and
* RecognitionMode.USER_AUTHENTICATION */
vec<ConfidenceLevel> levels;
};
-/* TODO(elaurent) remove when Java build problem is fixed */
+/** TODO(elaurent) remove when Java build problem is fixed */
union Dummy {
uint32_t dummy1;
int32_t dummy2;
-}; \ No newline at end of file
+};