mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 21:37:44 +00:00
Merge "Convert all comments into "doxygen-ready" comments." into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8074912d8c
@@ -23,14 +23,14 @@ import IStreamOut;
|
||||
interface IDevice {
|
||||
typedef android.hardware.audio@2.0::Result Result;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns whether the audio hardware interface has been initialized.
|
||||
*
|
||||
* @return retval OK on success, NOT_INITIALIZED on failure.
|
||||
*/
|
||||
initCheck() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the audio volume for all audio activities other than voice call. If
|
||||
* NOT_SUPPORTED is returned, the software mixer will emulate this
|
||||
* capability.
|
||||
@@ -40,7 +40,7 @@ interface IDevice {
|
||||
*/
|
||||
setMasterVolume(float volume) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Get the current master volume value for the HAL, if the HAL supports
|
||||
* master volume control. For example, AudioFlinger will query this value
|
||||
* from the primary audio HAL when the service starts and use the value for
|
||||
@@ -52,7 +52,7 @@ interface IDevice {
|
||||
*/
|
||||
getMasterVolume() generates (Result retval, float volume);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets microphone muting state.
|
||||
*
|
||||
* @param mute whether microphone is muted.
|
||||
@@ -60,7 +60,7 @@ interface IDevice {
|
||||
*/
|
||||
setMicMute(bool mute) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets whether microphone is muted.
|
||||
*
|
||||
* @return retval operation completion status.
|
||||
@@ -68,7 +68,7 @@ interface IDevice {
|
||||
*/
|
||||
getMicMute() generates (Result retval, bool mute);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the audio mute status for all audio activities. If the return value
|
||||
* is NOT_SUPPORTED, the software mixer will emulate this capability.
|
||||
*
|
||||
@@ -89,7 +89,7 @@ interface IDevice {
|
||||
*/
|
||||
getMasterMute() generates (Result retval, bool mute);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns audio input buffer size according to parameters passed or
|
||||
* INVALID_ARGUMENTS if one of the parameters is not supported.
|
||||
*
|
||||
@@ -100,7 +100,7 @@ interface IDevice {
|
||||
getInputBufferSize(AudioConfig config)
|
||||
generates (Result retval, uint64_t bufferSize);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method creates and opens the audio hardware output stream.
|
||||
* If the stream can not be opened with the proposed audio config,
|
||||
* HAL must provide suggested values for the audio config.
|
||||
@@ -122,7 +122,7 @@ interface IDevice {
|
||||
IStreamOut outStream,
|
||||
AudioConfig suggestedConfig);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method creates and opens the audio hardware input stream.
|
||||
* If the stream can not be opened with the proposed audio config,
|
||||
* HAL must provide suggested values for the audio config.
|
||||
@@ -146,14 +146,14 @@ interface IDevice {
|
||||
IStreamIn inStream,
|
||||
AudioConfig suggestedConfig);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns whether HAL supports audio patches.
|
||||
*
|
||||
* @return supports true if audio patches are supported.
|
||||
*/
|
||||
supportsAudioPatches() generates (bool supports);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Creates an audio patch between several source and sink ports. The handle
|
||||
* is allocated by the HAL and must be unique for this audio HAL module.
|
||||
*
|
||||
@@ -165,7 +165,7 @@ interface IDevice {
|
||||
createAudioPatch(vec<AudioPortConfig> sources, vec<AudioPortConfig> sinks)
|
||||
generates (Result retval, AudioPatchHandle patch);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Release an audio patch.
|
||||
*
|
||||
* @param patch patch handle.
|
||||
@@ -173,7 +173,7 @@ interface IDevice {
|
||||
*/
|
||||
releaseAudioPatch(AudioPatchHandle patch) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns the list of supported attributes for a given audio port.
|
||||
*
|
||||
* As input, 'port' contains the information (type, role, address etc...)
|
||||
@@ -189,7 +189,7 @@ interface IDevice {
|
||||
getAudioPort(AudioPort port)
|
||||
generates (Result retval, AudioPort resultPort);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set audio port configuration.
|
||||
*
|
||||
* @param config audio port configuration.
|
||||
@@ -197,7 +197,7 @@ interface IDevice {
|
||||
*/
|
||||
setAudioPortConfig(AudioPortConfig config) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the HW synchronization source of the device. Calling this method is
|
||||
* equivalent to getting AUDIO_PARAMETER_HW_AV_SYNC on the legacy HAL.
|
||||
*
|
||||
@@ -205,7 +205,7 @@ interface IDevice {
|
||||
*/
|
||||
getHwAvSync() generates (AudioHwSync hwAvSync);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets whether the screen is on. Calling this method is equivalent to
|
||||
* setting AUDIO_PARAMETER_KEY_SCREEN_STATE on the legacy HAL.
|
||||
*
|
||||
@@ -214,7 +214,7 @@ interface IDevice {
|
||||
*/
|
||||
setScreenState(bool turnedOn) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Generic method for retrieving vendor-specific parameter values.
|
||||
* The framework does not interpret the parameters, they are passed
|
||||
* in an opaque manner between a vendor application and HAL.
|
||||
@@ -226,7 +226,7 @@ interface IDevice {
|
||||
getParameters(vec<string> keys)
|
||||
generates (Result retval, vec<ParameterValue> parameters);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Generic method for setting vendor-specific parameter values.
|
||||
* The framework does not interpret the parameters, they are passed
|
||||
* in an opaque manner between a vendor application and HAL.
|
||||
@@ -236,7 +236,7 @@ interface IDevice {
|
||||
*/
|
||||
setParameters(vec<ParameterValue> parameters) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Dumps information about the stream into the provided file descriptor.
|
||||
* This is used for the dumpsys facility.
|
||||
*
|
||||
|
||||
@@ -30,7 +30,7 @@ interface IDevicesFactory {
|
||||
STUB
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Opens an audio device. To close the device, it is necessary to release
|
||||
* references to the returned device object.
|
||||
*
|
||||
|
||||
@@ -22,7 +22,7 @@ import IDevice;
|
||||
interface IPrimaryDevice extends IDevice {
|
||||
typedef android.hardware.audio@2.0::Result Result;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the audio volume of a voice call.
|
||||
*
|
||||
* @param volume 1.0f means unity, 0.0f is zero.
|
||||
@@ -30,7 +30,7 @@ interface IPrimaryDevice extends IDevice {
|
||||
*/
|
||||
setVoiceVolume(float volume) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method is used to notify the HAL about audio mode changes.
|
||||
*
|
||||
* @param mode new mode.
|
||||
@@ -38,7 +38,7 @@ interface IPrimaryDevice extends IDevice {
|
||||
*/
|
||||
setMode(AudioMode mode) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets whether BT SCO Noise Reduction and Echo Cancellation are enabled.
|
||||
* Calling this method is equivalent to getting AUDIO_PARAMETER_KEY_BT_NREC
|
||||
* on the legacy HAL.
|
||||
@@ -48,7 +48,7 @@ interface IPrimaryDevice extends IDevice {
|
||||
*/
|
||||
getBtScoNrecEnabled() generates (Result retval, bool enabled);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets whether BT SCO Noise Reduction and Echo Cancellation are enabled.
|
||||
* Calling this method is equivalent to setting AUDIO_PARAMETER_KEY_BT_NREC
|
||||
* on the legacy HAL.
|
||||
@@ -58,7 +58,7 @@ interface IPrimaryDevice extends IDevice {
|
||||
*/
|
||||
setBtScoNrecEnabled(bool enabled) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets whether BT SCO Wideband mode is enabled. Calling this method is
|
||||
* equivalent to getting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.
|
||||
*
|
||||
@@ -67,7 +67,7 @@ interface IPrimaryDevice extends IDevice {
|
||||
*/
|
||||
getBtScoWidebandEnabled() generates (Result retval, bool enabled);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets whether BT SCO Wideband mode is enabled. Calling this method is
|
||||
* equivalent to setting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.
|
||||
*
|
||||
@@ -83,7 +83,7 @@ interface IPrimaryDevice extends IDevice {
|
||||
FULL
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets current TTY mode selection. Calling this method is equivalent to
|
||||
* getting AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.
|
||||
*
|
||||
@@ -92,7 +92,7 @@ interface IPrimaryDevice extends IDevice {
|
||||
*/
|
||||
getTtyMode() generates (Result retval, TtyMode mode);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets current TTY mode. Calling this method is equivalent to setting
|
||||
* AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.
|
||||
*
|
||||
@@ -101,7 +101,7 @@ interface IPrimaryDevice extends IDevice {
|
||||
*/
|
||||
setTtyMode(TtyMode mode) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets whether Hearing Aid Compatibility - Telecoil (HAC-T) mode is
|
||||
* enabled. Calling this method is equivalent to getting
|
||||
* AUDIO_PARAMETER_KEY_HAC on the legacy HAL.
|
||||
@@ -111,7 +111,7 @@ interface IPrimaryDevice extends IDevice {
|
||||
*/
|
||||
getHacEnabled() generates (Result retval, bool enabled);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets whether Hearing Aid Compatibility - Telecoil (HAC-T) mode is
|
||||
* enabled. Calling this method is equivalent to setting
|
||||
* AUDIO_PARAMETER_KEY_HAC on the legacy HAL.
|
||||
|
||||
@@ -22,14 +22,14 @@ import android.hardware.audio.effect@2.0::IEffect;
|
||||
interface IStream {
|
||||
typedef android.hardware.audio@2.0::Result Result;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the frame size (number of bytes per sample).
|
||||
*
|
||||
* @return frameSize frame size in bytes.
|
||||
*/
|
||||
getFrameSize() generates (uint64_t frameSize);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the frame count of the buffer. Calling this method is equivalent
|
||||
* to getting AUDIO_PARAMETER_STREAM_FRAME_COUNT on the legacy HAL.
|
||||
*
|
||||
@@ -37,7 +37,7 @@ interface IStream {
|
||||
*/
|
||||
getFrameCount() generates (uint64_t count);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the size of input/output buffer in bytes for this stream.
|
||||
* It must be a multiple of the frame size.
|
||||
*
|
||||
@@ -45,14 +45,14 @@ interface IStream {
|
||||
*/
|
||||
getBufferSize() generates (uint64_t bufferSize);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the sampling rate in Hz.
|
||||
*
|
||||
* @return sampleRateHz sample rate in Hz.
|
||||
*/
|
||||
getSampleRate() generates (uint32_t sampleRateHz);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return supported sampling rates of the stream. Calling this method is
|
||||
* equivalent to getting AUDIO_PARAMETER_STREAM_SUP_SAMPLING_RATES on the
|
||||
* legacy HAL.
|
||||
@@ -61,7 +61,7 @@ interface IStream {
|
||||
*/
|
||||
getSupportedSampleRates() generates (vec<uint32_t> sampleRates);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the sampling rate of the stream. Calling this method is equivalent
|
||||
* to setting AUDIO_PARAMETER_STREAM_SAMPLING_RATE on the legacy HAL.
|
||||
*
|
||||
@@ -70,14 +70,14 @@ interface IStream {
|
||||
*/
|
||||
setSampleRate(uint32_t sampleRateHz) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the channel mask of the stream.
|
||||
*
|
||||
* @return mask channel mask.
|
||||
*/
|
||||
getChannelMask() generates (AudioChannelMask mask);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return supported channel masks of the stream. Calling this method is
|
||||
* equivalent to getting AUDIO_PARAMETER_STREAM_SUP_CHANNELS on the legacy
|
||||
* HAL.
|
||||
@@ -86,7 +86,7 @@ interface IStream {
|
||||
*/
|
||||
getSupportedChannelMasks() generates (vec<AudioChannelMask> masks);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the channel mask of the stream. Calling this method is equivalent to
|
||||
* setting AUDIO_PARAMETER_STREAM_CHANNELS on the legacy HAL.
|
||||
*
|
||||
@@ -95,14 +95,14 @@ interface IStream {
|
||||
*/
|
||||
setChannelMask(AudioChannelMask mask) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the audio format of the stream.
|
||||
*
|
||||
* @return format audio format.
|
||||
*/
|
||||
getFormat() generates (AudioFormat format);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return supported audio formats of the stream. Calling this method is
|
||||
* equivalent to getting AUDIO_PARAMETER_STREAM_SUP_FORMATS on the legacy
|
||||
* HAL.
|
||||
@@ -111,7 +111,7 @@ interface IStream {
|
||||
*/
|
||||
getSupportedFormats() generates (vec<AudioFormat> formats);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the audio format of the stream. Calling this method is equivalent to
|
||||
* setting AUDIO_PARAMETER_STREAM_FORMAT on the legacy HAL.
|
||||
*
|
||||
@@ -120,7 +120,7 @@ interface IStream {
|
||||
*/
|
||||
setFormat(AudioFormat format) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Convenience method for retrieving several stream parameters in
|
||||
* one transaction.
|
||||
*
|
||||
@@ -131,7 +131,7 @@ interface IStream {
|
||||
getAudioProperties() generates (
|
||||
uint32_t sampleRateHz, AudioChannelMask mask, AudioFormat format);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Applies audio effect to the stream.
|
||||
*
|
||||
* @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
|
||||
@@ -140,7 +140,7 @@ interface IStream {
|
||||
*/
|
||||
addEffect(uint64_t effectId) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Stops application of the effect to the stream.
|
||||
*
|
||||
* @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
|
||||
@@ -149,7 +149,7 @@ interface IStream {
|
||||
*/
|
||||
removeEffect(uint64_t effectId) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Put the audio hardware input/output into standby mode.
|
||||
* Driver must exit from standby mode at the next I/O operation.
|
||||
*
|
||||
@@ -157,14 +157,14 @@ interface IStream {
|
||||
*/
|
||||
standby() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the set of device(s) which this stream is connected to.
|
||||
*
|
||||
* @return device set of device(s) which this stream is connected to.
|
||||
*/
|
||||
getDevice() generates (AudioDevice device);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Connects the stream to the device.
|
||||
*
|
||||
* This method must only be used for HALs that do not support
|
||||
@@ -177,7 +177,7 @@ interface IStream {
|
||||
*/
|
||||
setDevice(DeviceAddress address) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notifies the stream about device connection state. Calling this method is
|
||||
* equivalent to setting AUDIO_PARAMETER_DEVICE_[DIS]CONNECT on the legacy
|
||||
* HAL.
|
||||
@@ -189,7 +189,7 @@ interface IStream {
|
||||
setConnectedState(DeviceAddress address, bool connected)
|
||||
generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the HW synchronization source. Calling this method is equivalent to
|
||||
* setting AUDIO_PARAMETER_STREAM_HW_AV_SYNC on the legacy HAL.
|
||||
*
|
||||
@@ -198,7 +198,7 @@ interface IStream {
|
||||
*/
|
||||
setHwAvSync(AudioHwSync hwAvSync) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Generic method for retrieving vendor-specific parameter values.
|
||||
* The framework does not interpret the parameters, they are passed
|
||||
* in an opaque manner between a vendor application and HAL.
|
||||
@@ -210,7 +210,7 @@ interface IStream {
|
||||
getParameters(vec<string> keys)
|
||||
generates (Result retval, vec<ParameterValue> parameters);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Generic method for setting vendor-specific parameter values.
|
||||
* The framework does not interpret the parameters, they are passed
|
||||
* in an opaque manner between a vendor application and HAL.
|
||||
@@ -220,7 +220,7 @@ interface IStream {
|
||||
*/
|
||||
setParameters(vec<ParameterValue> parameters) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Dumps information about the stream into the provided file descriptor.
|
||||
* This is used for the dumpsys facility.
|
||||
*
|
||||
@@ -228,7 +228,7 @@ interface IStream {
|
||||
*/
|
||||
debugDump(handle fd);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Called by the framework to start a stream operating in mmap mode.
|
||||
* createMmapBuffer() must be called before calling start().
|
||||
* Function only implemented by streams operating in mmap mode.
|
||||
@@ -249,7 +249,7 @@ interface IStream {
|
||||
*/
|
||||
stop() generates (Result retval) ;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Called by the framework to retrieve information on the mmap buffer used for audio
|
||||
* samples transfer.
|
||||
* Function only implemented by streams operating in mmap mode.
|
||||
@@ -266,7 +266,7 @@ interface IStream {
|
||||
createMmapBuffer(int32_t minSizeFrames)
|
||||
generates (Result retval, MmapBufferInfo info);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Called by the framework to read current read/write position in the mmap buffer
|
||||
* with associated time stamp.
|
||||
* Function only implemented by streams operating in mmap mode.
|
||||
@@ -280,7 +280,7 @@ interface IStream {
|
||||
getMmapPosition()
|
||||
generates (Result retval, MmapPosition position);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Called by the framework to deinitialize the stream and free up
|
||||
* all the currently allocated resources. It is recommended to close
|
||||
* the stream on the client side as soon as it is becomes unused.
|
||||
|
||||
@@ -22,7 +22,7 @@ import IStream;
|
||||
interface IStreamIn extends IStream {
|
||||
typedef android.hardware.audio@2.0::Result Result;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns the source descriptor of the input stream. Calling this method is
|
||||
* equivalent to getting AUDIO_PARAMETER_STREAM_INPUT_SOURCE on the legacy
|
||||
* HAL.
|
||||
@@ -32,7 +32,7 @@ interface IStreamIn extends IStream {
|
||||
*/
|
||||
getAudioSource() generates (Result retval, AudioSource source);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the input gain for the audio driver.
|
||||
*
|
||||
* @param gain 1.0f is unity, 0.0f is zero.
|
||||
@@ -40,7 +40,7 @@ interface IStreamIn extends IStream {
|
||||
*/
|
||||
setGain(float gain) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Commands that can be executed on the driver reader thread.
|
||||
*/
|
||||
enum ReadCommand : int32_t {
|
||||
@@ -48,7 +48,7 @@ interface IStreamIn extends IStream {
|
||||
GET_CAPTURE_POSITION
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Data structure passed to the driver for executing commands
|
||||
* on the driver reader thread.
|
||||
*/
|
||||
@@ -60,7 +60,7 @@ interface IStreamIn extends IStream {
|
||||
} params;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Data structure passed back to the client via status message queue
|
||||
* of 'read' operation.
|
||||
*
|
||||
@@ -81,7 +81,7 @@ interface IStreamIn extends IStream {
|
||||
} reply;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set up required transports for receiving audio buffers from the driver.
|
||||
*
|
||||
* The transport consists of three message queues:
|
||||
@@ -119,7 +119,7 @@ interface IStreamIn extends IStream {
|
||||
fmq_sync<ReadStatus> statusMQ,
|
||||
ThreadInfo threadInfo);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the amount of input frames lost in the audio driver since the last
|
||||
* call of this function.
|
||||
*
|
||||
|
||||
@@ -23,14 +23,14 @@ import IStreamOutCallback;
|
||||
interface IStreamOut extends IStream {
|
||||
typedef android.hardware.audio@2.0::Result Result;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the audio hardware driver estimated latency in milliseconds.
|
||||
*
|
||||
* @return latencyMs latency in milliseconds.
|
||||
*/
|
||||
getLatency() generates (uint32_t latencyMs);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method is used in situations where audio mixing is done in the
|
||||
* hardware. This method serves as a direct interface with hardware,
|
||||
* allowing to directly set the volume as apposed to via the framework.
|
||||
@@ -43,7 +43,7 @@ interface IStreamOut extends IStream {
|
||||
*/
|
||||
setVolume(float left, float right) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Commands that can be executed on the driver writer thread.
|
||||
*/
|
||||
enum WriteCommand : int32_t {
|
||||
@@ -52,7 +52,7 @@ interface IStreamOut extends IStream {
|
||||
GET_LATENCY
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Data structure passed back to the client via status message queue
|
||||
* of 'write' operation.
|
||||
*
|
||||
@@ -75,7 +75,7 @@ interface IStreamOut extends IStream {
|
||||
} reply;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set up required transports for passing audio buffers to the driver.
|
||||
*
|
||||
* The transport consists of three message queues:
|
||||
@@ -112,7 +112,7 @@ interface IStreamOut extends IStream {
|
||||
fmq_sync<WriteStatus> statusMQ,
|
||||
ThreadInfo threadInfo);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the number of audio frames written by the audio DSP to DAC since
|
||||
* the output has exited standby.
|
||||
*
|
||||
@@ -121,7 +121,7 @@ interface IStreamOut extends IStream {
|
||||
*/
|
||||
getRenderPosition() generates (Result retval, uint32_t dspFrames);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Get the local time at which the next write to the audio driver will be
|
||||
* presented. The units are microseconds, where the epoch is decided by the
|
||||
* local audio HAL.
|
||||
@@ -131,7 +131,7 @@ interface IStreamOut extends IStream {
|
||||
*/
|
||||
getNextWriteTimestamp() generates (Result retval, int64_t timestampUs);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the callback interface for notifying completion of non-blocking
|
||||
* write and drain.
|
||||
*
|
||||
@@ -146,7 +146,7 @@ interface IStreamOut extends IStream {
|
||||
*/
|
||||
setCallback(IStreamOutCallback callback) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Clears the callback previously set via 'setCallback' method.
|
||||
*
|
||||
* Warning: failure to call this method results in callback implementation
|
||||
@@ -156,7 +156,7 @@ interface IStreamOut extends IStream {
|
||||
*/
|
||||
clearCallback() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns whether HAL supports pausing and resuming of streams.
|
||||
*
|
||||
* @return supportsPause true if pausing is supported.
|
||||
@@ -179,7 +179,7 @@ interface IStreamOut extends IStream {
|
||||
*/
|
||||
pause() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notifies to the audio driver to resume playback following a pause.
|
||||
* Returns error INVALID_STATE if called without matching pause.
|
||||
*
|
||||
@@ -189,7 +189,7 @@ interface IStreamOut extends IStream {
|
||||
*/
|
||||
resume() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns whether HAL supports draining of streams.
|
||||
*
|
||||
* @return supports true if draining is supported.
|
||||
@@ -220,7 +220,7 @@ interface IStreamOut extends IStream {
|
||||
*/
|
||||
drain(AudioDrain type) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notifies to the audio driver to flush the queued data. Stream must
|
||||
* already be paused before calling 'flush'.
|
||||
*
|
||||
@@ -230,7 +230,7 @@ interface IStreamOut extends IStream {
|
||||
*/
|
||||
flush() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return a recent count of the number of audio frames presented to an
|
||||
* external observer. This excludes frames which have been written but are
|
||||
* still in the pipeline. The count is not reset to zero when output enters
|
||||
|
||||
@@ -16,21 +16,21 @@
|
||||
|
||||
package android.hardware.audio@2.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Asynchronous write callback interface.
|
||||
*/
|
||||
interface IStreamOutCallback {
|
||||
/*
|
||||
/**
|
||||
* Non blocking write completed.
|
||||
*/
|
||||
oneway onWriteReady();
|
||||
|
||||
/*
|
||||
/**
|
||||
* Drain completed.
|
||||
*/
|
||||
oneway onDrainReady();
|
||||
|
||||
/*
|
||||
/**
|
||||
* Stream hit an error.
|
||||
*/
|
||||
oneway onError();
|
||||
|
||||
@@ -28,14 +28,16 @@ enum Result : int32_t {
|
||||
|
||||
@export(name="audio_drain_type_t", value_prefix="AUDIO_DRAIN_")
|
||||
enum AudioDrain : int32_t {
|
||||
/* drain() returns when all data has been played. */
|
||||
/** drain() returns when all data has been played. */
|
||||
ALL,
|
||||
/* drain() returns a short time before all data from the current track has
|
||||
been played to give time for gapless track switch. */
|
||||
/**
|
||||
* drain() returns a short time before all data from the current track has
|
||||
* been played to give time for gapless track switch.
|
||||
*/
|
||||
EARLY_NOTIFY
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* A substitute for POSIX timespec.
|
||||
*/
|
||||
struct TimeSpec {
|
||||
@@ -43,7 +45,7 @@ struct TimeSpec {
|
||||
uint64_t tvNSec; // nanoseconds
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* IEEE 802 MAC address.
|
||||
*/
|
||||
typedef uint8_t[6] MacAddress;
|
||||
@@ -53,7 +55,7 @@ struct ParameterValue {
|
||||
string value;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Specifies a device in case when several devices of the same type
|
||||
* can be connected (e.g. BT A2DP, USB).
|
||||
*/
|
||||
@@ -71,7 +73,7 @@ struct DeviceAddress {
|
||||
string rSubmixAddress; // used for REMOTE_SUBMIX
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Mmap buffer descriptor returned by IStream.createMmapBuffer().
|
||||
* Used by streams opened in mmap mode.
|
||||
*/
|
||||
@@ -81,7 +83,7 @@ struct MmapBufferInfo {
|
||||
int32_t burstSizeFrames; // transfer size granularity in frames
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Mmap buffer read/write position returned by IStream.getMmapPosition().
|
||||
* Used by streams opened in mmap mode.
|
||||
*/
|
||||
@@ -90,7 +92,7 @@ struct MmapPosition {
|
||||
int32_t positionFrames; // increasing 32 bit frame count reset when IStream.stop() is called
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The message queue flags used to synchronize reads and writes from
|
||||
* message queues used by StreamIn and StreamOut.
|
||||
*/
|
||||
|
||||
@@ -16,28 +16,28 @@
|
||||
|
||||
package android.hardware.audio.common@2.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* IDs and Handles
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* Handle type for identifying audio sources and sinks.
|
||||
*/
|
||||
typedef int32_t AudioIoHandle;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Audio hw module handle functions or structures referencing a module.
|
||||
*/
|
||||
typedef int32_t AudioModuleHandle;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Each port has a unique ID or handle allocated by policy manager.
|
||||
*/
|
||||
typedef int32_t AudioPortHandle;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Each patch is identified by a handle at the interface used to create that
|
||||
* patch. For instance, when a patch is created by the audio HAL, the HAL
|
||||
* allocates and returns a handle. This handle is unique to a given audio HAL
|
||||
@@ -47,12 +47,12 @@ typedef int32_t AudioPortHandle;
|
||||
*/
|
||||
typedef int32_t AudioPatchHandle;
|
||||
|
||||
/*
|
||||
/**
|
||||
* A HW synchronization source returned by the audio HAL.
|
||||
*/
|
||||
typedef uint32_t AudioHwSync;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Each port has a unique ID or handle allocated by policy manager.
|
||||
*/
|
||||
@export(name="")
|
||||
@@ -63,7 +63,7 @@ enum AudioHandleConsts : int32_t {
|
||||
AUDIO_PATCH_HANDLE_NONE = 0,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Commonly used structure for passing unique identifieds (UUID).
|
||||
* For the definition of UUID, refer to ITU-T X.667 spec.
|
||||
*/
|
||||
@@ -76,13 +76,13 @@ struct Uuid {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* Audio streams
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* Audio stream type describing the intented use case of a stream.
|
||||
*/
|
||||
@export(name="audio_stream_type_t", value_prefix="AUDIO_STREAM_")
|
||||
@@ -126,13 +126,13 @@ enum AudioSource : int32_t {
|
||||
CAMCORDER = 5,
|
||||
VOICE_RECOGNITION = 6,
|
||||
VOICE_COMMUNICATION = 7,
|
||||
/*
|
||||
/**
|
||||
* Source for the mix to be presented remotely. An example of remote
|
||||
* presentation is Wifi Display where a dongle attached to a TV can be used
|
||||
* to play the mix captured by this audio source.
|
||||
*/
|
||||
REMOTE_SUBMIX = 8,
|
||||
/*
|
||||
/**
|
||||
* Source for unprocessed sound. Usage examples include level measurement
|
||||
* and raw signal analysis.
|
||||
*/
|
||||
@@ -141,7 +141,7 @@ enum AudioSource : int32_t {
|
||||
CNT,
|
||||
MAX = CNT - 1,
|
||||
FM_TUNER = 1998,
|
||||
/*
|
||||
/**
|
||||
* A low-priority, preemptible audio source for for background software
|
||||
* hotword detection. Same tuning as VOICE_RECOGNITION. Used only
|
||||
* internally by the framework.
|
||||
@@ -150,30 +150,30 @@ enum AudioSource : int32_t {
|
||||
};
|
||||
|
||||
typedef int32_t AudioSession;
|
||||
/*
|
||||
/**
|
||||
* Special audio session values.
|
||||
*/
|
||||
@export(name="audio_session_t", value_prefix="AUDIO_SESSION_")
|
||||
enum AudioSessionConsts : int32_t {
|
||||
/*
|
||||
/**
|
||||
* Session for effects attached to a particular output stream
|
||||
* (value must be less than 0)
|
||||
*/
|
||||
OUTPUT_STAGE = -1,
|
||||
/*
|
||||
/**
|
||||
* Session for effects applied to output mix. These effects can
|
||||
* be moved by audio policy manager to another output stream
|
||||
* (value must be 0)
|
||||
*/
|
||||
OUTPUT_MIX = 0,
|
||||
/*
|
||||
/**
|
||||
* Application does not specify an explicit session ID to be used, and
|
||||
* requests a new session ID to be allocated. Corresponds to
|
||||
* AudioManager.AUDIO_SESSION_ID_GENERATE and
|
||||
* AudioSystem.AUDIO_SESSION_ALLOCATE.
|
||||
*/
|
||||
ALLOCATE = 0,
|
||||
/*
|
||||
/**
|
||||
* For use with AudioRecord::start(), this indicates no trigger session.
|
||||
* It is also used with output tracks and patch tracks, which never have a
|
||||
* session.
|
||||
@@ -181,7 +181,7 @@ enum AudioSessionConsts : int32_t {
|
||||
NONE = 0
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Audio format is a 32-bit word that consists of:
|
||||
* main format field (upper 8 bits)
|
||||
* sub format field (lower 24 bits).
|
||||
@@ -196,13 +196,13 @@ enum AudioSessionConsts : int32_t {
|
||||
enum AudioFormat : uint32_t {
|
||||
INVALID = 0xFFFFFFFFUL,
|
||||
DEFAULT = 0,
|
||||
PCM = 0x00000000UL, /* DO NOT CHANGE */
|
||||
PCM = 0x00000000UL, /** DO NOT CHANGE */
|
||||
MP3 = 0x01000000UL,
|
||||
AMR_NB = 0x02000000UL,
|
||||
AMR_WB = 0x03000000UL,
|
||||
AAC = 0x04000000UL,
|
||||
HE_AAC_V1 = 0x05000000UL, /* Deprecated, Use AAC_HE_V1*/
|
||||
HE_AAC_V2 = 0x06000000UL, /* Deprecated, Use AAC_HE_V2*/
|
||||
HE_AAC_V1 = 0x05000000UL, /** Deprecated, Use AAC_HE_V1 */
|
||||
HE_AAC_V2 = 0x06000000UL, /** Deprecated, Use AAC_HE_V2 */
|
||||
VORBIS = 0x07000000UL,
|
||||
OPUS = 0x08000000UL,
|
||||
AC3 = 0x09000000UL,
|
||||
@@ -232,10 +232,10 @@ enum AudioFormat : uint32_t {
|
||||
APTX_HD = 0x21000000UL,
|
||||
AC4 = 0x22000000UL,
|
||||
LDAC = 0x23000000UL,
|
||||
MAIN_MASK = 0xFF000000UL, /* Deprecated */
|
||||
MAIN_MASK = 0xFF000000UL, /** Deprecated */
|
||||
SUB_MASK = 0x00FFFFFFUL,
|
||||
|
||||
/* Subformats */
|
||||
/** Subformats */
|
||||
PCM_SUB_16_BIT = 0x1, // PCM signed 16 bits
|
||||
PCM_SUB_8_BIT = 0x2, // PCM unsigned 8 bits
|
||||
PCM_SUB_32_BIT = 0x3, // PCM signed .31 fixed point
|
||||
@@ -260,10 +260,10 @@ enum AudioFormat : uint32_t {
|
||||
|
||||
VORBIS_SUB_NONE = 0x0,
|
||||
|
||||
/* Aliases */
|
||||
/* note != AudioFormat.ENCODING_PCM_16BIT */
|
||||
/** Aliases */
|
||||
/** note != AudioFormat.ENCODING_PCM_16BIT */
|
||||
PCM_16_BIT = (PCM | PCM_SUB_16_BIT),
|
||||
/* note != AudioFormat.ENCODING_PCM_8BIT */
|
||||
/** note != AudioFormat.ENCODING_PCM_8BIT */
|
||||
PCM_8_BIT = (PCM | PCM_SUB_8_BIT),
|
||||
PCM_32_BIT = (PCM | PCM_SUB_32_BIT),
|
||||
PCM_8_24_BIT = (PCM | PCM_SUB_8_24_BIT),
|
||||
@@ -291,7 +291,7 @@ enum AudioFormat : uint32_t {
|
||||
AAC_ADTS_ELD = (AAC_ADTS | AAC_SUB_ELD)
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Usage of these values highlights places in the code that use 2- or 8- channel
|
||||
* assumptions.
|
||||
*/
|
||||
@@ -301,7 +301,7 @@ enum FixedChannelCount : int32_t {
|
||||
FCC_8 = 8 // This is typically due to audio mixer and resampler limitations
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* A channel mask per se only defines the presence or absence of a channel, not
|
||||
* the order. See AUDIO_INTERLEAVE_* for the platform convention of order.
|
||||
*
|
||||
@@ -335,21 +335,21 @@ enum FixedChannelCount : int32_t {
|
||||
*/
|
||||
@export(name="", value_prefix="AUDIO_CHANNEL_")
|
||||
enum AudioChannelMask : uint32_t {
|
||||
REPRESENTATION_POSITION = 0, /* must be 0 for compatibility */
|
||||
/* 1 is reserved for future use */
|
||||
REPRESENTATION_POSITION = 0, /** must be 0 for compatibility */
|
||||
/** 1 is reserved for future use */
|
||||
REPRESENTATION_INDEX = 2,
|
||||
/* 3 is reserved for future use */
|
||||
/** 3 is reserved for future use */
|
||||
|
||||
/* These can be a complete value of AudioChannelMask */
|
||||
/** These can be a complete value of AudioChannelMask */
|
||||
NONE = 0x0,
|
||||
INVALID = 0xC0000000,
|
||||
|
||||
/*
|
||||
/**
|
||||
* These can be the bits portion of an AudioChannelMask
|
||||
* with representation REPRESENTATION_POSITION.
|
||||
*/
|
||||
|
||||
/* output channels */
|
||||
/** output channels */
|
||||
OUT_FRONT_LEFT = 0x1,
|
||||
OUT_FRONT_RIGHT = 0x2,
|
||||
OUT_FRONT_CENTER = 0x4,
|
||||
@@ -375,7 +375,7 @@ enum AudioChannelMask : uint32_t {
|
||||
OUT_QUAD = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
|
||||
OUT_BACK_LEFT | OUT_BACK_RIGHT),
|
||||
OUT_QUAD_BACK = OUT_QUAD,
|
||||
/* like OUT_QUAD_BACK with *_SIDE_* instead of *_BACK_* */
|
||||
/** like OUT_QUAD_BACK with *_SIDE_* instead of *_BACK_* */
|
||||
OUT_QUAD_SIDE = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
|
||||
OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
|
||||
OUT_SURROUND = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
|
||||
@@ -385,7 +385,7 @@ enum AudioChannelMask : uint32_t {
|
||||
OUT_FRONT_CENTER | OUT_LOW_FREQUENCY |
|
||||
OUT_BACK_LEFT | OUT_BACK_RIGHT),
|
||||
OUT_5POINT1_BACK = OUT_5POINT1,
|
||||
/* like OUT_5POINT1_BACK with *_SIDE_* instead of *_BACK_* */
|
||||
/** like OUT_5POINT1_BACK with *_SIDE_* instead of *_BACK_* */
|
||||
OUT_5POINT1_SIDE = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
|
||||
OUT_FRONT_CENTER | OUT_LOW_FREQUENCY |
|
||||
OUT_SIDE_LEFT | OUT_SIDE_RIGHT),
|
||||
@@ -393,7 +393,7 @@ enum AudioChannelMask : uint32_t {
|
||||
OUT_FRONT_CENTER | OUT_LOW_FREQUENCY |
|
||||
OUT_BACK_LEFT | OUT_BACK_RIGHT |
|
||||
OUT_BACK_CENTER),
|
||||
/* matches the correct AudioFormat.CHANNEL_OUT_7POINT1_SURROUND */
|
||||
/** matches the correct AudioFormat.CHANNEL_OUT_7POINT1_SURROUND */
|
||||
OUT_7POINT1 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
|
||||
OUT_FRONT_CENTER | OUT_LOW_FREQUENCY |
|
||||
OUT_BACK_LEFT | OUT_BACK_RIGHT |
|
||||
@@ -408,9 +408,9 @@ enum AudioChannelMask : uint32_t {
|
||||
OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_CENTER | OUT_TOP_FRONT_RIGHT |
|
||||
OUT_TOP_BACK_LEFT | OUT_TOP_BACK_CENTER | OUT_TOP_BACK_RIGHT),
|
||||
|
||||
/* These are bits only, not complete values */
|
||||
/** These are bits only, not complete values */
|
||||
|
||||
/* input channels */
|
||||
/** input channels */
|
||||
IN_LEFT = 0x4,
|
||||
IN_RIGHT = 0x8,
|
||||
IN_FRONT = 0x10,
|
||||
@@ -456,7 +456,7 @@ enum AudioChannelMask : uint32_t {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Expresses the convention when stereo audio samples are stored interleaved
|
||||
* in an array. This should improve readability by allowing code to use
|
||||
* symbolic indices instead of hard-coded [0] and [1].
|
||||
@@ -472,7 +472,7 @@ enum AudioInterleave : int32_t {
|
||||
RIGHT = 1,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Major modes for a mobile device. The current mode setting affects audio
|
||||
* routing.
|
||||
*/
|
||||
@@ -492,10 +492,10 @@ enum AudioMode : int32_t {
|
||||
@export(name="", value_prefix="AUDIO_DEVICE_")
|
||||
enum AudioDevice : uint32_t {
|
||||
NONE = 0x0,
|
||||
/* reserved bits */
|
||||
/** reserved bits */
|
||||
BIT_IN = 0x80000000,
|
||||
BIT_DEFAULT = 0x40000000,
|
||||
/* output devices */
|
||||
/** output devices */
|
||||
OUT_EARPIECE = 0x1,
|
||||
OUT_SPEAKER = 0x2,
|
||||
OUT_WIRED_HEADSET = 0x4,
|
||||
@@ -508,30 +508,30 @@ enum AudioDevice : uint32_t {
|
||||
OUT_BLUETOOTH_A2DP_SPEAKER = 0x200,
|
||||
OUT_AUX_DIGITAL = 0x400,
|
||||
OUT_HDMI = OUT_AUX_DIGITAL,
|
||||
/* uses an analog connection (multiplexed over the USB pins for instance) */
|
||||
/** uses an analog connection (multiplexed over the USB pins for instance) */
|
||||
OUT_ANLG_DOCK_HEADSET = 0x800,
|
||||
OUT_DGTL_DOCK_HEADSET = 0x1000,
|
||||
/* USB accessory mode: Android device is USB device and dock is USB host */
|
||||
/** USB accessory mode: Android device is USB device and dock is USB host */
|
||||
OUT_USB_ACCESSORY = 0x2000,
|
||||
/* USB host mode: Android device is USB host and dock is USB device */
|
||||
/** USB host mode: Android device is USB host and dock is USB device */
|
||||
OUT_USB_DEVICE = 0x4000,
|
||||
OUT_REMOTE_SUBMIX = 0x8000,
|
||||
/* Telephony voice TX path */
|
||||
/** Telephony voice TX path */
|
||||
OUT_TELEPHONY_TX = 0x10000,
|
||||
/* Analog jack with line impedance detected */
|
||||
/** Analog jack with line impedance detected */
|
||||
OUT_LINE = 0x20000,
|
||||
/* HDMI Audio Return Channel */
|
||||
/** HDMI Audio Return Channel */
|
||||
OUT_HDMI_ARC = 0x40000,
|
||||
/* S/PDIF out */
|
||||
/** S/PDIF out */
|
||||
OUT_SPDIF = 0x80000,
|
||||
/* FM transmitter out */
|
||||
/** FM transmitter out */
|
||||
OUT_FM = 0x100000,
|
||||
/* Line out for av devices */
|
||||
/** Line out for av devices */
|
||||
OUT_AUX_LINE = 0x200000,
|
||||
/* limited-output speaker device for acoustic safety */
|
||||
/** limited-output speaker device for acoustic safety */
|
||||
OUT_SPEAKER_SAFE = 0x400000,
|
||||
OUT_IP = 0x800000,
|
||||
/* audio bus implemented by the audio system (e.g an MOST stereo channel) */
|
||||
/** audio bus implemented by the audio system (e.g an MOST stereo channel) */
|
||||
OUT_BUS = 0x1000000,
|
||||
OUT_PROXY = 0x2000000,
|
||||
OUT_USB_HEADSET = 0x4000000,
|
||||
@@ -571,7 +571,7 @@ enum AudioDevice : uint32_t {
|
||||
OUT_BLUETOOTH_SCO_HEADSET |
|
||||
OUT_BLUETOOTH_SCO_CARKIT),
|
||||
OUT_ALL_USB = (OUT_USB_ACCESSORY | OUT_USB_DEVICE | OUT_USB_HEADSET),
|
||||
/* input devices */
|
||||
/** input devices */
|
||||
IN_COMMUNICATION = BIT_IN | 0x1,
|
||||
IN_AMBIENT = BIT_IN | 0x2,
|
||||
IN_BUILTIN_MIC = BIT_IN | 0x4,
|
||||
@@ -579,7 +579,7 @@ enum AudioDevice : uint32_t {
|
||||
IN_WIRED_HEADSET = BIT_IN | 0x10,
|
||||
IN_AUX_DIGITAL = BIT_IN | 0x20,
|
||||
IN_HDMI = IN_AUX_DIGITAL,
|
||||
/* Telephony voice RX path */
|
||||
/** Telephony voice RX path */
|
||||
IN_VOICE_CALL = BIT_IN | 0x40,
|
||||
IN_TELEPHONY_RX = IN_VOICE_CALL,
|
||||
IN_BACK_MIC = BIT_IN | 0x80,
|
||||
@@ -588,18 +588,18 @@ enum AudioDevice : uint32_t {
|
||||
IN_DGTL_DOCK_HEADSET = BIT_IN | 0x400,
|
||||
IN_USB_ACCESSORY = BIT_IN | 0x800,
|
||||
IN_USB_DEVICE = BIT_IN | 0x1000,
|
||||
/* FM tuner input */
|
||||
/** FM tuner input */
|
||||
IN_FM_TUNER = BIT_IN | 0x2000,
|
||||
/* TV tuner input */
|
||||
/** TV tuner input */
|
||||
IN_TV_TUNER = BIT_IN | 0x4000,
|
||||
/* Analog jack with line impedance detected */
|
||||
/** Analog jack with line impedance detected */
|
||||
IN_LINE = BIT_IN | 0x8000,
|
||||
/* S/PDIF in */
|
||||
/** S/PDIF in */
|
||||
IN_SPDIF = BIT_IN | 0x10000,
|
||||
IN_BLUETOOTH_A2DP = BIT_IN | 0x20000,
|
||||
IN_LOOPBACK = BIT_IN | 0x40000,
|
||||
IN_IP = BIT_IN | 0x80000,
|
||||
/* audio bus implemented by the audio system (e.g an MOST stereo channel) */
|
||||
/** audio bus implemented by the audio system (e.g an MOST stereo channel) */
|
||||
IN_BUS = BIT_IN | 0x100000,
|
||||
IN_PROXY = BIT_IN | 0x1000000,
|
||||
IN_USB_HEADSET = BIT_IN | 0x2000000,
|
||||
@@ -633,7 +633,7 @@ enum AudioDevice : uint32_t {
|
||||
IN_ALL_USB = (IN_USB_ACCESSORY | IN_USB_DEVICE | IN_USB_HEADSET),
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The audio output flags serve two purposes:
|
||||
*
|
||||
* - when an AudioTrack is created they indicate a "wish" to be connected to an
|
||||
@@ -674,7 +674,7 @@ enum AudioOutputFlag : int32_t {
|
||||
VOIP_RX = 0x8000, // preferred output for VoIP calls.
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The audio input flags are analogous to audio output flags.
|
||||
* Currently they are used only when an AudioRecord is created,
|
||||
* to indicate a preference to be connected to an input stream with
|
||||
@@ -717,7 +717,7 @@ enum AudioUsage : int32_t {
|
||||
MAX = CNT - 1,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Additional information about the stream passed to hardware decoders.
|
||||
*/
|
||||
struct AudioOffloadInfo {
|
||||
@@ -734,7 +734,7 @@ struct AudioOffloadInfo {
|
||||
AudioUsage usage;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Commonly used audio stream configuration parameters.
|
||||
*/
|
||||
struct AudioConfig {
|
||||
@@ -746,13 +746,13 @@ struct AudioConfig {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* Volume control
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* Type of gain control exposed by an audio port.
|
||||
*/
|
||||
@export(name="", value_prefix="AUDIO_GAIN_MODE_")
|
||||
@@ -762,7 +762,7 @@ enum AudioGainMode : uint32_t {
|
||||
RAMP = 0x4 // supports gain ramps
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* An audio_gain struct is a representation of a gain stage.
|
||||
* A gain stage is always attached to an audio port.
|
||||
*/
|
||||
@@ -777,7 +777,7 @@ struct AudioGain {
|
||||
uint32_t maxRampMs; // maximum ramp duration in ms
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The gain configuration structure is used to get or set the gain values of a
|
||||
* given port.
|
||||
*/
|
||||
@@ -785,7 +785,7 @@ struct AudioGainConfig {
|
||||
int32_t index; // index of the corresponding AudioGain in AudioPort.gains
|
||||
AudioGainMode mode;
|
||||
AudioChannelMask channelMask; // channels which gain value follows
|
||||
/*
|
||||
/**
|
||||
* 4 = sizeof(AudioChannelMask),
|
||||
* 8 is not "FCC_8", so it won't need to be changed for > 8 channels.
|
||||
* Gain values in millibels for each channel ordered from LSb to MSb in
|
||||
@@ -797,13 +797,13 @@ struct AudioGainConfig {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
*
|
||||
* Routing control
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* Types defined here are used to describe an audio source or sink at internal
|
||||
* framework interfaces (audio policy, patch panel) or at the audio HAL.
|
||||
* Sink and sources are grouped in a concept of “audio port” representing an
|
||||
@@ -811,7 +811,7 @@ struct AudioGainConfig {
|
||||
* the interface.
|
||||
*/
|
||||
|
||||
/* Audio port role: either source or sink */
|
||||
/** Audio port role: either source or sink */
|
||||
@export(name="audio_port_role_t", value_prefix="AUDIO_PORT_ROLE_")
|
||||
enum AudioPortRole : int32_t {
|
||||
NONE,
|
||||
@@ -819,7 +819,7 @@ enum AudioPortRole : int32_t {
|
||||
SINK,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Audio port type indicates if it is a session (e.g AudioTrack), a mix (e.g
|
||||
* PlaybackThread output) or a physical device (e.g OUT_SPEAKER)
|
||||
*/
|
||||
@@ -831,7 +831,7 @@ enum AudioPortType : int32_t {
|
||||
SESSION,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extension for audio port configuration structure when the audio port is a
|
||||
* hardware device.
|
||||
*/
|
||||
@@ -841,7 +841,7 @@ struct AudioPortConfigDeviceExt {
|
||||
uint8_t[32] address; // device address. "" if N/A
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extension for audio port configuration structure when the audio port is an
|
||||
* audio session.
|
||||
*/
|
||||
@@ -849,7 +849,7 @@ struct AudioPortConfigSessionExt {
|
||||
AudioSession session;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags indicating which fields are to be considered in AudioPortConfig.
|
||||
*/
|
||||
@export(name="", value_prefix="AUDIO_PORT_CONFIG_")
|
||||
@@ -861,7 +861,7 @@ enum AudioPortConfigMask : uint32_t {
|
||||
ALL = SAMPLE_RATE | CHANNEL_MASK | FORMAT | GAIN
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Audio port configuration structure used to specify a particular configuration
|
||||
* of an audio port.
|
||||
*/
|
||||
@@ -888,7 +888,7 @@ struct AudioPortConfig {
|
||||
} ext;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extension for audio port structure when the audio port is a hardware device.
|
||||
*/
|
||||
struct AudioPortDeviceExt {
|
||||
@@ -897,7 +897,7 @@ struct AudioPortDeviceExt {
|
||||
uint8_t[32] address;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Latency class of the audio mix.
|
||||
*/
|
||||
@export(name="audio_mix_latency_class_t", value_prefix="AUDIO_LATENCY_")
|
||||
@@ -912,7 +912,7 @@ struct AudioPortMixExt {
|
||||
AudioMixLatencyClass latencyClass;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extension for audio port structure when the audio port is an audio session.
|
||||
*/
|
||||
struct AudioPortSessionExt {
|
||||
|
||||
@@ -20,12 +20,12 @@ import android.hardware.audio.common@2.0;
|
||||
import IEffect;
|
||||
|
||||
interface IAcousticEchoCancelerEffect extends IEffect {
|
||||
/*
|
||||
/**
|
||||
* Sets echo delay value in milliseconds.
|
||||
*/
|
||||
setEchoDelay(uint32_t echoDelayMs) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets echo delay value in milliseconds.
|
||||
*/
|
||||
getEchoDelay() generates (Result retval, uint32_t echoDelayMs);
|
||||
|
||||
@@ -20,32 +20,32 @@ import android.hardware.audio.common@2.0;
|
||||
import IEffect;
|
||||
|
||||
interface IAutomaticGainControlEffect extends IEffect {
|
||||
/*
|
||||
/**
|
||||
* Sets target level in millibels.
|
||||
*/
|
||||
setTargetLevel(int16_t targetLevelMb) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets target level.
|
||||
*/
|
||||
getTargetLevel() generates (Result retval, int16_t targetLevelMb);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets gain in the compression range in millibels.
|
||||
*/
|
||||
setCompGain(int16_t compGainMb) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets gain in the compression range.
|
||||
*/
|
||||
getCompGain() generates (Result retval, int16_t compGainMb);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Enables or disables limiter.
|
||||
*/
|
||||
setLimiterEnabled(bool enabled) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns whether limiter is enabled.
|
||||
*/
|
||||
isLimiterEnabled() generates (Result retval, bool enabled);
|
||||
@@ -56,12 +56,12 @@ interface IAutomaticGainControlEffect extends IEffect {
|
||||
bool limiterEnabled;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets all properties at once.
|
||||
*/
|
||||
setAllProperties(AllProperties properties) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets all properties at once.
|
||||
*/
|
||||
getAllProperties() generates (Result retval, AllProperties properties);
|
||||
|
||||
@@ -20,7 +20,7 @@ import android.hardware.audio.common@2.0;
|
||||
import IEffect;
|
||||
|
||||
interface IBassBoostEffect extends IEffect {
|
||||
/*
|
||||
/**
|
||||
* Returns whether setting bass boost strength is supported.
|
||||
*/
|
||||
isStrengthSupported() generates (Result retval, bool strengthSupported);
|
||||
@@ -30,7 +30,7 @@ interface IBassBoostEffect extends IEffect {
|
||||
MAX = 1000
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets bass boost strength.
|
||||
*
|
||||
* @param strength strength of the effect. The valid range for strength
|
||||
@@ -41,7 +41,7 @@ interface IBassBoostEffect extends IEffect {
|
||||
*/
|
||||
setStrength(uint16_t strength) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets virtualization strength.
|
||||
*/
|
||||
getStrength() generates (Result retval, uint16_t strength);
|
||||
|
||||
@@ -20,7 +20,7 @@ import android.hardware.audio.common@2.0;
|
||||
import IEffectBufferProviderCallback;
|
||||
|
||||
interface IEffect {
|
||||
/*
|
||||
/**
|
||||
* Initialize effect engine--all configurations return to default.
|
||||
*
|
||||
* @return retval operation completion status.
|
||||
@@ -29,7 +29,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
init() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Apply new audio parameters configurations for input and output buffers.
|
||||
* The provider callbacks may be empty, but in this case the buffer
|
||||
* must be provided in the EffectConfig structure.
|
||||
@@ -45,7 +45,7 @@ interface IEffect {
|
||||
IEffectBufferProviderCallback outputBufferProvider)
|
||||
generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Reset the effect engine. Keep configuration but resets state and buffer
|
||||
* content.
|
||||
*
|
||||
@@ -54,7 +54,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
reset() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Enable processing.
|
||||
*
|
||||
* @return retval operation completion status.
|
||||
@@ -62,7 +62,7 @@ interface IEffect {
|
||||
@callflow(next={"prepareForProcessing"})
|
||||
enable() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Disable processing.
|
||||
*
|
||||
* @return retval operation completion status.
|
||||
@@ -70,7 +70,7 @@ interface IEffect {
|
||||
@callflow(next={"close"})
|
||||
disable() generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the rendering device the audio output path is connected to. The
|
||||
* effect implementation must set EFFECT_FLAG_DEVICE_IND flag in its
|
||||
* descriptor to receive this command when the device changes.
|
||||
@@ -84,7 +84,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
setDevice(AudioDevice device) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set and get volume. Used by audio framework to delegate volume control to
|
||||
* effect engine. The effect implementation must set EFFECT_FLAG_VOLUME_CTRL
|
||||
* flag in its descriptor to receive this command. The effect engine must
|
||||
@@ -103,7 +103,7 @@ interface IEffect {
|
||||
setAndGetVolume(vec<uint32_t> volumes)
|
||||
generates (Result retval, vec<uint32_t> result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notify the effect of the volume change. The effect implementation must
|
||||
* set EFFECT_FLAG_VOLUME_IND flag in its descriptor to receive this
|
||||
* command.
|
||||
@@ -116,7 +116,7 @@ interface IEffect {
|
||||
volumeChangeNotification(vec<uint32_t> volumes)
|
||||
generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the audio mode. The effect implementation must set
|
||||
* EFFECT_FLAG_AUDIO_MODE_IND flag in its descriptor to receive this command
|
||||
* when the audio mode changes.
|
||||
@@ -127,7 +127,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
setAudioMode(AudioMode mode) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Apply new audio parameters configurations for input and output buffers of
|
||||
* reverse stream. An example of reverse stream is the echo reference
|
||||
* supplied to an Acoustic Echo Canceler.
|
||||
@@ -143,7 +143,7 @@ interface IEffect {
|
||||
IEffectBufferProviderCallback outputBufferProvider)
|
||||
generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the capture device the audio input path is connected to. The effect
|
||||
* implementation must set EFFECT_FLAG_DEVICE_IND flag in its descriptor to
|
||||
* receive this command when the device changes.
|
||||
@@ -157,7 +157,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
setInputDevice(AudioDevice device) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Read audio parameters configurations for input and output buffers.
|
||||
*
|
||||
* @return retval operation completion status.
|
||||
@@ -166,7 +166,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
getConfig() generates (Result retval, EffectConfig config);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Read audio parameters configurations for input and output buffers of
|
||||
* reverse stream.
|
||||
*
|
||||
@@ -176,7 +176,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
getConfigReverse() generates (Result retval, EffectConfig config);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Queries for supported combinations of main and auxiliary channels
|
||||
* (e.g. for a multi-microphone noise suppressor).
|
||||
*
|
||||
@@ -190,7 +190,7 @@ interface IEffect {
|
||||
getSupportedAuxChannelsConfigs(uint32_t maxConfigs)
|
||||
generates (Result retval, vec<EffectAuxChannelsConfig> result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves the current configuration of main and auxiliary channels.
|
||||
*
|
||||
* @return retval absence of the feature support is indicated using
|
||||
@@ -201,7 +201,7 @@ interface IEffect {
|
||||
getAuxChannelsConfig()
|
||||
generates (Result retval, EffectAuxChannelsConfig result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the current configuration of main and auxiliary channels.
|
||||
*
|
||||
* @return retval operation completion status; absence of the feature
|
||||
@@ -211,7 +211,7 @@ interface IEffect {
|
||||
setAuxChannelsConfig(EffectAuxChannelsConfig config)
|
||||
generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the audio source the capture path is configured for (Camcorder, voice
|
||||
* recognition...).
|
||||
*
|
||||
@@ -224,7 +224,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
setAudioSource(AudioSource source) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This command indicates if the playback thread the effect is attached to
|
||||
* is offloaded or not, and updates the I/O handle of the playback thread
|
||||
* the effect is attached to.
|
||||
@@ -235,7 +235,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
offload(EffectOffloadParameter param) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns the effect descriptor.
|
||||
*
|
||||
* @return retval operation completion status.
|
||||
@@ -244,7 +244,7 @@ interface IEffect {
|
||||
@callflow(next={"*"})
|
||||
getDescriptor() generates (Result retval, EffectDescriptor descriptor);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set up required transports for passing audio buffers to the effect.
|
||||
*
|
||||
* The transport consists of shared memory and a message queue for reporting
|
||||
@@ -270,7 +270,7 @@ interface IEffect {
|
||||
@callflow(next={"setProcessBuffers"})
|
||||
prepareForProcessing() generates (Result retval, fmq_sync<Result> statusMQ);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set up input and output buffers for processing audio data. The effect
|
||||
* may modify both the input and the output buffer during the operation.
|
||||
* Buffers may be set multiple times during effect lifetime.
|
||||
@@ -289,7 +289,7 @@ interface IEffect {
|
||||
setProcessBuffers(AudioBuffer inBuffer, AudioBuffer outBuffer) generates (
|
||||
Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Execute a vendor specific command on the effect. The command code
|
||||
* and data, as well as result data are not interpreted by Android
|
||||
* Framework and are passed as-is between the application and the effect.
|
||||
@@ -310,7 +310,7 @@ interface IEffect {
|
||||
command(uint32_t commandId, vec<uint8_t> data, uint32_t resultMaxSize)
|
||||
generates (int32_t status, vec<uint8_t> result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set a vendor-specific parameter and apply it immediately. The parameter
|
||||
* code and data are not interpreted by Android Framework and are passed
|
||||
* as-is between the application and the effect.
|
||||
@@ -331,7 +331,7 @@ interface IEffect {
|
||||
setParameter(vec<uint8_t> parameter, vec<uint8_t> value)
|
||||
generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Get a vendor-specific parameter value. The parameter code and returned
|
||||
* data are not interpreted by Android Framework and are passed as-is
|
||||
* between the application and the effect.
|
||||
@@ -353,7 +353,7 @@ interface IEffect {
|
||||
getParameter(vec<uint8_t> parameter, uint32_t valueMaxSize)
|
||||
generates (Result retval, vec<uint8_t> value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Get supported configs for a vendor-specific feature. The configs returned
|
||||
* are not interpreted by Android Framework and are passed as-is between the
|
||||
* application and the effect.
|
||||
@@ -384,7 +384,7 @@ interface IEffect {
|
||||
uint32_t configsCount,
|
||||
vec<uint8_t> configsData);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Get the current config for a vendor-specific feature. The config returned
|
||||
* is not interpreted by Android Framework and is passed as-is between the
|
||||
* application and the effect.
|
||||
@@ -406,7 +406,7 @@ interface IEffect {
|
||||
getCurrentConfigForFeature(uint32_t featureId, uint32_t configSize)
|
||||
generates (Result retval, vec<uint8_t> configData);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the current config for a vendor-specific feature. The config data
|
||||
* is not interpreted by Android Framework and is passed as-is between the
|
||||
* application and the effect.
|
||||
@@ -426,7 +426,7 @@ interface IEffect {
|
||||
setCurrentConfigForFeature(uint32_t featureId, vec<uint8_t> configData)
|
||||
generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Called by the framework to deinitialize the effect and free up
|
||||
* all the currently allocated resources. It is recommended to close
|
||||
* the effect on the client side as soon as it is becomes unused.
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
|
||||
package android.hardware.audio.effect@2.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* This callback interface contains functions that can be used by the effect
|
||||
* engine 'process' function to exchange input and output audio buffers.
|
||||
*/
|
||||
interface IEffectBufferProviderCallback {
|
||||
/*
|
||||
/**
|
||||
* Called to retrieve a buffer where data should read from by 'process'
|
||||
* function.
|
||||
*
|
||||
@@ -29,7 +29,7 @@ interface IEffectBufferProviderCallback {
|
||||
*/
|
||||
getBuffer() generates (AudioBuffer buffer);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Called to provide a buffer with the data written by 'process' function.
|
||||
*
|
||||
* @param buffer audio buffer for processing
|
||||
|
||||
@@ -20,7 +20,7 @@ import android.hardware.audio.common@2.0;
|
||||
import IEffect;
|
||||
|
||||
interface IEffectsFactory {
|
||||
/*
|
||||
/**
|
||||
* Returns descriptors of different effects in all loaded libraries.
|
||||
*
|
||||
* @return retval operation completion status.
|
||||
@@ -28,7 +28,7 @@ interface IEffectsFactory {
|
||||
*/
|
||||
getAllDescriptors() generates(Result retval, vec<EffectDescriptor> result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns a descriptor of a particular effect.
|
||||
*
|
||||
* @return retval operation completion status.
|
||||
@@ -36,7 +36,7 @@ interface IEffectsFactory {
|
||||
*/
|
||||
getDescriptor(Uuid uid) generates(Result retval, EffectDescriptor result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Creates an effect engine of the specified type. To release the effect
|
||||
* engine, it is necessary to release references to the returned effect
|
||||
* object.
|
||||
@@ -56,7 +56,7 @@ interface IEffectsFactory {
|
||||
createEffect(Uuid uid, AudioSession session, AudioIoHandle ioHandle)
|
||||
generates (Result retval, IEffect result, uint64_t effectId);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Dumps information about effects into the provided file descriptor.
|
||||
* This is used for the dumpsys facility.
|
||||
*
|
||||
|
||||
@@ -20,12 +20,12 @@ import android.hardware.audio.common@2.0;
|
||||
import IEffect;
|
||||
|
||||
interface IEnvironmentalReverbEffect extends IEffect {
|
||||
/*
|
||||
/**
|
||||
* Sets whether the effect should be bypassed.
|
||||
*/
|
||||
setBypass(bool bypass) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets whether the effect should be bypassed.
|
||||
*/
|
||||
getBypass() generates (Result retval, bool bypass);
|
||||
@@ -53,102 +53,102 @@ interface IEnvironmentalReverbEffect extends IEffect {
|
||||
DENSITY_MAX = 1000
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the room level.
|
||||
*/
|
||||
setRoomLevel(int16_t roomLevel) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the room level.
|
||||
*/
|
||||
getRoomLevel() generates (Result retval, int16_t roomLevel);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the room high frequences level.
|
||||
*/
|
||||
setRoomHfLevel(int16_t roomHfLevel) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the room high frequences level.
|
||||
*/
|
||||
getRoomHfLevel() generates (Result retval, int16_t roomHfLevel);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the room decay time.
|
||||
*/
|
||||
setDecayTime(uint32_t decayTime) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the room decay time.
|
||||
*/
|
||||
getDecayTime() generates (Result retval, uint32_t decayTime);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the ratio of high frequences decay.
|
||||
*/
|
||||
setDecayHfRatio(int16_t decayHfRatio) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the ratio of high frequences decay.
|
||||
*/
|
||||
getDecayHfRatio() generates (Result retval, int16_t decayHfRatio);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the level of reflections in the room.
|
||||
*/
|
||||
setReflectionsLevel(int16_t reflectionsLevel) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the level of reflections in the room.
|
||||
*/
|
||||
getReflectionsLevel() generates (Result retval, int16_t reflectionsLevel);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the reflections delay in the room.
|
||||
*/
|
||||
setReflectionsDelay(uint32_t reflectionsDelay) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the reflections delay in the room.
|
||||
*/
|
||||
getReflectionsDelay() generates (Result retval, uint32_t reflectionsDelay);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the reverb level of the room.
|
||||
*/
|
||||
setReverbLevel(int16_t reverbLevel) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the reverb level of the room.
|
||||
*/
|
||||
getReverbLevel() generates (Result retval, int16_t reverbLevel);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the reverb delay of the room.
|
||||
*/
|
||||
setReverbDelay(uint32_t reverDelay) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the reverb delay of the room.
|
||||
*/
|
||||
getReverbDelay() generates (Result retval, uint32_t reverbDelay);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets room diffusion.
|
||||
*/
|
||||
setDiffusion(int16_t diffusion) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets room diffusion.
|
||||
*/
|
||||
getDiffusion() generates (Result retval, int16_t diffusion);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets room wall density.
|
||||
*/
|
||||
setDensity(int16_t density) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets room wall density.
|
||||
*/
|
||||
getDensity() generates (Result retval, int16_t density);
|
||||
@@ -166,12 +166,12 @@ interface IEnvironmentalReverbEffect extends IEffect {
|
||||
int16_t density; // in permilles, range 0 to 1000
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets all properties at once.
|
||||
*/
|
||||
setAllProperties(AllProperties properties) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets all properties at once.
|
||||
*/
|
||||
getAllProperties() generates (Result retval, AllProperties properties);
|
||||
|
||||
@@ -20,58 +20,58 @@ import android.hardware.audio.common@2.0;
|
||||
import IEffect;
|
||||
|
||||
interface IEqualizerEffect extends IEffect {
|
||||
/*
|
||||
/**
|
||||
* Gets the number of frequency bands that the equalizer supports.
|
||||
*/
|
||||
getNumBands() generates (Result retval, uint16_t numBands);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns the minimum and maximum band levels supported.
|
||||
*/
|
||||
getLevelRange()
|
||||
generates (Result retval, int16_t minLevel, int16_t maxLevel);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the gain for the given equalizer band.
|
||||
*/
|
||||
setBandLevel(uint16_t band, int16_t level) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the gain for the given equalizer band.
|
||||
*/
|
||||
getBandLevel(uint16_t band) generates (Result retval, int16_t level);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the center frequency of the given band, in milliHertz.
|
||||
*/
|
||||
getBandCenterFrequency(uint16_t band)
|
||||
generates (Result retval, uint32_t centerFreqmHz);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the frequency range of the given frequency band, in milliHertz.
|
||||
*/
|
||||
getBandFrequencyRange(uint16_t band)
|
||||
generates (Result retval, uint32_t minFreqmHz, uint32_t maxFreqmHz);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the band that has the most effect on the given frequency
|
||||
* in milliHertz.
|
||||
*/
|
||||
getBandForFrequency(uint32_t freqmHz)
|
||||
generates (Result retval, uint16_t band);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the names of all presets the equalizer supports.
|
||||
*/
|
||||
getPresetNames() generates (Result retval, vec<string> names);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the current preset using the index of the preset in the names
|
||||
* vector returned via 'getPresetNames'.
|
||||
*/
|
||||
setCurrentPreset(uint16_t preset) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the current preset.
|
||||
*/
|
||||
getCurrentPreset() generates (Result retval, uint16_t preset);
|
||||
@@ -81,12 +81,12 @@ interface IEqualizerEffect extends IEffect {
|
||||
vec<int16_t> bandLevels;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets all properties at once.
|
||||
*/
|
||||
setAllProperties(AllProperties properties) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets all properties at once.
|
||||
*/
|
||||
getAllProperties() generates (Result retval, AllProperties properties);
|
||||
|
||||
@@ -20,12 +20,12 @@ import android.hardware.audio.common@2.0;
|
||||
import IEffect;
|
||||
|
||||
interface ILoudnessEnhancerEffect extends IEffect {
|
||||
/*
|
||||
/**
|
||||
* Sets target gain expressed in millibels.
|
||||
*/
|
||||
setTargetGain(int32_t targetGainMb) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets target gain expressed in millibels.
|
||||
*/
|
||||
getTargetGain() generates (Result retval, int32_t targetGainMb);
|
||||
|
||||
@@ -26,12 +26,12 @@ interface INoiseSuppressionEffect extends IEffect {
|
||||
HIGH
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets suppression level.
|
||||
*/
|
||||
setSuppressionLevel(Level level) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets suppression level.
|
||||
*/
|
||||
getSuppressionLevel() generates (Result retval, Level level);
|
||||
@@ -41,12 +41,12 @@ interface INoiseSuppressionEffect extends IEffect {
|
||||
MULTI_CHANNEL
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set suppression type.
|
||||
*/
|
||||
setSuppressionType(Type type) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Get suppression type.
|
||||
*/
|
||||
getSuppressionType() generates (Result retval, Type type);
|
||||
@@ -56,12 +56,12 @@ interface INoiseSuppressionEffect extends IEffect {
|
||||
Type type;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets all properties at once.
|
||||
*/
|
||||
setAllProperties(AllProperties properties) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets all properties at once.
|
||||
*/
|
||||
getAllProperties() generates (Result retval, AllProperties properties);
|
||||
|
||||
@@ -20,7 +20,7 @@ import android.hardware.audio.common@2.0;
|
||||
import IEffect;
|
||||
|
||||
interface IVirtualizerEffect extends IEffect {
|
||||
/*
|
||||
/**
|
||||
* Returns whether setting virtualization strength is supported.
|
||||
*/
|
||||
isStrengthSupported() generates (bool strengthSupported);
|
||||
@@ -30,7 +30,7 @@ interface IVirtualizerEffect extends IEffect {
|
||||
MAX = 1000
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets virtualization strength.
|
||||
*
|
||||
* @param strength strength of the effect. The valid range for strength
|
||||
@@ -41,7 +41,7 @@ interface IVirtualizerEffect extends IEffect {
|
||||
*/
|
||||
setStrength(uint16_t strength) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets virtualization strength.
|
||||
*/
|
||||
getStrength() generates (Result retval, uint16_t strength);
|
||||
@@ -56,19 +56,19 @@ interface IVirtualizerEffect extends IEffect {
|
||||
int16_t elevation; // 0 is the horizontal plane
|
||||
// +90 is above the listener, -90 is below
|
||||
};
|
||||
/*
|
||||
/**
|
||||
* Retrieves virtual speaker angles for the given channel mask on the
|
||||
* specified device.
|
||||
*/
|
||||
getVirtualSpeakerAngles(AudioChannelMask mask, AudioDevice device)
|
||||
generates (Result retval, vec<SpeakerAngle> speakerAngles);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Forces the virtualizer effect for the given output device.
|
||||
*/
|
||||
forceVirtualizationMode(AudioDevice device) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns audio device reflecting the current virtualization mode,
|
||||
* AUDIO_DEVICE_NONE when not virtualizing.
|
||||
*/
|
||||
|
||||
@@ -25,12 +25,12 @@ interface IVisualizerEffect extends IEffect {
|
||||
MIN = 128 // minimum capture size in samples
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the number PCM samples in the capture.
|
||||
*/
|
||||
setCaptureSize(uint16_t captureSize) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the number PCM samples in the capture.
|
||||
*/
|
||||
getCaptureSize() generates (Result retval, uint16_t captureSize);
|
||||
@@ -42,22 +42,22 @@ interface IVisualizerEffect extends IEffect {
|
||||
AS_PLAYED = 1
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Specifies the way the captured data is scaled.
|
||||
*/
|
||||
setScalingMode(ScalingMode scalingMode) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves the way the captured data is scaled.
|
||||
*/
|
||||
getScalingMode() generates (Result retval, ScalingMode scalingMode);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Informs the visualizer about the downstream latency.
|
||||
*/
|
||||
setLatency(uint32_t latencyMs) generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the downstream latency.
|
||||
*/
|
||||
getLatency() generates (Result retval, uint32_t latencyMs);
|
||||
@@ -69,19 +69,19 @@ interface IVisualizerEffect extends IEffect {
|
||||
PEAK_RMS = 0x1
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Specifies which measurements are to be made.
|
||||
*/
|
||||
setMeasurementMode(MeasurementMode measurementMode)
|
||||
generates (Result retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves which measurements are to be made.
|
||||
*/
|
||||
getMeasurementMode() generates (
|
||||
Result retval, MeasurementMode measurementMode);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves the latest PCM snapshot captured by the visualizer engine. The
|
||||
* number of samples to capture is specified by 'setCaptureSize' parameter.
|
||||
*
|
||||
@@ -99,7 +99,7 @@ interface IVisualizerEffect extends IEffect {
|
||||
} peakAndRms;
|
||||
} value;
|
||||
};
|
||||
/*
|
||||
/**
|
||||
* Retrieves the lastest measurements. The measurements to be made
|
||||
* are specified by 'setMeasurementMode' parameter.
|
||||
*
|
||||
|
||||
@@ -27,7 +27,7 @@ enum Result : int32_t {
|
||||
RESULT_TOO_BIG
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Effect engine capabilities/requirements flags.
|
||||
*
|
||||
* Definitions for flags field of effect descriptor.
|
||||
@@ -195,7 +195,7 @@ enum EffectFlags : int32_t {
|
||||
NO_PROCESS = 1 << NO_PROCESS_SHIFT
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The effect descriptor contains necessary information to facilitate the
|
||||
* enumeration of the effect engines present in a library.
|
||||
*/
|
||||
@@ -212,7 +212,7 @@ struct EffectDescriptor {
|
||||
uint8_t[64] implementor; // human readable effect implementor name
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* A buffer is a chunk of audio data for processing. Multi-channel audio is
|
||||
* always interleaved. The channel order is from LSB to MSB with regard to the
|
||||
* channel mask definition in audio.h, audio_channel_mask_t, e.g.:
|
||||
@@ -235,7 +235,7 @@ enum EffectBufferAccess : int32_t {
|
||||
ACCESS_ACCUMULATE
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Determines what fields of EffectBufferConfig need to be considered.
|
||||
*/
|
||||
@export(name="", value_prefix="EFFECT_CONFIG_")
|
||||
@@ -248,7 +248,7 @@ enum EffectConfigParameters : int32_t {
|
||||
ALL = BUFFER | SMP_RATE | CHANNELS | FORMAT | ACC_MODE
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The buffer config structure specifies the input or output audio format
|
||||
* to be used by the effect engine.
|
||||
*/
|
||||
@@ -285,7 +285,7 @@ struct EffectOffloadParameter {
|
||||
// the effect is attached to
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The message queue flags used to synchronize reads and writes from
|
||||
* the status message queue used by effects.
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package android.hardware.automotive.evs@1.0;
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Bit flags indicating suggested uses for a given EVS camera
|
||||
*
|
||||
* The values in the UsageHint bit field provide a generic expression of how a
|
||||
@@ -35,7 +35,7 @@ enum UsageHint : uint32_t {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Structure describing the basic properties of an EVS camera
|
||||
*
|
||||
* The HAL is responsible for filling out this structure for each
|
||||
@@ -55,7 +55,7 @@ struct CameraDesc {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Structure describing the basic properties of an EVS display
|
||||
*
|
||||
* The HAL is responsible for filling out this structure to describe
|
||||
@@ -71,7 +71,7 @@ struct DisplayDesc {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Structure representing an image buffer through our APIs
|
||||
*
|
||||
* In addition to the handle to the graphics memory, we need to retain
|
||||
@@ -94,7 +94,7 @@ struct BufferDesc {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* States for control of the EVS display
|
||||
*
|
||||
* The DisplayInfo structure describes the basic properties of an EVS display. Any EVS
|
||||
@@ -112,11 +112,11 @@ enum DisplayState : uint32_t {
|
||||
};
|
||||
|
||||
|
||||
/* Error codes used in EVS HAL interface. */
|
||||
/** Error codes used in EVS HAL interface. */
|
||||
enum EvsResult : uint32_t {
|
||||
OK = 0,
|
||||
INVALID_ARG,
|
||||
STREAM_ALREADY_RUNNING,
|
||||
BUFFER_NOT_AVAILABLE,
|
||||
UNDERLYING_SERVICE_ERROR,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ interface IVehicle {
|
||||
*/
|
||||
getAllPropConfigs() generates (vec<VehiclePropConfig> propConfigs);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns a list of property configurations for given properties.
|
||||
*
|
||||
* If requested VehicleProperty wasn't found it must return
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.automotive.vehicle@2.0;
|
||||
|
||||
interface IVehicleCallback {
|
||||
|
||||
/*
|
||||
/**
|
||||
* Event callback happens whenever a variable that the API user has
|
||||
* subscribed to needs to be reported. This may be based purely on
|
||||
* threshold and frequency (a regular subscription, see subscribe call's
|
||||
@@ -31,7 +31,7 @@ interface IVehicleCallback {
|
||||
*/
|
||||
oneway onPropertyEvent(vec<VehiclePropValue> propValues);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method gets called if the client was subscribed to a property using
|
||||
* SubscribeFlags::SET_CALL flag and IVehicle#set(...) method was called.
|
||||
*
|
||||
@@ -42,7 +42,7 @@ interface IVehicleCallback {
|
||||
*/
|
||||
oneway onPropertySet(VehiclePropValue propValue);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set property value is usually asynchronous operation. Thus even if
|
||||
* client received StatusCode::OK from the IVehicle::set(...) this
|
||||
* doesn't guarantee that the value was successfully propagated to the
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@ package android.hardware.automotive.vehicle@2.1;
|
||||
|
||||
import android.hardware.automotive.vehicle@2.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* New revision of IVehicle interface that supports properties defined in
|
||||
* VehicleProperty enum version 2.1.
|
||||
*
|
||||
|
||||
@@ -18,11 +18,11 @@ package android.hardware.automotive.vehicle@2.1;
|
||||
|
||||
import android.hardware.automotive.vehicle@2.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extension of VehicleProperty enum declared in Vehicle HAL 2.0
|
||||
*/
|
||||
enum VehicleProperty: @2.0::VehicleProperty {
|
||||
/*
|
||||
/**
|
||||
* Reports wheel rotational distance in meters since last wheel tick
|
||||
* event
|
||||
*
|
||||
@@ -44,7 +44,7 @@ enum VehicleProperty: @2.0::VehicleProperty {
|
||||
| VehiclePropertyType:FLOAT_VEC
|
||||
| VehicleArea:GLOBAL),
|
||||
|
||||
/*
|
||||
/**
|
||||
* OBD2 Live Sensor Data
|
||||
*
|
||||
* This property uses COMPLEX data to send a snapshot of the current (live)
|
||||
@@ -84,7 +84,7 @@ enum VehicleProperty: @2.0::VehicleProperty {
|
||||
| VehiclePropertyType:COMPLEX
|
||||
| VehicleArea:GLOBAL),
|
||||
|
||||
/*
|
||||
/**
|
||||
* OBD2 Freeze Frame Sensor Data
|
||||
*
|
||||
* This property uses COMPLEX data to send a snapshot of the values of the
|
||||
@@ -132,7 +132,7 @@ enum VehicleProperty: @2.0::VehicleProperty {
|
||||
| VehiclePropertyType:COMPLEX
|
||||
| VehicleArea:GLOBAL),
|
||||
|
||||
/*
|
||||
/**
|
||||
* OBD2 Freeze Frame Information
|
||||
*
|
||||
* This property describes the current freeze frames stored in vehicle
|
||||
@@ -153,7 +153,7 @@ enum VehicleProperty: @2.0::VehicleProperty {
|
||||
| VehiclePropertyType:COMPLEX
|
||||
| VehicleArea:GLOBAL),
|
||||
|
||||
/*
|
||||
/**
|
||||
* OBD2 Freeze Frame Clear
|
||||
*
|
||||
* This property allows deletion of any of the freeze frames stored in
|
||||
@@ -175,7 +175,7 @@ enum VehicleProperty: @2.0::VehicleProperty {
|
||||
| VehiclePropertyType:COMPLEX
|
||||
| VehicleArea:GLOBAL),
|
||||
|
||||
/*
|
||||
/**
|
||||
* Vehicle Maps Service (VMS) message
|
||||
*
|
||||
* This property uses COMPLEX data to communicate vms messages.
|
||||
@@ -196,7 +196,7 @@ enum VehicleProperty: @2.0::VehicleProperty {
|
||||
| VehicleArea:GLOBAL),
|
||||
};
|
||||
|
||||
/* The status of a fuel system as described by the OBD2 specification. */
|
||||
/** The status of a fuel system as described by the OBD2 specification. */
|
||||
enum FuelSystemStatus : int32_t {
|
||||
OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
|
||||
|
||||
@@ -209,14 +209,14 @@ enum FuelSystemStatus : int32_t {
|
||||
CLOSED_LOOP_BUT_FEEDBACK_FAULT = 16,
|
||||
};
|
||||
|
||||
/* Defines which ignition monitors are available to be read. */
|
||||
/** Defines which ignition monitors are available to be read. */
|
||||
enum IgnitionMonitorKind : int32_t {
|
||||
SPARK = 0,
|
||||
|
||||
COMPRESSION = 1,
|
||||
};
|
||||
|
||||
/* These ignition monitors are common to both SPARK and COMPRESSION. */
|
||||
/** These ignition monitors are common to both SPARK and COMPRESSION. */
|
||||
enum CommonIgnitionMonitors : int32_t {
|
||||
COMPONENTS_AVAILABLE = 0x1 << 0,
|
||||
COMPONENTS_INCOMPLETE = 0x1 << 1,
|
||||
@@ -228,7 +228,7 @@ enum CommonIgnitionMonitors : int32_t {
|
||||
MISFIRE_INCOMPLETE = 0x1 << 5,
|
||||
};
|
||||
|
||||
/* Ignition monitors available for SPARK vehicles. */
|
||||
/** Ignition monitors available for SPARK vehicles. */
|
||||
enum SparkIgnitionMonitors : CommonIgnitionMonitors {
|
||||
EGR_AVAILABLE = 0x1 << 6,
|
||||
EGR_INCOMPLETE = 0x1 << 7,
|
||||
@@ -255,7 +255,7 @@ enum SparkIgnitionMonitors : CommonIgnitionMonitors {
|
||||
CATALYST_INCOMPLETE = 0x1 << 21,
|
||||
};
|
||||
|
||||
/* Ignition monitors only available for COMPRESSION vehicles. */
|
||||
/** Ignition monitors only available for COMPRESSION vehicles. */
|
||||
enum CompressionIgnitionMonitors : CommonIgnitionMonitors {
|
||||
EGR_OR_VVT_AVAILABLE = 0x1 << 6,
|
||||
EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
|
||||
@@ -336,7 +336,7 @@ enum FuelType : int32_t {
|
||||
BIFUEL_RUNNING_DIESEL = 23,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* This enum provides the canonical mapping for sensor properties that have an integer value.
|
||||
* The ordering of the values is taken from the OBD2 specification.
|
||||
* Some of the properties are represented as an integer mapping to another enum. In those cases
|
||||
@@ -344,15 +344,15 @@ enum FuelType : int32_t {
|
||||
* Any value greater than the last reserved index is available to vendors to map their extensions.
|
||||
*/
|
||||
enum Obd2IntegerSensorIndex : int32_t {
|
||||
/* refer to FuelSystemStatus for a description of this value. */
|
||||
/** refer to FuelSystemStatus for a description of this value. */
|
||||
FUEL_SYSTEM_STATUS = 0,
|
||||
|
||||
MALFUNCTION_INDICATOR_LIGHT_ON = 1,
|
||||
|
||||
/* refer to IgnitionMonitorKind for a description of this value. */
|
||||
/** refer to IgnitionMonitorKind for a description of this value. */
|
||||
IGNITION_MONITORS_SUPPORTED = 2,
|
||||
|
||||
/*
|
||||
/**
|
||||
* The value of this sensor is a bitmask that specifies whether ignition-specific
|
||||
* tests are available and whether they are complete. The semantics of the individual
|
||||
* bits in this value are given by, respectively, SparkIgnitionMonitors and
|
||||
@@ -362,7 +362,7 @@ enum Obd2IntegerSensorIndex : int32_t {
|
||||
|
||||
INTAKE_AIR_TEMPERATURE = 4,
|
||||
|
||||
/* refer to SecondaryAirStatus for a description of this value. */
|
||||
/** refer to SecondaryAirStatus for a description of this value. */
|
||||
COMMANDED_SECONDARY_AIR_STATUS = 5,
|
||||
|
||||
NUM_OXYGEN_SENSORS_PRESENT = 6,
|
||||
@@ -395,7 +395,7 @@ enum Obd2IntegerSensorIndex : int32_t {
|
||||
|
||||
MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20,
|
||||
|
||||
/* refer to FuelType for a description of this value. */
|
||||
/** refer to FuelType for a description of this value. */
|
||||
FUEL_TYPE = 21,
|
||||
|
||||
FUEL_RAIL_ABSOLUTE_PRESSURE = 22,
|
||||
@@ -421,7 +421,7 @@ enum Obd2IntegerSensorIndex : int32_t {
|
||||
LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* This enum provides the canonical mapping for sensor properties that have a floating-point value.
|
||||
* The ordering of the values is taken from the OBD2 specification.
|
||||
* Any value greater than the last reserved index is available to vendors to map their extensions.
|
||||
@@ -572,34 +572,34 @@ enum Obd2FloatSensorIndex : int32_t {
|
||||
LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* This enum lists the types of supported VMS messages.
|
||||
*/
|
||||
enum VmsMessageType : int32_t {
|
||||
/* A client subscribes to a layer. */
|
||||
/** A client subscribes to a layer. */
|
||||
SUBSCRIBE = 1,
|
||||
|
||||
/* A client unsubscribes from a layer. */
|
||||
/** A client unsubscribes from a layer. */
|
||||
UNSUBSCRIBE = 2,
|
||||
|
||||
/* A client publishes a data packet. */
|
||||
/** A client publishes a data packet. */
|
||||
DATA = 3,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* This enum provides the canonical mapping for VMS properties that have an
|
||||
* integer value.
|
||||
*/
|
||||
enum VmsMessageIntegerValuesIndex : int32_t {
|
||||
/* The message type as enumerated by VmsMessageType enum. */
|
||||
/** The message type as enumerated by VmsMessageType enum. */
|
||||
VMS_MESSAGE_TYPE = 0,
|
||||
|
||||
/* The layer ID as defined in the vms protocol. */
|
||||
/** The layer ID as defined in the vms protocol. */
|
||||
VMS_LAYER_ID = 1,
|
||||
|
||||
/* The version of the VMS layer. */
|
||||
/** The version of the VMS layer. */
|
||||
VMS_LAYER_VERSION = 2,
|
||||
|
||||
/* The number of bytes in the payload */
|
||||
/** The number of bytes in the payload */
|
||||
VMS_PAYLOAD_SIZE_BYTES = 3,
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ package android.hardware.biometrics.fingerprint@2.1;
|
||||
import IBiometricsFingerprintClientCallback;
|
||||
|
||||
interface IBiometricsFingerprint {
|
||||
/*
|
||||
/**
|
||||
* Set notification callback:
|
||||
* Registers a user function that must receive notifications from the HAL
|
||||
* This call must block if the HAL state machine is in busy state until HAL
|
||||
@@ -32,7 +32,7 @@ interface IBiometricsFingerprint {
|
||||
setNotify(IBiometricsFingerprintClientCallback clientCallback)
|
||||
generates (uint64_t deviceId);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Fingerprint pre-enroll enroll request:
|
||||
* Generates a unique token to upper layers to indicate the start of
|
||||
* an enrollment transaction. pre-enroll and post-enroll specify
|
||||
@@ -47,7 +47,7 @@ interface IBiometricsFingerprint {
|
||||
@callflow(next={"enroll", "postEnroll"})
|
||||
preEnroll() generates (uint64_t authChallenge);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Fingerprint enroll request:
|
||||
* Switches the HAL state machine to collect and store a new fingerprint
|
||||
* template. Switches back as soon as enroll is complete, signalled by
|
||||
@@ -69,7 +69,7 @@ interface IBiometricsFingerprint {
|
||||
enroll(uint8_t[69] hat, uint32_t gid, uint32_t timeoutSec)
|
||||
generates (RequestStatus debugErrno);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Finishes the enroll operation and invalidates the preEnroll() generated
|
||||
* challenge. This must be called at the end of a multi-finger enrollment
|
||||
* session to indicate that no more fingers may be added.
|
||||
@@ -79,7 +79,7 @@ interface IBiometricsFingerprint {
|
||||
@callflow(next={"authenticate", "setActiveGroup", "enumerate", "remove"})
|
||||
postEnroll() generates (RequestStatus debugErrno);
|
||||
|
||||
/*
|
||||
/**
|
||||
* getAuthenticatorId:
|
||||
* Returns a token associated with the current fingerprint set. This value
|
||||
* must change whenever a new fingerprint is enrolled, thus creating a new
|
||||
@@ -91,7 +91,7 @@ interface IBiometricsFingerprint {
|
||||
@callflow(next={"authenticate"})
|
||||
getAuthenticatorId() generates (uint64_t AuthenticatorId);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Cancel pending enroll or authenticate, sending FINGERPRINT_ERROR_CANCELED
|
||||
* to all running clients. Switches the HAL state machine back to the idle
|
||||
* state. Unlike enrollDone() doesn't invalidate the preEnroll() challenge.
|
||||
@@ -102,7 +102,7 @@ interface IBiometricsFingerprint {
|
||||
"setActiveGroup"})
|
||||
cancel() generates (RequestStatus debugErrno);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Enumerate all the fingerprint templates found in the directory set by
|
||||
* setActiveGroup():
|
||||
* For each template found a notify() must be called with:
|
||||
@@ -116,7 +116,7 @@ interface IBiometricsFingerprint {
|
||||
@callflow(next={"remove", "enroll", "authenticate", "setActiveGroup"})
|
||||
enumerate() generates (RequestStatus debugErrno);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Fingerprint remove request:
|
||||
* Deletes fingerprint template(s).
|
||||
* Works only within the path set by setActiveGroup().
|
||||
@@ -136,7 +136,7 @@ interface IBiometricsFingerprint {
|
||||
"setActiveGroup"})
|
||||
remove(uint32_t gid, uint32_t fid) generates (RequestStatus debugErrno);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Restricts the HAL operation to a set of fingerprints belonging to a group
|
||||
* provided. The caller must provide a path to a storage location within the
|
||||
* user's data directory.
|
||||
@@ -150,7 +150,7 @@ interface IBiometricsFingerprint {
|
||||
setActiveGroup(uint32_t gid, string storePath)
|
||||
generates (RequestStatus debugErrno);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Authenticates an operation identified by operationId
|
||||
*
|
||||
* @param operationId operation id.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package android.hardware.biometrics.fingerprint@2.1;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Request status indicates whether the request is accepted by the vendor
|
||||
* implementation or not. These values are taken from the errno set,
|
||||
* except for the SYS_UNKNOWN
|
||||
@@ -37,7 +37,7 @@ enum RequestStatus : int32_t {
|
||||
SYS_ETIMEDOUT = -110,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Fingerprint errors are meant to tell the framework to terminate the current
|
||||
* operation and ask for the user to correct the situation. These will almost
|
||||
* always result in messaging and user interaction to correct the problem.
|
||||
@@ -49,27 +49,27 @@ enum RequestStatus : int32_t {
|
||||
* followed by ERROR_CANCELED.
|
||||
*/
|
||||
enum FingerprintError : int32_t {
|
||||
/* Used for testing, no error returned */
|
||||
/** Used for testing, no error returned */
|
||||
ERROR_NO_ERROR = 0,
|
||||
/* The hardware has an error that can't be resolved. */
|
||||
/** The hardware has an error that can't be resolved. */
|
||||
ERROR_HW_UNAVAILABLE = 1,
|
||||
/* Bad data; operation can't continue */
|
||||
/** Bad data; operation can't continue */
|
||||
ERROR_UNABLE_TO_PROCESS = 2,
|
||||
/* The operation has timed out waiting for user input. */
|
||||
/** The operation has timed out waiting for user input. */
|
||||
ERROR_TIMEOUT = 3,
|
||||
/* No space available to store a template */
|
||||
/** No space available to store a template */
|
||||
ERROR_NO_SPACE = 4,
|
||||
/* The current operation has been canceled */
|
||||
/** The current operation has been canceled */
|
||||
ERROR_CANCELED = 5,
|
||||
/* Unable to remove a template */
|
||||
/** Unable to remove a template */
|
||||
ERROR_UNABLE_TO_REMOVE = 6,
|
||||
/* The hardware is in lockout due to too many attempts */
|
||||
/** The hardware is in lockout due to too many attempts */
|
||||
ERROR_LOCKOUT = 7,
|
||||
/* Vendor-specific error message */
|
||||
/** Vendor-specific error message */
|
||||
ERROR_VENDOR = 8
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Fingerprint acquisition info is meant as feedback for the current operation.
|
||||
* Anything but ACQUIRED_GOOD must be shown to the user as feedback on how to
|
||||
* take action on the current operation. For example, ACQUIRED_IMAGER_DIRTY may
|
||||
@@ -80,41 +80,43 @@ enum FingerprintError : int32_t {
|
||||
*/
|
||||
enum FingerprintAcquiredInfo : int32_t {
|
||||
ACQUIRED_GOOD = 0,
|
||||
/* sensor needs more data, i.e. longer swipe. */
|
||||
/** sensor needs more data, i.e. longer swipe. */
|
||||
ACQUIRED_PARTIAL = 1,
|
||||
/* image doesn't contain enough detail for recognition*/
|
||||
/**
|
||||
* image doesn't contain enough detail for recognition*/
|
||||
ACQUIRED_INSUFFICIENT = 2,
|
||||
/* sensor needs to be cleaned */
|
||||
/** sensor needs to be cleaned */
|
||||
ACQUIRED_IMAGER_DIRTY = 3,
|
||||
/* mostly swipe-type sensors; not enough data collected */
|
||||
/** mostly swipe-type sensors; not enough data collected */
|
||||
ACQUIRED_TOO_SLOW = 4,
|
||||
/* vendor-specific acquisition messages start here */
|
||||
/** vendor-specific acquisition messages start here */
|
||||
ACQUIRED_TOO_FAST = 5,
|
||||
/* vendor-specific acquisition messages */
|
||||
/** vendor-specific acquisition messages */
|
||||
ACQUIRED_VENDOR = 6
|
||||
};
|
||||
|
||||
struct FingerprintFingerId {
|
||||
/* Group ID */
|
||||
/** Group ID */
|
||||
uint32_t gid;
|
||||
/* Fingerprint template ID */
|
||||
/** Fingerprint template ID */
|
||||
uint32_t fid;
|
||||
};
|
||||
|
||||
struct FingerprintEnroll {
|
||||
/* Template ID */
|
||||
/** Template ID */
|
||||
FingerprintFingerId finger;
|
||||
/* samplesRemaining goes from N (no data collected, but N scans needed)
|
||||
/**
|
||||
* samplesRemaining goes from N (no data collected, but N scans needed)
|
||||
* to 0 (no more data is needed to build a template). */
|
||||
uint32_t samplesRemaining;
|
||||
/* Vendor specific message. Used for user guidance */
|
||||
/** Vendor specific message. Used for user guidance */
|
||||
uint64_t msg;
|
||||
};
|
||||
|
||||
struct FingerprintIterator {
|
||||
/* Template ID */
|
||||
/** Template ID */
|
||||
FingerprintFingerId finger;
|
||||
/* How many templates remain to iterate through */
|
||||
/** How many templates remain to iterate through */
|
||||
uint32_t remainingTemplates;
|
||||
};
|
||||
|
||||
@@ -122,18 +124,18 @@ typedef FingerprintIterator FingerprintEnumerated;
|
||||
typedef FingerprintIterator FingerprintRemoved;
|
||||
|
||||
struct FingerprintAcquired {
|
||||
/* information about the image */
|
||||
/** information about the image */
|
||||
FingerprintAcquiredInfo acquiredInfo;
|
||||
};
|
||||
|
||||
struct FingerprintAuthenticated {
|
||||
/* Matched template ID */
|
||||
/** Matched template ID */
|
||||
FingerprintFingerId finger;
|
||||
/* Authentication result from the keymaster */
|
||||
/** Authentication result from the keymaster */
|
||||
uint8_t[69] hat;
|
||||
};
|
||||
|
||||
/* Run time type identification for the notify() call payload. */
|
||||
/** Run time type identification for the notify() call payload. */
|
||||
enum FingerprintMsgType : int32_t {
|
||||
ERROR = -1,
|
||||
ACQUIRED = 1,
|
||||
|
||||
@@ -21,7 +21,7 @@ import ITuner;
|
||||
|
||||
interface IBroadcastRadio {
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieve implementation properties.
|
||||
* @return result Operation completion status: OK in case of success,
|
||||
* NOT_INITIALIZED in case of initialization error.
|
||||
@@ -30,7 +30,7 @@ interface IBroadcastRadio {
|
||||
*/
|
||||
getProperties() generates (Result result, Properties properties);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Open a tuner interface for the requested configuration.
|
||||
* If no other tuner is opened, this will power on the radio hardware.
|
||||
* The hardware must be powered down when all tuner interface are released.
|
||||
|
||||
@@ -20,7 +20,7 @@ import IBroadcastRadio;
|
||||
|
||||
interface IBroadcastRadioFactory {
|
||||
|
||||
/*
|
||||
/**
|
||||
* Connects to a broadcast radio HAL module for a given class
|
||||
* (AM/FM, Satellite, DAB).
|
||||
*
|
||||
|
||||
@@ -20,7 +20,7 @@ import ITunerCallback;
|
||||
|
||||
interface ITuner {
|
||||
|
||||
/*
|
||||
/**
|
||||
* Apply current radio band configuration (band, range, channel spacing...).
|
||||
* Automatically cancels pending scan, step or tune.
|
||||
* ITunerCallback.configChange() method MUST be called once the
|
||||
@@ -33,7 +33,7 @@ interface ITuner {
|
||||
*/
|
||||
setConfiguration(BandConfig config) generates(Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieve current radio band configuration.
|
||||
* @return result OK if valid configuration is returned,
|
||||
* NOT_INITIALIZED in case of initialization error.
|
||||
@@ -41,7 +41,7 @@ interface ITuner {
|
||||
*/
|
||||
getConfiguration() generates(Result result, BandConfig config);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Start scanning up to next valid station.
|
||||
* Shall be called only when a valid configuration has been applied.
|
||||
* Automatically cancels pending scan, step or tune.
|
||||
@@ -57,7 +57,7 @@ interface ITuner {
|
||||
*/
|
||||
scan(Direction direction, bool skipSubChannel) generates(Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Move one channel spacing up or down.
|
||||
* Must be called when a valid configuration has been applied.
|
||||
* Automatically cancels pending scan, step or tune.
|
||||
@@ -73,7 +73,7 @@ interface ITuner {
|
||||
*/
|
||||
step(Direction direction, bool skipSubChannel) generates(Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Tune to specified channel.
|
||||
* Must be called when a valid configuration has been applied.
|
||||
* Automatically cancels pending scan, step or tune.
|
||||
@@ -91,7 +91,7 @@ interface ITuner {
|
||||
*/
|
||||
tune(uint32_t channel, uint32_t subChannel) generates(Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Cancel a scan, step or tune operation.
|
||||
* Shall be called only while a scan, step or tune operation is pending.
|
||||
* ITunerCallback.tuneComplete() MUST NOT be sent by the HAL.
|
||||
@@ -101,7 +101,7 @@ interface ITuner {
|
||||
*/
|
||||
cancel() generates(Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieve current station information.
|
||||
* @return result OK if scan successfully started
|
||||
* NOT_INITIALIZED if another error occurs
|
||||
|
||||
@@ -19,13 +19,13 @@ package android.hardware.broadcastradio@1.0;
|
||||
|
||||
interface ITunerCallback {
|
||||
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when a HW failure occurs.
|
||||
* The framework MUST close the ITuner interface and open a new one.
|
||||
*/
|
||||
oneway hardwareFailure();
|
||||
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when a new configuration is applied
|
||||
* in response to IDevice.openTuner() or ITuner.setConfiguration().
|
||||
* @param result OK if the configuration has been applied,
|
||||
@@ -35,7 +35,7 @@ interface ITunerCallback {
|
||||
*/
|
||||
oneway configChange(Result result, BandConfig config);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when a tuning operation completes
|
||||
* following a step(), scan() or tune() command.
|
||||
* @param result OK if tune succeeded or TIMEOUT in case of time out.
|
||||
@@ -43,33 +43,33 @@ interface ITunerCallback {
|
||||
*/
|
||||
oneway tuneComplete(Result result, ProgramInfo info);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when a frequency switch occurs.
|
||||
* @param info A ProgramInfo structure describing the new tuned station.
|
||||
*/
|
||||
oneway afSwitch(ProgramInfo info);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when the antenna connection state changes.
|
||||
* @param connected True if the antenna is connected, false otherwise.
|
||||
*/
|
||||
oneway antennaStateChange(bool connected);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when a traffic announcement starts or
|
||||
* stops.
|
||||
* @param active True if the announcement starts, false if it stops.
|
||||
*/
|
||||
oneway trafficAnnouncement(bool active);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when an emergency announcement starts
|
||||
* or stops.
|
||||
* @param active True if the announcement starts, false if it stops.
|
||||
*/
|
||||
oneway emergencyAnnouncement(bool active);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when metadata for current station
|
||||
* are updated.
|
||||
* @param channel The channel the metadata is associated with.
|
||||
@@ -77,4 +77,4 @@ interface ITunerCallback {
|
||||
* @param metadata A list of all updated metada.
|
||||
*/
|
||||
oneway newMetadata(uint32_t channel, uint32_t subChannel, vec<MetaData> metadata);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -24,33 +24,33 @@ enum Result : int32_t {
|
||||
TIMEOUT,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Radio hardware module class. A given radio hardware module HAL is of one
|
||||
* class only. The platform can not have more than one hardware module of
|
||||
* each class. Current version of the framework only supports RADIO_CLASS_AM_FM.
|
||||
*/
|
||||
enum Class : uint32_t {
|
||||
/* FM (including HD radio) and AM */
|
||||
/** FM (including HD radio) and AM */
|
||||
AM_FM = 0,
|
||||
/* Satellite Radio */
|
||||
/** Satellite Radio */
|
||||
SAT = 1,
|
||||
/* Digital Radio (DAB) */
|
||||
/** Digital Radio (DAB) */
|
||||
DT = 2,
|
||||
};
|
||||
|
||||
/* value for field "type" of radio band described in struct radio_hal_band_config */
|
||||
/** value for field "type" of radio band described in struct radio_hal_band_config */
|
||||
enum Band : uint32_t {
|
||||
/* Amplitude Modulation band: LW, MW, SW */
|
||||
/** Amplitude Modulation band: LW, MW, SW */
|
||||
AM = 0,
|
||||
/* Frequency Modulation band: FM */
|
||||
/** Frequency Modulation band: FM */
|
||||
FM = 1,
|
||||
/* FM HD Radio / DRM (IBOC) */
|
||||
/** FM HD Radio / DRM (IBOC) */
|
||||
FM_HD = 2,
|
||||
/* AM HD Radio / DRM (IBOC) */
|
||||
/** AM HD Radio / DRM (IBOC) */
|
||||
AM_HD = 3,
|
||||
};
|
||||
|
||||
/* RDS variant implemented. A struct FmBandConfig can list none or several. */
|
||||
/** RDS variant implemented. A struct FmBandConfig can list none or several. */
|
||||
enum Rds : uint32_t {
|
||||
NONE = 0,
|
||||
WORLD = (1<<0),
|
||||
@@ -65,35 +65,35 @@ enum Deemphasis : uint32_t {
|
||||
D75 = (1<<1),
|
||||
};
|
||||
|
||||
/* Scanning direction for scan() and step() tuner APIs */
|
||||
/** Scanning direction for scan() and step() tuner APIs */
|
||||
enum Direction : uint32_t {
|
||||
UP,
|
||||
DOWN
|
||||
};
|
||||
|
||||
/* Unique handle allocated to a radio module */
|
||||
/** Unique handle allocated to a radio module */
|
||||
typedef uint32_t Handle;
|
||||
|
||||
|
||||
/* Additional attributes for an FM band configuration */
|
||||
/** Additional attributes for an FM band configuration */
|
||||
struct FmBandConfig {
|
||||
/* deemphasis variant */
|
||||
/** deemphasis variant */
|
||||
Deemphasis deemphasis;
|
||||
/* stereo supported */
|
||||
/** stereo supported */
|
||||
bool stereo;
|
||||
/* RDS variants supported */
|
||||
/** RDS variants supported */
|
||||
Rds rds;
|
||||
/* Traffic Announcement supported */
|
||||
/** Traffic Announcement supported */
|
||||
bool ta;
|
||||
/* Alternate Frequency supported */
|
||||
/** Alternate Frequency supported */
|
||||
bool af;
|
||||
/* Emergency announcements supported */
|
||||
/** Emergency announcements supported */
|
||||
bool ea;
|
||||
};
|
||||
|
||||
/* Additional attributes for an AM band configuration */
|
||||
/** Additional attributes for an AM band configuration */
|
||||
struct AmBandConfig {
|
||||
/* Stereo supported */
|
||||
/** Stereo supported */
|
||||
bool stereo;
|
||||
};
|
||||
|
||||
@@ -120,83 +120,84 @@ struct BandConfig {
|
||||
* If more than one tuner is supported (num_tuners > 1), only one can be
|
||||
* connected to the audio source. */
|
||||
struct Properties {
|
||||
/* Class of this module. E.g AM_FM */
|
||||
/** Class of this module. E.g AM_FM */
|
||||
Class classId;
|
||||
/* implementor name */
|
||||
/** implementor name */
|
||||
string implementor;
|
||||
/* product name */
|
||||
/** product name */
|
||||
string product;
|
||||
/* product version */
|
||||
/** product version */
|
||||
string version;
|
||||
/* serial number (for subscription services) */
|
||||
/** serial number (for subscription services) */
|
||||
string serial;
|
||||
/* number of tuners controllable independently */
|
||||
/** number of tuners controllable independently */
|
||||
uint32_t numTuners;
|
||||
/* number of audio sources driven simultaneously */
|
||||
/** number of audio sources driven simultaneously */
|
||||
uint32_t numAudioSources;
|
||||
/* the hardware supports capture of audio source from audio HAL */
|
||||
/** the hardware supports capture of audio source from audio HAL */
|
||||
bool supportsCapture;
|
||||
vec<BandConfig> bands; /* band descriptors */
|
||||
vec<BandConfig> bands; /** band descriptors */
|
||||
};
|
||||
|
||||
enum MetadataType : int32_t {
|
||||
INVALID = -1,
|
||||
/* Signed 32 bit integer */
|
||||
/** Signed 32 bit integer */
|
||||
INT = 0,
|
||||
/* String */
|
||||
/** String */
|
||||
TEXT = 1,
|
||||
/* Raw binary data (icon or art)
|
||||
/**
|
||||
* Raw binary data (icon or art)
|
||||
This data must be transparent to the android framework */
|
||||
RAW = 2,
|
||||
/* clock data, see MetaDataClock */
|
||||
/** clock data, see MetaDataClock */
|
||||
CLOCK = 3,
|
||||
};
|
||||
|
||||
enum MetadataKey : int32_t {
|
||||
INVALID = -1,
|
||||
/* RDS PI - string */
|
||||
/** RDS PI - string */
|
||||
RDS_PI = 0,
|
||||
/* RDS PS - string */
|
||||
/** RDS PS - string */
|
||||
RDS_PS = 1,
|
||||
/* RDS PTY - int32_t */
|
||||
/** RDS PTY - int32_t */
|
||||
RDS_PTY = 2,
|
||||
/* RBDS PTY - int32_t */
|
||||
/** RBDS PTY - int32_t */
|
||||
RBDS_PTY = 3,
|
||||
/* RDS RT - string */
|
||||
/** RDS RT - string */
|
||||
RDS_RT = 4,
|
||||
/* Song title - string */
|
||||
/** Song title - string */
|
||||
TITLE = 5,
|
||||
/* Artist name - string */
|
||||
/** Artist name - string */
|
||||
ARTIST = 6,
|
||||
/* Album name - string */
|
||||
/** Album name - string */
|
||||
ALBUM = 7,
|
||||
/* Musical genre - string */
|
||||
/** Musical genre - string */
|
||||
GENRE = 8,
|
||||
/* Station icon - raw */
|
||||
/** Station icon - raw */
|
||||
ICON = 9,
|
||||
/* Album art - raw */
|
||||
/** Album art - raw */
|
||||
ART = 10,
|
||||
/* Clock - MetaDataClock */
|
||||
/** Clock - MetaDataClock */
|
||||
CLOCK = 11,
|
||||
};
|
||||
|
||||
struct MetaDataClock {
|
||||
/* Seconds since epoch at GMT + 0. */
|
||||
/** Seconds since epoch at GMT + 0. */
|
||||
uint64_t utcSecondsSinceEpoch;
|
||||
/* Minutes offset from the GMT. */
|
||||
/** Minutes offset from the GMT. */
|
||||
int32_t timezoneOffsetInMinutes;
|
||||
};
|
||||
|
||||
struct MetaData {
|
||||
MetadataType type;
|
||||
MetadataKey key;
|
||||
/* Value used for type MetadataType.INT */
|
||||
/** Value used for type MetadataType.INT */
|
||||
int32_t intValue;
|
||||
/* Value used for type MetadataType.CLOCK */
|
||||
/** Value used for type MetadataType.CLOCK */
|
||||
MetaDataClock clockValue;
|
||||
/* Value used for type MetadataType.TEXT */
|
||||
/** Value used for type MetadataType.TEXT */
|
||||
string stringValue;
|
||||
/* Value used for type MetadataType.RAW */
|
||||
/** Value used for type MetadataType.RAW */
|
||||
vec<uint8_t> rawValue;
|
||||
};
|
||||
|
||||
@@ -205,12 +206,12 @@ struct MetaData {
|
||||
* Contains information on currently tuned channel.
|
||||
*/
|
||||
struct ProgramInfo {
|
||||
uint32_t channel; /* current channel. (e.g kHz for band type AM_FM) */
|
||||
uint32_t subChannel; /* current sub channel. (FM_HD) */
|
||||
bool tuned; /* tuned to a program or not */
|
||||
bool stereo; /* program is stereo or not */
|
||||
bool digital; /* digital program or not (e.g HD Radio program) */
|
||||
uint32_t signalStrength; /* signal strength from 0 to 100 */
|
||||
vec<MetaData> metadata; /* non empty if meta data are present (e.g PTY, song title ...) */
|
||||
uint32_t channel; /** current channel. (e.g kHz for band type AM_FM) */
|
||||
uint32_t subChannel; /** current sub channel. (FM_HD) */
|
||||
bool tuned; /** tuned to a program or not */
|
||||
bool stereo; /** program is stereo or not */
|
||||
bool digital; /** digital program or not (e.g HD Radio program) */
|
||||
uint32_t signalStrength; /** signal strength from 0 to 100 */
|
||||
vec<MetaData> metadata; /** non empty if meta data are present (e.g PTY, song title ...) */
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import @1.0::IBroadcastRadio;
|
||||
|
||||
interface IBroadcastRadio extends @1.0::IBroadcastRadio {
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieve implementation properties.
|
||||
* @return properties A Properties structure containing implementation
|
||||
* description and capabilities.
|
||||
|
||||
@@ -25,7 +25,7 @@ import @1.0::ITunerCallback;
|
||||
* ones, to avoid receiving a callback twice.
|
||||
*/
|
||||
interface ITunerCallback extends @1.0::ITunerCallback {
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when a tuning operation completes
|
||||
* following a step(), scan() or tune() command.
|
||||
* @param result OK if tune succeeded or TIMEOUT in case of time out.
|
||||
@@ -33,7 +33,7 @@ interface ITunerCallback extends @1.0::ITunerCallback {
|
||||
*/
|
||||
oneway tuneComplete_1_1(Result result, ProgramInfo info);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Method called by the HAL when a frequency switch occurs.
|
||||
* @param info A ProgramInfo structure describing the new tuned station.
|
||||
*/
|
||||
|
||||
@@ -249,7 +249,7 @@ struct CameraFrameMetadata {
|
||||
vec<CameraFace> faces;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* A simple integer handle to use to reference a particular memory buffer
|
||||
* between the HAL and the framework.
|
||||
*/
|
||||
|
||||
@@ -68,16 +68,16 @@ enum StreamType : uint32_t {
|
||||
* The required counterclockwise rotation of camera stream.
|
||||
*/
|
||||
enum StreamRotation : uint32_t {
|
||||
/* No rotation */
|
||||
/** No rotation */
|
||||
ROTATION_0 = 0,
|
||||
|
||||
/* Rotate by 90 degree counterclockwise */
|
||||
/** Rotate by 90 degree counterclockwise */
|
||||
ROTATION_90 = 1,
|
||||
|
||||
/* Rotate by 180 degree counterclockwise */
|
||||
/** Rotate by 180 degree counterclockwise */
|
||||
ROTATION_180 = 2,
|
||||
|
||||
/* Rotate by 270 degree counterclockwise */
|
||||
/** Rotate by 270 degree counterclockwise */
|
||||
ROTATION_270 = 3
|
||||
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
package android.hardware.configstore@1.0;
|
||||
|
||||
interface ISurfaceFlingerConfigs {
|
||||
/*
|
||||
/**
|
||||
* The following two methods define (respectively):
|
||||
*
|
||||
* - The phase offset between hardware vsync and when apps are woken up by the
|
||||
@@ -40,13 +40,13 @@ interface ISurfaceFlingerConfigs {
|
||||
vsyncEventPhaseOffsetNs() generates (OptionalInt64 value);
|
||||
vsyncSfEventPhaseOffsetNs() generates (OptionalInt64 value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Instruct the Render Engine to use EGL_IMG_context_priority hint if
|
||||
* availabe.
|
||||
*/
|
||||
useContextPriority() generates(OptionalBool value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* hasWideColorDisplay indicates that the device has
|
||||
* or can support a wide-color display, e.g. color space
|
||||
* greater than sRGB. Typical display may have same
|
||||
@@ -60,7 +60,7 @@ interface ISurfaceFlingerConfigs {
|
||||
*/
|
||||
hasWideColorDisplay() generates (OptionalBool value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* hwHdrDisplay indicates that the device has
|
||||
* or can support an HDR (High Dynamic Range) display.
|
||||
* Typically an HDR display is also wide-color.
|
||||
@@ -69,13 +69,13 @@ interface ISurfaceFlingerConfigs {
|
||||
*/
|
||||
hasHDRDisplay() generates (OptionalBool value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Specify the offset in nanoseconds to add to vsync time when timestamping
|
||||
* present fences.
|
||||
*/
|
||||
presentTimeOffsetFromVSyncNs() generates(OptionalInt64 value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Some hardware can do RGB->YUV conversion more efficiently in hardware
|
||||
* controlled by HWC than in hardware controlled by the video encoder.
|
||||
* This instruct VirtualDisplaySurface to use HWC for such conversion on
|
||||
@@ -83,19 +83,19 @@ interface ISurfaceFlingerConfigs {
|
||||
*/
|
||||
useHwcForRGBtoYUV() generates(OptionalBool value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Maximum dimension supported by HWC for virtual display.
|
||||
* Must be equals to min(max_width, max_height).
|
||||
*/
|
||||
maxVirtualDisplaySize() generates (OptionalUInt64 value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Indicates if Sync framework is available. Sync framework provides fence
|
||||
* mechanism which significantly reduces buffer processing latency.
|
||||
*/
|
||||
hasSyncFramework() generates(OptionalBool value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return true if surface flinger should use vr flinger for compatible vr
|
||||
* apps, false otherwise. Devices that will never be running vr apps should
|
||||
* return false to avoid extra resource usage. Daydream ready devices must
|
||||
@@ -103,7 +103,7 @@ interface ISurfaceFlingerConfigs {
|
||||
*/
|
||||
useVrFlinger() generates (OptionalBool value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Controls the number of buffers SurfaceFlinger will allocate for use in
|
||||
* FramebufferSurface.
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.contexthub@1.0;
|
||||
|
||||
import IContexthubCallback;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The Context Hub HAL provides an interface to a separate low-power processing
|
||||
* domain that has direct access to contextual information, such as sensors.
|
||||
* Native applications that run within a context hub are known as nanoapps, and
|
||||
@@ -26,14 +26,14 @@ import IContexthubCallback;
|
||||
* standardized via the CHRE API, defined elsewhere.
|
||||
*/
|
||||
interface IContexthub {
|
||||
/*
|
||||
/**
|
||||
* Enumerate all available context hubs on the system.
|
||||
*
|
||||
* @return hubs list of hubs on this system.
|
||||
*/
|
||||
getHubs() generates (vec<ContextHub> hubs);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Register a callback for the HAL implementation to send asynchronous
|
||||
* messages to the service from a context hub. There can be a maximum of
|
||||
* one callback registered with the HAL. A call to this function when a
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package android.hardware.contexthub@1.0;
|
||||
|
||||
interface IContexthubCallback {
|
||||
/*
|
||||
/**
|
||||
* This callback is passed by the Contexthub service to the HAL
|
||||
* implementation to allow the HAL to send asynchronous messages back
|
||||
* to the service and registered clients of the ContextHub service.
|
||||
@@ -27,7 +27,7 @@ interface IContexthubCallback {
|
||||
*/
|
||||
handleClientMsg(ContextHubMsg msg);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This callback is passed by the Contexthub service to the HAL
|
||||
* implementation to allow the HAL to send the response for a
|
||||
* transaction.
|
||||
@@ -39,7 +39,7 @@ interface IContexthubCallback {
|
||||
*/
|
||||
handleTxnResult(uint32_t txnId, TransactionResult result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This callback is passed by the Contexthub service to the HAL
|
||||
* implementation to allow the HAL to send an asynchronous event
|
||||
* to the ContextHub service.
|
||||
@@ -49,7 +49,7 @@ interface IContexthubCallback {
|
||||
*/
|
||||
handleHubEvent(AsyncEventType evt);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This callback is passed by the Contexthub service to the HAL
|
||||
* implementation to allow the HAL to send a notification to the service
|
||||
* that a nanp-app has aborted.
|
||||
@@ -63,7 +63,7 @@ interface IContexthubCallback {
|
||||
*/
|
||||
handleAppAbort(uint64_t appId, uint32_t abortCode);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This callback is passed by the Contexthub service to the HAL
|
||||
* implementation to allow the HAL to send information about the
|
||||
* currently loaded and active nanoapps on the hub.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package android.hardware.dumpstate@1.0;
|
||||
|
||||
interface IDumpstateDevice {
|
||||
/*
|
||||
/**
|
||||
* Dumps device-specific state into the given file descriptor.
|
||||
*/
|
||||
dumpstateBoard(handle h);
|
||||
|
||||
@@ -91,7 +91,7 @@ verify(uint32_t uid, uint64_t challenge,
|
||||
vec<uint8_t> providedPassword)
|
||||
generates (GatekeeperResponse response);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Deletes the enrolledPasswordHandle associated with the uid. Once deleted
|
||||
* the user cannot be verified anymore.
|
||||
* This is an optional method.
|
||||
@@ -107,7 +107,7 @@ verify(uint32_t uid, uint64_t challenge,
|
||||
*/
|
||||
deleteUser(uint32_t uid) generates (GatekeeperResponse response);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Deletes all the enrolled_password_handles for all uid's. Once called,
|
||||
* no users must be enrolled on the device.
|
||||
* This is an optional method.
|
||||
|
||||
@@ -31,12 +31,13 @@ enum GatekeeperStatusCode : int32_t {
|
||||
* Gatekeeper response to any/all requests has this structure as mandatory part
|
||||
*/
|
||||
struct GatekeeperResponse {
|
||||
/* request completion status */
|
||||
/** request completion status */
|
||||
GatekeeperStatusCode code;
|
||||
/* retry timeout in ms, if code == ERROR_RETRY_TIMEOUT
|
||||
/**
|
||||
* retry timeout in ms, if code == ERROR_RETRY_TIMEOUT
|
||||
* otherwise unused (0)
|
||||
*/
|
||||
uint32_t timeout;
|
||||
/* optional crypto blob. Opaque to Android system. */
|
||||
/** optional crypto blob. Opaque to Android system. */
|
||||
vec<uint8_t> data;
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.gnss@1.0;
|
||||
|
||||
import IAGnssCallback;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extended interface for AGNSS support.
|
||||
*/
|
||||
interface IAGnss {
|
||||
@@ -30,7 +30,7 @@ interface IAGnss {
|
||||
IPV4V6 = 3
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Opens the AGNSS interface and provides the callback routines to the
|
||||
* implementation of this interface.
|
||||
*
|
||||
@@ -38,21 +38,21 @@ interface IAGnss {
|
||||
*/
|
||||
setCallback(IAGnssCallback callback);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notifies that the AGNSS data connection has been closed.
|
||||
*
|
||||
* @return success True if the operation is successful.
|
||||
*/
|
||||
dataConnClosed() generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notifies that a data connection is not available for AGNSS.
|
||||
*
|
||||
* @return success True if the operation is successful.
|
||||
*/
|
||||
dataConnFailed() generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the hostname and port for the AGNSS server.
|
||||
*
|
||||
* @param type Specifies if SUPL or C2K.
|
||||
@@ -64,7 +64,7 @@ interface IAGnss {
|
||||
setServer(AGnssType type, string hostname, int32_t port)
|
||||
generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notifies that a data connection is available and sets the name of the
|
||||
* APN, and its IP type, to be used for SUPL connections.
|
||||
*
|
||||
|
||||
@@ -39,39 +39,39 @@ interface IAGnssCallback {
|
||||
AGNSS_DATA_CONN_FAILED = 5
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents the status of AGNSS augmented to support IPv4.
|
||||
*/
|
||||
@export(name="", value_prefix="GPS_")
|
||||
struct AGnssStatusIpV4 {
|
||||
AGnssType type;
|
||||
AGnssStatusValue status;
|
||||
/*
|
||||
/**
|
||||
* 32-bit IPv4 address.
|
||||
*/
|
||||
uint32_t ipV4Addr;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents the status of AGNSS augmented to support IPv6.
|
||||
*/
|
||||
struct AGnssStatusIpV6 {
|
||||
AGnssType type;
|
||||
AGnssStatusValue status;
|
||||
/*
|
||||
/**
|
||||
* 128-bit IPv6 address.
|
||||
*/
|
||||
uint8_t[16] ipV6Addr;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Callback with AGNSS(IpV4) status information.
|
||||
*
|
||||
* @param status Will be of type AGnssStatusIpV4.
|
||||
*/
|
||||
agnssStatusIpV4Cb(AGnssStatusIpV4 status);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Callback with AGNSS(IpV6) status information.
|
||||
*
|
||||
* @param status Will be of type AGnssStatusIpV6.
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.gnss@1.0;
|
||||
|
||||
import IAGnssRilCallback;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extended interface for AGNSS RIL support. An Assisted GNSS Radio Interface
|
||||
* Layer interface allows the GNSS chipset to request radio interface layer
|
||||
* information from Android platform. Examples of such information are reference
|
||||
@@ -50,41 +50,42 @@ interface IAGnssRil {
|
||||
LTE_CELLID = 4,
|
||||
};
|
||||
|
||||
/* CellID for 2G, 3G and LTE, used in AGNSS. */
|
||||
/** CellID for 2G, 3G and LTE, used in AGNSS. */
|
||||
struct AGnssRefLocationCellID {
|
||||
AGnssRefLocationType type;
|
||||
|
||||
/* Mobile Country Code. */
|
||||
/** Mobile Country Code. */
|
||||
uint16_t mcc;
|
||||
|
||||
/* Mobile Network Code .*/
|
||||
/**
|
||||
* Mobile Network Code .*/
|
||||
uint16_t mnc;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Location Area Code in 2G, 3G and LTE. In 3G lac is discarded. In LTE,
|
||||
* lac is populated with tac, to ensure that we don't break old clients that
|
||||
* might rely in the old (wrong) behavior.
|
||||
*/
|
||||
uint16_t lac;
|
||||
|
||||
/* Cell id in 2G. Utran Cell id in 3G. Cell Global Id EUTRA in LTE. */
|
||||
/** Cell id in 2G. Utran Cell id in 3G. Cell Global Id EUTRA in LTE. */
|
||||
uint32_t cid;
|
||||
|
||||
/* Tracking Area Code in LTE. */
|
||||
/** Tracking Area Code in LTE. */
|
||||
uint16_t tac;
|
||||
|
||||
/* Physical Cell id in LTE (not used in 2G and 3G) */
|
||||
/** Physical Cell id in LTE (not used in 2G and 3G) */
|
||||
uint16_t pcid;
|
||||
};
|
||||
|
||||
/* Represents ref locations */
|
||||
/** Represents ref locations */
|
||||
struct AGnssRefLocation {
|
||||
AGnssRefLocationType type;
|
||||
|
||||
AGnssRefLocationCellID cellID;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Opens the AGNSS interface and provides the callback routines
|
||||
* to the implementation of this interface.
|
||||
*
|
||||
@@ -92,14 +93,14 @@ interface IAGnssRil {
|
||||
*/
|
||||
setCallback(IAGnssRilCallback callback);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the reference location.
|
||||
*
|
||||
* @param agnssReflocation AGNSS reference location CellID.
|
||||
*/
|
||||
setRefLocation(AGnssRefLocation agnssReflocation);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the SET ID.
|
||||
*
|
||||
* @param type Must be populated with either IMSI or MSISDN or NONE.
|
||||
@@ -114,7 +115,7 @@ interface IAGnssRil {
|
||||
*/
|
||||
setSetId(SetIDType type, string setid) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notify GNSS of network status changes.
|
||||
*
|
||||
* @param connected Indicates whether network connectivity exists and
|
||||
@@ -129,7 +130,7 @@ interface IAGnssRil {
|
||||
updateNetworkState(bool connected, NetworkType type, bool roaming)
|
||||
generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notify GNSS of network status changes.
|
||||
*
|
||||
* @param available Indicates whether network connectivity is available.
|
||||
|
||||
@@ -16,26 +16,26 @@
|
||||
|
||||
package android.hardware.gnss@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Callback for IAGnssRil interface. Used to request SET ID and
|
||||
* Reference Location.
|
||||
*/
|
||||
interface IAGnssRilCallback {
|
||||
/* Kinds of SET ID that can be requested */
|
||||
/** Kinds of SET ID that can be requested */
|
||||
@export(name="", value_prefix="AGPS_RIL_REQUEST_SETID_")
|
||||
enum ID : uint32_t {
|
||||
IMSI = 1 << 0L,
|
||||
MSISDN = 1 << 1L,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The Hal uses this API to request a SET ID.
|
||||
*
|
||||
* @param setIdflag Specifies the kind of SET ID that is required by the HAL.
|
||||
*/
|
||||
requestSetIdCb(bitfield<ID> setIdflag);
|
||||
|
||||
/*
|
||||
/**
|
||||
* The Hal uses this API to request a reference location.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -28,23 +28,23 @@ import IGnssGeofencing;
|
||||
import IGnssNi;
|
||||
import IGnssXtra;
|
||||
|
||||
/* Represents the standard GNSS (Global Navigation Satellite System) interface. */
|
||||
/** Represents the standard GNSS (Global Navigation Satellite System) interface. */
|
||||
interface IGnss {
|
||||
/* Requested operational mode for GNSS operation. */
|
||||
/** Requested operational mode for GNSS operation. */
|
||||
@export(name="", value_prefix="GPS_POSITION_MODE_")
|
||||
enum GnssPositionMode : uint8_t {
|
||||
/** Mode for running GNSS standalone (no assistance). */
|
||||
STANDALONE = 0,
|
||||
/** AGNSS MS-Based mode. */
|
||||
MS_BASED = 1,
|
||||
/*
|
||||
/**
|
||||
* AGNSS MS-Assisted mode. This mode is not maintained by the platform anymore.
|
||||
* It is strongly recommended to use MS_BASED instead.
|
||||
*/
|
||||
MS_ASSISTED = 2,
|
||||
};
|
||||
|
||||
/* Requested recurrence mode for GNSS operation. */
|
||||
/** Requested recurrence mode for GNSS operation. */
|
||||
@export(name="", value_prefix="GPS_POSITION_")
|
||||
enum GnssPositionRecurrence : uint32_t {
|
||||
/** Receive GNSS fixes on a recurring basis at a specified period. */
|
||||
@@ -53,7 +53,7 @@ interface IGnss {
|
||||
RECURRENCE_SINGLE = 1
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags used to specify which aiding data to delete when calling
|
||||
* deleteAidingData().
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ interface IGnss {
|
||||
DELETE_ALL = 0xFFFF
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Opens the interface and provides the callback routines
|
||||
* to the implementation of this interface.
|
||||
*
|
||||
@@ -84,7 +84,7 @@ interface IGnss {
|
||||
*/
|
||||
setCallback(IGnssCallback callback) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Starts a location output stream using the IGnssCallback
|
||||
* gnssLocationCb(), following the settings from the most recent call to
|
||||
* setPositionMode().
|
||||
@@ -96,19 +96,19 @@ interface IGnss {
|
||||
*/
|
||||
start() generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Stops the location output stream.
|
||||
*
|
||||
* @return success Returns true on success.
|
||||
*/
|
||||
stop() generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Closes the interface.
|
||||
*/
|
||||
cleanup();
|
||||
|
||||
/*
|
||||
/**
|
||||
* Injects the current time.
|
||||
*
|
||||
* @param timeMs This is the UTC time received from the NTP server, its value
|
||||
@@ -124,7 +124,7 @@ interface IGnss {
|
||||
injectTime(GnssUtcTime timeMs, int64_t timeReferenceMs, int32_t uncertaintyMs)
|
||||
generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Injects current location from another location provider (typically cell
|
||||
* ID).
|
||||
*
|
||||
@@ -137,7 +137,7 @@ interface IGnss {
|
||||
injectLocation(double latitudeDegrees, double longitudeDegrees, float accuracyMeters)
|
||||
generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Specifies that the next call to start will not use the
|
||||
* information defined in the flags. GnssAidingData value of DELETE_ALL is
|
||||
* passed for a cold start.
|
||||
@@ -146,7 +146,7 @@ interface IGnss {
|
||||
*/
|
||||
deleteAidingData(GnssAidingData aidingDataFlags);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the GnssPositionMode parameter,its associated recurrence value,
|
||||
* the time between fixes,requested fix accuracy and time to first fix.
|
||||
*
|
||||
@@ -165,70 +165,70 @@ interface IGnss {
|
||||
uint32_t preferredTimeMs)
|
||||
generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IAGnssRil Interface.
|
||||
*
|
||||
* @return aGnssRilIface Handle to the IAGnssRil interface.
|
||||
*/
|
||||
getExtensionAGnssRil() generates (IAGnssRil aGnssRilIface);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IGnssGeofencing Interface.
|
||||
*
|
||||
* @return gnssGeofencingIface Handle to the IGnssGeofencing interface.
|
||||
*/
|
||||
getExtensionGnssGeofencing() generates(IGnssGeofencing gnssGeofencingIface);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IAGnss Interface.
|
||||
*
|
||||
* @return aGnssIface Handle to the IAGnss interface.
|
||||
*/
|
||||
getExtensionAGnss() generates (IAGnss aGnssIface);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IGnssNi interface.
|
||||
*
|
||||
* @return gnssNiIface Handle to the IGnssNi interface.
|
||||
*/
|
||||
getExtensionGnssNi() generates (IGnssNi gnssNiIface);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IGnssMeasurement interface.
|
||||
*
|
||||
* @return gnssMeasurementIface Handle to the IGnssMeasurement interface.
|
||||
*/
|
||||
getExtensionGnssMeasurement() generates (IGnssMeasurement gnssMeasurementIface);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IGnssNavigationMessage interface.
|
||||
*
|
||||
* @return gnssNavigationIface gnssNavigationIface to the IGnssNavigationMessage interface.
|
||||
*/
|
||||
getExtensionGnssNavigationMessage() generates (IGnssNavigationMessage gnssNavigationIface);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IGnssXtra interface.
|
||||
*
|
||||
* @return xtraIface Handle to the IGnssXtra interface.
|
||||
*/
|
||||
getExtensionXtra() generates (IGnssXtra xtraIface);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IGnssConfiguration interface.
|
||||
*
|
||||
* @return gnssConfigIface Handle to the IGnssConfiguration interface.
|
||||
*/
|
||||
getExtensionGnssConfiguration() generates (IGnssConfiguration gnssConfigIface);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IGnssDebug interface.
|
||||
*
|
||||
* @return debugIface Handle to the IGnssDebug interface.
|
||||
*/
|
||||
getExtensionGnssDebug() generates (IGnssDebug debugIface);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method returns the IGnssBatching interface.
|
||||
*
|
||||
* @return batchingIface Handle to the IGnssBatching interface.
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.gnss@1.0;
|
||||
|
||||
import IGnssBatchingCallback;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extended interface for GNSS Batching support.
|
||||
*
|
||||
* If this interface is supported, this batching request must be able to run in
|
||||
@@ -39,12 +39,12 @@ import IGnssBatchingCallback;
|
||||
*/
|
||||
|
||||
interface IGnssBatching {
|
||||
/*
|
||||
/**
|
||||
* Enum which holds the bit masks for batching control.
|
||||
*/
|
||||
@export(name="", value_prefix="FLP_BATCH_")
|
||||
enum Flag : uint8_t {
|
||||
/*
|
||||
/**
|
||||
* If this flag is set, the hardware implementation
|
||||
* must wake up the application processor when the FIFO is full, and
|
||||
* call IGnssBatchingCallback to return the locations.
|
||||
@@ -56,19 +56,19 @@ interface IGnssBatching {
|
||||
};
|
||||
|
||||
struct Options {
|
||||
/*
|
||||
/**
|
||||
* Time interval between samples in the location batch, in nano
|
||||
* seconds.
|
||||
*/
|
||||
int64_t periodNanos;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags controlling how batching should behave.
|
||||
*/
|
||||
bitfield<Flag> flags;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Opens the interface and provides the callback routines
|
||||
* to the implementation of this interface.
|
||||
*
|
||||
@@ -78,7 +78,7 @@ interface IGnssBatching {
|
||||
*/
|
||||
init(IGnssBatchingCallback callback) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Return the batch size (in number of GnssLocation objects)
|
||||
* available in this hardware implementation.
|
||||
*
|
||||
@@ -93,7 +93,7 @@ interface IGnssBatching {
|
||||
*/
|
||||
getBatchSize() generates (uint16_t batchSize);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Start batching locations. This API is primarily used when the AP is
|
||||
* asleep and the device can batch locations in the hardware.
|
||||
*
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package android.hardware.gnss@1.0;
|
||||
|
||||
/* The callback interface to report measurements from the HAL. */
|
||||
/** The callback interface to report measurements from the HAL. */
|
||||
interface IGnssBatchingCallback {
|
||||
/*
|
||||
/**
|
||||
* Called when a batch of locations is output, by various means, including
|
||||
* a flush request, as well as the buffer becoming full (if appropriate option
|
||||
* is set.)
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
|
||||
package android.hardware.gnss@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The interface is required for the HAL to communicate certain information
|
||||
* like status and location info back to the platform, the platform implements
|
||||
* the interfaces and passes a handle to the HAL.
|
||||
*/
|
||||
interface IGnssCallback {
|
||||
/* Flags for the gnssSetCapabilities callback. */
|
||||
/** Flags for the gnssSetCapabilities callback. */
|
||||
@export(name="", value_prefix="GPS_CAPABILITY_")
|
||||
enum Capabilities : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* GNSS HAL schedules fixes for RECURRENCE_PERIODIC mode.
|
||||
* If this is not set, then the framework will use 1000ms for
|
||||
* minInterval and will call start() and stop() to schedule the GNSS.
|
||||
@@ -47,7 +47,7 @@ interface IGnssCallback {
|
||||
NAV_MESSAGES = 1 << 7
|
||||
};
|
||||
|
||||
/* GNSS status event values. */
|
||||
/** GNSS status event values. */
|
||||
@export(name="", value_prefix="GPS_STATUS_")
|
||||
enum GnssStatusValue : uint8_t {
|
||||
/** GNSS status unknown. */
|
||||
@@ -62,7 +62,7 @@ interface IGnssCallback {
|
||||
ENGINE_OFF = 4
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags that indicate information about the satellite
|
||||
*/
|
||||
@export(name="", value_prefix="GNSS_SV_FLAGS_")
|
||||
@@ -75,7 +75,7 @@ interface IGnssCallback {
|
||||
};
|
||||
|
||||
struct GnssSvInfo {
|
||||
/*
|
||||
/**
|
||||
* Pseudo-random number for the SV, or FCN/OSN number for Glonass. The
|
||||
* distinction is made by looking at constellation field. Values must be
|
||||
* in the range of:
|
||||
@@ -93,12 +93,12 @@ interface IGnssCallback {
|
||||
*/
|
||||
int16_t svid;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Defines the constellation of the given SV.
|
||||
*/
|
||||
GnssConstellationType constellation;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Carrier-to-noise density in dB-Hz, typically in the range [0, 63].
|
||||
* It contains the measured C/N0 value for the signal at the antenna port.
|
||||
*
|
||||
@@ -112,7 +112,7 @@ interface IGnssCallback {
|
||||
/** Azimuth of SV in degrees. */
|
||||
float azimuthDegrees;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Carrier frequency of the signal tracked, for example it can be the
|
||||
* GPS central frequency for L1 = 1575.45 MHz, or L2 = 1227.60 MHz, L5 =
|
||||
* 1176.45 MHz, varying GLO channels, etc. If the field is not set, it
|
||||
@@ -130,22 +130,22 @@ interface IGnssCallback {
|
||||
*/
|
||||
float carrierFrequencyHz;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Contains additional data about the given SV.
|
||||
*/
|
||||
bitfield<GnssSvFlags> svFlag;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents SV status.
|
||||
*/
|
||||
struct GnssSvStatus {
|
||||
/*
|
||||
/**
|
||||
* Number of GNSS SVs currently visible, refers to the SVs stored in sv_list
|
||||
*/
|
||||
uint32_t numSvs;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Pointer to an array of SVs information for all GNSS constellations,
|
||||
* except GNSS, which is reported using svList
|
||||
*/
|
||||
@@ -153,26 +153,26 @@ interface IGnssCallback {
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Called when a GNSS location is available.
|
||||
*
|
||||
* @param location Location information from HAL.
|
||||
*/
|
||||
gnssLocationCb(GnssLocation location);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Called to communicate the status of the GNSS engine.
|
||||
*
|
||||
* @param status Status information from HAL.
|
||||
*/
|
||||
gnssStatusCb(GnssStatusValue status);
|
||||
|
||||
/*
|
||||
/**
|
||||
* @param svInfo SV status information from HAL.
|
||||
*/
|
||||
gnssSvStatusCb(GnssSvStatus svInfo);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Called when NMEA data is available.
|
||||
* Callback for reporting NMEA sentences.
|
||||
*
|
||||
@@ -195,7 +195,7 @@ interface IGnssCallback {
|
||||
*/
|
||||
gnssNmeaCb(GnssUtcTime timestamp, string nmea);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Callback to inform framework of the GNSS engine's capabilities.
|
||||
*
|
||||
* @param capabilities Capability parameter is a bit field of
|
||||
@@ -203,7 +203,7 @@ interface IGnssCallback {
|
||||
*/
|
||||
gnssSetCapabilitesCb(bitfield<Capabilities> capabilities);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Callback utility for acquiring the GNSS wakelock. This can be used to prevent
|
||||
* the CPU from suspending while handling GNSS events.
|
||||
*/
|
||||
@@ -215,7 +215,7 @@ interface IGnssCallback {
|
||||
/** Callback for requesting NTP time */
|
||||
gnssRequestTimeCb();
|
||||
|
||||
/*
|
||||
/**
|
||||
* Provides information about how new the underlying GPS/GNSS hardware and
|
||||
* software is.
|
||||
*
|
||||
@@ -228,14 +228,14 @@ interface IGnssCallback {
|
||||
* GnssMeasurement support will be verified.
|
||||
*/
|
||||
struct GnssSystemInfo{
|
||||
/*
|
||||
/**
|
||||
* year in which the last update was made to the underlying hardware/firmware
|
||||
* used to capture GNSS signals, e.g. 2016
|
||||
*/
|
||||
uint16_t yearOfHw;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Callback to inform framework of the engine's hardware version information.
|
||||
*
|
||||
* @param info GnssSystemInfo about the GPS/GNSS hardware.
|
||||
|
||||
@@ -16,68 +16,68 @@
|
||||
|
||||
package android.hardware.gnss@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Interface for passing GNSS configuration info from platform to HAL.
|
||||
*/
|
||||
interface IGnssConfiguration {
|
||||
/*
|
||||
/**
|
||||
* Enum which holds the bit masks for SUPL_MODE configuration parameter.
|
||||
*/
|
||||
enum SuplMode : uint8_t {
|
||||
/* Mobile Station Based */
|
||||
/** Mobile Station Based */
|
||||
MSB = 0x01,
|
||||
|
||||
/* Mobile Station Assisted */
|
||||
/** Mobile Station Assisted */
|
||||
MSA = 0x02
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Enum which holds the bit masks for GPS_LOCK configuration parameter.
|
||||
*/
|
||||
enum GpsLock : uint8_t {
|
||||
/* Lock Mobile Originated GPS functionalitues. */
|
||||
/** Lock Mobile Originated GPS functionalitues. */
|
||||
MO = 0x01,
|
||||
|
||||
/* Lock Network initiated GPS functionalities. */
|
||||
/** Lock Network initiated GPS functionalities. */
|
||||
NI = 0x02
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Enum that hold the bit masks for various LTE Positioning Profile settings (LPP_PROFILE
|
||||
* configuration parameter). If none of the bits in the enum are set, the default setting is
|
||||
* Radio Resource Location Protocol(RRLP).
|
||||
*/
|
||||
enum LppProfile : uint8_t {
|
||||
/* Enable LTE Positioning Protocol user plane */
|
||||
/** Enable LTE Positioning Protocol user plane */
|
||||
USER_PLANE = 0x01,
|
||||
|
||||
/* Enable LTE Positioning Protocol Control plane */
|
||||
/** Enable LTE Positioning Protocol Control plane */
|
||||
CONTROL_PLANE = 0x02
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Enum which holds the bit masks for A_GLONASS_POS_PROTOCOL_SELECT
|
||||
* configuration parameter.
|
||||
*/
|
||||
enum GlonassPosProtocol : uint8_t {
|
||||
/* Radio Resource Control(RRC) control-plane. */
|
||||
/** Radio Resource Control(RRC) control-plane. */
|
||||
RRC_CPLANE = 0x01,
|
||||
|
||||
/* Radio Resource Location user-plane. */
|
||||
/** Radio Resource Location user-plane. */
|
||||
RRLP_CPLANE = 0x02,
|
||||
|
||||
/* LTE Positioning Protocol User plane */
|
||||
/** LTE Positioning Protocol User plane */
|
||||
LPP_UPLANE = 0x04
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* IMPORTANT: GNSS HAL must expect the below methods to be called multiple
|
||||
* times. They can be called even when GnssLocationProvider is already
|
||||
* constructed and enabled. GNSS HAL must maintain the existing requests
|
||||
* for various callbacks regardless the change in configuration data.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method enables or disables emergency SUPL.
|
||||
*
|
||||
* @param enabled True if emergency SUPL is to be enabled.
|
||||
@@ -86,7 +86,7 @@ interface IGnssConfiguration {
|
||||
*/
|
||||
setSuplEs(bool enabled) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method sets the SUPL version requested by Carrier. The GNSS HAL
|
||||
* must use this version of the SUPL protocol if supported.
|
||||
*
|
||||
@@ -99,7 +99,7 @@ interface IGnssConfiguration {
|
||||
*/
|
||||
setSuplVersion(uint32_t version) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method sets the SUPL mode.
|
||||
*
|
||||
* @param mode Bit mask that specifies the SUPL mode which is set with the SuplMode enum.
|
||||
@@ -108,7 +108,7 @@ interface IGnssConfiguration {
|
||||
*/
|
||||
setSuplMode(bitfield<SuplMode> mode) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This setting configures how GPS functionalities should be locked when
|
||||
* user turns off GPS On setting.
|
||||
*
|
||||
@@ -119,7 +119,7 @@ interface IGnssConfiguration {
|
||||
*/
|
||||
setGpsLock(bitfield<GpsLock> lock) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method sets the LTE Positioning Profile configuration.
|
||||
*
|
||||
* @param lppProfile Bitmask that specifies the LTE Positioning Profile
|
||||
@@ -129,7 +129,7 @@ interface IGnssConfiguration {
|
||||
*/
|
||||
setLppProfile(bitfield<LppProfile> lppProfile) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method selects positioning protocol on A-Glonass system.
|
||||
*
|
||||
* @param protocol Bitmask that specifies the positioning protocol to be
|
||||
@@ -139,7 +139,7 @@ interface IGnssConfiguration {
|
||||
*/
|
||||
setGlonassPositioningProtocol(bitfield<GlonassPosProtocol> protocol) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This method configures which PDN to use.
|
||||
*
|
||||
* @param enable Use emergency PDN if true and regular PDN if false.
|
||||
|
||||
@@ -1,107 +1,107 @@
|
||||
package android.hardware.gnss@1.0;
|
||||
|
||||
/* Extended interface for DEBUG support. */
|
||||
/** Extended interface for DEBUG support. */
|
||||
interface IGnssDebug {
|
||||
enum SatelliteEphemerisType : uint8_t {
|
||||
/* no information is known to the gnss hardware, about this satellite */
|
||||
/** no information is known to the gnss hardware, about this satellite */
|
||||
UNKNOWN,
|
||||
/* this satellite is known to exist */
|
||||
/** this satellite is known to exist */
|
||||
KNOWN,
|
||||
/* this satellite is not known to exist */
|
||||
/** this satellite is not known to exist */
|
||||
NONEXISTENT,
|
||||
/* Only Almanac (approximate) location known for this satellite */
|
||||
/** Only Almanac (approximate) location known for this satellite */
|
||||
ALMANAC_ONLY,
|
||||
/* Ephemeris is known from demodulating the signal on device */
|
||||
/** Ephemeris is known from demodulating the signal on device */
|
||||
DEMODULATED,
|
||||
/* Ephemeris has been provided by SUPL */
|
||||
/** Ephemeris has been provided by SUPL */
|
||||
SUPL_PROVIDED,
|
||||
/* Ephemeris has been provided by another server */
|
||||
/** Ephemeris has been provided by another server */
|
||||
OTHER_SERVER_PROVIDED,
|
||||
/*
|
||||
/**
|
||||
* Predicted ephemeris has been provided by a server
|
||||
* (e.g. Xtra, Extended Ephemeris, etc...)
|
||||
*/
|
||||
SERVER_PREDICTED,
|
||||
/*
|
||||
/**
|
||||
* Predicted ephemeris in use, generated locally on the device (e.g. from prior
|
||||
* ephemeris)
|
||||
*/
|
||||
LOCALLY_PREDICTED
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Provides the current best known position from any
|
||||
* source (GNSS or injected assistance).
|
||||
*/
|
||||
struct PositionDebug {
|
||||
/*
|
||||
/**
|
||||
* Validity of the data in this struct. False only if no
|
||||
* latitude/longitude information is known.
|
||||
*/
|
||||
bool valid;
|
||||
/* Latitude expressed in degrees */
|
||||
/** Latitude expressed in degrees */
|
||||
double latitudeDegrees;
|
||||
/* Longitude expressed in degrees */
|
||||
/** Longitude expressed in degrees */
|
||||
double longitudeDegrees;
|
||||
/* Altitude above ellipsoid expressed in meters */
|
||||
/** Altitude above ellipsoid expressed in meters */
|
||||
float altitudeMeters;
|
||||
/* Represents speed in meters per second. */
|
||||
/** Represents speed in meters per second. */
|
||||
float speedMetersPerSec;
|
||||
/* Represents heading in degrees. */
|
||||
/** Represents heading in degrees. */
|
||||
float bearingDegrees;
|
||||
/*
|
||||
/**
|
||||
* estimated horizontal accuracy of position expressed in meters, radial,
|
||||
* 68% confidence.
|
||||
*/
|
||||
double horizontalAccuracyMeters;
|
||||
/*
|
||||
/**
|
||||
* estimated vertical accuracy of position expressed in meters, with
|
||||
* 68% confidence.
|
||||
*/
|
||||
double verticalAccuracyMeters;
|
||||
/*
|
||||
/**
|
||||
* estimated speed accuracy in meters per second with 68% confidence.
|
||||
*/
|
||||
double speedAccuracyMetersPerSecond;
|
||||
/*
|
||||
/**
|
||||
* estimated bearing accuracy degrees with 68% confidence.
|
||||
*/
|
||||
double bearingAccuracyDegrees;
|
||||
/*
|
||||
/**
|
||||
* Time duration before this report that this position information was
|
||||
* valid.
|
||||
*/
|
||||
float ageSeconds;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Provides the current best known UTC time estimate.
|
||||
*/
|
||||
struct TimeDebug {
|
||||
/*
|
||||
/**
|
||||
* Validity of the data in the struct.
|
||||
* False if current time is unknown.
|
||||
*/
|
||||
bool valid;
|
||||
/*
|
||||
/**
|
||||
* UTC time estimate.
|
||||
*/
|
||||
GnssUtcTime timeEstimate;
|
||||
/* 68% error estimate in time. */
|
||||
/** 68% error estimate in time. */
|
||||
float timeUncertaintyNs;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Provides a single satellite info that has decoded navigation data.
|
||||
*/
|
||||
struct SatelliteData {
|
||||
/* Satellite vehicle ID number */
|
||||
/** Satellite vehicle ID number */
|
||||
int16_t svid;
|
||||
/* Defines the constellation type of the given SV. */
|
||||
/** Defines the constellation type of the given SV. */
|
||||
GnssConstellationType constellation;
|
||||
/* Defines the ephemeris type of the satellite. */
|
||||
/** Defines the ephemeris type of the satellite. */
|
||||
SatelliteEphemerisType ephemerisType;
|
||||
/*
|
||||
/**
|
||||
* Time duration before this report, that the ephemeris source was last
|
||||
* updated, e.g. latest demodulation, or latest server download.
|
||||
* Set to 0 when ephemerisType is UNKNOWN.
|
||||
@@ -109,16 +109,16 @@ interface IGnssDebug {
|
||||
float ephemerisAgeSeconds;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Provides a set of debug information that is filled by the GNSS chipset
|
||||
* when the method getDebugData() is invoked.
|
||||
*/
|
||||
struct DebugData {
|
||||
/* Current best known position. */
|
||||
/** Current best known position. */
|
||||
PositionDebug position;
|
||||
/* Current best know time estimate */
|
||||
/** Current best know time estimate */
|
||||
TimeDebug time;
|
||||
/*
|
||||
/**
|
||||
* Provides a list of the decoded satellite ephemeris.
|
||||
* Must provide a complete list for all constellations device can track,
|
||||
* including GnssConstellationType UNKNOWN.
|
||||
@@ -127,7 +127,7 @@ interface IGnssDebug {
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* This methods requests position, time and satellite ephemeris debug information
|
||||
* from the HAL.
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package android.hardware.gnss@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* GNSS Geofence.
|
||||
* There are 3 states associated with a Geofence: Inside, Outside, Unknown.
|
||||
* There are 3 transitions: ENTERED, EXITED, UNCERTAIN.
|
||||
@@ -114,7 +114,7 @@ interface IGnssGeofenceCallback {
|
||||
ERROR_GENERIC = -149
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The callback associated with the geofence transition.
|
||||
* The callback must only be called when the caller is interested in that
|
||||
* particular transition. For instance, if the caller is interested only in
|
||||
@@ -134,7 +134,7 @@ interface IGnssGeofenceCallback {
|
||||
gnssGeofenceTransitionCb(int32_t geofenceId, GnssLocation location,
|
||||
GeofenceTransition transition, GnssUtcTime timestamp);
|
||||
|
||||
/*
|
||||
/**
|
||||
* The callback associated with the availability of the GNSS system for
|
||||
* geofencing monitoring. If the GNSS system determines that it cannot monitor
|
||||
* geofences because of lack of reliability or unavailability of the GNSS
|
||||
@@ -145,7 +145,7 @@ interface IGnssGeofenceCallback {
|
||||
*/
|
||||
gnssGeofenceStatusCb(GeofenceAvailability status, GnssLocation lastLocation);
|
||||
|
||||
/*
|
||||
/**
|
||||
* The callback associated with the addGeofence call.
|
||||
*
|
||||
* @param geofenceId Id of the geofence.
|
||||
@@ -159,7 +159,7 @@ interface IGnssGeofenceCallback {
|
||||
*/
|
||||
gnssGeofenceAddCb(int32_t geofenceId, GeofenceStatus status);
|
||||
|
||||
/*
|
||||
/**
|
||||
* The callback associated with the removeGeofence call.
|
||||
*
|
||||
* @param geofenceId Id of the geofence.
|
||||
@@ -169,7 +169,7 @@ interface IGnssGeofenceCallback {
|
||||
*/
|
||||
gnssGeofenceRemoveCb(int32_t geofenceId, GeofenceStatus status);
|
||||
|
||||
/*
|
||||
/**
|
||||
* The callback associated with the pauseGeofence call.
|
||||
*
|
||||
* @param geofenceId Id of the geofence.
|
||||
@@ -180,7 +180,7 @@ interface IGnssGeofenceCallback {
|
||||
*/
|
||||
gnssGeofencePauseCb(int32_t geofenceId, GeofenceStatus status);
|
||||
|
||||
/*
|
||||
/**
|
||||
* The callback associated with the resumeGeofence call.
|
||||
*
|
||||
* @param geofenceId - Id of the geofence.
|
||||
|
||||
@@ -18,9 +18,9 @@ package android.hardware.gnss@1.0;
|
||||
|
||||
import IGnssGeofenceCallback;
|
||||
|
||||
/* Extended interface for GNSS Geofencing support */
|
||||
/** Extended interface for GNSS Geofencing support */
|
||||
interface IGnssGeofencing {
|
||||
/*
|
||||
/**
|
||||
* Opens the geofence interface and provides the callback routines
|
||||
* to the HAL.
|
||||
*
|
||||
@@ -28,7 +28,7 @@ interface IGnssGeofencing {
|
||||
*/
|
||||
setCallback(IGnssGeofenceCallback callback);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Add a geofence area. This api currently supports circular geofences.
|
||||
*
|
||||
* @param geofenceId The id for the geofence. If a geofence with this id
|
||||
@@ -59,14 +59,14 @@ interface IGnssGeofencing {
|
||||
uint32_t notificationResponsivenessMs,
|
||||
uint32_t unknownTimerMs);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Pause monitoring a particular geofence.
|
||||
*
|
||||
* @param geofenceId The id for the geofence.
|
||||
*/
|
||||
pauseGeofence(int32_t geofenceId);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Resume monitoring a particular geofence.
|
||||
*
|
||||
* @param geofenceId - The id for the geofence.
|
||||
@@ -78,7 +78,7 @@ interface IGnssGeofencing {
|
||||
resumeGeofence(int32_t geofenceId,
|
||||
bitfield<IGnssGeofenceCallback.GeofenceTransition> monitorTransitions);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Remove a geofence area. After the function returns, no notifications
|
||||
* must be sent.
|
||||
*
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.gnss@1.0;
|
||||
|
||||
import IGnssMeasurementCallback;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extended interface for GNSS Measurements support.
|
||||
*/
|
||||
interface IGnssMeasurement {
|
||||
@@ -29,7 +29,7 @@ interface IGnssMeasurement {
|
||||
ERROR_GENERIC = -101
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Initializes the interface and registers the callback routines with the HAL.
|
||||
* After a successful call to 'setCallback' the HAL must begin to provide updates at
|
||||
* an average output rate of 1Hz (occasional
|
||||
@@ -46,7 +46,7 @@ interface IGnssMeasurement {
|
||||
*/
|
||||
setCallback(IGnssMeasurementCallback callback) generates (GnssMeasurementStatus initRet);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Stops updates from the HAL, and unregisters the callback routines.
|
||||
* After a call to close(), the previously registered callbacks must be
|
||||
* considered invalid by the HAL.
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package android.hardware.gnss@1.0;
|
||||
|
||||
/* The callback interface to report measurements from the HAL. */
|
||||
/** The callback interface to report measurements from the HAL. */
|
||||
interface IGnssMeasurementCallback {
|
||||
/*
|
||||
/**
|
||||
* Flags to indicate what fields in GnssClock are valid.
|
||||
*/
|
||||
@export(name="", value_prefix="GNSS_CLOCK_")
|
||||
@@ -39,7 +39,7 @@ interface IGnssMeasurementCallback {
|
||||
HAS_DRIFT_UNCERTAINTY = 1 << 6
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags to indicate what fields in GnssMeasurement are valid.
|
||||
*/
|
||||
@export(name="", value_prefix="GNSS_MEASUREMENT_")
|
||||
@@ -58,7 +58,7 @@ interface IGnssMeasurementCallback {
|
||||
HAS_AUTOMATIC_GAIN_CONTROL = 1 << 13
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Enumeration of available values for the GNSS Measurement's multipath
|
||||
* indicator.
|
||||
*/
|
||||
@@ -72,7 +72,7 @@ interface IGnssMeasurementCallback {
|
||||
INDICATIOR_NOT_PRESENT = 2
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags indicating the GNSS measurement state.
|
||||
*
|
||||
* The expected behavior here is for GNSS HAL to set all the flags that applies.
|
||||
@@ -106,7 +106,7 @@ interface IGnssMeasurementCallback {
|
||||
STATE_GLO_TOD_KNOWN = 1 << 15,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags indicating the Accumulated Delta Range's states.
|
||||
*/
|
||||
@export(name="", value_prefix="GNSS_")
|
||||
@@ -117,17 +117,17 @@ interface IGnssMeasurementCallback {
|
||||
ADR_STATE_CYCLE_SLIP = 1 << 2,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents an estimate of the GNSS clock time.
|
||||
*/
|
||||
struct GnssClock {
|
||||
/*
|
||||
/**
|
||||
* A set of flags indicating the validity of the fields in this data
|
||||
* structure.
|
||||
*/
|
||||
bitfield<GnssClockFlags> gnssClockFlags;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Leap second data.
|
||||
* The sign of the value is defined by the following equation:
|
||||
* utcTimeNs = timeNs - (fullBiasNs + biasNs) - leapSecond *
|
||||
@@ -138,7 +138,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
int16_t leapSecond;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The GNSS receiver internal clock value. This is the local hardware clock
|
||||
* value.
|
||||
*
|
||||
@@ -159,7 +159,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
int64_t timeNs;
|
||||
|
||||
/*
|
||||
/**
|
||||
* 1-Sigma uncertainty associated with the clock's time in nanoseconds.
|
||||
* The uncertainty is represented as an absolute (single sided) value.
|
||||
*
|
||||
@@ -170,7 +170,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double timeUncertaintyNs;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The difference between hardware clock ('time' field) inside GNSS receiver
|
||||
* and the true GNSS time since 0000Z, January 6, 1980, in nanoseconds.
|
||||
*
|
||||
@@ -187,7 +187,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
int64_t fullBiasNs;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sub-nanosecond bias.
|
||||
* The error estimate for the sum of this and the fullBiasNs is the
|
||||
* biasUncertaintyNs.
|
||||
@@ -198,7 +198,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double biasNs;
|
||||
|
||||
/*
|
||||
/**
|
||||
* 1-Sigma uncertainty associated with the local estimate of GNSS time (clock
|
||||
* bias) in nanoseconds. The uncertainty is represented as an absolute
|
||||
* (single sided) value.
|
||||
@@ -209,7 +209,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double biasUncertaintyNs;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The clock's drift in nanoseconds (per second).
|
||||
*
|
||||
* A positive value means that the frequency is higher than the nominal
|
||||
@@ -223,7 +223,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double driftNsps;
|
||||
|
||||
/*
|
||||
/**
|
||||
* 1-Sigma uncertainty associated with the clock's drift in nanoseconds (per
|
||||
* second).
|
||||
* The uncertainty is represented as an absolute (single sided) value.
|
||||
@@ -234,7 +234,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double driftUncertaintyNsps;
|
||||
|
||||
/*
|
||||
/**
|
||||
* When there are any discontinuities in the HW clock, this field is
|
||||
* mandatory.
|
||||
*
|
||||
@@ -267,7 +267,7 @@ interface IGnssMeasurementCallback {
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents a GNSS Measurement, it contains raw and computed information.
|
||||
*
|
||||
* All signal measurement information (e.g. svTime,
|
||||
@@ -277,24 +277,24 @@ interface IGnssMeasurementCallback {
|
||||
* position, velocity, or time.
|
||||
*/
|
||||
struct GnssMeasurement{
|
||||
/*
|
||||
/**
|
||||
* A set of flags indicating the validity of the fields in this data
|
||||
* structure.
|
||||
*/
|
||||
bitfield<GnssMeasurementFlags> flags;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Satellite vehicle ID number, as defined in GnssSvInfo::svid
|
||||
* This is a mandatory value.
|
||||
*/
|
||||
int16_t svid;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Defines the constellation of the given SV.
|
||||
*/
|
||||
GnssConstellationType constellation;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Time offset at which the measurement was taken in nanoseconds.
|
||||
* The reference receiver's time is specified by GnssData::clock::timeNs.
|
||||
*
|
||||
@@ -307,7 +307,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double timeOffsetNs;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Per satellite sync state. It represents the current sync state for the
|
||||
* associated satellite.
|
||||
* Based on the sync state, the 'received GNSS tow' field must be interpreted
|
||||
@@ -317,7 +317,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
bitfield<GnssMeasurementState> state;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The received GNSS Time-of-Week at the measurement time, in nanoseconds.
|
||||
* For GNSS & QZSS, this is the received GNSS Time-of-Week at the
|
||||
* measurement time, in nanoseconds. The value is relative to the
|
||||
@@ -402,14 +402,14 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
int64_t receivedSvTimeInNs;
|
||||
|
||||
/*
|
||||
/**
|
||||
* 1-Sigma uncertainty of the Received GNSS Time-of-Week in nanoseconds.
|
||||
*
|
||||
* This value must be populated if 'state' != STATE_UNKNOWN.
|
||||
*/
|
||||
int64_t receivedSvTimeUncertaintyInNs;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Carrier-to-noise density in dB-Hz, typically in the range [0, 63].
|
||||
* It contains the measured C/N0 value for the signal at the antenna port.
|
||||
*
|
||||
@@ -417,7 +417,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double cN0DbHz;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Pseudorange rate at the timestamp in m/s. The correction of a given
|
||||
* Pseudorange Rate value includes corrections for receiver and satellite
|
||||
* clock frequency errors. Ensure that this field is independent (see
|
||||
@@ -445,7 +445,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double pseudorangeRateMps;
|
||||
|
||||
/*
|
||||
/**
|
||||
* 1-Sigma uncertainty of the pseudorangeRateMps.
|
||||
* The uncertainty is represented as an absolute (single sided) value.
|
||||
*
|
||||
@@ -453,7 +453,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double pseudorangeRateUncertaintyMps;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Accumulated delta range's state. It indicates whether ADR is reset or
|
||||
* there is a cycle slip(indicating loss of lock).
|
||||
*
|
||||
@@ -461,7 +461,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
bitfield<GnssAccumulatedDeltaRangeState> accumulatedDeltaRangeState;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Accumulated delta range since the last channel reset in meters.
|
||||
* A positive value indicates that the SV is moving away from the receiver.
|
||||
*
|
||||
@@ -476,14 +476,14 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double accumulatedDeltaRangeM;
|
||||
|
||||
/*
|
||||
/**
|
||||
* 1-Sigma uncertainty of the accumulated delta range in meters.
|
||||
* This value must be populated if 'accumulated delta range state' !=
|
||||
* ADR_STATE_UNKNOWN.
|
||||
*/
|
||||
double accumulatedDeltaRangeUncertaintyM;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Carrier frequency of the signal tracked, for example it can be the
|
||||
* GPS central frequency for L1 = 1575.45 MHz, or L2 = 1227.60 MHz, L5 =
|
||||
* 1176.45 MHz, varying GLO channels, etc. If the field is not set, it
|
||||
@@ -501,7 +501,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
float carrierFrequencyHz;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The number of full carrier cycles between the satellite and the
|
||||
* receiver. The reference frequency is given by the field
|
||||
* 'carrierFrequencyHz'. Indications of possible cycle slips and
|
||||
@@ -513,7 +513,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
int64_t carrierCycles;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The RF phase detected by the receiver, in the range [0.0, 1.0].
|
||||
* This is usually the fractional part of the complete carrier phase
|
||||
* measurement.
|
||||
@@ -526,14 +526,14 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double carrierPhase;
|
||||
|
||||
/*
|
||||
/**
|
||||
* 1-Sigma uncertainty of the carrier-phase.
|
||||
* If the data is available, gnssClockFlags must contain
|
||||
* HAS_CARRIER_PHASE_UNCERTAINTY.
|
||||
*/
|
||||
double carrierPhaseUncertainty;
|
||||
|
||||
/*
|
||||
/**
|
||||
* An enumeration that indicates the 'multipath' state of the event.
|
||||
*
|
||||
* The multipath Indicator is intended to report the presence of overlapping
|
||||
@@ -554,7 +554,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
GnssMultipathIndicator multipathIndicator;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Signal-to-noise ratio at correlator output in dB.
|
||||
* If the data is available, gnssClockFlags must contain MEASUREMENT_HAS_SNR.
|
||||
* This is the power ratio of the "correlation peak height above the
|
||||
@@ -562,7 +562,7 @@ interface IGnssMeasurementCallback {
|
||||
*/
|
||||
double snrDb;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Automatic gain control (AGC) level. AGC acts as a variable gain
|
||||
* amplifier adjusting the power of the incoming signal. The AGC level
|
||||
* may be used to indicate potential interference. When AGC is at a
|
||||
@@ -581,7 +581,7 @@ interface IGnssMeasurementCallback {
|
||||
double agcLevelDb;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents a reading of GNSS measurements. For devices where GnssSystemInfo's
|
||||
* yearOfHw is set to 2016+, it is mandatory that these be provided, on
|
||||
* request, when the GNSS receiver is searching/tracking signals.
|
||||
@@ -590,17 +590,17 @@ interface IGnssMeasurementCallback {
|
||||
* - Reporting of all tracked constellations are encouraged.
|
||||
*/
|
||||
struct GnssData {
|
||||
/* Number of GnssMeasurement elements. */
|
||||
/** Number of GnssMeasurement elements. */
|
||||
uint32_t measurementCount;
|
||||
|
||||
/* The array of measurements. */
|
||||
/** The array of measurements. */
|
||||
GnssMeasurement[GnssMax:SVS_COUNT] measurements;
|
||||
|
||||
/** The GNSS clock time reading. */
|
||||
GnssClock clock;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Callback for the hal to pass a GnssData structure back to the client.
|
||||
*
|
||||
* @param data Contains a reading of GNSS measurements.
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.gnss@1.0;
|
||||
|
||||
import IGnssNavigationMessageCallback;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extended interface for GNSS navigation message reporting support.
|
||||
*/
|
||||
interface IGnssNavigationMessage {
|
||||
@@ -29,7 +29,7 @@ interface IGnssNavigationMessage {
|
||||
ERROR_GENERIC = -101
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Initializes the interface and registers the callback routines with the HAL.
|
||||
* After a successful call to 'setCallback' the HAL must begin to provide updates as
|
||||
* they become available.
|
||||
@@ -45,7 +45,7 @@ interface IGnssNavigationMessage {
|
||||
*/
|
||||
setCallback(IGnssNavigationMessageCallback callback) generates (GnssNavigationMessageStatus initRet);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Stops updates from the HAL, and unregisters the callback routines.
|
||||
* After a call to close(), the previously registered callbacks must be
|
||||
* considered invalid by the HAL.
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.gnss@1.0;
|
||||
|
||||
/** Represents a GNSS navigation message (or a fragment of it). */
|
||||
interface IGnssNavigationMessageCallback {
|
||||
/*
|
||||
/**
|
||||
* Enumeration of available values to indicate the GNSS Navigation message
|
||||
* types.
|
||||
*
|
||||
@@ -48,7 +48,7 @@ interface IGnssNavigationMessageCallback {
|
||||
GAL_F = 0x0602
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Status of Navigation Message
|
||||
* When a message is received properly without any parity error in its
|
||||
* navigation words, the status must be set to PARITY_PASSED. But if a message is
|
||||
@@ -65,26 +65,26 @@ interface IGnssNavigationMessageCallback {
|
||||
};
|
||||
|
||||
struct GnssNavigationMessage {
|
||||
/*
|
||||
/**
|
||||
* Satellite vehicle ID number, as defined in GnssSvInfo::svid
|
||||
* This is a mandatory value.
|
||||
*/
|
||||
int16_t svid;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The type of message contained in the structure.
|
||||
* This is a mandatory value.
|
||||
*/
|
||||
GnssNavigationMessageType type;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The status of the received navigation message.
|
||||
* No need to send any navigation message that contains words with parity
|
||||
* error and cannot be corrected.
|
||||
*/
|
||||
bitfield<NavigationMessageStatus> status;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Message identifier. It provides an index so the complete Navigation
|
||||
* Message can be assembled.
|
||||
*
|
||||
@@ -106,7 +106,7 @@ interface IGnssNavigationMessageCallback {
|
||||
*/
|
||||
int16_t messageId;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sub-message identifier. If required by the message 'type', this value
|
||||
* contains a sub-index within the current message (or frame) that is being
|
||||
* transmitted.
|
||||
@@ -123,7 +123,7 @@ interface IGnssNavigationMessageCallback {
|
||||
*/
|
||||
int16_t submessageId;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The data of the reported GNSS message. The bytes (or words) are specified
|
||||
* using big endian format (MSB first). The data is stored and decoded
|
||||
* in a server for research purposes.
|
||||
@@ -158,7 +158,7 @@ interface IGnssNavigationMessageCallback {
|
||||
vec<uint8_t> data;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The callback to report an available fragment of a GNSS navigation messages
|
||||
* from the HAL.
|
||||
*
|
||||
|
||||
@@ -17,19 +17,19 @@
|
||||
package android.hardware.gnss@1.0;
|
||||
import IGnssNiCallback;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extended interface for Network-initiated (NI) support. This interface is used
|
||||
* to respond to NI notifications originating from the HAL.
|
||||
*/
|
||||
interface IGnssNi {
|
||||
/*
|
||||
/**
|
||||
* Registers the callbacks for HAL to use.
|
||||
*
|
||||
* @param callback handle to IGnssNiCallback interface.
|
||||
*/
|
||||
setCallback(IGnssNiCallback callback);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sends a response to HAL.
|
||||
*
|
||||
* @param notifId An ID generated by HAL to associate NI notifications and
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package android.hardware.gnss@1.0;
|
||||
|
||||
/* GNSS Network Initiated callback interface. */
|
||||
/** GNSS Network Initiated callback interface. */
|
||||
interface IGnssNiCallback {
|
||||
/*
|
||||
/**
|
||||
* GnssNiType constants
|
||||
*/
|
||||
@export(name="", value_prefix="GPS_NI_TYPE_")
|
||||
@@ -28,7 +28,7 @@ interface IGnssNiCallback {
|
||||
UMTS_CTRL_PLANE = 3
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* GnssNiNotifyFlags constants
|
||||
*/
|
||||
@export(name="", value_prefix="GPS_NI_")
|
||||
@@ -41,7 +41,7 @@ interface IGnssNiCallback {
|
||||
PRIVACY_OVERRIDE = 0x0004,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* GNSS NI responses, used to define the response in
|
||||
* NI structures
|
||||
*/
|
||||
@@ -52,7 +52,7 @@ interface IGnssNiCallback {
|
||||
RESPONSE_NORESP = 3,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* NI data encoding scheme
|
||||
*/
|
||||
@export(name="", value_prefix="GPS_")
|
||||
@@ -66,59 +66,59 @@ interface IGnssNiCallback {
|
||||
|
||||
/** Represents an NI request */
|
||||
struct GnssNiNotification{
|
||||
/*
|
||||
/**
|
||||
* An ID generated by HAL to associate NI notifications and UI
|
||||
* responses.
|
||||
*/
|
||||
int32_t notificationId;
|
||||
|
||||
/*
|
||||
/**
|
||||
* A type used to distinguish different categories of NI
|
||||
* events, such as VOICE, UMTS_SUPL etc.
|
||||
*/
|
||||
GnssNiType niType;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notification/verification options, combinations of GnssNiNotifyFlags
|
||||
* constants.
|
||||
*/
|
||||
bitfield<GnssNiNotifyFlags> notifyFlags;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Timeout period to wait for user response.
|
||||
* Set to 0 for no timeout limit. Specified in seconds.
|
||||
*/
|
||||
uint32_t timeoutSec;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Default response when timeout.
|
||||
*/
|
||||
GnssUserResponseType defaultResponse;
|
||||
|
||||
/*
|
||||
/**
|
||||
* String representing the requester of the network inititated location
|
||||
* request.
|
||||
*/
|
||||
string requestorId;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notification message. String representing the service(for eg. SUPL-service)
|
||||
* who sent the network initiated location request.
|
||||
*/
|
||||
string notificationMessage;
|
||||
|
||||
/*
|
||||
/**
|
||||
* requestorId decoding scheme.
|
||||
*/
|
||||
GnssNiEncodingType requestorIdEncoding;
|
||||
|
||||
/*
|
||||
/**
|
||||
* notificationId decoding scheme
|
||||
*/
|
||||
GnssNiEncodingType notificationIdEncoding;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Callback with a network initiated request.
|
||||
*
|
||||
* @param notification network initiated request.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package android.hardware.gnss@1.0;
|
||||
import IGnssXtraCallback;
|
||||
|
||||
/*
|
||||
/**
|
||||
* This interface is used by the GNSS HAL to request the framework
|
||||
* to download XTRA data.
|
||||
*/
|
||||
interface IGnssXtra {
|
||||
/*
|
||||
/**
|
||||
* Opens the XTRA interface and provides the callback routines
|
||||
* to the implementation of this interface.
|
||||
*
|
||||
@@ -16,7 +16,7 @@ interface IGnssXtra {
|
||||
*/
|
||||
setCallback(IGnssXtraCallback callback) generates (bool success);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Inject the downloaded XTRA data into the GNSS receiver.
|
||||
*
|
||||
* @param xtraData GNSS XTRA data.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package android.hardware.gnss@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* This interface is used by the GNSS HAL to request download of XTRA data.
|
||||
*/
|
||||
interface IGnssXtraCallback {
|
||||
/*
|
||||
/**
|
||||
* Callback to request the client to download XTRA data. The client should
|
||||
* download XTRA data and inject it by calling injectXtraData().
|
||||
*/
|
||||
|
||||
@@ -22,10 +22,10 @@ enum GnssMax : uint32_t {
|
||||
SVS_COUNT = 64,
|
||||
};
|
||||
|
||||
/* Milliseconds since January 1, 1970 */
|
||||
/** Milliseconds since January 1, 1970 */
|
||||
typedef int64_t GnssUtcTime;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Constellation type of GnssSvInfo
|
||||
*/
|
||||
|
||||
@@ -61,52 +61,52 @@ enum GnssLocationFlags : uint16_t {
|
||||
HAS_BEARING_ACCURACY = 0x0080
|
||||
};
|
||||
|
||||
/* Represents a location. */
|
||||
/** Represents a location. */
|
||||
struct GnssLocation {
|
||||
/* Contains GnssLocationFlags bits. */
|
||||
/** Contains GnssLocationFlags bits. */
|
||||
bitfield<GnssLocationFlags> gnssLocationFlags;
|
||||
|
||||
/* Represents latitude in degrees. */
|
||||
/** Represents latitude in degrees. */
|
||||
double latitudeDegrees;
|
||||
|
||||
/* Represents longitude in degrees. */
|
||||
/** Represents longitude in degrees. */
|
||||
double longitudeDegrees;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents altitude in meters above the WGS 84 reference ellipsoid.
|
||||
*/
|
||||
double altitudeMeters;
|
||||
|
||||
/* Represents speed in meters per second. */
|
||||
/** Represents speed in meters per second. */
|
||||
float speedMetersPerSec;
|
||||
|
||||
/* Represents heading in degrees. */
|
||||
/** Represents heading in degrees. */
|
||||
float bearingDegrees;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents expected horizontal position accuracy, radial, in meters
|
||||
* (68% confidence).
|
||||
*/
|
||||
float horizontalAccuracyMeters;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents expected vertical position accuracy in meters
|
||||
* (68% confidence).
|
||||
*/
|
||||
float verticalAccuracyMeters;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents expected speed accuracy in meter per seconds
|
||||
* (68% confidence).
|
||||
*/
|
||||
float speedAccuracyMetersPerSecond;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Represents expected bearing accuracy in degrees
|
||||
* (68% confidence).
|
||||
*/
|
||||
float bearingAccuracyDegrees;
|
||||
|
||||
/* Timestamp for the location fix. */
|
||||
/** Timestamp for the location fix. */
|
||||
GnssUtcTime timestamp;
|
||||
};
|
||||
|
||||
@@ -20,23 +20,23 @@ import IAllocatorClient;
|
||||
|
||||
interface IAllocator {
|
||||
enum Capability : int32_t {
|
||||
/* reserved */
|
||||
/** reserved */
|
||||
INVALID = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* IAllocatorClient::testAllocate must always return UNDEFINED unless
|
||||
* this capability is supported.
|
||||
*/
|
||||
TEST_ALLOCATE = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* IAllocatorClient::BufferDescriptorInfo::layerCount must be 1 unless
|
||||
* this capability is supported.
|
||||
*/
|
||||
LAYERED_BUFFERS = 2,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Provides a list of supported capabilities (as described in the
|
||||
* definition of Capability above). This list must not change after
|
||||
* initialization.
|
||||
@@ -48,7 +48,7 @@ interface IAllocator {
|
||||
@callflow(next="*")
|
||||
getCapabilities() generates (vec<Capability> capabilities);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves implementation-defined debug information, which will be
|
||||
* displayed during, for example, `dumpsys SurfaceFlinger`.
|
||||
*
|
||||
@@ -59,7 +59,7 @@ interface IAllocator {
|
||||
@callflow(next="*")
|
||||
dumpDebugInfo() generates (string debugInfo);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Creates a client of the allocator. All resources created by the client
|
||||
* are owned by the client and are only visible to the client, unless they
|
||||
* are exported by exportHandle.
|
||||
|
||||
@@ -20,7 +20,7 @@ import android.hardware.graphics.common@1.0::PixelFormat;
|
||||
|
||||
interface IAllocatorClient {
|
||||
struct BufferDescriptorInfo {
|
||||
/*
|
||||
/**
|
||||
* The width specifies how many columns of pixels must be in the
|
||||
* allocated buffer, but does not necessarily represent the offset in
|
||||
* columns between the same column in adjacent rows. The rows may be
|
||||
@@ -28,34 +28,34 @@ interface IAllocatorClient {
|
||||
*/
|
||||
uint32_t width;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The height specifies how many rows of pixels must be in the
|
||||
* allocated buffer.
|
||||
*/
|
||||
uint32_t height;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The number of image layers that must be in the allocated buffer.
|
||||
*/
|
||||
uint32_t layerCount;
|
||||
|
||||
/* Buffer pixel format. */
|
||||
/** Buffer pixel format. */
|
||||
PixelFormat format;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Buffer producer usage mask; valid flags can be found in the
|
||||
* definition of ProducerUsage.
|
||||
*/
|
||||
uint64_t producerUsageMask;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Buffer consumer usage mask; valid flags can be found in the
|
||||
* definition of ConsumerUsage.
|
||||
*/
|
||||
uint64_t consumerUsageMask;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Creates a new, opaque buffer descriptor.
|
||||
*
|
||||
* @param descriptorInfo specifies the attributes of the buffer
|
||||
@@ -71,7 +71,7 @@ interface IAllocatorClient {
|
||||
generates (Error error,
|
||||
BufferDescriptor descriptor);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Destroys an existing buffer descriptor.
|
||||
*
|
||||
* @param descriptor is the descriptor to destroy.
|
||||
@@ -81,7 +81,7 @@ interface IAllocatorClient {
|
||||
@callflow(next="*")
|
||||
destroyDescriptor(BufferDescriptor descriptor) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Tests whether a buffer allocation can succeed, ignoring potential
|
||||
* resource contention which might lead to a NO_RESOURCES error.
|
||||
*
|
||||
@@ -98,7 +98,7 @@ interface IAllocatorClient {
|
||||
@callflow(next="allocate")
|
||||
testAllocate(vec<BufferDescriptor> descriptors) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Attempts to allocate a list of buffers sharing a backing store.
|
||||
*
|
||||
* Each buffer must correspond to one of the descriptors passed into the
|
||||
@@ -124,7 +124,7 @@ interface IAllocatorClient {
|
||||
generates (Error error,
|
||||
vec<Buffer> buffers);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Frees a buffer.
|
||||
*
|
||||
* @param buffer is the buffer to be freed.
|
||||
@@ -135,7 +135,7 @@ interface IAllocatorClient {
|
||||
@callflow(next="*")
|
||||
free(Buffer buffer) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Exports a buffer for use in other client libraries or for cross-process
|
||||
* sharing.
|
||||
*
|
||||
|
||||
@@ -17,130 +17,131 @@
|
||||
package android.hardware.graphics.allocator@2.0;
|
||||
|
||||
enum Error : int32_t {
|
||||
NONE = 0, /* no error */
|
||||
BAD_DESCRIPTOR = 1, /* invalid BufferDescriptor */
|
||||
BAD_BUFFER = 2, /* invalid Buffer */
|
||||
BAD_VALUE = 3, /* invalid width, height, etc. */
|
||||
NOT_SHARED = 4, /* buffers not sharing backing store */
|
||||
NO_RESOURCES = 5, /* temporary failure due to resource contention */
|
||||
UNDEFINED = 6, /* an operation has no defined meaning */
|
||||
UNSUPPORTED = 7, /* permanent failure */
|
||||
NONE = 0, /** no error */
|
||||
BAD_DESCRIPTOR = 1, /** invalid BufferDescriptor */
|
||||
BAD_BUFFER = 2, /** invalid Buffer */
|
||||
BAD_VALUE = 3, /** invalid width, height, etc. */
|
||||
NOT_SHARED = 4, /** buffers not sharing backing store */
|
||||
NO_RESOURCES = 5, /** temporary failure due to resource contention */
|
||||
UNDEFINED = 6, /** an operation has no defined meaning */
|
||||
UNSUPPORTED = 7, /** permanent failure */
|
||||
};
|
||||
|
||||
enum ProducerUsage : uint64_t {
|
||||
/* bit 0 is reserved */
|
||||
/** bit 0 is reserved */
|
||||
|
||||
/* buffer is read by CPU occasionally */
|
||||
/** buffer is read by CPU occasionally */
|
||||
CPU_READ = 1ULL << 1,
|
||||
/* buffer is read by CPU frequently */
|
||||
/** buffer is read by CPU frequently */
|
||||
CPU_READ_OFTEN = 1ULL << 2,
|
||||
|
||||
/* bit 3 is reserved */
|
||||
/* bit 4 is reserved */
|
||||
/** bit 3 is reserved */
|
||||
/** bit 4 is reserved */
|
||||
|
||||
/* buffer is written by CPU occasionally */
|
||||
/** buffer is written by CPU occasionally */
|
||||
CPU_WRITE = 1ULL << 5,
|
||||
/* buffer is written by CPU frequently */
|
||||
/** buffer is written by CPU frequently */
|
||||
CPU_WRITE_OFTEN = 1ULL << 6,
|
||||
|
||||
/* bit 7 is reserved */
|
||||
/* bit 8 is reserved */
|
||||
/** bit 7 is reserved */
|
||||
/** bit 8 is reserved */
|
||||
|
||||
/* buffer is used as a GPU render target */
|
||||
/** buffer is used as a GPU render target */
|
||||
GPU_RENDER_TARGET = 1ULL << 9,
|
||||
|
||||
/* bit 10 is reserved */
|
||||
/* bit 11 is reserved */
|
||||
/* bit 12 is reserved */
|
||||
/* bit 13 is reserved */
|
||||
/** bit 10 is reserved */
|
||||
/** bit 11 is reserved */
|
||||
/** bit 12 is reserved */
|
||||
/** bit 13 is reserved */
|
||||
|
||||
/*
|
||||
/**
|
||||
* Buffer is allocated with hardware-level protection against copying the
|
||||
* contents (or information derived from the contents) into unprotected
|
||||
* memory.
|
||||
*/
|
||||
PROTECTED = 1ULL << 14,
|
||||
|
||||
/* bit 15 is reserved */
|
||||
/* bit 16 is reserved */
|
||||
/** bit 15 is reserved */
|
||||
/** bit 16 is reserved */
|
||||
|
||||
/* buffer is used as a camera HAL output */
|
||||
/** buffer is used as a camera HAL output */
|
||||
CAMERA = 1ULL << 17,
|
||||
|
||||
/* bit 18 is reserved */
|
||||
/* bit 19 is reserved */
|
||||
/* bit 20 is reserved */
|
||||
/* bit 21 is reserved */
|
||||
/** bit 18 is reserved */
|
||||
/** bit 19 is reserved */
|
||||
/** bit 20 is reserved */
|
||||
/** bit 21 is reserved */
|
||||
|
||||
/* buffer is used as a video decoder output */
|
||||
/** buffer is used as a video decoder output */
|
||||
VIDEO_DECODER = 1ULL << 22,
|
||||
|
||||
/* buffer is used as a sensor direct report output */
|
||||
/** buffer is used as a sensor direct report output */
|
||||
SENSOR_DIRECT_DATA = 1ULL << 23,
|
||||
|
||||
/* bits 24-27 are reserved for future versions */
|
||||
/* bits 28-31 are reserved for vendor extensions */
|
||||
/** bits 24-27 are reserved for future versions */
|
||||
/** bits 28-31 are reserved for vendor extensions */
|
||||
|
||||
/* bits 32-47 are reserved for future versions */
|
||||
/* bits 48-63 are reserved for vendor extensions */
|
||||
/** bits 32-47 are reserved for future versions */
|
||||
/** bits 48-63 are reserved for vendor extensions */
|
||||
};
|
||||
|
||||
enum ConsumerUsage : uint64_t {
|
||||
/* bit 0 is reserved */
|
||||
/** bit 0 is reserved */
|
||||
|
||||
/* buffer is read by CPU occasionally */
|
||||
/** buffer is read by CPU occasionally */
|
||||
CPU_READ = 1ULL << 1,
|
||||
/* buffer is read by CPU frequently */
|
||||
/** buffer is read by CPU frequently */
|
||||
CPU_READ_OFTEN = 1ULL << 2,
|
||||
|
||||
/* bit 3 is reserved */
|
||||
/* bit 4 is reserved */
|
||||
/* bit 5 is reserved */
|
||||
/* bit 6 is reserved */
|
||||
/* bit 7 is reserved */
|
||||
/** bit 3 is reserved */
|
||||
/** bit 4 is reserved */
|
||||
/** bit 5 is reserved */
|
||||
/** bit 6 is reserved */
|
||||
/** bit 7 is reserved */
|
||||
|
||||
/* buffer is used as a GPU texture */
|
||||
/** buffer is used as a GPU texture */
|
||||
GPU_TEXTURE = 1ULL << 8,
|
||||
|
||||
/* bit 9 is reserved */
|
||||
/* bit 10 is reserved */
|
||||
/** bit 9 is reserved */
|
||||
/** bit 10 is reserved */
|
||||
|
||||
/* buffer is used by hwcomposer HAL */
|
||||
/** buffer is used by hwcomposer HAL */
|
||||
HWCOMPOSER = 1ULL << 11,
|
||||
/* buffer is a hwcomposer HAL client target */
|
||||
/** buffer is a hwcomposer HAL client target */
|
||||
CLIENT_TARGET = 1ULL << 12,
|
||||
|
||||
/* bit 13 is reserved */
|
||||
/* bit 14 is reserved */
|
||||
/** bit 13 is reserved */
|
||||
/** bit 14 is reserved */
|
||||
|
||||
/* buffer is used as a hwcomposer HAL cursor */
|
||||
/** buffer is used as a hwcomposer HAL cursor */
|
||||
CURSOR = 1ULL << 15,
|
||||
|
||||
/* buffer is used as a video encoder input */
|
||||
/** buffer is used as a video encoder input */
|
||||
VIDEO_ENCODER = 1ULL << 16,
|
||||
|
||||
/* bit 17 is reserved */
|
||||
/** bit 17 is reserved */
|
||||
|
||||
/* buffer is used as a camera HAL input */
|
||||
/** buffer is used as a camera HAL input */
|
||||
CAMERA = 1ULL << 18,
|
||||
|
||||
/* bit 19 is reserved */
|
||||
/** bit 19 is reserved */
|
||||
|
||||
/* buffer is used as a renderscript allocation */
|
||||
/** buffer is used as a renderscript allocation */
|
||||
RENDERSCRIPT = 1ULL << 20,
|
||||
|
||||
/* bit 21 is reserved */
|
||||
/* bit 22 is reserved */
|
||||
/** bit 21 is reserved */
|
||||
/** bit 22 is reserved */
|
||||
|
||||
/* buffer is used as as an OpenGL shader storage or uniform
|
||||
/**
|
||||
* buffer is used as as an OpenGL shader storage or uniform
|
||||
buffer object */
|
||||
GPU_DATA_BUFFER = 1ULL << 23,
|
||||
|
||||
/* bits 24-27 are reserved for future versions */
|
||||
/* bits 28-31 are reserved for vendor extensions */
|
||||
/** bits 24-27 are reserved for future versions */
|
||||
/** bits 28-31 are reserved for vendor extensions */
|
||||
|
||||
/* bits 32-47 are reserved for future versions */
|
||||
/* bits 48-63 are reserved for vendor extensions */
|
||||
/** bits 32-47 are reserved for future versions */
|
||||
/** bits 48-63 are reserved for vendor extensions */
|
||||
};
|
||||
|
||||
typedef uint64_t BufferDescriptor;
|
||||
|
||||
@@ -546,7 +546,7 @@ interface IGraphicBufferProducer {
|
||||
*/
|
||||
disconnect(
|
||||
int32_t api,
|
||||
DisconnectMode mode /* = DisconnectMode::API */
|
||||
DisconnectMode mode /** = DisconnectMode::API */
|
||||
) generates (
|
||||
Status status
|
||||
);
|
||||
|
||||
@@ -21,7 +21,7 @@ package android.hardware.graphics.common@1.0;
|
||||
*/
|
||||
@export(name="android_pixel_format_t", value_prefix="HAL_PIXEL_FORMAT_")
|
||||
enum PixelFormat : int32_t {
|
||||
/*
|
||||
/**
|
||||
* "linear" color pixel formats:
|
||||
*
|
||||
* When used with ANativeWindow, the dataSpace field describes the color
|
||||
@@ -37,7 +37,7 @@ enum PixelFormat : int32_t {
|
||||
RGB_565 = 4,
|
||||
BGRA_8888 = 5,
|
||||
|
||||
/*
|
||||
/**
|
||||
* The following formats use 10bit integers for R, G, and B and
|
||||
* 2 bits for alpha. This is used to improve color precision on
|
||||
* wide-color devices, e.g. Display-P3 or scRGB.
|
||||
@@ -47,7 +47,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
RGBA_1010102 = 0x2B,
|
||||
|
||||
/*
|
||||
/**
|
||||
* The following formats use a 16bit float per color component.
|
||||
*
|
||||
* When used with ANativeWindow, the dataSpace field describes the color
|
||||
@@ -55,7 +55,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
RGBA_FP16 = 0x16,
|
||||
|
||||
/*
|
||||
/**
|
||||
* 0x101 - 0x1FF
|
||||
*
|
||||
* This range is reserved for pixel formats that are specific to the HAL
|
||||
@@ -66,7 +66,7 @@ enum PixelFormat : int32_t {
|
||||
* GL_OES_EGL_image_external OpenGL ES extension.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android YUV format:
|
||||
*
|
||||
* This format is exposed outside of the HAL to software decoders and
|
||||
@@ -95,7 +95,7 @@ enum PixelFormat : int32_t {
|
||||
YV12 = 0x32315659, // YCrCb 4:2:0 Planar
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android Y8 format:
|
||||
*
|
||||
* This format is exposed outside of the HAL to the framework.
|
||||
@@ -120,7 +120,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
Y8 = 0x20203859,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android Y16 format:
|
||||
*
|
||||
* This format is exposed outside of the HAL to the framework.
|
||||
@@ -149,7 +149,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
Y16 = 0x20363159,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android RAW sensor format:
|
||||
*
|
||||
* This format is exposed outside of the camera HAL to applications.
|
||||
@@ -187,7 +187,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
RAW16 = 0x20,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android RAW10 format:
|
||||
*
|
||||
* This format is exposed outside of the camera HAL to applications.
|
||||
@@ -241,7 +241,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
RAW10 = 0x25,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android RAW12 format:
|
||||
*
|
||||
* This format is exposed outside of camera HAL to applications.
|
||||
@@ -291,7 +291,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
RAW12 = 0x26,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android opaque RAW format:
|
||||
*
|
||||
* This format is exposed outside of the camera HAL to applications.
|
||||
@@ -312,7 +312,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
RAW_OPAQUE = 0x24,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android binary blob graphics buffer format:
|
||||
*
|
||||
* This format is used to carry task-specific data which does not have a
|
||||
@@ -338,7 +338,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
BLOB = 0x21,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android format indicating that the choice of format is entirely up to the
|
||||
* device-specific Gralloc implementation.
|
||||
*
|
||||
@@ -356,7 +356,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
IMPLEMENTATION_DEFINED = 0x22,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android flexible YCbCr 4:2:0 formats
|
||||
*
|
||||
* This format allows platforms to use an efficient YCbCr/YCrCb 4:2:0
|
||||
@@ -378,7 +378,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
YCBCR_420_888 = 0x23,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android flexible YCbCr 4:2:2 formats
|
||||
*
|
||||
* This format allows platforms to use an efficient YCbCr/YCrCb 4:2:2
|
||||
@@ -392,7 +392,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
YCBCR_422_888 = 0x27,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android flexible YCbCr 4:4:4 formats
|
||||
*
|
||||
* This format allows platforms to use an efficient YCbCr/YCrCb 4:4:4
|
||||
@@ -406,7 +406,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
YCBCR_444_888 = 0x28,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android flexible RGB 888 formats
|
||||
*
|
||||
* This format allows platforms to use an efficient RGB/BGR/RGBX/BGRX
|
||||
@@ -420,7 +420,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
FLEX_RGB_888 = 0x29,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Android flexible RGBA 8888 formats
|
||||
*
|
||||
* This format allows platforms to use an efficient RGBA/BGRA/ARGB/ABGR
|
||||
@@ -434,7 +434,7 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
FLEX_RGBA_8888 = 0x2A,
|
||||
|
||||
/* Legacy formats (deprecated), used by ImageFormat.java */
|
||||
/** Legacy formats (deprecated), used by ImageFormat.java */
|
||||
YCBCR_422_SP = 0x10, // NV16
|
||||
YCRCB_420_SP = 0x11, // NV21
|
||||
YCBCR_422_I = 0x14, // YUY2
|
||||
@@ -450,18 +450,19 @@ enum PixelFormat : int32_t {
|
||||
*/
|
||||
@export(name="android_transform_t", value_prefix="HAL_TRANSFORM_")
|
||||
enum Transform : int32_t {
|
||||
/* flip source image horizontally (around the vertical axis) */
|
||||
/** flip source image horizontally (around the vertical axis) */
|
||||
FLIP_H = 0x01,
|
||||
/* flip source image vertically (around the horizontal axis)*/
|
||||
/**
|
||||
* flip source image vertically (around the horizontal axis)*/
|
||||
FLIP_V = 0x02,
|
||||
/* rotate source image 90 degrees clockwise */
|
||||
/** rotate source image 90 degrees clockwise */
|
||||
ROT_90 = 0x04,
|
||||
/* rotate source image 180 degrees */
|
||||
/** rotate source image 180 degrees */
|
||||
ROT_180 = 0x03,
|
||||
/* rotate source image 270 degrees clockwise */
|
||||
/** rotate source image 270 degrees clockwise */
|
||||
ROT_270 = 0x07,
|
||||
|
||||
/* 0x08 is reserved */
|
||||
/** 0x08 is reserved */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -509,7 +510,7 @@ enum Transform : int32_t {
|
||||
*/
|
||||
@export(name="android_dataspace_t", value_prefix="HAL_DATASPACE_")
|
||||
enum Dataspace : int32_t {
|
||||
/*
|
||||
/**
|
||||
* Default-assumption data space, when not explicitly specified.
|
||||
*
|
||||
* It is safest to assume the buffer is an image with sRGB primaries and
|
||||
@@ -520,7 +521,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
UNKNOWN = 0x0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Arbitrary dataspace with manually defined characteristics. Definition
|
||||
* for colorspaces or other meaning must be communicated separately.
|
||||
*
|
||||
@@ -533,7 +534,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
ARBITRARY = 0x1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Color-description aspects
|
||||
*
|
||||
* The following aspects define various characteristics of the color
|
||||
@@ -543,7 +544,7 @@ enum Dataspace : int32_t {
|
||||
|
||||
STANDARD_SHIFT = 16,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Standard aspect
|
||||
*
|
||||
* Defines the chromaticity coordinates of the source primaries in terms of
|
||||
@@ -551,7 +552,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_MASK = 63 << STANDARD_SHIFT, // 0x3F
|
||||
|
||||
/*
|
||||
/**
|
||||
* Chromacity coordinates are unknown or are determined by the application.
|
||||
* Implementations shall use the following suggested standards:
|
||||
*
|
||||
@@ -566,7 +567,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_UNSPECIFIED = 0 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries: x y
|
||||
* green 0.300 0.600
|
||||
* blue 0.150 0.060
|
||||
@@ -578,7 +579,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_BT709 = 1 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries: x y
|
||||
* green 0.290 0.600
|
||||
* blue 0.150 0.060
|
||||
@@ -592,7 +593,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_BT601_625 = 2 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries: x y
|
||||
* green 0.290 0.600
|
||||
* blue 0.150 0.060
|
||||
@@ -604,7 +605,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_BT601_625_UNADJUSTED = 3 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries: x y
|
||||
* green 0.310 0.595
|
||||
* blue 0.155 0.070
|
||||
@@ -618,7 +619,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_BT601_525 = 4 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries: x y
|
||||
* green 0.310 0.595
|
||||
* blue 0.155 0.070
|
||||
@@ -630,7 +631,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_BT601_525_UNADJUSTED = 5 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries: x y
|
||||
* green 0.170 0.797
|
||||
* blue 0.131 0.046
|
||||
@@ -642,7 +643,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_BT2020 = 6 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries: x y
|
||||
* green 0.170 0.797
|
||||
* blue 0.131 0.046
|
||||
@@ -654,7 +655,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_BT2020_CONSTANT_LUMINANCE = 7 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries: x y
|
||||
* green 0.21 0.71
|
||||
* blue 0.14 0.08
|
||||
@@ -666,7 +667,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_BT470M = 8 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries: x y
|
||||
* green 0.243 0.692
|
||||
* blue 0.145 0.049
|
||||
@@ -678,7 +679,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_FILM = 9 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* SMPTE EG 432-1 and SMPTE RP 431-2. (DCI-P3)
|
||||
* Primaries: x y
|
||||
* green 0.265 0.690
|
||||
@@ -688,7 +689,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
STANDARD_DCI_P3 = 10 << STANDARD_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Adobe RGB
|
||||
* Primaries: x y
|
||||
* green 0.210 0.710
|
||||
@@ -702,7 +703,7 @@ enum Dataspace : int32_t {
|
||||
|
||||
TRANSFER_SHIFT = 22,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Transfer aspect
|
||||
*
|
||||
* Transfer characteristics are the opto-electronic transfer characteristic
|
||||
@@ -718,7 +719,7 @@ enum Dataspace : int32_t {
|
||||
|
||||
TRANSFER_MASK = 31 << TRANSFER_SHIFT, // 0x1F
|
||||
|
||||
/*
|
||||
/**
|
||||
* Transfer characteristics are unknown or are determined by the
|
||||
* application.
|
||||
*
|
||||
@@ -732,7 +733,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
TRANSFER_UNSPECIFIED = 0 << TRANSFER_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Transfer characteristic curve:
|
||||
* E = L
|
||||
* L - luminance of image 0 <= L <= 1 for conventional colorimetry
|
||||
@@ -740,7 +741,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
TRANSFER_LINEAR = 1 << TRANSFER_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Transfer characteristic curve:
|
||||
*
|
||||
* E = 1.055 * L^(1/2.4) - 0.055 for 0.0031308 <= L <= 1
|
||||
@@ -750,7 +751,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
TRANSFER_SRGB = 2 << TRANSFER_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* BT.601 525, BT.601 625, BT.709, BT.2020
|
||||
*
|
||||
* Transfer characteristic curve:
|
||||
@@ -761,7 +762,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
TRANSFER_SMPTE_170M = 3 << TRANSFER_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Assumed display gamma 2.2.
|
||||
*
|
||||
* Transfer characteristic curve:
|
||||
@@ -771,7 +772,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
TRANSFER_GAMMA2_2 = 4 << TRANSFER_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* display gamma 2.6.
|
||||
*
|
||||
* Transfer characteristic curve:
|
||||
@@ -781,7 +782,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
TRANSFER_GAMMA2_6 = 5 << TRANSFER_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* display gamma 2.8.
|
||||
*
|
||||
* Transfer characteristic curve:
|
||||
@@ -791,7 +792,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
TRANSFER_GAMMA2_8 = 6 << TRANSFER_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* SMPTE ST 2084 (Dolby Perceptual Quantizer)
|
||||
*
|
||||
* Transfer characteristic curve:
|
||||
@@ -807,7 +808,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
TRANSFER_ST2084 = 7 << TRANSFER_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* ARIB STD-B67 Hybrid Log Gamma
|
||||
*
|
||||
* Transfer characteristic curve:
|
||||
@@ -825,7 +826,7 @@ enum Dataspace : int32_t {
|
||||
|
||||
RANGE_SHIFT = 27,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Range aspect
|
||||
*
|
||||
* Defines the range of values corresponding to the unit range of 0-1.
|
||||
@@ -833,7 +834,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
RANGE_MASK = 7 << RANGE_SHIFT, // 0x7
|
||||
|
||||
/*
|
||||
/**
|
||||
* Range is unknown or are determined by the application. Implementations
|
||||
* shall use the following suggested ranges:
|
||||
*
|
||||
@@ -846,13 +847,13 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
RANGE_UNSPECIFIED = 0 << RANGE_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Full range uses all values for Y, Cb and Cr from
|
||||
* 0 to 2^b-1, where b is the bit depth of the color format.
|
||||
*/
|
||||
RANGE_FULL = 1 << RANGE_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Limited range uses values 16/256*2^b to 235/256*2^b for Y, and
|
||||
* 1/16*2^b to 15/16*2^b for Cb, Cr, R, G and B, where b is the bit depth of
|
||||
* the color format.
|
||||
@@ -867,7 +868,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
RANGE_LIMITED = 2 << RANGE_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Extended range is used for scRGB. Intended for use with
|
||||
* floating point pixel formats. [0.0 - 1.0] is the standard
|
||||
* sRGB space. Values outside the range 0.0 - 1.0 can encode
|
||||
@@ -876,11 +877,11 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
RANGE_EXTENDED = 3 << RANGE_SHIFT,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Legacy dataspaces
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* sRGB linear encoding:
|
||||
*
|
||||
* The red, green, and blue components are stored in sRGB space, but
|
||||
@@ -895,7 +896,7 @@ enum Dataspace : int32_t {
|
||||
V0_SRGB_LINEAR = STANDARD_BT709 | TRANSFER_LINEAR | RANGE_FULL,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* scRGB linear encoding:
|
||||
*
|
||||
* The red, green, and blue components are stored in extended sRGB space,
|
||||
@@ -910,7 +911,7 @@ enum Dataspace : int32_t {
|
||||
V0_SCRGB_LINEAR = STANDARD_BT709 | TRANSFER_LINEAR | RANGE_EXTENDED,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* sRGB gamma encoding:
|
||||
*
|
||||
* The red, green and blue components are stored in sRGB space, and
|
||||
@@ -928,7 +929,7 @@ enum Dataspace : int32_t {
|
||||
V0_SRGB = STANDARD_BT709 | TRANSFER_SRGB | RANGE_FULL,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* scRGB:
|
||||
*
|
||||
* The red, green, and blue components are stored in extended sRGB space,
|
||||
@@ -942,7 +943,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
V0_SCRGB = STANDARD_BT709 | TRANSFER_SRGB | RANGE_EXTENDED,
|
||||
|
||||
/*
|
||||
/**
|
||||
* YCbCr Colorspaces
|
||||
* -----------------
|
||||
*
|
||||
@@ -953,7 +954,7 @@ enum Dataspace : int32_t {
|
||||
* at the source as a function of linear optical intensity (luminance).
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* JPEG File Interchange Format (JFIF)
|
||||
*
|
||||
* Same model as BT.601-625, but all values (Y, Cb, Cr) range from 0 to 255
|
||||
@@ -964,7 +965,7 @@ enum Dataspace : int32_t {
|
||||
|
||||
V0_JFIF = STANDARD_BT601_625 | TRANSFER_SMPTE_170M | RANGE_FULL,
|
||||
|
||||
/*
|
||||
/**
|
||||
* ITU-R Recommendation 601 (BT.601) - 625-line
|
||||
*
|
||||
* Standard-definition television, 625 Lines (PAL)
|
||||
@@ -976,7 +977,7 @@ enum Dataspace : int32_t {
|
||||
V0_BT601_625 = STANDARD_BT601_625 | TRANSFER_SMPTE_170M | RANGE_LIMITED,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* ITU-R Recommendation 601 (BT.601) - 525-line
|
||||
*
|
||||
* Standard-definition television, 525 Lines (NTSC)
|
||||
@@ -987,7 +988,7 @@ enum Dataspace : int32_t {
|
||||
|
||||
V0_BT601_525 = STANDARD_BT601_525 | TRANSFER_SMPTE_170M | RANGE_LIMITED,
|
||||
|
||||
/*
|
||||
/**
|
||||
* ITU-R Recommendation 709 (BT.709)
|
||||
*
|
||||
* High-definition television
|
||||
@@ -999,7 +1000,7 @@ enum Dataspace : int32_t {
|
||||
V0_BT709 = STANDARD_BT709 | TRANSFER_SMPTE_170M | RANGE_LIMITED,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* SMPTE EG 432-1 and SMPTE RP 431-2.
|
||||
*
|
||||
* Digital Cinema DCI-P3
|
||||
@@ -1009,7 +1010,7 @@ enum Dataspace : int32_t {
|
||||
DCI_P3_LINEAR = STANDARD_DCI_P3 | TRANSFER_LINEAR | RANGE_FULL,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* SMPTE EG 432-1 and SMPTE RP 431-2.
|
||||
*
|
||||
* Digital Cinema DCI-P3
|
||||
@@ -1021,7 +1022,7 @@ enum Dataspace : int32_t {
|
||||
DCI_P3 = STANDARD_DCI_P3 | TRANSFER_GAMMA2_6 | RANGE_FULL,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Display P3
|
||||
*
|
||||
* Display P3 uses same primaries and white-point as DCI-P3
|
||||
@@ -1030,7 +1031,7 @@ enum Dataspace : int32_t {
|
||||
DISPLAY_P3_LINEAR = STANDARD_DCI_P3 | TRANSFER_LINEAR | RANGE_FULL,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Display P3
|
||||
*
|
||||
* Use same primaries and white-point as DCI-P3
|
||||
@@ -1039,7 +1040,7 @@ enum Dataspace : int32_t {
|
||||
DISPLAY_P3 = STANDARD_DCI_P3 | TRANSFER_SRGB | RANGE_FULL,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Adobe RGB
|
||||
*
|
||||
* Use full range, gamma 2.2 transfer and Adobe RGB primaries
|
||||
@@ -1049,7 +1050,7 @@ enum Dataspace : int32_t {
|
||||
ADOBE_RGB = STANDARD_ADOBE_RGB | TRANSFER_GAMMA2_2 | RANGE_FULL,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* ITU-R Recommendation 2020 (BT.2020)
|
||||
*
|
||||
* Ultra High-definition television
|
||||
@@ -1059,7 +1060,7 @@ enum Dataspace : int32_t {
|
||||
BT2020_LINEAR = STANDARD_BT2020 | TRANSFER_LINEAR | RANGE_FULL,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* ITU-R Recommendation 2020 (BT.2020)
|
||||
*
|
||||
* Ultra High-definition television
|
||||
@@ -1068,7 +1069,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
BT2020 = STANDARD_BT2020 | TRANSFER_SMPTE_170M | RANGE_FULL,
|
||||
|
||||
/*
|
||||
/**
|
||||
* ITU-R Recommendation 2020 (BT.2020)
|
||||
*
|
||||
* Ultra High-definition television
|
||||
@@ -1078,11 +1079,11 @@ enum Dataspace : int32_t {
|
||||
BT2020_PQ = STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_FULL,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Data spaces for non-color formats
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* The buffer contains depth ranging measurements from a depth camera.
|
||||
* This value is valid with formats:
|
||||
* HAL_PIXEL_FORMAT_Y16: 16-bit samples, consisting of a depth measurement
|
||||
@@ -1103,7 +1104,7 @@ enum Dataspace : int32_t {
|
||||
DEPTH = 0x1000,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* The buffer contains sensor events from sensor direct report.
|
||||
* This value is valid with formats:
|
||||
* HAL_PIXEL_FORMAT_BLOB: an array of sensor event structure that forms
|
||||
@@ -1113,7 +1114,7 @@ enum Dataspace : int32_t {
|
||||
SENSOR = 0x1001
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Color modes that may be supported by a display.
|
||||
*
|
||||
* Definitions:
|
||||
@@ -1159,7 +1160,7 @@ enum Dataspace : int32_t {
|
||||
*/
|
||||
@export(name="android_color_mode_t", value_prefix="HAL_COLOR_MODE_")
|
||||
enum ColorMode : int32_t {
|
||||
/*
|
||||
/**
|
||||
* DEFAULT is the "native" gamut of the display.
|
||||
* White Point: Vendor/OEM defined
|
||||
* Panel Gamma: Vendor/OEM defined (typically 2.2)
|
||||
@@ -1167,7 +1168,7 @@ enum ColorMode : int32_t {
|
||||
*/
|
||||
NATIVE = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* STANDARD_BT601_625 corresponds with display
|
||||
* settings that implement the ITU-R Recommendation BT.601
|
||||
* or Rec 601. Using 625 line version
|
||||
@@ -1193,7 +1194,7 @@ enum ColorMode : int32_t {
|
||||
*/
|
||||
STANDARD_BT601_625 = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries:
|
||||
* x y
|
||||
* green 0.290 0.600
|
||||
@@ -1213,7 +1214,7 @@ enum ColorMode : int32_t {
|
||||
*/
|
||||
STANDARD_BT601_625_UNADJUSTED = 2,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries:
|
||||
* x y
|
||||
* green 0.310 0.595
|
||||
@@ -1235,7 +1236,7 @@ enum ColorMode : int32_t {
|
||||
*/
|
||||
STANDARD_BT601_525 = 3,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Primaries:
|
||||
* x y
|
||||
* green 0.310 0.595
|
||||
@@ -1255,7 +1256,7 @@ enum ColorMode : int32_t {
|
||||
*/
|
||||
STANDARD_BT601_525_UNADJUSTED = 4,
|
||||
|
||||
/*
|
||||
/**
|
||||
* REC709 corresponds with display settings that implement
|
||||
* the ITU-R Recommendation BT.709 / Rec. 709 for high-definition television.
|
||||
* Rendering Intent: Colorimetric
|
||||
@@ -1283,7 +1284,7 @@ enum ColorMode : int32_t {
|
||||
*/
|
||||
STANDARD_BT709 = 5,
|
||||
|
||||
/*
|
||||
/**
|
||||
* DCI_P3 corresponds with display settings that implement
|
||||
* SMPTE EG 432-1 and SMPTE RP 431-2
|
||||
* Rendering Intent: Colorimetric
|
||||
@@ -1298,7 +1299,7 @@ enum ColorMode : int32_t {
|
||||
*/
|
||||
DCI_P3 = 6,
|
||||
|
||||
/*
|
||||
/**
|
||||
* SRGB corresponds with display settings that implement
|
||||
* the sRGB color space. Uses the same primaries as ITU-R Recommendation
|
||||
* BT.709
|
||||
@@ -1326,7 +1327,7 @@ enum ColorMode : int32_t {
|
||||
*/
|
||||
SRGB = 7,
|
||||
|
||||
/*
|
||||
/**
|
||||
* ADOBE_RGB corresponds with the RGB color space developed
|
||||
* by Adobe Systems, Inc. in 1998.
|
||||
* Rendering Intent: Colorimetric
|
||||
@@ -1341,7 +1342,7 @@ enum ColorMode : int32_t {
|
||||
*/
|
||||
ADOBE_RGB = 8,
|
||||
|
||||
/*
|
||||
/**
|
||||
* DISPLAY_P3 is a color space that uses the DCI_P3 primaries,
|
||||
* the D65 white point and the SRGB transfer functions.
|
||||
* Rendering Intent: Colorimetric
|
||||
@@ -1364,46 +1365,47 @@ enum ColorMode : int32_t {
|
||||
DISPLAY_P3 = 9
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Color transforms that may be applied by hardware composer to the whole
|
||||
* display.
|
||||
*/
|
||||
@export(name="android_color_transform_t", value_prefix="HAL_COLOR_TRANSFORM_")
|
||||
enum ColorTransform : int32_t {
|
||||
/* Applies no transform to the output color */
|
||||
/** Applies no transform to the output color */
|
||||
IDENTITY = 0,
|
||||
|
||||
/* Applies an arbitrary transform defined by a 4x4 affine matrix */
|
||||
/** Applies an arbitrary transform defined by a 4x4 affine matrix */
|
||||
ARBITRARY_MATRIX = 1,
|
||||
|
||||
/* Applies a transform that inverts the value or luminance of the color, but
|
||||
/**
|
||||
* Applies a transform that inverts the value or luminance of the color, but
|
||||
* does not modify hue or saturation */
|
||||
VALUE_INVERSE = 2,
|
||||
|
||||
/* Applies a transform that maps all colors to shades of gray */
|
||||
/** Applies a transform that maps all colors to shades of gray */
|
||||
GRAYSCALE = 3,
|
||||
|
||||
/* Applies a transform which corrects for protanopic color blindness */
|
||||
/** Applies a transform which corrects for protanopic color blindness */
|
||||
CORRECT_PROTANOPIA = 4,
|
||||
|
||||
/* Applies a transform which corrects for deuteranopic color blindness */
|
||||
/** Applies a transform which corrects for deuteranopic color blindness */
|
||||
CORRECT_DEUTERANOPIA = 5,
|
||||
|
||||
/* Applies a transform which corrects for tritanopic color blindness */
|
||||
/** Applies a transform which corrects for tritanopic color blindness */
|
||||
CORRECT_TRITANOPIA = 6
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Supported HDR formats. Must be kept in sync with equivalents in Display.java.
|
||||
*/
|
||||
@export(name="android_hdr_t", value_prefix="HAL_HDR_")
|
||||
enum Hdr : int32_t {
|
||||
/* Device supports Dolby Vision HDR */
|
||||
/** Device supports Dolby Vision HDR */
|
||||
DOLBY_VISION = 1,
|
||||
|
||||
/* Device supports HDR10 */
|
||||
/** Device supports HDR10 */
|
||||
HDR10 = 2,
|
||||
|
||||
/* Device supports hybrid log-gamma HDR */
|
||||
/** Device supports hybrid log-gamma HDR */
|
||||
HLG = 3
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ package android.hardware.graphics.composer@2.1;
|
||||
import IComposerClient;
|
||||
|
||||
interface IComposer {
|
||||
/*
|
||||
/**
|
||||
* Optional capabilities which may be supported by some devices. The
|
||||
* particular set of supported capabilities for a given device may be
|
||||
* retrieved using getCapabilities.
|
||||
@@ -27,7 +27,7 @@ interface IComposer {
|
||||
enum Capability : int32_t {
|
||||
INVALID = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Specifies that the device supports sideband stream layers, for
|
||||
* which buffer content updates and other synchronization will not be
|
||||
* provided through the usual validate/present cycle and must be
|
||||
@@ -37,7 +37,7 @@ interface IComposer {
|
||||
*/
|
||||
SIDEBAND_STREAM = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Specifies that the device will apply a color transform even when
|
||||
* either the client or the device has chosen that all layers should
|
||||
* be composed by the client. This will prevent the client from
|
||||
@@ -46,7 +46,7 @@ interface IComposer {
|
||||
SKIP_CLIENT_COLOR_TRANSFORM = 2,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Provides a list of supported capabilities (as described in the
|
||||
* definition of Capability above). This list must not change after
|
||||
* initialization.
|
||||
@@ -58,7 +58,7 @@ interface IComposer {
|
||||
@callflow(next="*")
|
||||
getCapabilities() generates (vec<Capability> capabilities);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves implementation-defined debug information, which will be
|
||||
* displayed during, for example, `dumpsys SurfaceFlinger`.
|
||||
*
|
||||
@@ -69,7 +69,7 @@ interface IComposer {
|
||||
@callflow(next="*")
|
||||
dumpDebugInfo() generates (string debugInfo);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Creates a client of the composer. All resources created by the client
|
||||
* are owned by the client and are only visible to the client.
|
||||
*
|
||||
|
||||
@@ -20,13 +20,13 @@ interface IComposerCallback {
|
||||
enum Connection : int32_t {
|
||||
INVALID = 0,
|
||||
|
||||
/* The display has been connected */
|
||||
/** The display has been connected */
|
||||
CONNECTED = 1,
|
||||
/* The display has been disconnected */
|
||||
/** The display has been disconnected */
|
||||
DISCONNECTED = 2,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notifies the client that the given display has either been connected or
|
||||
* disconnected. Every active display (even a built-in physical display)
|
||||
* must trigger at least one hotplug notification, even if it only occurs
|
||||
@@ -47,7 +47,7 @@ interface IComposerCallback {
|
||||
@callflow(next="*")
|
||||
onHotplug(Display display, Connection connected);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notifies the client to trigger a screen refresh. This forces all layer
|
||||
* state for this display to be resent, and the display to be validated
|
||||
* and presented, even if there have been no changes.
|
||||
@@ -61,7 +61,7 @@ interface IComposerCallback {
|
||||
@callflow(next="*")
|
||||
oneway onRefresh(Display display);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Notifies the client that a vsync event has occurred. This callback must
|
||||
* only be triggered when vsync is enabled for this display (through
|
||||
* setVsyncEnabled).
|
||||
|
||||
@@ -20,18 +20,18 @@ import android.hardware.graphics.common@1.0;
|
||||
import IComposerCallback;
|
||||
|
||||
interface IComposerClient {
|
||||
/* Display attributes queryable through getDisplayAttribute. */
|
||||
/** Display attributes queryable through getDisplayAttribute. */
|
||||
enum Attribute : int32_t {
|
||||
INVALID = 0,
|
||||
|
||||
/* Dimensions in pixels */
|
||||
/** Dimensions in pixels */
|
||||
WIDTH = 1,
|
||||
HEIGHT = 2,
|
||||
|
||||
/* Vsync period in nanoseconds */
|
||||
/** Vsync period in nanoseconds */
|
||||
VSYNC_PERIOD = 3,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Dots per thousand inches (DPI * 1000). Scaling by 1000 allows these
|
||||
* numbers to be stored in an int32_t without losing too much
|
||||
* precision. If the DPI for a configuration is unavailable or is
|
||||
@@ -41,15 +41,15 @@ interface IComposerClient {
|
||||
DPI_Y = 5,
|
||||
};
|
||||
|
||||
/* Display requests returned by getDisplayRequests. */
|
||||
/** Display requests returned by getDisplayRequests. */
|
||||
enum DisplayRequest : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* Instructs the client to provide a new client target buffer, even if
|
||||
* no layers are marked for client composition.
|
||||
*/
|
||||
FLIP_CLIENT_TARGET = 1 << 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Instructs the client to write the result of client composition
|
||||
* directly into the virtual display output buffer. If any of the
|
||||
* layers are not marked as Composition::CLIENT or the given display
|
||||
@@ -58,9 +58,9 @@ interface IComposerClient {
|
||||
WRITE_CLIENT_TARGET_TO_OUTPUT = 1 << 1,
|
||||
};
|
||||
|
||||
/* Layer requests returned from getDisplayRequests. */
|
||||
/** Layer requests returned from getDisplayRequests. */
|
||||
enum LayerRequest : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* The client must clear its target with transparent pixels where
|
||||
* this layer would be. The client may ignore this request if the
|
||||
* layer must be blended.
|
||||
@@ -68,24 +68,24 @@ interface IComposerClient {
|
||||
CLEAR_CLIENT_TARGET = 1 << 0,
|
||||
};
|
||||
|
||||
/* Power modes for use with setPowerMode. */
|
||||
/** Power modes for use with setPowerMode. */
|
||||
enum PowerMode : int32_t {
|
||||
/* The display is fully off (blanked). */
|
||||
/** The display is fully off (blanked). */
|
||||
OFF = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* These are optional low power modes. getDozeSupport may be called to
|
||||
* determine whether a given display supports these modes.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* The display is turned on and configured in a low power state that
|
||||
* is suitable for presenting ambient information to the user,
|
||||
* possibly with lower fidelity than ON, but with greater efficiency.
|
||||
*/
|
||||
DOZE = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* The display is configured as in DOZE but may stop applying display
|
||||
* updates from the client. This is effectively a hint to the device
|
||||
* that drawing to the display has been suspended and that the the
|
||||
@@ -100,40 +100,40 @@ interface IComposerClient {
|
||||
*/
|
||||
DOZE_SUSPEND = 3,
|
||||
|
||||
/* The display is fully on. */
|
||||
/** The display is fully on. */
|
||||
ON = 2,
|
||||
};
|
||||
|
||||
/* Vsync values passed to setVsyncEnabled. */
|
||||
/** Vsync values passed to setVsyncEnabled. */
|
||||
enum Vsync : int32_t {
|
||||
INVALID = 0,
|
||||
|
||||
/* Enable vsync. */
|
||||
/** Enable vsync. */
|
||||
ENABLE = 1,
|
||||
|
||||
/* Disable vsync. */
|
||||
/** Disable vsync. */
|
||||
DISABLE = 2,
|
||||
};
|
||||
|
||||
/* Blend modes, settable per layer. */
|
||||
/** Blend modes, settable per layer. */
|
||||
enum BlendMode : int32_t {
|
||||
INVALID = 0,
|
||||
|
||||
/* colorOut = colorSrc */
|
||||
/** colorOut = colorSrc */
|
||||
NONE = 1,
|
||||
|
||||
/* colorOut = colorSrc + colorDst * (1 - alphaSrc) */
|
||||
/** colorOut = colorSrc + colorDst * (1 - alphaSrc) */
|
||||
PREMULTIPLIED = 2,
|
||||
|
||||
/* colorOut = colorSrc * alphaSrc + colorDst * (1 - alphaSrc) */
|
||||
/** colorOut = colorSrc * alphaSrc + colorDst * (1 - alphaSrc) */
|
||||
COVERAGE = 3,
|
||||
};
|
||||
|
||||
/* Possible composition types for a given layer. */
|
||||
/** Possible composition types for a given layer. */
|
||||
enum Composition : int32_t {
|
||||
INVALID = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* The client must composite this layer into the client target buffer
|
||||
* (provided to the device through setClientTarget).
|
||||
*
|
||||
@@ -142,7 +142,7 @@ interface IComposerClient {
|
||||
*/
|
||||
CLIENT = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* The device must handle the composition of this layer through a
|
||||
* hardware overlay or other similar means.
|
||||
*
|
||||
@@ -151,7 +151,7 @@ interface IComposerClient {
|
||||
*/
|
||||
DEVICE = 2,
|
||||
|
||||
/*
|
||||
/**
|
||||
* The device must render this layer using the color set through
|
||||
* setLayerColor. If this functionality is not supported on a layer
|
||||
* that the client sets to SOLID_COLOR, the device must request that
|
||||
@@ -163,7 +163,7 @@ interface IComposerClient {
|
||||
*/
|
||||
SOLID_COLOR = 3,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Similar to DEVICE, but the position of this layer may also be set
|
||||
* asynchronously through setCursorPosition. If this functionality is
|
||||
* not supported on a layer that the client sets to CURSOR, the device
|
||||
@@ -177,7 +177,7 @@ interface IComposerClient {
|
||||
*/
|
||||
CURSOR = 4,
|
||||
|
||||
/*
|
||||
/**
|
||||
* The device must handle the composition of this layer, as well as
|
||||
* its buffer updates and content synchronization. Only supported on
|
||||
* devices which provide Capability::SIDEBAND_STREAM.
|
||||
@@ -189,26 +189,26 @@ interface IComposerClient {
|
||||
SIDEBAND = 5,
|
||||
};
|
||||
|
||||
/* Display types returned by getDisplayType. */
|
||||
/** Display types returned by getDisplayType. */
|
||||
enum DisplayType : int32_t {
|
||||
INVALID = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* All physical displays, including both internal displays and
|
||||
* hotpluggable external displays.
|
||||
*/
|
||||
PHYSICAL = 1,
|
||||
|
||||
/* Virtual displays created by createVirtualDisplay. */
|
||||
/** Virtual displays created by createVirtualDisplay. */
|
||||
VIRTUAL = 2,
|
||||
};
|
||||
|
||||
/* Special index values (always negative) for command queue commands. */
|
||||
/** Special index values (always negative) for command queue commands. */
|
||||
enum HandleIndex : int32_t {
|
||||
/* No handle */
|
||||
/** No handle */
|
||||
EMPTY = -1,
|
||||
|
||||
/* Use cached handle */
|
||||
/** Use cached handle */
|
||||
CACHED = -2,
|
||||
};
|
||||
|
||||
@@ -233,7 +233,7 @@ interface IComposerClient {
|
||||
uint8_t a;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Provides a IComposerCallback object for the device to call.
|
||||
*
|
||||
* This function must be called only once.
|
||||
@@ -244,7 +244,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
registerCallback(IComposerCallback callback);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns the maximum number of virtual displays supported by this device
|
||||
* (which may be 0). The client must not attempt to create more than this
|
||||
* many virtual displays on this device. This number must not change for
|
||||
@@ -255,7 +255,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
getMaxVirtualDisplayCount() generates (uint32_t count);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Creates a new virtual display with the given width and height. The
|
||||
* format passed into this function is the default format requested by the
|
||||
* consumer of the virtual display output buffers.
|
||||
@@ -286,7 +286,7 @@ interface IComposerClient {
|
||||
Display display,
|
||||
PixelFormat format);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Destroys a virtual display. After this call all resources consumed by
|
||||
* this display may be freed by the device and any operations performed on
|
||||
* this display must fail.
|
||||
@@ -300,7 +300,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
destroyVirtualDisplay(Display display) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Creates a new layer on the given display.
|
||||
*
|
||||
* @param display is the display on which to create the layer.
|
||||
@@ -317,7 +317,7 @@ interface IComposerClient {
|
||||
generates (Error error,
|
||||
Layer layer);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Destroys the given layer.
|
||||
*
|
||||
* @param display is the display on which the layer was created.
|
||||
@@ -329,7 +329,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
destroyLayer(Display display, Layer layer) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves which display configuration is currently active.
|
||||
*
|
||||
* If no display configuration is currently active, this function must
|
||||
@@ -346,7 +346,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
getActiveConfig(Display display) generates (Error error, Config config);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns whether a client target with the given properties can be
|
||||
* handled by the device.
|
||||
*
|
||||
@@ -373,7 +373,7 @@ interface IComposerClient {
|
||||
Dataspace dataspace)
|
||||
generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns the color modes supported on this display.
|
||||
*
|
||||
* All devices must support at least ColorMode::NATIVE.
|
||||
@@ -388,7 +388,7 @@ interface IComposerClient {
|
||||
generates (Error error,
|
||||
vec<ColorMode> modes);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns a display attribute value for a particular display
|
||||
* configuration.
|
||||
*
|
||||
@@ -410,7 +410,7 @@ interface IComposerClient {
|
||||
generates (Error error,
|
||||
int32_t value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns handles for all of the valid display configurations on this
|
||||
* display.
|
||||
*
|
||||
@@ -424,7 +424,7 @@ interface IComposerClient {
|
||||
generates (Error error,
|
||||
vec<Config> configs);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns a human-readable version of the display's name.
|
||||
*
|
||||
* @return error is NONE upon success. Otherwise,
|
||||
@@ -434,7 +434,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
getDisplayName(Display display) generates (Error error, string name);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns whether the given display is a physical or virtual display.
|
||||
*
|
||||
* @param display is the display to query.
|
||||
@@ -445,7 +445,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
getDisplayType(Display display) generates (Error error, DisplayType type);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns whether the given display supports PowerMode::DOZE and
|
||||
* PowerMode::DOZE_SUSPEND. DOZE_SUSPEND may not provide any benefit over
|
||||
* DOZE (see the definition of PowerMode for more information), but if
|
||||
@@ -460,7 +460,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
getDozeSupport(Display display) generates (Error error, bool support);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns the high dynamic range (HDR) capabilities of the given display,
|
||||
* which are invariant with regard to the active configuration.
|
||||
*
|
||||
@@ -486,7 +486,7 @@ interface IComposerClient {
|
||||
float maxAverageLuminance,
|
||||
float minLuminance);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the number of client target slots to be reserved.
|
||||
*
|
||||
* @param display is the display to which the slots are reserved.
|
||||
@@ -500,7 +500,7 @@ interface IComposerClient {
|
||||
uint32_t clientTargetSlotCount)
|
||||
generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the active configuration for this display. Upon returning, the
|
||||
* given display configuration must be active and remain so until either
|
||||
* this function is called again or the display is disconnected.
|
||||
@@ -515,7 +515,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
setActiveConfig(Display display, Config config) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the color mode of the given display.
|
||||
*
|
||||
* Upon returning from this function, the color mode change must have
|
||||
@@ -534,7 +534,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
setColorMode(Display display, ColorMode mode) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the power mode of the given display. The transition must be
|
||||
* complete when this function returns. It is valid to call this function
|
||||
* multiple times with the same power mode.
|
||||
@@ -553,7 +553,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
setPowerMode(Display display, PowerMode mode) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Enables or disables the vsync signal for the given display. Virtual
|
||||
* displays never generate vsync callbacks, and any attempt to enable
|
||||
* vsync for a virtual display though this function must succeed and have
|
||||
@@ -568,7 +568,7 @@ interface IComposerClient {
|
||||
@callflow(next="*")
|
||||
setVsyncEnabled(Display display, Vsync enabled) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets the input command message queue.
|
||||
*
|
||||
* @param descriptor is the descriptor of the input command message queue.
|
||||
@@ -579,7 +579,7 @@ interface IComposerClient {
|
||||
setInputCommandQueue(fmq_sync<uint32_t> descriptor)
|
||||
generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the output command message queue.
|
||||
*
|
||||
* This function must only be called inside executeCommands closure.
|
||||
@@ -593,7 +593,7 @@ interface IComposerClient {
|
||||
generates (Error error,
|
||||
fmq_sync<uint32_t> descriptor);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Executes commands from the input command message queue. Return values
|
||||
* generated by the input commands are written to the output command
|
||||
* message queue in the form of value commands.
|
||||
@@ -620,7 +620,7 @@ interface IComposerClient {
|
||||
uint32_t outLength,
|
||||
vec<handle> outHandles);
|
||||
|
||||
/*
|
||||
/**
|
||||
* SELECT_DISPLAY has this pseudo prototype
|
||||
*
|
||||
* selectDisplay(Display display);
|
||||
@@ -1099,18 +1099,18 @@ interface IComposerClient {
|
||||
OPCODE_SHIFT = 16,
|
||||
OPCODE_MASK = 0xffff << OPCODE_SHIFT,
|
||||
|
||||
/* special commands */
|
||||
/** special commands */
|
||||
SELECT_DISPLAY = 0x000 << OPCODE_SHIFT,
|
||||
SELECT_LAYER = 0x001 << OPCODE_SHIFT,
|
||||
|
||||
/* value commands (for return values) */
|
||||
/** value commands (for return values) */
|
||||
SET_ERROR = 0x100 << OPCODE_SHIFT,
|
||||
SET_CHANGED_COMPOSITION_TYPES = 0x101 << OPCODE_SHIFT,
|
||||
SET_DISPLAY_REQUESTS = 0x102 << OPCODE_SHIFT,
|
||||
SET_PRESENT_FENCE = 0x103 << OPCODE_SHIFT,
|
||||
SET_RELEASE_FENCES = 0x104 << OPCODE_SHIFT,
|
||||
|
||||
/* display commands */
|
||||
/** display commands */
|
||||
SET_COLOR_TRANSFORM = 0x200 << OPCODE_SHIFT,
|
||||
SET_CLIENT_TARGET = 0x201 << OPCODE_SHIFT,
|
||||
SET_OUTPUT_BUFFER = 0x202 << OPCODE_SHIFT,
|
||||
@@ -1118,12 +1118,12 @@ interface IComposerClient {
|
||||
ACCEPT_DISPLAY_CHANGES = 0x204 << OPCODE_SHIFT,
|
||||
PRESENT_DISPLAY = 0x205 << OPCODE_SHIFT,
|
||||
|
||||
/* layer commands (VALIDATE_DISPLAY not required) */
|
||||
/** layer commands (VALIDATE_DISPLAY not required) */
|
||||
SET_LAYER_CURSOR_POSITION = 0x300 << OPCODE_SHIFT,
|
||||
SET_LAYER_BUFFER = 0x301 << OPCODE_SHIFT,
|
||||
SET_LAYER_SURFACE_DAMAGE = 0x302 << OPCODE_SHIFT,
|
||||
|
||||
/* layer state commands (VALIDATE_DISPLAY required) */
|
||||
/** layer state commands (VALIDATE_DISPLAY required) */
|
||||
SET_LAYER_BLEND_MODE = 0x400 << OPCODE_SHIFT,
|
||||
SET_LAYER_COLOR = 0x401 << OPCODE_SHIFT,
|
||||
SET_LAYER_COMPOSITION_TYPE = 0x402 << OPCODE_SHIFT,
|
||||
@@ -1136,7 +1136,7 @@ interface IComposerClient {
|
||||
SET_LAYER_VISIBLE_REGION = 0x409 << OPCODE_SHIFT,
|
||||
SET_LAYER_Z_ORDER = 0x40a << OPCODE_SHIFT,
|
||||
|
||||
/* 0x800 - 0xfff are reserved for vendor extensions */
|
||||
/* 0x1000 - 0xffff are reserved */
|
||||
/** 0x800 - 0xfff are reserved for vendor extensions */
|
||||
/** 0x1000 - 0xffff are reserved */
|
||||
};
|
||||
};
|
||||
|
||||
@@ -16,17 +16,17 @@
|
||||
|
||||
package android.hardware.graphics.composer@2.1;
|
||||
|
||||
/* Return codes from all functions. */
|
||||
/** Return codes from all functions. */
|
||||
enum Error : int32_t {
|
||||
NONE = 0, /* no error */
|
||||
BAD_CONFIG = 1, /* invalid Config */
|
||||
BAD_DISPLAY = 2, /* invalid Display */
|
||||
BAD_LAYER = 3, /* invalid Layer */
|
||||
BAD_PARAMETER = 4, /* invalid width, height, etc. */
|
||||
/* 5 is reserved */
|
||||
NO_RESOURCES = 6, /* temporary failure due to resource contention */
|
||||
NOT_VALIDATED = 7, /* validateDisplay has not been called */
|
||||
UNSUPPORTED = 8, /* permanent failure */
|
||||
NONE = 0, /** no error */
|
||||
BAD_CONFIG = 1, /** invalid Config */
|
||||
BAD_DISPLAY = 2, /** invalid Display */
|
||||
BAD_LAYER = 3, /** invalid Layer */
|
||||
BAD_PARAMETER = 4, /** invalid width, height, etc. */
|
||||
/** 5 is reserved */
|
||||
NO_RESOURCES = 6, /** temporary failure due to resource contention */
|
||||
NOT_VALIDATED = 7, /** validateDisplay has not been called */
|
||||
UNSUPPORTED = 8, /** permanent failure */
|
||||
};
|
||||
|
||||
typedef uint32_t Config;
|
||||
|
||||
@@ -27,7 +27,7 @@ interface IMapper {
|
||||
int32_t height;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Adds a reference to the given buffer handle.
|
||||
*
|
||||
* A buffer handle received from a remote process or exported by
|
||||
@@ -49,7 +49,7 @@ interface IMapper {
|
||||
@callflow(next="*")
|
||||
retain(handle bufferHandle) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Removes a reference from the given buffer buffer.
|
||||
*
|
||||
* If no references remain, the buffer handle must be freed with
|
||||
@@ -65,7 +65,7 @@ interface IMapper {
|
||||
@exit
|
||||
release(handle bufferHandle) generates (Error error);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the width and height of the buffer in pixels.
|
||||
*
|
||||
* See IAllocator::BufferDescriptorInfo for more information.
|
||||
@@ -82,7 +82,7 @@ interface IMapper {
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the format of the buffer.
|
||||
*
|
||||
* See IAllocator::BufferDescriptorInfo for more information.
|
||||
@@ -97,7 +97,7 @@ interface IMapper {
|
||||
generates (Error error,
|
||||
PixelFormat format);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the number of layers of the buffer.
|
||||
*
|
||||
* See IAllocator::BufferDescriptorInfo for more information.
|
||||
@@ -112,7 +112,7 @@ interface IMapper {
|
||||
generates (Error error,
|
||||
uint32_t layerCount);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the producer usage flags which were used to allocate this buffer.
|
||||
*
|
||||
* See IAllocator::BufferDescriptorInfo for more information.
|
||||
@@ -128,7 +128,7 @@ interface IMapper {
|
||||
generates (Error error,
|
||||
uint64_t usageMask);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the consumer usage flags which were used to allocate this buffer.
|
||||
*
|
||||
* See IAllocator::BufferDescriptorInfo for more information.
|
||||
@@ -144,7 +144,7 @@ interface IMapper {
|
||||
generates (Error error,
|
||||
uint64_t usageMask);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets a value that uniquely identifies the backing store of the given
|
||||
* buffer.
|
||||
*
|
||||
@@ -165,7 +165,7 @@ interface IMapper {
|
||||
generates (Error error,
|
||||
BackingStore store);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the stride of the buffer in pixels.
|
||||
*
|
||||
* The stride is the offset in pixel-sized elements between the same
|
||||
@@ -185,7 +185,7 @@ interface IMapper {
|
||||
generates (Error error,
|
||||
uint32_t stride);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Locks the given buffer for the specified CPU usage.
|
||||
*
|
||||
* Exactly one of producerUsageMask and consumerUsageMask must be 0. The
|
||||
@@ -247,7 +247,7 @@ interface IMapper {
|
||||
generates (Error error,
|
||||
pointer data);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This is largely the same as lock(), except that instead of returning a
|
||||
* pointer directly to the buffer data, it returns an FlexLayout struct
|
||||
* describing how to access the data planes.
|
||||
@@ -296,7 +296,7 @@ interface IMapper {
|
||||
generates (Error error,
|
||||
FlexLayout layout);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This function indicates to the device that the client will be done with
|
||||
* the buffer when releaseFence signals.
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package android.hardware.graphics.mapper@2.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Structures for describing flexible YUVA/RGBA formats for consumption by
|
||||
* applications. Such flexible formats contain a plane for each component (e.g.
|
||||
* red, green, blue), where each plane is laid out in a grid-like pattern
|
||||
@@ -49,19 +49,19 @@ package android.hardware.graphics.mapper@2.0;
|
||||
*/
|
||||
|
||||
enum FlexComponent : int32_t {
|
||||
Y = 1 << 0, /* luma */
|
||||
CB = 1 << 1, /* chroma blue */
|
||||
CR = 1 << 2, /* chroma red */
|
||||
Y = 1 << 0, /** luma */
|
||||
CB = 1 << 1, /** chroma blue */
|
||||
CR = 1 << 2, /** chroma red */
|
||||
|
||||
R = 1 << 10, /* red */
|
||||
G = 1 << 11, /* green */
|
||||
B = 1 << 12, /* blue */
|
||||
R = 1 << 10, /** red */
|
||||
G = 1 << 11, /** green */
|
||||
B = 1 << 12, /** blue */
|
||||
|
||||
A = 1 << 30, /* alpha */
|
||||
A = 1 << 30, /** alpha */
|
||||
};
|
||||
|
||||
enum FlexFormat : int32_t {
|
||||
/* not a flexible format */
|
||||
/** not a flexible format */
|
||||
INVALID = 0x0,
|
||||
|
||||
Y = FlexComponent:Y,
|
||||
@@ -73,38 +73,38 @@ enum FlexFormat : int32_t {
|
||||
};
|
||||
|
||||
struct FlexPlane {
|
||||
/* Pointer to the first byte of the top-left pixel of the plane. */
|
||||
/** Pointer to the first byte of the top-left pixel of the plane. */
|
||||
pointer topLeft;
|
||||
|
||||
FlexComponent component;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Bits allocated for the component in each pixel. Must be a positive
|
||||
* multiple of 8.
|
||||
*/
|
||||
int32_t bitsPerComponent;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Number of the most significant bits used in the format for this
|
||||
* component. Must be between 1 and bitsPerComponent, inclusive.
|
||||
*/
|
||||
int32_t bitsUsed;
|
||||
|
||||
/* Horizontal increment. */
|
||||
/** Horizontal increment. */
|
||||
int32_t hIncrement;
|
||||
/* Vertical increment. */
|
||||
/** Vertical increment. */
|
||||
int32_t vIncrement;
|
||||
/* Horizontal subsampling. Must be a positive power of 2. */
|
||||
/** Horizontal subsampling. Must be a positive power of 2. */
|
||||
int32_t hSubsampling;
|
||||
/* Vertical subsampling. Must be a positive power of 2. */
|
||||
/** Vertical subsampling. Must be a positive power of 2. */
|
||||
int32_t vSubsampling;
|
||||
};
|
||||
|
||||
struct FlexLayout {
|
||||
/* The kind of flexible format. */
|
||||
/** The kind of flexible format. */
|
||||
FlexFormat format;
|
||||
|
||||
/*
|
||||
/**
|
||||
* A plane for each component; ordered in increasing component value
|
||||
* order. E.g. FlexFormat::RGBA maps 0 -> R, 1 -> G, etc. Can have size 0
|
||||
* for FlexFormat::INVALID.
|
||||
@@ -112,5 +112,5 @@ struct FlexLayout {
|
||||
vec<FlexPlane> planes;
|
||||
};
|
||||
|
||||
/* Backing store ID of a buffer. See IMapper::getBackingStore. */
|
||||
/** Backing store ID of a buffer. See IMapper::getBackingStore. */
|
||||
typedef uint64_t BackingStore;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package android.hardware.health@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Possible return values for optional HAL method(s) like
|
||||
* IHealth::energyCounter()
|
||||
*/
|
||||
@@ -26,7 +26,7 @@ enum Result : int32_t {
|
||||
UNKNOWN,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Possible values for Battery Status.
|
||||
* Note: These are currently in sync with BatteryManager and must not
|
||||
* be extended / altered.
|
||||
@@ -36,7 +36,7 @@ enum BatteryStatus : int32_t {
|
||||
UNKNOWN = 1,
|
||||
CHARGING = 2,
|
||||
DISCHARGING = 3,
|
||||
/*
|
||||
/**
|
||||
* Battery is *not* charging - special case when charger is present
|
||||
* but battery isn't charging
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ enum BatteryStatus : int32_t {
|
||||
FULL = 5,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Possible values for Battery Health.
|
||||
* Note: These are currently in sync with BatteryManager and must not
|
||||
* be extended / altered.
|
||||
@@ -56,7 +56,7 @@ enum BatteryHealth : int32_t {
|
||||
OVERHEAT = 3,
|
||||
DEAD = 4,
|
||||
OVER_VOLTAGE = 5,
|
||||
/*
|
||||
/**
|
||||
* Battery experienced an unknown/unspecifid failure.
|
||||
*/
|
||||
UNSPECIFIED_FAILURE = 6,
|
||||
@@ -65,149 +65,149 @@ enum BatteryHealth : int32_t {
|
||||
|
||||
struct HealthConfig {
|
||||
|
||||
/*
|
||||
/**
|
||||
* periodicChoresIntervalFast is used while the device is not in
|
||||
* suspend, or in suspend and connected to a charger (to watch for battery
|
||||
* overheat due to charging)
|
||||
*/
|
||||
int32_t periodicChoresIntervalFast;
|
||||
|
||||
/*
|
||||
/**
|
||||
* periodicChoresIntervalSlow is used when the device is in suspend and
|
||||
* not connected to a charger (to watch for a battery drained to zero
|
||||
* remaining capacity).
|
||||
*/
|
||||
int32_t periodicChoresIntervalSlow;
|
||||
|
||||
/*
|
||||
/**
|
||||
* power_supply sysfs attribute file paths. Set these to specific paths
|
||||
* to use for the associated battery parameters. Clients must search
|
||||
* for appropriate power_supply attribute files to use, for any paths
|
||||
* left empty after the HAL is initialized.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryStatusPath - file path to read battery charging status.
|
||||
* (POWER_SUPPLY_PROP_STATUS)
|
||||
*/
|
||||
string batteryStatusPath;
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryHealthPath - file path to read battery health.
|
||||
* (POWER_SUPPLY_PROP_HEALTH)
|
||||
*/
|
||||
string batteryHealthPath;
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryPresentPath - file path to read battery present status.
|
||||
* (POWER_SUPPLY_PROP_PRESENT)
|
||||
*/
|
||||
string batteryPresentPath;
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryCapacityPath - file path to read remaining battery capacity.
|
||||
* (POWER_SUPPLY_PROP_CAPACITY)
|
||||
*/
|
||||
string batteryCapacityPath;
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryVoltagePath - file path to read battery voltage.
|
||||
* (POWER_SUPPLY_PROP_VOLTAGE_NOW)
|
||||
*/
|
||||
string batteryVoltagePath;
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryTemperaturePath - file path to read battery temperature in tenths
|
||||
* of degree celcius. (POWER_SUPPLY_PROP_TEMP)
|
||||
*/
|
||||
string batteryTemperaturePath;
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryTechnologyPath - file path to read battery technology.
|
||||
* (POWER_SUPPLY_PROP_TECHNOLOGY)
|
||||
*/
|
||||
string batteryTechnologyPath;
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryCurrentNowPath - file path to read battery instantaneous current.
|
||||
* (POWER_SUPPLY_PROP_CURRENT_NOW)
|
||||
*/
|
||||
string batteryCurrentNowPath;
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryCurrentAvgPath - file path to read battery average current.
|
||||
* (POWER_SUPPLY_PROP_CURRENT_AVG)
|
||||
*/
|
||||
string batteryCurrentAvgPath;
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryChargeCounterPath - file path to read battery accumulated charge.
|
||||
* (POWER_SUPPLY_PROP_CHARGE_COUNTER)
|
||||
*/
|
||||
string batteryChargeCounterPath;
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryFullChargerPath - file path to read battery charge value when it
|
||||
* is considered to be full. (POWER_SUPPLY_PROP_CHARGE_FULL)
|
||||
*/
|
||||
string batteryFullChargePath;
|
||||
|
||||
/*
|
||||
/**
|
||||
* batteryCycleCountPath - file path to read battery charge cycle count.
|
||||
* (POWER_SUPPLY_PROP_CYCLE_COUNT)
|
||||
*/
|
||||
string batteryCycleCountPath;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* The parameter to healthd mainloop update calls
|
||||
*/
|
||||
struct HealthInfo {
|
||||
/* AC charger state - 'true' if online */
|
||||
/** AC charger state - 'true' if online */
|
||||
bool chargerAcOnline;
|
||||
|
||||
/* USB charger state - 'true' if online */
|
||||
/** USB charger state - 'true' if online */
|
||||
bool chargerUsbOnline;
|
||||
|
||||
/* Wireless charger state - 'true' if online */
|
||||
/** Wireless charger state - 'true' if online */
|
||||
bool chargerWirelessOnline;
|
||||
|
||||
/* Maximum charging current supported by charger in uA */
|
||||
/** Maximum charging current supported by charger in uA */
|
||||
int32_t maxChargingCurrent;
|
||||
|
||||
/* Maximum charging voltage supported by charger in uV */
|
||||
/** Maximum charging voltage supported by charger in uV */
|
||||
int32_t maxChargingVoltage;
|
||||
|
||||
BatteryStatus batteryStatus;
|
||||
|
||||
BatteryHealth batteryHealth;
|
||||
|
||||
/* 'true' if battery is present */
|
||||
/** 'true' if battery is present */
|
||||
bool batteryPresent;
|
||||
|
||||
/* Remaining battery capacity in percent */
|
||||
/** Remaining battery capacity in percent */
|
||||
int32_t batteryLevel;
|
||||
|
||||
/* Instantaneous battery voltage in uV */
|
||||
/** Instantaneous battery voltage in uV */
|
||||
int32_t batteryVoltage;
|
||||
|
||||
/* Instantaneous battery temperature in tenths of degree celcius */
|
||||
/** Instantaneous battery temperature in tenths of degree celcius */
|
||||
int32_t batteryTemperature;
|
||||
|
||||
/* Instantaneous battery current in uA */
|
||||
/** Instantaneous battery current in uA */
|
||||
int32_t batteryCurrent;
|
||||
|
||||
/* Battery charge cycle count */
|
||||
/** Battery charge cycle count */
|
||||
int32_t batteryCycleCount;
|
||||
|
||||
/* Battery charge value when it is considered to be "full" in uA-h */
|
||||
/** Battery charge value when it is considered to be "full" in uA-h */
|
||||
int32_t batteryFullCharge;
|
||||
|
||||
/* Instantaneous battery capacity in uA-h */
|
||||
/** Instantaneous battery capacity in uA-h */
|
||||
int32_t batteryChargeCounter;
|
||||
|
||||
/* Battery technology, e.g. "Li-ion, Li-Poly" etc. */
|
||||
/** Battery technology, e.g. "Li-ion, Li-Poly" etc. */
|
||||
string batteryTechnology;
|
||||
};
|
||||
|
||||
@@ -17,40 +17,40 @@
|
||||
package android.hardware.keymaster@3.0;
|
||||
|
||||
enum TagType : uint32_t {
|
||||
INVALID = 0 << 28, /* Invalid type, used to designate a tag as uninitialized */
|
||||
INVALID = 0 << 28, /** Invalid type, used to designate a tag as uninitialized */
|
||||
ENUM = 1 << 28,
|
||||
ENUM_REP = 2 << 28, /* Repeatable enumeration value. */
|
||||
ENUM_REP = 2 << 28, /** Repeatable enumeration value. */
|
||||
UINT = 3 << 28,
|
||||
UINT_REP = 4 << 28, /* Repeatable integer value */
|
||||
UINT_REP = 4 << 28, /** Repeatable integer value */
|
||||
ULONG = 5 << 28,
|
||||
DATE = 6 << 28,
|
||||
BOOL = 7 << 28,
|
||||
BIGNUM = 8 << 28,
|
||||
BYTES = 9 << 28,
|
||||
ULONG_REP = 10 << 28, /* Repeatable long value */
|
||||
ULONG_REP = 10 << 28, /** Repeatable long value */
|
||||
};
|
||||
|
||||
enum Tag : uint32_t {
|
||||
INVALID = TagType:INVALID | 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Tags that must be semantically enforced by hardware and software implementations.
|
||||
*/
|
||||
|
||||
/* Crypto parameters */
|
||||
PURPOSE = TagType:ENUM_REP | 1, /* KeyPurpose. */
|
||||
ALGORITHM = TagType:ENUM | 2, /* Algorithm. */
|
||||
KEY_SIZE = TagType:UINT | 3, /* Key size in bits. */
|
||||
BLOCK_MODE = TagType:ENUM_REP | 4, /* BlockMode. */
|
||||
DIGEST = TagType:ENUM_REP | 5, /* Digest. */
|
||||
PADDING = TagType:ENUM_REP | 6, /* PaddingMode. */
|
||||
CALLER_NONCE = TagType:BOOL | 7, /* Allow caller to specify nonce or IV. */
|
||||
/** Crypto parameters */
|
||||
PURPOSE = TagType:ENUM_REP | 1, /** KeyPurpose. */
|
||||
ALGORITHM = TagType:ENUM | 2, /** Algorithm. */
|
||||
KEY_SIZE = TagType:UINT | 3, /** Key size in bits. */
|
||||
BLOCK_MODE = TagType:ENUM_REP | 4, /** BlockMode. */
|
||||
DIGEST = TagType:ENUM_REP | 5, /** Digest. */
|
||||
PADDING = TagType:ENUM_REP | 6, /** PaddingMode. */
|
||||
CALLER_NONCE = TagType:BOOL | 7, /** Allow caller to specify nonce or IV. */
|
||||
MIN_MAC_LENGTH = TagType:UINT | 8, /* Minimum length of MAC or AEAD authentication tag in
|
||||
* bits. */
|
||||
KDF = TagType:ENUM_REP | 9, /* KeyDerivationFunction. */
|
||||
EC_CURVE = TagType:ENUM | 10, /* EcCurve. */
|
||||
KDF = TagType:ENUM_REP | 9, /** KeyDerivationFunction. */
|
||||
EC_CURVE = TagType:ENUM | 10, /** EcCurve. */
|
||||
|
||||
/* Algorithm-specific. */
|
||||
/** Algorithm-specific. */
|
||||
RSA_PUBLIC_EXPONENT = TagType:ULONG | 200,
|
||||
ECIES_SINGLE_HASH_MODE = TagType:BOOL | 201, /* Whether the ephemeral public key is fed into the
|
||||
* KDF. */
|
||||
@@ -58,17 +58,17 @@ enum Tag : uint32_t {
|
||||
* will contain an application-scoped and
|
||||
* time-bounded device-unique ID.*/
|
||||
|
||||
/* Other hardware-enforced. */
|
||||
BLOB_USAGE_REQUIREMENTS = TagType:ENUM | 301, /* KeyBlobUsageRequirements. */
|
||||
BOOTLOADER_ONLY = TagType:BOOL | 302, /* Usable only by bootloader. */
|
||||
/** Other hardware-enforced. */
|
||||
BLOB_USAGE_REQUIREMENTS = TagType:ENUM | 301, /** KeyBlobUsageRequirements. */
|
||||
BOOTLOADER_ONLY = TagType:BOOL | 302, /** Usable only by bootloader. */
|
||||
|
||||
/*
|
||||
/**
|
||||
* Tags that should be semantically enforced by hardware if possible and will otherwise be
|
||||
* enforced by software (keystore).
|
||||
*/
|
||||
|
||||
/* Key validity period */
|
||||
ACTIVE_DATETIME = TagType:DATE | 400, /* Start of validity. */
|
||||
/** Key validity period */
|
||||
ACTIVE_DATETIME = TagType:DATE | 400, /** Start of validity. */
|
||||
ORIGINATION_EXPIRE_DATETIME = TagType:DATE | 401, /* Date when new "messages" should no longer
|
||||
* be created. */
|
||||
USAGE_EXPIRE_DATETIME = TagType:DATE | 402, /* Date when existing "messages" should no
|
||||
@@ -78,13 +78,13 @@ enum Tag : uint32_t {
|
||||
MAX_USES_PER_BOOT = TagType:UINT | 404, /* Number of times the key can be used per
|
||||
* boot. */
|
||||
|
||||
/* User authentication */
|
||||
ALL_USERS = TagType:BOOL | 500, /* Reserved for future use -- ignore. */
|
||||
USER_ID = TagType:UINT | 501, /* Reserved for future use -- ignore. */
|
||||
/** User authentication */
|
||||
ALL_USERS = TagType:BOOL | 500, /** Reserved for future use -- ignore. */
|
||||
USER_ID = TagType:UINT | 501, /** Reserved for future use -- ignore. */
|
||||
USER_SECURE_ID = TagType:ULONG_REP | 502, /* Secure ID of authorized user or authenticator(s).
|
||||
* Disallowed if ALL_USERS or NO_AUTH_REQUIRED is
|
||||
* present. */
|
||||
NO_AUTH_REQUIRED = TagType:BOOL | 503, /* If key is usable without authentication. */
|
||||
NO_AUTH_REQUIRED = TagType:BOOL | 503, /** If key is usable without authentication. */
|
||||
USER_AUTH_TYPE = TagType:ENUM | 504, /* Bitmask of authenticator types allowed when
|
||||
* USER_SECURE_ID contains a secure user ID, rather
|
||||
* than a secure authenticator ID. Defined in
|
||||
@@ -99,27 +99,27 @@ enum Tag : uint32_t {
|
||||
* if device is still on-body (requires secure on-body
|
||||
* sensor. */
|
||||
|
||||
/* Application access control */
|
||||
/** Application access control */
|
||||
ALL_APPLICATIONS = TagType:BOOL | 600, /* Specified to indicate key is usable by all
|
||||
* applications. */
|
||||
APPLICATION_ID = TagType:BYTES | 601, /* Byte string identifying the authorized application. */
|
||||
APPLICATION_ID = TagType:BYTES | 601, /** Byte string identifying the authorized application. */
|
||||
EXPORTABLE = TagType:BOOL | 602, /* If true, private/secret key can be exported, but only
|
||||
* if all access control requirements for use are
|
||||
* met. (keymaster2) */
|
||||
|
||||
/*
|
||||
/**
|
||||
* Semantically unenforceable tags, either because they have no specific meaning or because
|
||||
* they're informational only.
|
||||
*/
|
||||
APPLICATION_DATA = TagType:BYTES | 700, /* Data provided by authorized application. */
|
||||
CREATION_DATETIME = TagType:DATE | 701, /* Key creation time */
|
||||
ORIGIN = TagType:ENUM | 702, /* keymaster_key_origin_t. */
|
||||
ROLLBACK_RESISTANT = TagType:BOOL | 703, /* Whether key is rollback-resistant. */
|
||||
ROOT_OF_TRUST = TagType:BYTES | 704, /* Root of trust ID. */
|
||||
OS_VERSION = TagType:UINT | 705, /* Version of system (keymaster2) */
|
||||
OS_PATCHLEVEL = TagType:UINT | 706, /* Patch level of system (keymaster2) */
|
||||
UNIQUE_ID = TagType:BYTES | 707, /* Used to provide unique ID in attestation */
|
||||
ATTESTATION_CHALLENGE = TagType:BYTES | 708, /* Used to provide challenge in attestation */
|
||||
APPLICATION_DATA = TagType:BYTES | 700, /** Data provided by authorized application. */
|
||||
CREATION_DATETIME = TagType:DATE | 701, /** Key creation time */
|
||||
ORIGIN = TagType:ENUM | 702, /** keymaster_key_origin_t. */
|
||||
ROLLBACK_RESISTANT = TagType:BOOL | 703, /** Whether key is rollback-resistant. */
|
||||
ROOT_OF_TRUST = TagType:BYTES | 704, /** Root of trust ID. */
|
||||
OS_VERSION = TagType:UINT | 705, /** Version of system (keymaster2) */
|
||||
OS_PATCHLEVEL = TagType:UINT | 706, /** Patch level of system (keymaster2) */
|
||||
UNIQUE_ID = TagType:BYTES | 707, /** Used to provide unique ID in attestation */
|
||||
ATTESTATION_CHALLENGE = TagType:BYTES | 708, /** Used to provide challenge in attestation */
|
||||
ATTESTATION_APPLICATION_ID = TagType:BYTES | 709, /* Used to identify the set of possible
|
||||
* applications of which one has initiated a
|
||||
* key attestation */
|
||||
@@ -140,13 +140,13 @@ enum Tag : uint32_t {
|
||||
ATTESTATION_ID_MODEL = TagType:BYTES | 717, /* Used to provide the device's model name to be
|
||||
included in attestation */
|
||||
|
||||
/* Tags used only to provide data to or receive data from operations */
|
||||
ASSOCIATED_DATA = TagType:BYTES | 1000, /* Used to provide associated data for AEAD modes. */
|
||||
NONCE = TagType:BYTES | 1001, /* Nonce or Initialization Vector */
|
||||
/** Tags used only to provide data to or receive data from operations */
|
||||
ASSOCIATED_DATA = TagType:BYTES | 1000, /** Used to provide associated data for AEAD modes. */
|
||||
NONCE = TagType:BYTES | 1001, /** Nonce or Initialization Vector */
|
||||
AUTH_TOKEN = TagType:BYTES | 1002, /* Authentication token that proves secure user
|
||||
* authentication has been performed. Structure defined
|
||||
* in hw_auth_token_t in hw_auth_token.h. */
|
||||
MAC_LENGTH = TagType:UINT | 1003, /* MAC or AEAD authentication tag length in bits. */
|
||||
MAC_LENGTH = TagType:UINT | 1003, /** MAC or AEAD authentication tag length in bits. */
|
||||
|
||||
RESET_SINCE_ID_ROTATION = TagType:BOOL | 1004, /* Whether the device has beeen factory reset
|
||||
* since the last unique ID rotation. Used for
|
||||
@@ -154,15 +154,15 @@ enum Tag : uint32_t {
|
||||
};
|
||||
|
||||
enum Algorithm : uint32_t {
|
||||
/* Asymmetric algorithms. */
|
||||
/** Asymmetric algorithms. */
|
||||
RSA = 1,
|
||||
// DSA = 2, -- Removed, do not re-use value 2.
|
||||
EC = 3,
|
||||
|
||||
/* Block ciphers algorithms */
|
||||
/** Block ciphers algorithms */
|
||||
AES = 32,
|
||||
|
||||
/* MAC algorithms */
|
||||
/** MAC algorithms */
|
||||
HMAC = 128,
|
||||
};
|
||||
|
||||
@@ -170,13 +170,15 @@ enum Algorithm : uint32_t {
|
||||
* Symmetric block cipher modes provided by keymaster implementations.
|
||||
*/
|
||||
enum BlockMode : uint32_t {
|
||||
/* Unauthenticated modes, usable only for encryption/decryption and not generally recommended
|
||||
/**
|
||||
* Unauthenticated modes, usable only for encryption/decryption and not generally recommended
|
||||
* except for compatibility with existing other protocols. */
|
||||
ECB = 1,
|
||||
CBC = 2,
|
||||
CTR = 3,
|
||||
|
||||
/* Authenticated modes, usable for encryption/decryption and signing/verification. Recommended
|
||||
/**
|
||||
* Authenticated modes, usable for encryption/decryption and signing/verification. Recommended
|
||||
* over unauthenticated modes for all purposes. */
|
||||
GCM = 32,
|
||||
};
|
||||
@@ -188,7 +190,7 @@ enum BlockMode : uint32_t {
|
||||
* cryptographically-appropriate pairs.
|
||||
*/
|
||||
enum PaddingMode : uint32_t {
|
||||
NONE = 1, /* deprecated */
|
||||
NONE = 1, /** deprecated */
|
||||
RSA_OAEP = 2,
|
||||
RSA_PSS = 3,
|
||||
RSA_PKCS1_1_5_ENCRYPT = 4,
|
||||
@@ -227,9 +229,9 @@ enum EcCurve : uint32_t {
|
||||
* guaranteed never to have existed outide the secure hardware.
|
||||
*/
|
||||
enum KeyOrigin : uint32_t {
|
||||
GENERATED = 0, /* Generated in keymaster. Should not exist outside the TEE. */
|
||||
DERIVED = 1, /* Derived inside keymaster. Likely exists off-device. */
|
||||
IMPORTED = 2, /* Imported into keymaster. Existed as cleartext in Android. */
|
||||
GENERATED = 0, /** Generated in keymaster. Should not exist outside the TEE. */
|
||||
DERIVED = 1, /** Derived inside keymaster. Likely exists off-device. */
|
||||
IMPORTED = 2, /** Imported into keymaster. Existed as cleartext in Android. */
|
||||
UNKNOWN = 3, /* Keymaster did not record origin. This value can only be seen on keys in a
|
||||
* keymaster0 implementation. The keymaster0 adapter uses this value to document
|
||||
* the fact that it is unkown whether the key was generated inside or imported
|
||||
@@ -252,12 +254,12 @@ enum KeyBlobUsageRequirements : uint32_t {
|
||||
* Possible purposes of a key (or pair).
|
||||
*/
|
||||
enum KeyPurpose : uint32_t {
|
||||
ENCRYPT = 0, /* Usable with RSA, EC and AES keys. */
|
||||
DECRYPT = 1, /* Usable with RSA, EC and AES keys. */
|
||||
SIGN = 2, /* Usable with RSA, EC and HMAC keys. */
|
||||
VERIFY = 3, /* Usable with RSA, EC and HMAC keys. */
|
||||
DERIVE_KEY = 4, /* Usable with EC keys. */
|
||||
WRAP_KEY = 5, /* Usable with wrapping keys. */
|
||||
ENCRYPT = 0, /** Usable with RSA, EC and AES keys. */
|
||||
DECRYPT = 1, /** Usable with RSA, EC and AES keys. */
|
||||
SIGN = 2, /** Usable with RSA, EC and HMAC keys. */
|
||||
VERIFY = 3, /** Usable with RSA, EC and HMAC keys. */
|
||||
DERIVE_KEY = 4, /** Usable with EC keys. */
|
||||
WRAP_KEY = 5, /** Usable with wrapping keys. */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -283,8 +285,8 @@ enum ErrorCode : uint32_t {
|
||||
INVALID_AUTHORIZATION_TIMEOUT = -16,
|
||||
UNSUPPORTED_KEY_FORMAT = -17,
|
||||
INCOMPATIBLE_KEY_FORMAT = -18,
|
||||
UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM = -19, /* For PKCS8 & PKCS12 */
|
||||
UNSUPPORTED_KEY_VERIFICATION_ALGORITHM = -20, /* For PKCS8 & PKCS12 */
|
||||
UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM = -19, /** For PKCS8 & PKCS12 */
|
||||
UNSUPPORTED_KEY_VERIFICATION_ALGORITHM = -20, /** For PKCS8 & PKCS12 */
|
||||
INVALID_INPUT_LENGTH = -21,
|
||||
KEY_EXPORT_OPTIONS_INVALID = -22,
|
||||
DELEGATION_NOT_ALLOWED = -23,
|
||||
@@ -340,17 +342,17 @@ enum ErrorCode : uint32_t {
|
||||
* Key derivation functions, mostly used in ECIES.
|
||||
*/
|
||||
enum KeyDerivationFunction : uint32_t {
|
||||
/* Do not apply a key derivation function; use the raw agreed key */
|
||||
/** Do not apply a key derivation function; use the raw agreed key */
|
||||
NONE = 0,
|
||||
/* HKDF defined in RFC 5869 with SHA256 */
|
||||
/** HKDF defined in RFC 5869 with SHA256 */
|
||||
RFC5869_SHA256 = 1,
|
||||
/* KDF1 defined in ISO 18033-2 with SHA1 */
|
||||
/** KDF1 defined in ISO 18033-2 with SHA1 */
|
||||
ISO18033_2_KDF1_SHA1 = 2,
|
||||
/* KDF1 defined in ISO 18033-2 with SHA256 */
|
||||
/** KDF1 defined in ISO 18033-2 with SHA256 */
|
||||
ISO18033_2_KDF1_SHA256 = 3,
|
||||
/* KDF2 defined in ISO 18033-2 with SHA1 */
|
||||
/** KDF2 defined in ISO 18033-2 with SHA1 */
|
||||
ISO18033_2_KDF2_SHA1 = 4,
|
||||
/* KDF2 defined in ISO 18033-2 with SHA256 */
|
||||
/** KDF2 defined in ISO 18033-2 with SHA256 */
|
||||
ISO18033_2_KDF2_SHA256 = 5,
|
||||
};
|
||||
|
||||
@@ -368,11 +370,12 @@ enum HardwareAuthenticatorType : uint32_t {
|
||||
};
|
||||
|
||||
struct KeyParameter {
|
||||
/* Discriminates the uinon/blob field used. The blob cannot be coincided with the union, but
|
||||
/**
|
||||
* Discriminates the uinon/blob field used. The blob cannot be coincided with the union, but
|
||||
* only one of "f" and "blob" is ever used at a time. */
|
||||
Tag tag;
|
||||
union IntegerParams {
|
||||
/* Enum types */
|
||||
/** Enum types */
|
||||
Algorithm algorithm;
|
||||
BlockMode blockMode;
|
||||
PaddingMode paddingMode;
|
||||
@@ -384,7 +387,7 @@ struct KeyParameter {
|
||||
KeyDerivationFunction keyDerivationFunction;
|
||||
HardwareAuthenticatorType hardwareAuthenticatorType;
|
||||
|
||||
/* Other types */
|
||||
/** Other types */
|
||||
bool boolValue; // Always true, if a boolean tag is present.
|
||||
uint32_t integer;
|
||||
uint64_t longInteger;
|
||||
@@ -424,8 +427,8 @@ enum SecurityLevel : uint32_t {
|
||||
* Formats for key import and export.
|
||||
*/
|
||||
enum KeyFormat : uint32_t {
|
||||
X509 = 0, /* for public key export */
|
||||
PKCS8 = 1, /* for asymmetric key pair import */
|
||||
X509 = 0, /** for public key export */
|
||||
PKCS8 = 1, /** for asymmetric key pair import */
|
||||
RAW = 3, /* for symmetric key import and export*/
|
||||
};
|
||||
|
||||
|
||||
@@ -24,17 +24,17 @@ enum Status : int32_t {
|
||||
};
|
||||
|
||||
enum Flash : int32_t {
|
||||
/*
|
||||
/**
|
||||
* Keep the light steady on or off.
|
||||
*/
|
||||
NONE,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flash the light at specified rate.
|
||||
*/
|
||||
TIMED,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flash the light using hardware assist.
|
||||
*/
|
||||
HARDWARE,
|
||||
@@ -77,7 +77,7 @@ enum Brightness : int32_t {
|
||||
LOW_PERSISTENCE,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* These light IDs correspond to logical lights, not physical.
|
||||
* So for example, if your INDICATOR light is in line with your
|
||||
* BUTTONS, it might make sense to also light the INDICATOR
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package android.hardware.memtrack@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The Memory Tracker HAL is designed to return information about
|
||||
* device-specific memory usage.
|
||||
* The primary goal is to be able to track memory that is not
|
||||
@@ -30,7 +30,7 @@ package android.hardware.memtrack@1.0;
|
||||
* setup actions and is called once before any calls to getMemory().
|
||||
*/
|
||||
interface IMemtrack {
|
||||
/*
|
||||
/**
|
||||
* getMemory() populates MemtrackRecord vector with the sizes of memory
|
||||
* plus associated flags for that memory.
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package android.hardware.memtrack@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* SMAPS_ACCOUNTED/SMAPS_UNACCOUNTED
|
||||
* Flags to differentiate memory that can already be accounted for in
|
||||
* /proc/<pid>/smaps,
|
||||
@@ -56,7 +56,7 @@ enum MemtrackFlag : uint32_t {
|
||||
SECURE = 1 << 9,
|
||||
};
|
||||
|
||||
/* Tags which define the usage of the memory buffers. */
|
||||
/** Tags which define the usage of the memory buffers. */
|
||||
enum MemtrackType : uint32_t {
|
||||
OTHER = 0,
|
||||
GL = 1,
|
||||
@@ -79,7 +79,7 @@ enum MemtrackStatus : uint32_t {
|
||||
*/
|
||||
struct MemtrackRecord {
|
||||
uint64_t sizeInBytes;
|
||||
/*
|
||||
/**
|
||||
* This is the bitfield for the MemtrackFlag indicating all the flags that
|
||||
* are valid for this record.
|
||||
*/
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
*/
|
||||
package android.hardware.power@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Constructor for the interface performs power management setup actions at
|
||||
* runtime startup, such as to set default cpufreq parameters.
|
||||
*/
|
||||
interface IPower {
|
||||
/*
|
||||
/**
|
||||
* setInteractive() performs power management actions upon the
|
||||
* system entering interactive state (that is, the system is awake
|
||||
* and ready for interaction, often with UI devices such as
|
||||
@@ -49,7 +49,7 @@ interface IPower {
|
||||
*/
|
||||
setInteractive(bool interactive);
|
||||
|
||||
/*
|
||||
/**
|
||||
* powerHint() is called to pass hints on power requirements which
|
||||
* may result in adjustment of power/performance parameters of the
|
||||
* cpufreq governor and other controls.
|
||||
@@ -62,7 +62,7 @@ interface IPower {
|
||||
*/
|
||||
powerHint(PowerHint hint, int32_t data);
|
||||
|
||||
/*
|
||||
/**
|
||||
* setFeature() is called to turn on or off a particular feature
|
||||
* depending on the state parameter.
|
||||
*
|
||||
@@ -71,7 +71,7 @@ interface IPower {
|
||||
*/
|
||||
setFeature(Feature feature, bool activate);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Platform-level sleep state stats:
|
||||
* Report cumulative info on the statistics on platform-level sleep states
|
||||
* since boot.
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package android.hardware.power@1.0;
|
||||
|
||||
/* Power hint identifiers passed to powerHint() */
|
||||
/** Power hint identifiers passed to powerHint() */
|
||||
enum PowerHint : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* Foreground app has started or stopped requesting a VSYNC pulse
|
||||
* from SurfaceFlinger. If the app has started requesting VSYNC
|
||||
* then CPU and GPU load is expected soon, and it may be appropriate
|
||||
@@ -28,7 +28,7 @@ enum PowerHint : uint32_t {
|
||||
VSYNC = 0x00000001,
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* User is interacting with the device, for example, touchscreen
|
||||
* events are incoming. CPU and GPU load may be expected soon,
|
||||
* and it may be appropriate to raise speeds of CPU, memory bus,
|
||||
@@ -38,13 +38,14 @@ enum PowerHint : uint32_t {
|
||||
INTERACTION = 0x00000002,
|
||||
|
||||
|
||||
/* DO NOT USE VIDEO_ENCODE/_DECODE! They will be removed in
|
||||
/**
|
||||
* DO NOT USE VIDEO_ENCODE/_DECODE! They will be removed in
|
||||
* KLP.
|
||||
*/
|
||||
VIDEO_ENCODE = 0x00000003,
|
||||
VIDEO_DECODE = 0x00000004,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Low power mode is activated or deactivated. Low power mode
|
||||
* is intended to save battery at the cost of performance. The data
|
||||
* parameter is non-zero when low power mode is activated, and zero
|
||||
@@ -52,7 +53,7 @@ enum PowerHint : uint32_t {
|
||||
*/
|
||||
LOW_POWER = 0x00000005,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sustained Performance mode is actived or deactivated. Sustained
|
||||
* performance mode is intended to provide a consistent level of
|
||||
* performance for a prolonged amount of time. The data parameter is
|
||||
@@ -61,7 +62,7 @@ enum PowerHint : uint32_t {
|
||||
*/
|
||||
SUSTAINED_PERFORMANCE = 0x00000006,
|
||||
|
||||
/*
|
||||
/**
|
||||
* VR Mode is activated or deactivated. VR mode is intended to
|
||||
* provide minimum guarantee for performance for the amount of time the
|
||||
* device can sustain it. The data parameter is non-zero when the mode
|
||||
@@ -69,7 +70,7 @@ enum PowerHint : uint32_t {
|
||||
*/
|
||||
VR_MODE = 0x00000007,
|
||||
|
||||
/*
|
||||
/**
|
||||
* This hint indicates that an application has been launched. Can be used
|
||||
* for device specific optimizations during application launch. The data
|
||||
* parameter is non-zero when the application starts to launch and zero when
|
||||
@@ -79,7 +80,7 @@ enum PowerHint : uint32_t {
|
||||
};
|
||||
|
||||
enum Feature : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* Enabling/Disabling this feature will allow/disallow the system
|
||||
* to wake up by tapping the screen twice.
|
||||
*/
|
||||
@@ -90,7 +91,7 @@ enum Status : uint32_t {
|
||||
SUCCESS = 0,
|
||||
FILESYSTEM_ERROR = 1
|
||||
};
|
||||
/*
|
||||
/**
|
||||
* Platform-level sleep state stats:
|
||||
* PowerStateVoter struct is useful for describing the individual voters
|
||||
* when a Platform-level sleep state is chosen by aggregation of votes from
|
||||
@@ -100,24 +101,24 @@ enum Status : uint32_t {
|
||||
* entering the lowest Platform-level sleep state.
|
||||
*/
|
||||
struct PowerStateVoter {
|
||||
/*
|
||||
/**
|
||||
* Name of the voter.
|
||||
*/
|
||||
string name;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Total time in msec the voter voted for the platform sleep state since
|
||||
* boot.
|
||||
*/
|
||||
uint64_t totalTimeInMsecVotedForSinceBoot;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Number of times the voter voted for the platform sleep state since boot.
|
||||
*/
|
||||
uint64_t totalNumberOfTimesVotedSinceBoot;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Platform-level sleep state stats:
|
||||
* PowerStatePlatformSleepState represents the Platform-level sleep state
|
||||
* the device is capable of getting into.
|
||||
@@ -125,27 +126,27 @@ struct PowerStateVoter {
|
||||
* SoCs usually have more than one Platform-level sleep state.
|
||||
*/
|
||||
struct PowerStatePlatformSleepState {
|
||||
/*
|
||||
/**
|
||||
* Platform-level Sleep state name.
|
||||
*/
|
||||
string name;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Time spent in msec at this platform-level sleep state since boot.
|
||||
*/
|
||||
uint64_t residencyInMsecSinceBoot;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Total number of times system entered this state.
|
||||
*/
|
||||
uint64_t totalTransitions;
|
||||
|
||||
/*
|
||||
/**
|
||||
* This platform-level sleep state can only be reached during system suspend
|
||||
*/
|
||||
bool supportedOnlyInSuspend;
|
||||
|
||||
/*
|
||||
/**
|
||||
* voters is useful if the Platform-level sleep state
|
||||
* is chosen by aggregation votes from multiple clients/system conditions.
|
||||
* All the voters have to say yes or all the system conditions need to be
|
||||
|
||||
@@ -37,7 +37,8 @@ interface ISensors {
|
||||
*/
|
||||
setOperationMode(OperationMode mode) generates (Result result);
|
||||
|
||||
/* Activate/de-activate one sensor.
|
||||
/**
|
||||
* Activate/de-activate one sensor.
|
||||
*
|
||||
* After sensor de-activation, existing sensor events that have not
|
||||
* been picked up by poll() must be abandoned immediately so that
|
||||
@@ -76,7 +77,7 @@ interface ISensors {
|
||||
vec<Event> data,
|
||||
vec<SensorInfo> dynamicSensorsAdded);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets a sensor’s parameters, including sampling frequency and maximum
|
||||
* report latency. This function can be called while the sensor is
|
||||
* activated, in which case it must not cause any sensor measurements to
|
||||
@@ -96,7 +97,7 @@ interface ISensors {
|
||||
int64_t samplingPeriodNs,
|
||||
int64_t maxReportLatencyNs) generates (Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Trigger a flush of internal FIFO.
|
||||
*
|
||||
* Flush adds a FLUSH_COMPLETE metadata event to the end of the "batch mode"
|
||||
@@ -113,7 +114,7 @@ interface ISensors {
|
||||
*/
|
||||
flush(int32_t sensorHandle) generates (Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Inject a single sensor event or push operation environment parameters to
|
||||
* device.
|
||||
*
|
||||
@@ -137,7 +138,7 @@ interface ISensors {
|
||||
*/
|
||||
injectSensorData(Event event) generates (Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Register direct report channel.
|
||||
*
|
||||
* Register a direct channel with supplied shared memory information. Upon
|
||||
@@ -156,7 +157,7 @@ interface ISensors {
|
||||
registerDirectChannel(SharedMemInfo mem)
|
||||
generates (Result result, int32_t channelHandle);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Unregister direct report channel.
|
||||
*
|
||||
* Unregister a direct channel previously registered using
|
||||
@@ -169,7 +170,7 @@ interface ISensors {
|
||||
*/
|
||||
unregisterDirectChannel(int32_t channelHandle) generates (Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Configure direct sensor event report in direct channel.
|
||||
*
|
||||
* This function start, modify rate or stop direct report of a sensor in a
|
||||
|
||||
@@ -22,7 +22,7 @@ package android.hardware.sensors@1.0;
|
||||
* http://source.android.com/devices/sensors/index.html
|
||||
*/
|
||||
|
||||
/* Type enumerating various result codes returned from ISensors methods */
|
||||
/** Type enumerating various result codes returned from ISensors methods */
|
||||
enum Result : int32_t {
|
||||
OK,
|
||||
PERMISSION_DENIED = -1,
|
||||
@@ -31,7 +31,7 @@ enum Result : int32_t {
|
||||
INVALID_OPERATION = -38,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sensor HAL modes used in setOperationMode method
|
||||
*/
|
||||
@export(name="", value_prefix="SENSOR_HAL_", value_suffix="_MODE")
|
||||
@@ -40,7 +40,7 @@ enum OperationMode : int32_t {
|
||||
DATA_INJECTION = 1,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sensor type
|
||||
*
|
||||
* Each sensor has a type which defines what this sensor measures and how
|
||||
@@ -88,7 +88,7 @@ enum OperationMode : int32_t {
|
||||
* - This way, all applications can now use this sensor.
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
* Wake up sensors.
|
||||
* Each sensor may have either or both a wake-up and a non-wake variant.
|
||||
* When registered in batch mode, wake-up sensors will wake up the AP when
|
||||
@@ -116,14 +116,15 @@ enum OperationMode : int32_t {
|
||||
|
||||
@export(name="", value_prefix="SENSOR_TYPE_")
|
||||
enum SensorType : int32_t {
|
||||
/* META_DATA is a special event type used to populate the MetaData
|
||||
/**
|
||||
* META_DATA is a special event type used to populate the MetaData
|
||||
* structure. It doesn't correspond to a physical sensor. Events of this
|
||||
* type exist only inside the HAL, their primary purpose is to signal the
|
||||
* completion of a flush request.
|
||||
*/
|
||||
META_DATA = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* ACCELEROMETER
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -135,7 +136,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
ACCELEROMETER = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* MAGNETIC_FIELD
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -147,7 +148,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
MAGNETIC_FIELD = 2,
|
||||
|
||||
/*
|
||||
/**
|
||||
* ORIENTATION
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -161,7 +162,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
ORIENTATION = 3,
|
||||
|
||||
/*
|
||||
/**
|
||||
* GYROSCOPE
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -173,7 +174,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
GYROSCOPE = 4,
|
||||
|
||||
/*
|
||||
/**
|
||||
* LIGHT
|
||||
* reporting-mode: on-change
|
||||
*
|
||||
@@ -183,7 +184,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
LIGHT = 5,
|
||||
|
||||
/*
|
||||
/**
|
||||
* PRESSURE
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -194,10 +195,10 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
PRESSURE = 6,
|
||||
|
||||
/* TEMPERATURE is deprecated in the HAL */
|
||||
/** TEMPERATURE is deprecated in the HAL */
|
||||
TEMPERATURE = 7,
|
||||
|
||||
/*
|
||||
/**
|
||||
* PROXIMITY
|
||||
* reporting-mode: on-change
|
||||
*
|
||||
@@ -210,7 +211,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
PROXIMITY = 8,
|
||||
|
||||
/*
|
||||
/**
|
||||
* GRAVITY
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -222,7 +223,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
GRAVITY = 9,
|
||||
|
||||
/*
|
||||
/**
|
||||
* LINEAR_ACCELERATION
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -234,7 +235,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
LINEAR_ACCELERATION = 10,
|
||||
|
||||
/*
|
||||
/**
|
||||
* ROTATION_VECTOR
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -246,7 +247,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
ROTATION_VECTOR = 11,
|
||||
|
||||
/*
|
||||
/**
|
||||
* RELATIVE_HUMIDITY
|
||||
* reporting-mode: on-change
|
||||
*
|
||||
@@ -257,7 +258,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
RELATIVE_HUMIDITY = 12,
|
||||
|
||||
/*
|
||||
/**
|
||||
* AMBIENT_TEMPERATURE
|
||||
* reporting-mode: on-change
|
||||
*
|
||||
@@ -267,7 +268,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
AMBIENT_TEMPERATURE = 13,
|
||||
|
||||
/*
|
||||
/**
|
||||
* MAGNETIC_FIELD_UNCALIBRATED
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -279,7 +280,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
MAGNETIC_FIELD_UNCALIBRATED = 14,
|
||||
|
||||
/*
|
||||
/**
|
||||
* GAME_ROTATION_VECTOR
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -291,7 +292,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
GAME_ROTATION_VECTOR = 15,
|
||||
|
||||
/*
|
||||
/**
|
||||
* GYROSCOPE_UNCALIBRATED
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -303,7 +304,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
GYROSCOPE_UNCALIBRATED = 16,
|
||||
|
||||
/*
|
||||
/**
|
||||
* SIGNIFICANT_MOTION
|
||||
* reporting-mode: one-shot
|
||||
*
|
||||
@@ -316,7 +317,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
SIGNIFICANT_MOTION = 17,
|
||||
|
||||
/*
|
||||
/**
|
||||
* STEP_DETECTOR
|
||||
* reporting-mode: special
|
||||
*
|
||||
@@ -328,7 +329,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
STEP_DETECTOR = 18,
|
||||
|
||||
/*
|
||||
/**
|
||||
* STEP_COUNTER
|
||||
* reporting-mode: on-change
|
||||
*
|
||||
@@ -341,7 +342,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
STEP_COUNTER = 19,
|
||||
|
||||
/*
|
||||
/**
|
||||
* GEOMAGNETIC_ROTATION_VECTOR
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -353,7 +354,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
GEOMAGNETIC_ROTATION_VECTOR = 20,
|
||||
|
||||
/*
|
||||
/**
|
||||
* HEART_RATE
|
||||
* reporting-mode: on-change
|
||||
*
|
||||
@@ -377,7 +378,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
HEART_RATE = 21,
|
||||
|
||||
/*
|
||||
/**
|
||||
* WAKE_UP_TILT_DETECTOR
|
||||
* reporting-mode: special (setDelay has no impact)
|
||||
*
|
||||
@@ -416,7 +417,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
TILT_DETECTOR = 22,
|
||||
|
||||
/*
|
||||
/**
|
||||
* WAKE_GESTURE
|
||||
* reporting-mode: one-shot
|
||||
*
|
||||
@@ -437,7 +438,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
WAKE_GESTURE = 23,
|
||||
|
||||
/*
|
||||
/**
|
||||
* GLANCE_GESTURE
|
||||
* reporting-mode: one-shot
|
||||
*
|
||||
@@ -474,7 +475,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
PICK_UP_GESTURE = 25,
|
||||
|
||||
/*
|
||||
/**
|
||||
* WRIST_TILT_GESTURE
|
||||
* trigger-mode: special
|
||||
* wake-up sensor: yes
|
||||
@@ -489,7 +490,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
WRIST_TILT_GESTURE = 26,
|
||||
|
||||
/*
|
||||
/**
|
||||
* DEVICE_ORIENTATION
|
||||
* reporting-mode: on-change
|
||||
*
|
||||
@@ -523,7 +524,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
DEVICE_ORIENTATION = 27,
|
||||
|
||||
/*
|
||||
/**
|
||||
* POSE_6DOF
|
||||
* trigger-mode: continuous
|
||||
*
|
||||
@@ -541,7 +542,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
POSE_6DOF = 28,
|
||||
|
||||
/*
|
||||
/**
|
||||
* STATIONARY_DETECT
|
||||
* trigger mode: one shot
|
||||
*
|
||||
@@ -555,7 +556,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
STATIONARY_DETECT = 29,
|
||||
|
||||
/*
|
||||
/**
|
||||
* MOTION_DETECT
|
||||
* trigger mode: one shot
|
||||
*
|
||||
@@ -573,7 +574,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
MOTION_DETECT = 30,
|
||||
|
||||
/*
|
||||
/**
|
||||
* HEART_BEAT
|
||||
* trigger mode: continuous
|
||||
*
|
||||
@@ -680,7 +681,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
ADDITIONAL_INFO = 33,
|
||||
|
||||
/*
|
||||
/**
|
||||
* LOW_LATENCY_OFFBODY_DETECT
|
||||
* trigger-mode: on-change
|
||||
* wake-up sensor: yes
|
||||
@@ -703,7 +704,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
LOW_LATENCY_OFFBODY_DETECT = 34,
|
||||
|
||||
/*
|
||||
/**
|
||||
* ACCELEROMETER_UNCALIBRATED
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
@@ -715,7 +716,7 @@ enum SensorType : int32_t {
|
||||
*/
|
||||
ACCELEROMETER_UNCALIBRATED = 35,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Base for device manufacturers private sensor types.
|
||||
* These sensor types can't be exposed in the SDK.
|
||||
*/
|
||||
@@ -724,7 +725,7 @@ enum SensorType : int32_t {
|
||||
|
||||
@export(name="", value_prefix="SENSOR_FLAG_")
|
||||
enum SensorFlagBits : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* Whether this sensor wakes up the AP from suspend mode when data is
|
||||
* available. Whenever sensor events are delivered from a wake_up sensor,
|
||||
* the driver needs to hold a wake_lock till the events are read by the
|
||||
@@ -735,7 +736,7 @@ enum SensorFlagBits : uint32_t {
|
||||
*/
|
||||
WAKE_UP = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Reporting modes for various sensors. Each sensor will have exactly one of
|
||||
* these modes set.
|
||||
* The least significant 2nd, 3rd and 4th bits are used to represent four
|
||||
@@ -746,7 +747,7 @@ enum SensorFlagBits : uint32_t {
|
||||
ONE_SHOT_MODE = 4,
|
||||
SPECIAL_REPORTING_MODE = 6,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set this flag if the sensor supports data_injection mode and allows data
|
||||
* to be injected from the SensorService. When in data_injection ONLY
|
||||
* sensors with this flag set are injected sensor data and only sensors with
|
||||
@@ -756,42 +757,42 @@ enum SensorFlagBits : uint32_t {
|
||||
*/
|
||||
DATA_INJECTION = 0x10,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set this flag if the sensor is a dynamically connected sensor. See
|
||||
* DynamicSensorInfo and DYNAMIC_SENSOR_META for details.
|
||||
*/
|
||||
DYNAMIC_SENSOR = 0x20,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set this flag if sensor additional information is supported.
|
||||
* See ADDITIONAL_INFO and AdditionalInfo for details.
|
||||
*/
|
||||
ADDITIONAL_INFO = 0x40,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set this flag if sensor suppor direct channel backed by ashmem.
|
||||
* See SharedMemType and registerDirectChannel for more details.
|
||||
*/
|
||||
DIRECT_CHANNEL_ASHMEM = 0x400,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set this flag if sensor suppor direct channel backed by gralloc HAL memory.
|
||||
* See SharedMemType and registerDirectChannel for more details.
|
||||
*/
|
||||
DIRECT_CHANNEL_GRALLOC = 0x800,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags mask for reporting mode of sensor.
|
||||
*/
|
||||
MASK_REPORTING_MODE = 0xE,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags mask for direct report maximum rate level support.
|
||||
* See RateLevel.
|
||||
*/
|
||||
MASK_DIRECT_REPORT = 0x380,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Flags mask for all direct channel support bits.
|
||||
* See SharedMemType.
|
||||
*/
|
||||
@@ -809,30 +810,34 @@ enum SensorFlagShift : uint8_t {
|
||||
};
|
||||
|
||||
struct SensorInfo {
|
||||
/* handle that identifies this sensors. This handle is used to reference
|
||||
/**
|
||||
* handle that identifies this sensors. This handle is used to reference
|
||||
* this sensor throughout the HAL API.
|
||||
*/
|
||||
int32_t sensorHandle;
|
||||
|
||||
/* Name of this sensor.
|
||||
/**
|
||||
* Name of this sensor.
|
||||
* All sensors of the same "type" must have a different "name".
|
||||
*/
|
||||
string name;
|
||||
|
||||
/* vendor of the hardware part */
|
||||
/** vendor of the hardware part */
|
||||
string vendor;
|
||||
|
||||
/* version of the hardware part + driver. The value of this field
|
||||
/**
|
||||
* version of the hardware part + driver. The value of this field
|
||||
* must increase when the driver is updated in a way that changes the
|
||||
* output of this sensor. This is important for fused sensors when the
|
||||
* fusion algorithm is updated.
|
||||
*/
|
||||
int32_t version;
|
||||
|
||||
/* this sensor's type. */
|
||||
/** this sensor's type. */
|
||||
SensorType type;
|
||||
|
||||
/* type of this sensor as a string.
|
||||
/**
|
||||
* type of this sensor as a string.
|
||||
*
|
||||
* When defining an OEM specific sensor or sensor manufacturer specific
|
||||
* sensor, use your reserve domain name as a prefix.
|
||||
@@ -843,16 +848,17 @@ struct SensorInfo {
|
||||
*/
|
||||
string typeAsString;
|
||||
|
||||
/* maximum range of this sensor's value in SI units */
|
||||
/** maximum range of this sensor's value in SI units */
|
||||
float maxRange;
|
||||
|
||||
/* smallest difference between two values reported by this sensor */
|
||||
/** smallest difference between two values reported by this sensor */
|
||||
float resolution;
|
||||
|
||||
/* rough estimate of this sensor's power consumption in mA */
|
||||
/** rough estimate of this sensor's power consumption in mA */
|
||||
float power;
|
||||
|
||||
/* this value depends on the reporting mode:
|
||||
/**
|
||||
* this value depends on the reporting mode:
|
||||
*
|
||||
* continuous: minimum sample period allowed in microseconds
|
||||
* on-change : 0
|
||||
@@ -861,20 +867,23 @@ struct SensorInfo {
|
||||
*/
|
||||
int32_t minDelay;
|
||||
|
||||
/* number of events reserved for this sensor in the batch mode FIFO.
|
||||
/**
|
||||
* number of events reserved for this sensor in the batch mode FIFO.
|
||||
* If there is a dedicated FIFO for this sensor, then this is the
|
||||
* size of this FIFO. If the FIFO is shared with other sensors,
|
||||
* this is the size reserved for that sensor and it can be zero.
|
||||
*/
|
||||
uint32_t fifoReservedEventCount;
|
||||
|
||||
/* maximum number of events of this sensor that could be batched.
|
||||
/**
|
||||
* maximum number of events of this sensor that could be batched.
|
||||
* This is especially relevant when the FIFO is shared between
|
||||
* several sensors; this value is then set to the size of that FIFO.
|
||||
*/
|
||||
uint32_t fifoMaxEventCount;
|
||||
|
||||
/* permission required to see this sensor, register to it and receive data.
|
||||
/**
|
||||
* permission required to see this sensor, register to it and receive data.
|
||||
* Set to "" if no permission is required. Some sensor types like the
|
||||
* heart rate monitor have a mandatory require_permission.
|
||||
* For sensors that always require a specific permission, like the heart
|
||||
@@ -883,7 +892,8 @@ struct SensorInfo {
|
||||
*/
|
||||
string requiredPermission;
|
||||
|
||||
/* This value is defined only for continuous mode and on-change sensors.
|
||||
/**
|
||||
* This value is defined only for continuous mode and on-change sensors.
|
||||
* It is the delay between two sensor events corresponding to the lowest
|
||||
* frequency that this sensor supports. When lower frequencies are requested
|
||||
* through batch()/setDelay() the events will be generated at this frequency
|
||||
@@ -901,7 +911,7 @@ struct SensorInfo {
|
||||
*/
|
||||
int32_t maxDelay;
|
||||
|
||||
/* Bitmask of SensorFlagBits */
|
||||
/** Bitmask of SensorFlagBits */
|
||||
bitfield<SensorFlagBits> flags;
|
||||
};
|
||||
|
||||
@@ -938,13 +948,14 @@ struct Uncal {
|
||||
};
|
||||
|
||||
struct HeartRate {
|
||||
/* Heart rate in beats per minute.
|
||||
/**
|
||||
* Heart rate in beats per minute.
|
||||
* Set to 0 when status is SensorStatus::UNRELIABLE or
|
||||
* SensorStatus::NO_CONTACT
|
||||
*/
|
||||
float bpm;
|
||||
|
||||
/* Status of the heart rate sensor for this reading. */
|
||||
/** Status of the heart rate sensor for this reading. */
|
||||
SensorStatus status;
|
||||
};
|
||||
|
||||
@@ -961,7 +972,8 @@ struct DynamicSensorInfo {
|
||||
bool connected;
|
||||
int32_t sensorHandle;
|
||||
|
||||
/* UUID of a dynamic sensor (using RFC 4122 byte order)
|
||||
/**
|
||||
* UUID of a dynamic sensor (using RFC 4122 byte order)
|
||||
* For UUID 12345678-90AB-CDEF-1122-334455667788 the uuid field is
|
||||
* initialized as:
|
||||
* {0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x11, ...}
|
||||
@@ -971,53 +983,60 @@ struct DynamicSensorInfo {
|
||||
|
||||
@export(name="additional_info_type_t")
|
||||
enum AdditionalInfoType : uint32_t {
|
||||
/* Marks the beginning of additional information frames */
|
||||
/** Marks the beginning of additional information frames */
|
||||
AINFO_BEGIN = 0,
|
||||
|
||||
/* Marks the end of additional information frames */
|
||||
/** Marks the end of additional information frames */
|
||||
AINFO_END = 1,
|
||||
|
||||
/* Estimation of the delay that is not tracked by sensor timestamps. This
|
||||
/**
|
||||
* Estimation of the delay that is not tracked by sensor timestamps. This
|
||||
* includes delay introduced by sensor front-end filtering, data transport,
|
||||
* etc.
|
||||
* float[2]: delay in seconds, standard deviation of estimated value
|
||||
*/
|
||||
AINFO_UNTRACKED_DELAY = 0x10000,
|
||||
|
||||
/* float: Celsius temperature */
|
||||
/** float: Celsius temperature */
|
||||
AINFO_INTERNAL_TEMPERATURE,
|
||||
|
||||
/* First three rows of a homogeneous matrix, which represents calibration to
|
||||
/**
|
||||
* First three rows of a homogeneous matrix, which represents calibration to
|
||||
* a three-element vector raw sensor reading.
|
||||
* float[12]: 3x4 matrix in row major order
|
||||
*/
|
||||
AINFO_VEC3_CALIBRATION,
|
||||
|
||||
/* Location and orientation of sensor element in the device frame: origin is
|
||||
/**
|
||||
* Location and orientation of sensor element in the device frame: origin is
|
||||
* the geometric center of the mobile device screen surface; the axis
|
||||
* definition corresponds to Android sensor definitions.
|
||||
* float[12]: 3x4 matrix in row major order
|
||||
*/
|
||||
AINFO_SENSOR_PLACEMENT,
|
||||
|
||||
/* float[2]: raw sample period in seconds,
|
||||
/**
|
||||
* float[2]: raw sample period in seconds,
|
||||
* standard deviation of sampling period
|
||||
*/
|
||||
AINFO_SAMPLING,
|
||||
|
||||
// Sampling channel modeling information section
|
||||
|
||||
/* int32_t: noise type
|
||||
/**
|
||||
* int32_t: noise type
|
||||
* float[n]: parameters
|
||||
*/
|
||||
AINFO_CHANNEL_NOISE = 0x20000,
|
||||
|
||||
/* float[3]: sample period, standard deviation of sample period,
|
||||
/**
|
||||
* float[3]: sample period, standard deviation of sample period,
|
||||
* quantization unit
|
||||
*/
|
||||
AINFO_CHANNEL_SAMPLER,
|
||||
|
||||
/* Represents a filter:
|
||||
/**
|
||||
* Represents a filter:
|
||||
* \sum_j a_j y[n-j] == \sum_i b_i x[n-i]
|
||||
*
|
||||
* int32_t[3]: number of feedforward coeffients M,
|
||||
@@ -1031,48 +1050,56 @@ enum AdditionalInfoType : uint32_t {
|
||||
*/
|
||||
AINFO_CHANNEL_FILTER,
|
||||
|
||||
/* int32_t[2]: size in (row, column) ... 1st frame
|
||||
/**
|
||||
* int32_t[2]: size in (row, column) ... 1st frame
|
||||
* float[n]: matrix element values in row major order.
|
||||
*/
|
||||
AINFO_CHANNEL_LINEAR_TRANSFORM,
|
||||
|
||||
/* int32_t[2]: extrapolate method, interpolate method
|
||||
/**
|
||||
* int32_t[2]: extrapolate method, interpolate method
|
||||
* float[n]: mapping key points in pairs, (in, out)...
|
||||
* (may be used to model saturation).
|
||||
*/
|
||||
AINFO_CHANNEL_NONLINEAR_MAP,
|
||||
|
||||
/* int32_t: resample method (0-th order, 1st order...)
|
||||
/**
|
||||
* int32_t: resample method (0-th order, 1st order...)
|
||||
* float[1]: resample ratio (upsampling if < 1.0, downsampling if > 1.0).
|
||||
*/
|
||||
AINFO_CHANNEL_RESAMPLER,
|
||||
|
||||
/* Operation environment parameters section
|
||||
/**
|
||||
* Operation environment parameters section
|
||||
* Types in the following section is sent down (instead of reported from)
|
||||
* device as additional information to aid sensor operation. Data is sent
|
||||
* via injectSensorData() function to sensor handle -1 denoting all sensors
|
||||
* in device.
|
||||
*/
|
||||
|
||||
/* Local geomagnetic field information based on device geo location. This
|
||||
/**
|
||||
* Local geomagnetic field information based on device geo location. This
|
||||
* type is primarily for for magnetic field calibration and rotation vector
|
||||
* sensor fusion.
|
||||
* float[3]: strength (uT), declination and inclination angle (rad).
|
||||
*/
|
||||
AINFO_LOCAL_GEOMAGNETIC_FIELD = 0x30000,
|
||||
|
||||
/* Local gravitational acceleration strength at device geo location.
|
||||
/**
|
||||
* Local gravitational acceleration strength at device geo location.
|
||||
* float: gravitational acceleration norm in m/s^2.
|
||||
*/
|
||||
AINFO_LOCAL_GRAVITY,
|
||||
|
||||
/* Device dock state.
|
||||
/**
|
||||
* Device dock state.
|
||||
* int32_t: dock state following Android API Intent.EXTRA_DOCK_STATE
|
||||
* definition, undefined value is ignored.
|
||||
*/
|
||||
AINFO_DOCK_STATE,
|
||||
|
||||
/* High performance mode hint. Device is able to use up more power and take
|
||||
/**
|
||||
* High performance mode hint. Device is able to use up more power and take
|
||||
* more reources to improve throughput and latency in high performance mode.
|
||||
* One possible use case is virtual reality, when sensor latency need to be
|
||||
* carefully controlled.
|
||||
@@ -1081,7 +1108,8 @@ enum AdditionalInfoType : uint32_t {
|
||||
*/
|
||||
AINFO_HIGH_PERFORMANCE_MODE,
|
||||
|
||||
/* Magnetic field calibration hint. Device is notified when manually
|
||||
/**
|
||||
* Magnetic field calibration hint. Device is notified when manually
|
||||
* triggered magnetic field calibration procedure is started or stopped. The
|
||||
* calibration procedure is assumed timed out after 1 minute from start,
|
||||
* even if an explicit stop is not received.
|
||||
@@ -1090,18 +1118,18 @@ enum AdditionalInfoType : uint32_t {
|
||||
*/
|
||||
AINFO_MAGNETIC_FIELD_CALIBRATION,
|
||||
|
||||
/* Custom information */
|
||||
/** Custom information */
|
||||
AINFO_CUSTOM_START = 0x10000000,
|
||||
|
||||
/* Debugging */
|
||||
/** Debugging */
|
||||
AINFO_DEBUGGING_START = 0x40000000,
|
||||
};
|
||||
|
||||
struct AdditionalInfo {
|
||||
/* type of payload data, see AdditionalInfoType */
|
||||
/** type of payload data, see AdditionalInfoType */
|
||||
AdditionalInfoType type;
|
||||
|
||||
/* sequence number of this frame for this type */
|
||||
/** sequence number of this frame for this type */
|
||||
int32_t serial;
|
||||
|
||||
union Payload {
|
||||
@@ -1121,27 +1149,31 @@ struct AdditionalInfo {
|
||||
* relative humidity in percent
|
||||
*/
|
||||
union EventPayload {
|
||||
/* SensorType::ACCELEROMETER, SensorType::MAGNETIC_FIELD,
|
||||
/**
|
||||
* SensorType::ACCELEROMETER, SensorType::MAGNETIC_FIELD,
|
||||
* SensorType::ORIENTATION, SensorType::GYROSCOPE, SensorType::GRAVITY,
|
||||
* SensorType::LINEAR_ACCELERATION
|
||||
*/
|
||||
Vec3 vec3;
|
||||
|
||||
/* SensorType::ROTATION_VECTOR, SensorType::GAME_ROTATION_VECTOR,
|
||||
/**
|
||||
* SensorType::ROTATION_VECTOR, SensorType::GAME_ROTATION_VECTOR,
|
||||
* SensorType::GEOMAGNETIC_ROTATION_VECTOR
|
||||
*/
|
||||
Vec4 vec4;
|
||||
|
||||
/* SensorType::MAGNETIC_FIELD_UNCALIBRATED,
|
||||
/**
|
||||
* SensorType::MAGNETIC_FIELD_UNCALIBRATED,
|
||||
* SensorType::GYROSCOPE_UNCALIBRATED
|
||||
* SensorType::ACCELEROMETER_UNCALIBRATED
|
||||
*/
|
||||
Uncal uncal;
|
||||
|
||||
/* SensorType::META_DATA */
|
||||
/** SensorType::META_DATA */
|
||||
MetaData meta;
|
||||
|
||||
/* SensorType::DEVICE_ORIENTATION, SensorType::LIGHT, SensorType::PRESSURE,
|
||||
/**
|
||||
* SensorType::DEVICE_ORIENTATION, SensorType::LIGHT, SensorType::PRESSURE,
|
||||
* SensorType::TEMPERATURE, SensorType::PROXIMITY,
|
||||
* SensorType::RELATIVE_HUMIDITY, SensorType::AMBIENT_TEMPERATURE,
|
||||
* SensorType::SIGNIFICANT_MOTION, SensorType::STEP_DETECTOR,
|
||||
@@ -1153,35 +1185,35 @@ union EventPayload {
|
||||
*/
|
||||
float scalar;
|
||||
|
||||
/* SensorType::STEP_COUNTER */
|
||||
/** SensorType::STEP_COUNTER */
|
||||
uint64_t stepCount;
|
||||
|
||||
/* SensorType::HEART_RATE */
|
||||
/** SensorType::HEART_RATE */
|
||||
HeartRate heartRate;
|
||||
|
||||
/* SensorType::POSE_6DOF */
|
||||
/** SensorType::POSE_6DOF */
|
||||
float[15] pose6DOF;
|
||||
|
||||
/* SensorType::DYNAMIC_SENSOR_META */
|
||||
/** SensorType::DYNAMIC_SENSOR_META */
|
||||
DynamicSensorInfo dynamic;
|
||||
|
||||
/* SensorType::ADDITIONAL_INFO */
|
||||
/** SensorType::ADDITIONAL_INFO */
|
||||
AdditionalInfo additional;
|
||||
|
||||
/* undefined/custom sensor type >= SensorType::DEVICE_PRIVATE_BASE */
|
||||
/** undefined/custom sensor type >= SensorType::DEVICE_PRIVATE_BASE */
|
||||
float[16] data;
|
||||
};
|
||||
|
||||
struct Event {
|
||||
/* Time measured in nanoseconds, in "elapsedRealtimeNano()'s" timebase. */
|
||||
/** Time measured in nanoseconds, in "elapsedRealtimeNano()'s" timebase. */
|
||||
int64_t timestamp;
|
||||
|
||||
/* sensor identifier */
|
||||
/** sensor identifier */
|
||||
int32_t sensorHandle;
|
||||
|
||||
SensorType sensorType;
|
||||
|
||||
/* Union discriminated on sensorType */
|
||||
/** Union discriminated on sensorType */
|
||||
EventPayload u;
|
||||
};
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.hardware.thermal@1.0;
|
||||
|
||||
interface IThermal {
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves temperatures in Celsius.
|
||||
*
|
||||
* @return status Status of the operation. If status code is FAILURE,
|
||||
@@ -38,7 +38,7 @@ interface IThermal {
|
||||
getTemperatures()
|
||||
generates (ThermalStatus status, vec<Temperature> temperatures);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves CPU usage information of each core: active and total times
|
||||
* in ms since first boot.
|
||||
*
|
||||
@@ -55,7 +55,7 @@ interface IThermal {
|
||||
@exit
|
||||
getCpuUsages() generates (ThermalStatus status, vec<CpuUsage> cpuUsages);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Retrieves the cooling devices information.
|
||||
*
|
||||
* @return status Status of the operation. If status code is FAILURE,
|
||||
|
||||
@@ -18,11 +18,11 @@ package android.hardware.tv.cec@1.0;
|
||||
|
||||
import IHdmiCecCallback;
|
||||
|
||||
/*
|
||||
/**
|
||||
* HDMI-CEC HAL interface definition.
|
||||
*/
|
||||
interface IHdmiCec {
|
||||
/*
|
||||
/**
|
||||
* Passes the logical address that must be used in this system.
|
||||
*
|
||||
* HAL must use it to configure the hardware so that the CEC commands
|
||||
@@ -39,7 +39,7 @@ interface IHdmiCec {
|
||||
@callflow(next={"*"})
|
||||
addLogicalAddress(CecLogicalAddress addr) generates (Result result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Clears all the logical addresses.
|
||||
*
|
||||
* It is used when the system doesn't need to process CEC command any more,
|
||||
@@ -50,7 +50,7 @@ interface IHdmiCec {
|
||||
@exit
|
||||
clearLogicalAddress();
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the CEC physical address.
|
||||
*
|
||||
* The physical address depends on the topology of the network formed by
|
||||
@@ -66,7 +66,7 @@ interface IHdmiCec {
|
||||
@callflow(next="*")
|
||||
getPhysicalAddress() generates (Result result, uint16_t addr);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Transmits HDMI-CEC message to other HDMI device.
|
||||
*
|
||||
* The method must be designed to return in a certain amount of time and not
|
||||
@@ -84,7 +84,7 @@ interface IHdmiCec {
|
||||
@callflow(next="*")
|
||||
sendMessage(CecMessage message) generates (SendMessageResult result);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets a callback that HDMI-CEC HAL must later use for incoming CEC
|
||||
* messages or internal HDMI events.
|
||||
*
|
||||
@@ -95,7 +95,7 @@ interface IHdmiCec {
|
||||
@entry
|
||||
setCallback(IHdmiCecCallback callback);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns the CEC version supported by underlying hardware.
|
||||
*
|
||||
* @return version the CEC version supported by underlying hardware.
|
||||
@@ -103,7 +103,7 @@ interface IHdmiCec {
|
||||
@callflow(next={"*"})
|
||||
getCecVersion() generates (int32_t version);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the identifier of the vendor.
|
||||
*
|
||||
* @return vendorId Identifier of the vendor that is the 24-bit unique
|
||||
@@ -113,7 +113,7 @@ interface IHdmiCec {
|
||||
@callflow(next={"*"})
|
||||
getVendorId() generates (uint32_t vendorId);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the hdmi port information of underlying hardware.
|
||||
*
|
||||
* @return infos The list of HDMI port information
|
||||
@@ -121,7 +121,7 @@ interface IHdmiCec {
|
||||
@callflow(next={"*"})
|
||||
getPortInfo() generates (vec<HdmiPortInfo> infos);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Sets flags controlling the way HDMI-CEC service works down to HAL
|
||||
* implementation. Those flags must be used in case the feature needs update
|
||||
* in HAL itself, firmware or microcontroller.
|
||||
@@ -132,7 +132,7 @@ interface IHdmiCec {
|
||||
@callflow(next="*")
|
||||
setOption(OptionKey key, bool value);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Passes the updated language information of Android system. Contains
|
||||
* three-letter code as defined in ISO/FDIS 639-2. Must be used for HAL to
|
||||
* respond to <Get Menu Language> while in standby mode.
|
||||
@@ -143,7 +143,7 @@ interface IHdmiCec {
|
||||
@callflow(next="*")
|
||||
setLanguage(string language);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Configures ARC circuit in the hardware logic to start or stop the
|
||||
* feature.
|
||||
*
|
||||
@@ -154,7 +154,7 @@ interface IHdmiCec {
|
||||
@callflow(next="*")
|
||||
enableAudioReturnChannel(int32_t portId, bool enable);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets the connection status of the specified port.
|
||||
*
|
||||
* @param portId Port id to be inspected for the connection status.
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
package android.hardware.tv.cec@1.0;
|
||||
|
||||
interface IHdmiCecCallback {
|
||||
/*
|
||||
/**
|
||||
* The callback function that must be called by HAL implementation to notify
|
||||
* the system of new CEC message arrival.
|
||||
*/
|
||||
oneway onCecMessage(CecMessage message);
|
||||
|
||||
/*
|
||||
/**
|
||||
* The callback function that must be called by HAL implementation to notify
|
||||
* the system of new hotplug event.
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,7 @@ enum CecLogicalAddress : int32_t {
|
||||
BROADCAST = 15, // as Destination address
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* HDMI CEC message types. The assigned values represent opcode used in CEC
|
||||
* frame as specified in CEC Table 8-26 of the CEC Spec 1.4b.
|
||||
*/
|
||||
@@ -123,7 +123,7 @@ enum CecMessageType : int32_t {
|
||||
ABORT = 0xFF,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Operand description [Abort Reason]
|
||||
*/
|
||||
enum AbortReason : int32_t {
|
||||
@@ -144,7 +144,7 @@ enum Result : int32_t {
|
||||
FAILURE_BUSY = 5,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* error code used for send_message.
|
||||
*/
|
||||
enum SendMessageResult : int32_t {
|
||||
@@ -154,7 +154,7 @@ enum SendMessageResult : int32_t {
|
||||
FAIL = 3,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* HDMI port type.
|
||||
*/
|
||||
enum HdmiPortType : int32_t {
|
||||
@@ -162,24 +162,27 @@ enum HdmiPortType : int32_t {
|
||||
OUTPUT = 1,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Options used for IHdmiCec.setOption()
|
||||
*/
|
||||
enum OptionKey : int32_t {
|
||||
/* When set to false, HAL does not wake up the system upon receiving <Image
|
||||
/**
|
||||
* When set to false, HAL does not wake up the system upon receiving <Image
|
||||
* View On> or <Text View On>. Used when user changes the TV settings to
|
||||
* disable the auto TV on functionality.
|
||||
* True by default.
|
||||
*/
|
||||
WAKEUP = 1,
|
||||
|
||||
/* When set to false, all the CEC commands are discarded. Used when user
|
||||
/**
|
||||
* When set to false, all the CEC commands are discarded. Used when user
|
||||
* changes the TV settings to disable CEC functionality.
|
||||
* True by default.
|
||||
*/
|
||||
ENABLE_CEC = 2,
|
||||
|
||||
/* Setting this flag to false means Android system must stop handling CEC
|
||||
/**
|
||||
* Setting this flag to false means Android system must stop handling CEC
|
||||
* service and yield the control over to the microprocessor that is powered
|
||||
* on through the standby mode. When set to true, the system must gain the
|
||||
* control over, hence telling the microprocessor to stop handling the CEC
|
||||
@@ -190,17 +193,18 @@ enum OptionKey : int32_t {
|
||||
*/
|
||||
SYSTEM_CEC_CONTROL = 3,
|
||||
|
||||
/* Option 4 not used */
|
||||
/** Option 4 not used */
|
||||
};
|
||||
|
||||
struct CecMessage {
|
||||
/* logical address of sender */
|
||||
/** logical address of sender */
|
||||
CecLogicalAddress initiator;
|
||||
|
||||
/* logical address of receiver */
|
||||
/** logical address of receiver */
|
||||
CecLogicalAddress destination;
|
||||
|
||||
/* The maximum size of body is 15 (MaxLength::MESSAGE_BODY) as specified in
|
||||
/**
|
||||
* The maximum size of body is 15 (MaxLength::MESSAGE_BODY) as specified in
|
||||
* the section 6 of the CEC Spec 1.4b. Overflowed data must be ignored. */
|
||||
vec<uint8_t> body;
|
||||
};
|
||||
@@ -210,7 +214,7 @@ struct HotplugEvent {
|
||||
uint32_t portId;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* HDMI port descriptor
|
||||
*/
|
||||
struct HdmiPortInfo {
|
||||
|
||||
@@ -19,7 +19,7 @@ package android.hardware.tv.input@1.0;
|
||||
import ITvInputCallback;
|
||||
|
||||
interface ITvInput {
|
||||
/*
|
||||
/**
|
||||
* Sets a callback for events.
|
||||
*
|
||||
* Note that initially no device is available in the client side, so the
|
||||
@@ -33,7 +33,7 @@ interface ITvInput {
|
||||
@callflow(next={"getStreamConfigurations"})
|
||||
setCallback(ITvInputCallback callback);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Gets stream configurations for a specific device.
|
||||
*
|
||||
* The configs object is valid only until the next
|
||||
@@ -48,7 +48,7 @@ interface ITvInput {
|
||||
getStreamConfigurations(int32_t deviceId)
|
||||
generates (Result result, vec<TvStreamConfig> configurations);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Opens a specific stream in a device.
|
||||
*
|
||||
* @param deviceId Device ID for the steam to open.
|
||||
@@ -65,7 +65,7 @@ interface ITvInput {
|
||||
openStream(int32_t deviceId, int32_t streamId)
|
||||
generates (Result result, handle sidebandStream);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Closes a specific stream in a device.
|
||||
*
|
||||
* @param deviceId Device ID for the steam to open.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package android.hardware.tv.input@1.0;
|
||||
|
||||
interface ITvInputCallback {
|
||||
/*
|
||||
/**
|
||||
* Notifies the client that an event has occured. For possible event types,
|
||||
* check TvInputEventType.
|
||||
*
|
||||
|
||||
@@ -26,7 +26,7 @@ enum Result : int32_t {
|
||||
INVALID_STATE,
|
||||
};
|
||||
|
||||
/* Type of physical TV input. */
|
||||
/** Type of physical TV input. */
|
||||
@export(name="", value_prefix="TV_INPUT_TYPE_")
|
||||
enum TvInputType : int32_t {
|
||||
OTHER = 1, // Generic hardware.
|
||||
@@ -41,7 +41,7 @@ enum TvInputType : int32_t {
|
||||
DISPLAY_PORT = 10,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Status of cable connection.
|
||||
* This status is for devices having availability to detect the cable in a mechanical way,
|
||||
* regardless of whether the connected external device is electrically on or not.
|
||||
@@ -67,7 +67,7 @@ struct TvInputDeviceInfo {
|
||||
|
||||
@export(name="", value_prefix="EVENT_")
|
||||
enum TvInputEventType : int32_t {
|
||||
/*
|
||||
/**
|
||||
* Hardware notifies the framework that a device is available.
|
||||
*
|
||||
* Note that DEVICE_AVAILABLE and DEVICE_UNAVAILABLE events do not represent
|
||||
@@ -89,7 +89,7 @@ enum TvInputEventType : int32_t {
|
||||
*/
|
||||
DEVICE_AVAILABLE = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Hardware notifies the framework that a device is unavailable.
|
||||
*
|
||||
* HAL implementation must generate this event when a device registered
|
||||
@@ -104,7 +104,7 @@ enum TvInputEventType : int32_t {
|
||||
*/
|
||||
DEVICE_UNAVAILABLE = 2,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Stream configurations are changed. Client must regard all open streams
|
||||
* at the specific device are closed, and must call
|
||||
* getStreamConfigurations() again, opening some of them if necessary.
|
||||
@@ -126,7 +126,7 @@ enum TvInputEventType : int32_t {
|
||||
|
||||
struct TvInputEvent {
|
||||
TvInputEventType type;
|
||||
/*
|
||||
/**
|
||||
* DEVICE_AVAILABLE: all fields are relevant.
|
||||
* DEVICE_UNAVAILABLE: only deviceId is relevant.
|
||||
* STREAM_CONFIGURATIONS_CHANGED: only deviceId is relevant.
|
||||
|
||||
@@ -19,7 +19,7 @@ package android.hardware.usb@1.0;
|
||||
import IUsbCallback;
|
||||
|
||||
interface IUsb {
|
||||
/*
|
||||
/**
|
||||
* This function is used to change the port role of a specific port.
|
||||
* For example, when PD_SWAP or PR_SWAP is supported.
|
||||
* This is function is asynchronous. The status of the role switch
|
||||
@@ -31,7 +31,7 @@ interface IUsb {
|
||||
*/
|
||||
oneway switchRole(string portName, PortRole role);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This function is used to register a callback function which is
|
||||
* called by the HAL whenever there is a change in the port state.
|
||||
* i.e. DATA_ROLE, POWER_ROLE or MODE.
|
||||
@@ -44,7 +44,7 @@ interface IUsb {
|
||||
*/
|
||||
oneway setCallback(IUsbCallback callback);
|
||||
|
||||
/*
|
||||
/**
|
||||
* This functions is used to request the hal for the current status
|
||||
* status of the Type-C ports. This method is async/oneway. The result of the
|
||||
* query would be sent through the IUsbCallback object's notifyRoleSwitchStatus
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
package android.hardware.usb@1.0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Callback object used for all the IUsb async methods which expects a result.
|
||||
* Caller is expected to register the callback object using setCallback method
|
||||
* to receive updates on the PortStatus.
|
||||
*/
|
||||
interface IUsbCallback {
|
||||
/*
|
||||
/**
|
||||
* Used to convey the current port status to the caller.
|
||||
* Called either when PortState changes due to the port partner (or)
|
||||
* when caller requested for the PortStatus update through queryPortStatus.
|
||||
@@ -34,7 +34,7 @@ interface IUsbCallback {
|
||||
*/
|
||||
oneway notifyPortStatusChange(vec<PortStatus> currentPortStatus, Status retval);
|
||||
|
||||
/*
|
||||
/**
|
||||
* Used to notify the result of the switchRole call to the caller.
|
||||
*
|
||||
* @param portName name of the port for which the roleswap is requested.
|
||||
|
||||
@@ -19,42 +19,42 @@ package android.hardware.usb@1.0;
|
||||
enum Status : uint32_t {
|
||||
SUCCESS = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* error value when the HAL operation fails for reasons not listed here.
|
||||
*/
|
||||
ERROR = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* error value returned when input argument is invalid.
|
||||
*/
|
||||
INVALID_ARGUMENT = 2,
|
||||
|
||||
/*
|
||||
/**
|
||||
* error value returned when role string is unrecognized.
|
||||
*/
|
||||
UNRECOGNIZED_ROLE = 3,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Denotes the Port role type.
|
||||
* Passed as an argument for functions used to query or change port roles.
|
||||
*/
|
||||
enum PortRoleType : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* Denotes the data role of the port.
|
||||
* The port can either be a "host" or a "device" for data.
|
||||
* This maps to the PortDataRole enum.
|
||||
*/
|
||||
DATA_ROLE = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Denotes the power role of the port.
|
||||
* The port can either be a "source" or "sink" for power.
|
||||
* This maps to PortPowerRole enum.
|
||||
*/
|
||||
POWER_ROLE = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* USB ports can be a pure DFP port which can only act
|
||||
* as a host. A UFP port which can only act as a device.
|
||||
* Or a dual role ports which can either can as a host or
|
||||
@@ -65,19 +65,19 @@ enum PortRoleType : uint32_t {
|
||||
|
||||
@export
|
||||
enum PortDataRole : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* Indicates that the port does not have a data role.
|
||||
* In case of DRP, the current data role of the port is only resolved
|
||||
* when the type-c handshake happens.
|
||||
*/
|
||||
NONE = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Indicates that the port is acting as a host for data.
|
||||
*/
|
||||
HOST = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Indicated that the port is acting as a device for data.
|
||||
*/
|
||||
DEVICE = 2,
|
||||
@@ -87,19 +87,19 @@ enum PortDataRole : uint32_t {
|
||||
|
||||
@export
|
||||
enum PortPowerRole : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* Indicates that the port does not have a power role.
|
||||
* In case of DRP, the current power role of the port is only resolved
|
||||
* when the type-c handshake happens.
|
||||
*/
|
||||
NONE = 0,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Indicates that the port is supplying power to the other port.
|
||||
*/
|
||||
SOURCE = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Indicates that the port is sinking power from the other port.
|
||||
*/
|
||||
SINK = 2,
|
||||
@@ -109,23 +109,23 @@ enum PortPowerRole : uint32_t {
|
||||
|
||||
@export
|
||||
enum PortMode : uint32_t {
|
||||
/*
|
||||
/**
|
||||
* Indicates that the port does not have a mode.
|
||||
* In case of DRP, the current mode of the port is only resolved
|
||||
* when the type-c handshake happens.
|
||||
*/
|
||||
NONE = 0,
|
||||
/*
|
||||
/**
|
||||
* Indicates that port can only act as device for data and sink for power.
|
||||
*/
|
||||
UFP = 1,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Indicates the port can only act as host for data and source for power.
|
||||
*/
|
||||
DFP = 2,
|
||||
|
||||
/*
|
||||
/**
|
||||
* Indicates can either act as UFP or DFP at a given point of time.
|
||||
*/
|
||||
DRP = 3,
|
||||
@@ -133,17 +133,17 @@ enum PortMode : uint32_t {
|
||||
NUM_MODES = 4,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Used as a container to send port role information.
|
||||
*/
|
||||
struct PortRole {
|
||||
/*
|
||||
/**
|
||||
* Indicates the type of Port Role.
|
||||
* Maps to the PortRoleType enum.
|
||||
*/
|
||||
PortRoleType type;
|
||||
|
||||
/*
|
||||
/**
|
||||
* when type is HAL_USB_DATA_ROLE pass values from enum PortDataRole.
|
||||
* when type is HAL_USB_POWER_ROLE pass values from enum PortPowerRole.
|
||||
* when type is HAL_USB_MODE pass values from enum PortMode.
|
||||
@@ -151,40 +151,40 @@ struct PortRole {
|
||||
uint32_t role;
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* Used as the container to report data back to the caller.
|
||||
* Represents the current connection status of a single USB port.
|
||||
*/
|
||||
struct PortStatus {
|
||||
/*
|
||||
/**
|
||||
* Name of the port.
|
||||
* Used as the port's id by the caller.
|
||||
*/
|
||||
string portName;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Data role of the port.
|
||||
*/
|
||||
PortDataRole currentDataRole;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Power Role of thte port.
|
||||
*/
|
||||
PortPowerRole currentPowerRole;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Mode in which the port is connected.
|
||||
* Can be UFP or DFP.
|
||||
*/
|
||||
PortMode currentMode;
|
||||
|
||||
/*
|
||||
/**
|
||||
* True indicates that the port's mode can
|
||||
* be changed. False otherwise.
|
||||
*/
|
||||
bool canChangeMode;
|
||||
|
||||
/*
|
||||
/**
|
||||
* True indicates that the port's data role
|
||||
* can be changed. False otherwise.
|
||||
* For example, true if Type-C PD PD_SWAP
|
||||
@@ -192,7 +192,7 @@ struct PortStatus {
|
||||
*/
|
||||
bool canChangeDataRole;
|
||||
|
||||
/*
|
||||
/**
|
||||
* True indicates that the port's power role
|
||||
* can be changed. False otherwise.
|
||||
* For example, true if Type-C PD PR_SWAP
|
||||
@@ -200,7 +200,7 @@ struct PortStatus {
|
||||
*/
|
||||
bool canChangePowerRole;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Identifies the type of the local port.
|
||||
*
|
||||
* UFP - Indicates that port can only act as device for
|
||||
|
||||
Reference in New Issue
Block a user