Loading audio/2.0/IDevice.hal +19 −19 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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 Loading @@ -52,7 +52,7 @@ interface IDevice { */ getMasterVolume() generates (Result retval, float volume); /* /** * Sets microphone muting state. * * @param mute whether microphone is muted. Loading @@ -60,7 +60,7 @@ interface IDevice { */ setMicMute(bool mute) generates (Result retval); /* /** * Gets whether microphone is muted. * * @return retval operation completion status. Loading @@ -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. * Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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...) Loading @@ -189,7 +189,7 @@ interface IDevice { getAudioPort(AudioPort port) generates (Result retval, AudioPort resultPort); /* /** * Set audio port configuration. * * @param config audio port configuration. Loading @@ -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. * Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading @@ -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. * Loading audio/2.0/IDevicesFactory.hal +1 −1 Original line number Diff line number Diff line Loading @@ -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. * Loading audio/2.0/IPrimaryDevice.hal +10 −10 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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. Loading @@ -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. Loading @@ -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. Loading @@ -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. * Loading @@ -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. * Loading @@ -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. * Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading audio/2.0/IStream.hal +27 −27 Original line number Diff line number Diff line Loading @@ -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. * Loading @@ -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. * Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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. * Loading @@ -120,7 +120,7 @@ interface IStream { */ setFormat(AudioFormat format) generates (Result retval); /* /** * Convenience method for retrieving several stream parameters in * one transaction. * Loading @@ -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 Loading @@ -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 Loading @@ -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. * Loading @@ -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 Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading @@ -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. Loading @@ -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. Loading audio/2.0/IStreamIn.hal +7 −7 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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. Loading @@ -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 { Loading @@ -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. */ Loading @@ -60,7 +60,7 @@ interface IStreamIn extends IStream { } params; }; /* /** * Data structure passed back to the client via status message queue * of 'read' operation. * Loading @@ -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: Loading Loading @@ -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. * Loading Loading
audio/2.0/IDevice.hal +19 −19 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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 Loading @@ -52,7 +52,7 @@ interface IDevice { */ getMasterVolume() generates (Result retval, float volume); /* /** * Sets microphone muting state. * * @param mute whether microphone is muted. Loading @@ -60,7 +60,7 @@ interface IDevice { */ setMicMute(bool mute) generates (Result retval); /* /** * Gets whether microphone is muted. * * @return retval operation completion status. Loading @@ -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. * Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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...) Loading @@ -189,7 +189,7 @@ interface IDevice { getAudioPort(AudioPort port) generates (Result retval, AudioPort resultPort); /* /** * Set audio port configuration. * * @param config audio port configuration. Loading @@ -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. * Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading @@ -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. * Loading
audio/2.0/IDevicesFactory.hal +1 −1 Original line number Diff line number Diff line Loading @@ -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. * Loading
audio/2.0/IPrimaryDevice.hal +10 −10 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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. Loading @@ -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. Loading @@ -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. Loading @@ -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. * Loading @@ -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. * Loading @@ -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. * Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading
audio/2.0/IStream.hal +27 −27 Original line number Diff line number Diff line Loading @@ -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. * Loading @@ -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. * Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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. * Loading @@ -120,7 +120,7 @@ interface IStream { */ setFormat(AudioFormat format) generates (Result retval); /* /** * Convenience method for retrieving several stream parameters in * one transaction. * Loading @@ -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 Loading @@ -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 Loading @@ -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. * Loading @@ -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 Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading @@ -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. * Loading @@ -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. Loading @@ -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. Loading @@ -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. Loading @@ -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. Loading
audio/2.0/IStreamIn.hal +7 −7 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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. Loading @@ -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 { Loading @@ -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. */ Loading @@ -60,7 +60,7 @@ interface IStreamIn extends IStream { } params; }; /* /** * Data structure passed back to the client via status message queue * of 'read' operation. * Loading @@ -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: Loading Loading @@ -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. * Loading