Loading audio/5.0/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ hidl_interface { "android.hardware.audio.common@5.0", "android.hardware.audio.effect@5.0", "android.hidl.base@1.0", "android.hidl.safe_union@1.0", ], types: [ "AudioDrain", Loading @@ -28,8 +29,8 @@ hidl_interface { "AudioMicrophoneCoordinate", "AudioMicrophoneDirectionality", "AudioMicrophoneLocation", "DeviceAddress", "MessageQueueFlagBits", "MicrophoneDirection", "MicrophoneInfo", "MmapBufferFlag", "MmapBufferInfo", Loading audio/5.0/IDevice.hal +1 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ interface IDevice { * @param config stream configuration. * @param flags additional flags. * @param sinkMetadata Description of the audio that is suggested by the client. * May be used by implementations to configure hardware effects. * May be used by implementations to configure processing effects. * @return retval operation completion status. * @return inStream in case of success, created input stream. * @return suggestedConfig in case of invalid parameters, suggested config. Loading audio/5.0/IStreamIn.hal +23 −0 Original line number Diff line number Diff line Loading @@ -165,4 +165,27 @@ interface IStreamIn extends IStream { */ getActiveMicrophones() generates(Result retval, vec<MicrophoneInfo> microphones); /** * Specifies the logical microphone (for processing). * * Optional method * * @param Direction constant * @return retval OK if the call is successful, an error code otherwise. */ setMicrophoneDirection(MicrophoneDirection direction) generates(Result retval); /** * Specifies the zoom factor for the selected microphone (for processing). * * Optional method * * @param the desired field dimension of microphone capture. Range is from -1 (wide angle), * though 0 (no zoom) to 1 (maximum zoom). * * @return retval OK if the call is not successful, an error code otherwise. */ setMicrophoneFieldDimension(float zoom) generates(Result retval); }; audio/5.0/types.hal +26 −23 Original line number Diff line number Diff line Loading @@ -49,34 +49,11 @@ struct TimeSpec { uint64_t tvNSec; // nanoseconds }; /** * IEEE 802 MAC address. */ typedef uint8_t[6] MacAddress; struct ParameterValue { string key; string value; }; /** * Specifies a device in case when several devices of the same type * can be connected (e.g. BT A2DP, USB). */ struct DeviceAddress { AudioDevice device; // discriminator union Address { MacAddress mac; // used for BLUETOOTH_A2DP_* uint8_t[4] ipv4; // used for IP struct Alsa { int32_t card; int32_t device; } alsa; // used for USB_* } address; string busAddress; // used for BUS string rSubmixAddress; // used for REMOTE_SUBMIX }; enum MmapBufferFlag : uint32_t { NONE = 0x0, /** Loading Loading @@ -244,3 +221,29 @@ struct MicrophoneInfo { */ AudioMicrophoneCoordinate orientation; }; /** * Constants used by the HAL to determine how to select microphones and process those inputs in * order to optimize for capture in the specified direction. * * MicrophoneDirection Constants are defined in MicrophoneDirection.java. */ @export(name="audio_microphone_direction_t", value_prefix="MIC_DIRECTION_") enum MicrophoneDirection : int32_t { /** * Don't do any directionality processing of the activated microphone(s). */ UNSPECIFIED = 0, /** * Optimize capture for audio coming from the screen-side of the device. */ FRONT = 1, /** * Optimize capture for audio coming from the side of the device opposite the screen. */ BACK = 2, /** * Optimize capture for audio coming from an off-device microphone. */ EXTERNAL = 3, }; audio/effect/5.0/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ hidl_interface { interfaces: [ "android.hardware.audio.common@5.0", "android.hidl.base@1.0", "android.hidl.safe_union@1.0", ], types: [ "AudioBuffer", Loading Loading
audio/5.0/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ hidl_interface { "android.hardware.audio.common@5.0", "android.hardware.audio.effect@5.0", "android.hidl.base@1.0", "android.hidl.safe_union@1.0", ], types: [ "AudioDrain", Loading @@ -28,8 +29,8 @@ hidl_interface { "AudioMicrophoneCoordinate", "AudioMicrophoneDirectionality", "AudioMicrophoneLocation", "DeviceAddress", "MessageQueueFlagBits", "MicrophoneDirection", "MicrophoneInfo", "MmapBufferFlag", "MmapBufferInfo", Loading
audio/5.0/IDevice.hal +1 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ interface IDevice { * @param config stream configuration. * @param flags additional flags. * @param sinkMetadata Description of the audio that is suggested by the client. * May be used by implementations to configure hardware effects. * May be used by implementations to configure processing effects. * @return retval operation completion status. * @return inStream in case of success, created input stream. * @return suggestedConfig in case of invalid parameters, suggested config. Loading
audio/5.0/IStreamIn.hal +23 −0 Original line number Diff line number Diff line Loading @@ -165,4 +165,27 @@ interface IStreamIn extends IStream { */ getActiveMicrophones() generates(Result retval, vec<MicrophoneInfo> microphones); /** * Specifies the logical microphone (for processing). * * Optional method * * @param Direction constant * @return retval OK if the call is successful, an error code otherwise. */ setMicrophoneDirection(MicrophoneDirection direction) generates(Result retval); /** * Specifies the zoom factor for the selected microphone (for processing). * * Optional method * * @param the desired field dimension of microphone capture. Range is from -1 (wide angle), * though 0 (no zoom) to 1 (maximum zoom). * * @return retval OK if the call is not successful, an error code otherwise. */ setMicrophoneFieldDimension(float zoom) generates(Result retval); };
audio/5.0/types.hal +26 −23 Original line number Diff line number Diff line Loading @@ -49,34 +49,11 @@ struct TimeSpec { uint64_t tvNSec; // nanoseconds }; /** * IEEE 802 MAC address. */ typedef uint8_t[6] MacAddress; struct ParameterValue { string key; string value; }; /** * Specifies a device in case when several devices of the same type * can be connected (e.g. BT A2DP, USB). */ struct DeviceAddress { AudioDevice device; // discriminator union Address { MacAddress mac; // used for BLUETOOTH_A2DP_* uint8_t[4] ipv4; // used for IP struct Alsa { int32_t card; int32_t device; } alsa; // used for USB_* } address; string busAddress; // used for BUS string rSubmixAddress; // used for REMOTE_SUBMIX }; enum MmapBufferFlag : uint32_t { NONE = 0x0, /** Loading Loading @@ -244,3 +221,29 @@ struct MicrophoneInfo { */ AudioMicrophoneCoordinate orientation; }; /** * Constants used by the HAL to determine how to select microphones and process those inputs in * order to optimize for capture in the specified direction. * * MicrophoneDirection Constants are defined in MicrophoneDirection.java. */ @export(name="audio_microphone_direction_t", value_prefix="MIC_DIRECTION_") enum MicrophoneDirection : int32_t { /** * Don't do any directionality processing of the activated microphone(s). */ UNSPECIFIED = 0, /** * Optimize capture for audio coming from the screen-side of the device. */ FRONT = 1, /** * Optimize capture for audio coming from the side of the device opposite the screen. */ BACK = 2, /** * Optimize capture for audio coming from an off-device microphone. */ EXTERNAL = 3, };
audio/effect/5.0/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ hidl_interface { interfaces: [ "android.hardware.audio.common@5.0", "android.hidl.base@1.0", "android.hidl.safe_union@1.0", ], types: [ "AudioBuffer", Loading