* This directory still has many warnings to fix.
Bug: 66996870
Test: normal build
Exempt-From-Owner-Approval: quick fix for broken build
Change-Id: I7f3cef3016ba16cb7ddbe6721cf74c71c1cbf1a2
* Remove unused local variables.
* Remove or comment out unused static functions.
* Fix trivial bugs found by unused value warnings.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I99389b883c89551850180d25241a35a40bb77b26
This CL makes the hack(ag/3176281) in frameworks/av not needed no longer.
Bug: 69321320
Test: After reverting the hack in av, the camera sample app works.
Exempt-From-Owner-Approval: HAL is owned by Things team.
Change-Id: I510531bed401fe4fa6071fc151a1f75307a5decb
BGR32 mode is in RPi3's camera has a RB color swapping issue. This CL
makes to use stable RGB24 mode instead to avoid the problem without
causing any quality regression.
Bug: 69075512
Test: RB color swapping problem is gone on preview, recording and stil.
Exempt-From-Owner-Approval: HAL is owned by Things team.
Change-Id: I109363c0f68cec45f92e739a978f554e70032151
Camera capture should close acquire fence. If not, fd remains unused,
which consumes all available fd resources for a process (usually 1024).
Bug: 64214375
Test: Running camera preview of camera sample app for a long time
should not break preview image.
Exempt-From-Owner-Approval: This is a cherry-pick CL from oc-iot-dev.
Change-Id: I91d6d3a7b7a95ed5b33c7c73bc85d42f69f4c856
(cherry picked from commit da3c52413a7499a3cd91246b0634f839315ed7b7)
Both in_flight_lock_ lock in v4l2_camera.cpp and buffer_queue_lock_ in
v4l2_wrapper.cpp have problems that guards the buffer indices and in
flight buffer vector incorrectly. Those problem leads to mismatching in
terms of buffer size between the HAL and Camera3Device and eventually
the Camera3Device will stop to wait for buffers that HAL will not post
in the future.
Bug: 69076261
Test: Camera samples app doesn't stuck with FB impl.
Exempt-From-Owner-Approval: got +2 from the HAL maintainer.
Change-Id: I3d0a4361d46571fd144a5eb8bc160296a31d6358
This section of code uses PRODUCT_FULL_TREBLE, but
what PRODUCT_FULL_TREBLE means is too fuzzy, and
it is being broken up into multiple flags.
Also, this is an unnecessary restriction (HALs can
be implemented anyway people want).
Fixes: 67975863
Test: multiproduct_kati
Change-Id: I0de36d1ee23052c1fadcdf9a8b1ce85781dd88a0
Adds sensor direct report mode support to multihal. Limited
by hal API only the first HAL in configuration list can support
sensor direct report.
Sensor operation parameter support in multihal module is added in
this CL.
In treblized device multihal is enabled by default and implementation
is included in default implementation. Remove multihal shared lib
generation in device specified PRODUCT_FULL_TREBLE.
Test: warning message shows up on device that specified both
PRODUCT_FULL_TREBLE and USE_SENSOR_MULTI_HAL flags.
Test: cts test passes
Change-Id: I868e7c1ce727370b333f80bbfe737fb106f6d106
Merged-In: I868e7c1ce727370b333f80bbfe737fb106f6d106
* changes:
Build tv_input.default.vendor with BOARD_VNDK_VERSION
Build fingerprint.default with BOARD_VNDK_VERSION
Build power.default with BOARD_VNDK_VERSION
Build local_time.default with BOARD_VNDK_VERSION
Build nfc.default with BOARD_VNDK_VERSION
Build vr.default with BOARD_VNDK_VERSION
Build vibrator.default.vendor with BOARD_VNDK_VERSION
Build audio.usb.default with BOARD_VNDK_VERSION
Build vehicle.default with BOARD_VNDK_VERSION
Build audio.primary.default, audio.stub.default, audio_policy.stub with BOARD_VNDK_VERSION
Build radio.fm.default.vendor with BOARD_VNDK_VERSION
Build consumerir.default with BOARD_VNDK_VERSION
One must explicitly include what it need.
time.h for clock_gettime
float.h for FLT_MAX
string.h for memset
Bug: 37629934
Test: build
Change-Id: I1030a9c9ff3c2de4c5febabc3064d6976e9535cf
This HAL is using android/input.h which is not available to vendors.
Unmark this HAL back to platform lib so that the header is accessible.
Note that this does not block our effort of splitting system/vendor
builds since this HAL is not used in any Treble-enabled device.
Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j input.evdev.default
Change-Id: I4f900cb58802bccf8d06f995a4e52c3b450f4799
When the vndk is enabled (BOARD_VNDK_VERSION=current),
vendor libraries must only link against vendor variants
in the build system. This also means that they receive
restricted sets of headers and that automatic global
headers are restricted.
Test: BOARD_VNDK_VERSION=current m -j k hwcomposer.default
Bug: 37342627
Change-Id: I79d034b71cc69fabb53d1682339da71191a65e3c
When the vndk is enabled (BOARD_VNDK_VERSION=current),
vendor libraries must only link against vendor variants
in the build system. This means that they receive restricted
sets of headers and that automatic global headers are restricted.
Test: build audio_remote_submix with BOARD_VNDK_VERSION=current
Bug: 37342627
Change-Id: I1170443466df58fa7b66096241e881a38f8cf1ac
libhardware_headers is added since global include path is not provided
when building with BOARD_VNDK_VERSION
Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j thermal.default
Change-Id: Ieaa8be8033d13a24539e37e88f7cd858c03f5273
include headers missing headers from libstagefright_foundation and
libhardware.
Bug: 33241851
Test: cd hardware/libhardware/modules/sensors/ && mma -j64 -k
BOARD_VNDK_VERSION=current
Change-Id: Ie05de74207d7c31598d2cad55ea6b7b8acace0e4
There's below error which trigger FPE_INTDIV becuase tuner->config isn't
set in time.
CMD_TUNE is executed before CMD_CONFIG after being opened immediately
11:27:10.307 21151 21151 I radio_hw_stub: rdev_open_tuner rdev 0x7b36ea03e000
11:27:10.307 21151 21151 V radio_hw_stub: send_command_l 1 delay_ms 500
11:27:10.307 21151 21151 V radio_hw_stub: send_command_l CMD_CONFIG type 0
11:27:10.307 21151 21151 I radio_hw_stub: rdev_open_tuner DONE
11:27:10.307 21151 22015 I radio_hw_stub: callback_thread_loop
11:27:10.603 21151 22015 E radio_hw_stub: callback_thread_loop processing command 4 time 1321010830.603019830
11:27:10.604 21151 22015 F libc : Fatal signal 8 (SIGFPE), code 1, fault addr 0x7b36e704b5d6 in tid 22015 (sound trigger c)
11:27:10.632 22021 22021 F DEBUG : signal 8 (SIGFPE), code 1 (FPE_INTDIV), fault addr 0x7b36e704b5d6
There's no need to use seq lock to correct the sequence. Adjust the time
is the simple way to fix above error.
Change-Id: I1bd5535840fe990db1f6c355af85c93443d9de87
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Jerry Liu <primerlink@gmail.com>
Adds sensor direct report mode support to multihal. Limited
by hal API only the first HAL in configuration list can support
sensor direct report.
Sensor operation parameter support in multihal module is added in
this CL.
In treblized device multihal is enabled by default and implementation
is included in default implementation. Remove multihal shared lib
generation in device specified PRODUCT_FULL_TREBLE.
Test: warning message shows up on device that specified both
PRODUCT_FULL_TREBLE and USE_SENSOR_MULTI_HAL flags.
Test: cts test passes
Change-Id: I868e7c1ce727370b333f80bbfe737fb106f6d106
Move default multihal configuration file path to
/vendor/etc/sensors/hals.conf. Retained old definition but changed
varible name to mark it deprecated. get_so_paths() is modified
to search both new and old path for configuration file.
MULTI_HAL_CONFIG_FILE_PATH is only used by hidl default
implementation at this moment outside multihal module.
Bug: 35947802
Test: build ok, sensor works on 2017 devices
Change-Id: I443ff71fa194383646108c8eb0c5438d150a5886
Make sure that open_input_stream() reflects audio parameters
modifications done by proxy_prepare() and returns an error with
proposed parameters if needed.
Alos do not overwrite adev->device_sample_rate when opening an
input stream as this is driven by the output stream.
Bug: 37949012
Test: audio capture, playback and calls over USB headset.
Change-Id: I45fcd895b9a95e7673f2232b4a98c74be0548d0d
It requires all devices that set AUDIOSERVER_MULTILIB := 64, to specify
64-bit binary when installed (PRODUCT_PACKAGES += radio.fm.default:64).
Bug: 37512442
Bug: 37159108
Test: it builds
Change-Id: I9be897bb1794a12953fe77665596d00519aeac28
It requires all devices that set AUDIOSERVER_MULTILIB := 64, to specify
64-bit binary when installed (PRODUCT_PACKAGES += radio.fm.default:64).
Bug: 37512442
Bug: 37159108
Test: it builds
Change-Id: I9be897bb1794a12953fe77665596d00519aeac28
Fix an error in polling of inotify fd to avoid 100% CPU usage.
Refactored code to use android Looper.
Fix a string count accounting error that causes unpaired decStrong
crashing sensor hidl service.
Bug: 37719320
Bug: 37714835
Test: no longer have 100% CPU usage.
Test: tested connection of a few mouse/keyboard/usb disk/gnubby
no crash observed.
Test: cts still working properly after fix.
Change-Id: Ibaa026151e5e4919d8dd134c16f5865d5e30ef8a
Our custom UNUSED_ARGUMENT macro was redundant with the sys/defs.h
__unused macro, so it needed to be removed. But rather than
switch to __unused, we opt to switch this code to C++, so we can
comment out parameter names to silence compiler warnings about
unused arguments.
The switch to C++ requires casting the result of calloc. We
also change our function argument indentation per our C++
style rules while we're in here.
Test: Compiled and confirmed no compiler warnings.
Change-Id: Ibd0eef7787843597917c3e0e71bdd772f6e9e876
Implemented HID dynamic sensor using linux hidraw driver and
HidUtils. Support the following cases:
1) HID Sensor spec defined accelerometer, gyroscope, magnetometer
and orientation (quaternion).
2) Android defined type sensors (HID sensor custom type): ambient
temperature, barometer, light and heart rate sensor.
3) Android custom type sensor (based on HID sensor custom type).
Test: run tests/examples in test/
Test: test with a USB HID hardware (launchpad sensor) and marlin
Bug: 37482951
Bug: 31026607
Change-Id: I9d679fb34d15324a9df1cf19647ea638fd1a0e68
Test: works with BOARD_VNDK_VERSION := current
Bug: 33241851
(cherry picked from commit e7722d4e3f)
Merged-In: I145488dbf9b6e5257bee47920643c03c31eafbf4
Change-Id: I145488dbf9b6e5257bee47920643c03c31eafbf4
libcutils was not used
Test: links
Bug: 33241851
(cherry picked from commit d23bf8aabb)
Merged-In: Ic53e48b95461bb09b44df83952288a96ba9af65a
Change-Id: Ic53e48b95461bb09b44df83952288a96ba9af65a
An HID utility library for constructing HID based dynamic sensor.
Primary functionality is in HidParser.h, which parses HID
descriptor into useful data structures. Supporting classes and
structures can be used individually as well.
Test: run tests in HidUtils/test
Bug: 37482274
Change-Id: Icfb59414bb6a1e7b6cdd1078a1a83820e70bbef8
There's below error which trigger FPE_INTDIV becuase tuner->config isn't
set in time.
CMD_TUNE is executed before CMD_CONFIG after being opened immediately
11:27:10.307 21151 21151 I radio_hw_stub: rdev_open_tuner rdev 0x7b36ea03e000
11:27:10.307 21151 21151 V radio_hw_stub: send_command_l 1 delay_ms 500
11:27:10.307 21151 21151 V radio_hw_stub: send_command_l CMD_CONFIG type 0
11:27:10.307 21151 21151 I radio_hw_stub: rdev_open_tuner DONE
11:27:10.307 21151 22015 I radio_hw_stub: callback_thread_loop
11:27:10.603 21151 22015 E radio_hw_stub: callback_thread_loop processing command 4 time 1321010830.603019830
11:27:10.604 21151 22015 F libc : Fatal signal 8 (SIGFPE), code 1, fault addr 0x7b36e704b5d6 in tid 22015 (sound trigger c)
11:27:10.632 22021 22021 F DEBUG : signal 8 (SIGFPE), code 1 (FPE_INTDIV), fault addr 0x7b36e704b5d6
There's no need to use seq lock to correct the sequence. Adjust the time
is the simple way to fix above error.
Change-Id: I1bd5535840fe990db1f6c355af85c93443d9de87
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Jerry Liu <primerlink@gmail.com>
Only liblog things are being used but libcutils was being included.
Test: links
Merged-In: I50492f49cef449256cad49823a21166f0d089bac
Change-Id: I50492f49cef449256cad49823a21166f0d089bac
libcutils not needed as only functions from liblog are being used
Test: links
(cherry picked from commit 02b5d168f2)
Merged-In: I2a2cb58d883c0ec1e26a2f023865b137517da432
Change-Id: I2a2cb58d883c0ec1e26a2f023865b137517da432
Library to handle dynamic sensor connection. There are two way to use
this: as hal extension or standalone hal module.
In hal extension mode: add libdynamic_sensor_ext in dependency of hal,
instantiate DynamicSensorManager with appropriate parameters. Then
for all sensor requests, if the handle is owned by dynamic sensor
manager, forward the request.
In standalone mode, add sensor.dynamic_sensor_hal into device make
file. Usually, this also means multihal is necessary. Add
sensor.dynamic_sensor_hal into multihal configuration file.
A dummy sensor module is included for testing.
Test: tested with cts dynamics sensor related test and demo app.
also verified sensor basic operation with sensor logger.
Change-Id: I16612935fc21b06c173aca875401ece37c6bde01
ScopedFd is being deprecated.
Bug: 35856819
Test: Still builds on nyc-iot-dev, now builds on master too.
Change-Id: Ibf131cbac218d581beee17e70f83042289382f17
There's a problem with enabling the transient trigger in the HAL, that is
the trigger function exports tree properties - activate, state, and
duration which require to be chown'd to system:system during the init
process. Hence, the trigger will be now enabled in the init process and
the HAL will use the "activate" property to determine if the device has
vibrator support via ledtrig-transient.
Test: device vibrates with the driver supports ledtrig-transient
Change-Id: Ieb195ddc199c6372f5dcf3ca1b2be4fd59724717
Signed-off-by: David Lin <dtwlin@google.com>
Library to handle dynamic sensor connection. There are two way to use
this: as hal extension or standalone hal module.
In hal extension mode: add libdynamic_sensor_ext in dependency of hal,
instantiate DynamicSensorManager with appropriate parameters. Then
for all sensor requests, if the handle is owned by dynamic sensor
manager, forward the request.
In standalone mode, add sensor.dynamic_sensor_hal into device make
file. Usually, this also means multihal is necessary. Add
sensor.dynamic_sensor_hal into multihal configuration file.
This CL implements the dynamic sensor manager framework. Sensor daemon
will be added in follow up CL.
Test: test compile (functionality test done in a follow up CL)
Change-Id: I3b96ee135d8dbe3e199af01bed4b61637358803e
Libraries under /hardware/libhardware/modules should go to /vendor/.
These are conventionl HALs for default implementations, most of them
are not used.
Camera and thermal are already moved in other CLs.
Bug: 35907904
Test: Compiled and checked install path. Verified on Sailfish with
$ lsof | grep default.
Change-Id: Ibde574001c01cbfea014a20a0fbbb3265e6cdc8a
In order to build generic system image that is agnostic to SoC or
device, HALs should be moved from system partition to vendor
partition.
Bug: 34826389, 35743509
Test: build & run and check whether the HAL is loaded from
/vendor/lib[64]/hw.
$ su; lsof | grep thermal.
Change-Id: Ia2bb060590f31688528de4a3b9b9ab8fbd376b6c
Dropping support for Sensor HAL version 1.0.
Sensor HALs version 1.1 and 1.2 are already depracated.
This makes version 1.3 as the earliest supported version.
Test: Sensors CTS tests still pass.
Change-Id: I806ce1d0d9277cbb312d9f90749975420cef2109
Add get_multi_hal_module_info() to support using multi-hal
functionality within the HIDL sensor implementation.
Move externally relevant constants and prototypes to new multihal.h
file.
Add new Android.bp for Treble to build multi-hal into a static
library that is now included by the HIDL sensor implementation.
Bug: 32022308
Change-Id: I2b3afa9ff1e0a2e5a098e643dde99ec86bb88206
Due to gpu freezing on larger images.
BUG: http://b/33221285, http://b/33058456
TEST: ImageWriter cts tests no longer fail.
Change-Id: Ibc0fe4ec78181646074333c50ef6cd2b386ba3a4
Flush the device before disconnecting from it.
Hasn't caused identifiable bugs yet, but seems
dangerous and easy to fix.
TEST: builds & runs sample
Change-Id: Icaf27d4de5628087278b84bff586aab8e1e62e28
The partial_metadata_factory method to create V4L2 controls
incorrectly used V4L2_CTRL_TYPE_MENU - it assumed that all
values between min and max were supported. Actually, each value
must be queried using QUERY_MENU to confirm support.
BUG: b/30921166
TEST: unit tests pass, android.hardware.camera2.cts.CaptureRequestTest#testSceneModes now passes.
Change-Id: I763eb767e21c082a629d0ba91fdaaa0d6ce162f5
Uses clock_gettime instead of using a spoofed "1" all the time.
Only offers approximate default FPS of 30 as the valid range,
instead of the true maximum reported by the device,
as actually changing it isn't hooked up yet.
Removes the sensor frame duration variable;
CTS at least will just default to reading from the timestamp.
BUG: b/29457051
TEST: unit tests pass. Some previously failing cts tests now pass.
Change-Id: I505d7dd51fe45de55214cb802184bea46245f316
Supported if exposure time & sensitivity are available.
BUG: b/30510395
TEST: unit tests pass, previously failing CTS test
(CaptureRequestTest#testFlashControl) now passes.
Change-Id: Ibf99b2c0d8919dc91fcd6280042a6974d0f3690c
The reference implementation stream validation/setting
was all out of whack, particularly the handling of "reuse"
streams. This CL does away with that, and plugs in the
static_properties/request_tracker validation/tracking of
configured streams.
Implementation specific features, such as gralloc flags,
are moved down into the V4L2Camera class out of the Camera class.
BUG: https://b/33057320, https://b/31044638
TEST: unit tests pass, some previously failing CTS tests are passing
(and no regressions), simple test camera preview app runs.
Change-Id: Ie8568239a1348dac45bf829ef928e500e01fdcda
Instead of controls picking their own defaults,
a delegate taking a mapping of template : desired default
is taken instead. These defaults are honored if able.
BUG: b/31017806
TEST: unit tests pass, multiple CTS tests fixed, test app runs.
Change-Id: I8212580c9aee1d7fe223fa6b3ff17a6cfb97552f
Plugs in the StaticProperties class for ease of accessing the
static metadata.
Expands StaticProperties to handle checking template support.
Test: Unit tests pass, test app runs, fixes 2 failing CTS tests on rpi3
BUG: b/32951283
Change-Id: I3077a3507751c3072b88f7d91902bdaa5b53c30e
When logging was enabled, the log was a little *too*
verbose, making it unreadable. Removing some of the
more frequently hit log messages.
BUG: b/32942120
TEST: Can run camera samples
Change-Id: I136c20279699e4c87b3ef1c3042b88c20c301002
Was assuming HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED was either YUV or JPEG.
BUG: b/32942342
TEST: unit tests pass
Change-Id: I3aaa6ee8040efa699c2856b687fc3b8a6d84b5cc
This fixes a potential NULL-pointer reference crash in case
cpu_file == NULL and pass NULL to fclose().
Test: mm -j 8
Change-Id: Ib3267676bea910533bd85ac2935efe02d361fc6b
This allows for verification of callbacks, and will also be helpful
when implementing flush.
BUG: 31653306
TEST: unit tests pass, test program runs
Change-Id: Id43d6cb3c2b9ca4adc96fc08282f88e0b7b904e1
Track which buffer indices are in use to prevent duplicates.
BUG: 31831808
TEST: Test app runs, enqueue errors no longer showing up in logs.
Change-Id: I319f9a1906170c861e194e357bdb57fab81d8c34
Also checks gralloc return results, and cleans up style.
BUG: https://b/31595935, https://b/31589070
TEST: test streaming app works
Change-Id: I4d910524ae21a7b666a1f456e2b7122a8671560f
Actually returns GBR data for now, based on available formats for
RPi3 camera, but claims it's RGB.
BUG: b/31829804
TEST: test program runs, can handle format 0x1 (RGBA_8888)
Change-Id: I41c9ced5c1fa25d1254530d3d0a1446d2d514a1f
Camera now has special synchronized threads to enqueue
buffers and dequeue buffers.
BUG: 29334616
TEST: manually tested with test app
Change-Id: Ibce14cd6b269c4d26403534b3f7985914263bf2b
Set up a series of methods that can be producers/consumers/callbacks.
For now, they call each other synchronously.
TEST: manually tested with app
BUG: 29334616
Change-Id: Icb6cf9d9970521d5291c54f02dc5032f43b26616
RequestTracker keeps track of how many buffers are in flight for
each stream, and what frame numbers correspond to what requests/buffers.
BUG: 31044638
TEST: unit tests pass
Change-Id: I8ef3fcacdf8171514ea7f7eaf77301a641bff61e
Static properties read and validate stream configurations,
stall durations, and reprocess formats.
Static properties can be used to validate a given
camera3_stream_configuration_t to check if the streams
all work together as defined by the metadata properties.
BUG: 31044638
TEST: unit tests pass
Change-Id: I2c8eecb680cd86fbe0340c07e4d73bd25429b4e9
MetadataReader provides a clean wrapper around getting
and translating certain metadata values in a nice form.
StaticProperties will be used by Camera as the source of
truth for metadata properties, extracted directly from a reader,
rather than calling down into the device again.
BUG: 31044638
TEST: unit tests pass
Change-Id: I712a80f87e629a7288c678637de0eae0225acf96
Moved files to a subdir to allow reference implementations
of other versions to join this same space without conflict.
Chery picked from master.
BUG: b/31117512
TEST: lunch bullhead-eng, make -j32, m -j32 camera.default
Change-Id: I9bc3047bd3c00c53ce4d4e4f2070d8ee1453c936
Replaces metadata usage in Camera/V4L2Camera with the
new Metadata class.
Switches Camera from camera_metadata_t to android::CameraMetadata
where appropriate for ease of use/clarity of ownership.
Also cleaned up some "error" logs that were potentially expected,
leaving it to the caller to log if something goes wrong, since
they were numerous and cluttering the log feed.
BUG: https://b/30140438, https://b/29335262
TEST: unit tests pass, test picture program still works,
tested setting a V4L2 control to a non-default value.
Change-Id: I24e50c9b71736dfc576debf8d09dbe36b9bbf23a
States are dynamically changing values. For now
none of them have implementations; they're all fixed
values.
BUG: 30140438
TEST: unit tests pass
Change-Id: I60f97fce5db4542e6b77694bb323934e32eab9f6
Moved files to a subdir to allow reference implementations
of other versions to join this same space without conflict.
BUG: b/31117512
TEST: lunch bullhead-eng, make -j32, m -j32 camera.default
Change-Id: I9bc3047bd3c00c53ce4d4e4f2070d8ee1453c936
Default entries for controls/properties that could theoretically
be queried from/controlled by V4L2, but are not yet implemented
in this HAL.
BUG: 30140438
TEST: unit tests pass
Change-Id: I78264f3f0d37b41614b24ef71000fee175a3bb17
Adds a flow for Metadata to initialize templates.
PartialMetadataInterfaces expose another populate method,
which use a default value getter from ControlOptionsInterfaces.
BUG: 30140438
TEST: unit tests pass
Change-Id: I1c01469dcf4d06f7c4c62ebe2acd3d9b2294a161
This factory queries the device for the properties detailing
what formats it supports. Since this may fail, Metadata/V4L2Metadata
was moved from the weird inheritance/constructor stuff it was doing
to Metadata having a better constructor and V4L2Metadata being a
factory.
BUG: 30140438
TEST: unit tests pass
Change-Id: Id4bcb27fbd8b517e3a9a8e9fb8a984af139254b3
Switches v4l2_metadata over to the updated controls/properties
using inheritance over composition. Slight regression
in that the V4L2-based control factory method was removed,
will be replaced (and improved) in a CL soon.
BUG: 30140438
TEST: unit tests pass
Change-Id: I636fef67cd3ceeb3ebf9853d04b068988c4c4944
Simple wrappers that associate a control delegate
or set of control options with a corresponding
metadata tag.
BUG: 30140438
TEST: unit tests pass
Change-Id: Ib4d769f4a860d661128c8af47d317937d96feb96
Part of moving towards composition over inheritance.
Ignored: Requests to set are ignored.
NoEffect: Tracks a value but does nothing.
V4L2: Goes through a V4l2 device.
TEST: unit tests pass
BUG: 30140438
Change-Id: I9ca636556f4a6ddfe4b8ddfbd042371ed56343b9
These interfaces will be used to increase composition
and decrease inheritance in the metadata controls.
ControlDelegates are responsible for getting/setting values,
While ControlOptions are responsible for validating values
(breaking these two apart allows, for example, unused sliders
and unused enums to share the same ControlDelegate, but have different
options, with minimal code duplication).
StateDelegates are for read-only values that may change.
ControlDelegate inherits from this because it will allow
the State interface to be passed around, while one owner
maintains control of updating it behind the scenes.
BUG: 30140438
TEST: unit tests pass. Interfaces only so no new tests
Change-Id: I8042c1ccf97655558f45a1f8411e3a4a36de7506
Scaling converters scale, as the name implies.
The two wrapping converters, map & ranged sanitize
data for sending to V4L2, either converting a value
to be within a map, or within a range, respectively.
(These are intended for use with V4L2 int menu and int
controls, respectively).
TEST: Unit tests pass
BUG: 30140438
Change-Id: Ie7d86118e00c0b59e6457fc16449228706098952
Using composition for conversion will allow more
code to be shared by different V4L2 controls.
BUG: 30140438
TEST: unit tests pass
Change-Id: I467efc72d71b9593d2476a61615fa44f7a975649
The normal G_CTRL and S_CTRL ioctls are only intended
for the basic user control interface. For the HAL,
we want access to quite a few extended controls as well.
BUG: 30140438
Change-Id: I750e9b1dc5e9e18cf5ad25daf1e1c1e34e756169
Was previously running the clang-format command incorrectly;
was not using the .clang-format file, and so was formatting
in some different style.
Change-Id: I09e81b919d1e6d40a56eb4f3f519aaed281a0c86
TEST: unit tests pass
Add all current enum controls and their mappings
to the metadata constructor.
BUG: https://b/30140438
Change-Id: Ie4a5b89d8bc4bc75531425e5fc8bfb4a181b0a03
Some V4L2 controls are simple enum menus, and are directly
analagous to metadata controls. The new V4L2EnumControl class
is a generalized converter between the two.
BUG: https://b/30140438, https://b/29394024
TEST: unit tests pass
Change-Id: I9f8bed200e21cb7e3f3336608fe210f094b7aa42
Common static functions for manipulating metadata moved
from patial_metadata_interface to metadata_common.h
Common static functions for comparing equivalence with
metadata for tests moved to test_common.h
BUG: 30140438
TEST: Unit tests pass
Change-Id: I4310b4ff05bdd68f7f92f533028989914d0f4c82
Query formats, sizes, and frame rates.
BUG: https://b/29394024, https://b/30605346
TEST: Test java program shows a bunch of formats & rates,
can take pictures in different sizes now.
Change-Id: I203fd8f200dda79cf6946c58f130548b05269fbd
MultiHal was not properly fielding errors from the poll() calls of
sub-HALs. Propagating errors received from sub-HALs up to Sensor
Services causes Sensor Services to abort, so instead of propagating
the error up to Sensor Services, the MultiHal logs a message to
logcat to fix the sub-HAL problem.
Bug: 30060537
Change-Id: I6e20c193a2f2d228da48cf3d5a23e439eaf663df
Ignored controls are optioned controls where the value
set by the user is tracked, but doesn't actually matter.
BUG: 30140438
Change-Id: I45819c3c6c855922418f76fd34309a44660fc3f0
TEST: unit tests pass