IStream.getCapturePosition becomes mandatory in
audio HAL V7. The legacy implementation must
provide it for the default HAL implementation.
Bug: 161253754
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: I2f2094f0499ba85f53f291e0a269211981b4c9d8
Upgrading legacy usb HAL to version 3.2 and implementing
get_audio_port_v7. The API get_audio_port_v7 returns the device
capabilites with supported formats and corresponding supported
channel masks and sample rates for the formats.
Bug: 160352965
Test: manually
Test: VTS with adding usb as attached devices.
Change-Id: I90a2b2706aa2b385210fb4922e4287f9f0ff9d6c
Upgrade device version of usb audio HAL to 3.0. With this change, the
framework will use createAudioPatch API for audio routing.
When opening a stream, the HAL will open alsa device with the given
device information. The HAL will cache the io handle to identify the
stream. Before starting audio playback/recording, create_audio_patch
API is called to set the correct devices. All the devices will be
cached as a list in stream_in/stream_out. The HAL will return a unique
patch handle which is used when updating/releasing the patch. When
patch is released, the patch handle will also be removed.
Bug: 160352965
Test: playback/record with usb device
Change-Id: Iba69c5cc82d1063af8ab050183d6a57b27083ee1
This is part of supporting multiple devices playback. Currently, the usb
audio module only supports single device. The limitation is that there
is only one alsa_device_profile/proxy cached. With supporting multiple
devices playback in audio framework, it makes sense to use list to cache
alsa_device_profile/proxy so that it is possible to route audio to
multiple USB devices simultaneously.
To keep the code symemetric, the device for capture is also cached as a
list. But there will only be one device for capture.
Test: play audio via USB
Bug: 160352965
Change-Id: Ibe7bbb7000d657381b317c19fda57e6c0edaa1df
This applies to the following types:
- audio_gain_mode_t;
- audio_flags_mask_t;
- audio_channel_representation_t;
- audio_channel_mask_t;
- audio_devices_t.
Enum types are distinct thus proper overloading on the type
is possible in C++. Also, assignments to enum types are
less prone to errors.
Bug: 169889714
Test: basic audio functionality
Change-Id: I8f1e6fa2bbad8900fdae66f01ac70c75953fd62c
Merged-In: I8f1e6fa2bbad8900fdae66f01ac70c75953fd62c
This applies to the following types:
- audio_gain_mode_t;
- audio_flags_mask_t;
- audio_channel_representation_t;
- audio_channel_mask_t;
- audio_devices_t.
Enum types are distinct thus proper overloading on the type
is possible in C++. Also, assignments to enum types are
less prone to errors.
Bug: 169889714
Test: basic audio functionality
Change-Id: I8f1e6fa2bbad8900fdae66f01ac70c75953fd62c
Code in adev_open_input_stream was deallocating
a structure but then using it again due to absence
of a 'return' statement.
Found by clang-tidy.
Bug: 152526318
Test: m
Change-Id: I9ec3148197715fb118e99503d2b52412a4fb2a73
Do not block in out_write() when the peer input is in standby to avoid
remaining stuck when writing to the blocking mono pipe.
Bug: 141878993
Test: atest AudioHostTest#testTwoChannelCapturing
Change-Id: Ie92d59529ac1018a6785c3ac31696dcccdbb204a
Merged-In: Ie92d59529ac1018a6785c3ac31696dcccdbb204a
Undeclared uint8 data types are used in exif_utils.cpp file and this
change corrects their types as uint8_t instead.
Bug: 140885470
Test: mm
Change-Id: I2e48a134c24cd3f17a7b6bafdc815200ca546826
Signed-off-by: Changyeon Jo <changyeon@google.com>
The new android-mainline kernel has increase the maximum number of
SW input codes to 33, so update the code to handle more than 32
values.
Test: Builds.
Change-Id: I344de37569c1d2c4ff94b8025a7339147ac9afe7
C++20 is stricter about member ordering in designated initializers than
C99.
Bug: 139945549
Test: mm
Change-Id: I045da46821280e720286a25a0c96b5750d1ad05e
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Fix the implementation to conform to VTS expectations.
out_get_next_write_timestamp must return "NOT_SUPPORTED" (-ENOSYS)
as it is not supported.
adev_get_input_buffer_size must return a non-zero
buffer size for supported formats, regardless of whether
there are any opened streams at the moment.
Bug: 141847510
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: I322bf8cf42415fddb028c9cd10db0ac82089ce85
Merged-In: I322bf8cf42415fddb028c9cd10db0ac82089ce85
Fix the implementation to conform to VTS expectations.
out_get_next_write_timestamp must return "NOT_SUPPORTED" (-ENOSYS)
as it is not supported.
adev_get_input_buffer_size must return a non-zero
buffer size for supported formats, regardless of whether
there are any opened streams at the moment.
Bug: 141847510
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: I322bf8cf42415fddb028c9cd10db0ac82089ce85
-Wimplicit-fallthrough was printing warnings for these, they look
like real errors. Fix them and re-enable the error.
Test: treehugger
Change-Id: I818e18a995760f17b85b4c72ee577e531fa2a601
Previously we were ignoring the requested image format when mapping a graphics
device via gralloc_alloc, and using the mode that the framebuffer started up
in. This meant that on devices whose framebuffer starts up in a mode other
than RGBA8888, we would map the framebuffer in the other mode and attempt to
use it as an RGBA8888 framebuffer, which would lead to crashes or incorrecet
rendering. This is the case in the ARM FVP, whose framebuffer starts up in
RGB565 mode.
Unfortunately there is no preferred image format passed in to fb_device_open,
and we presumably cannot start passing one in for backwards compatibility
reasons. Therefore, we set the image format to RGBA8888, which appears to
be the only format that the platform ends up using.
Bug: 142352330
Change-Id: I24000fd36910b4044ce7659605efc423e36cba00
Do not block in out_write() when the peer input is in standby to avoid
remaining stuck when writing to the blocking mono pipe.
Bug: 141878993
Test: atest AudioHostTest#testTwoChannelCapturing
Change-Id: Ie92d59529ac1018a6785c3ac31696dcccdbb204a
These are no longer used by EventHub, and should not be carried forward.
Bug: 116601048
Test: presubmit only
Merged-In: I35129484d9945dcd4d291e0f2fac894e07c53c04
Change-Id: I35129484d9945dcd4d291e0f2fac894e07c53c04
These are no longer used by EventHub, and should not be carried forward.
Bug: 116601048
Test: presubmit only
Change-Id: I35129484d9945dcd4d291e0f2fac894e07c53c04