Commit graph

87 commits

Author SHA1 Message Date
Yin-Chia Yeh
357e1dea20 Camera: fix HAL1 removeCamera crash
Test: partner testing
Bug: 173511749
Change-Id: Ifd5fc7c63e3835945194291d161b491bd5acb342
2020-12-03 10:07:34 -08:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Jason Macnak
2540a38771 Merge "Implement lockYCbCr stub for Mapper 4.0" into rvc-dev 2020-05-14 21:06:54 +00:00
Jason Macnak
eda6dca45c Implement lockYCbCr stub for Mapper 4.0
(Includes bpfmt changes from repo hook)

Bug: b/146515640
Test: cts -m CtsCameraTestCases
Change-Id: Ibd882db1883e0976c2baf95257e51c29de6e6853
2020-05-12 11:40:20 -07:00
Jason Macnak
f2c9ed1309 Adds a lock method to HandleImporter w/ access region
... to allow locking 2D regions of non-BLOB buffers.

Bug: b/146515640
Test: cts -m CtsCameraTestCases
Change-Id: Ia68abf96ffe15891520833921e103efa3f7a80c5
2020-05-12 11:33:55 -07:00
Shuzhen Wang
75b0f0288c Camera: move preCorrectionActiveArraySize override to cameraserver
This is to handle the case where HAL isn't using the hidl shim.

Test: dumpsys on Pixel 2
Bug: 145300768
Change-Id: I74874a025904887cc27ec00518f4261dd24e291a
2020-05-01 11:59:10 -07:00
Automerger Merge Worker
098aae3c96 Camera: Fix possible ExifUtils heap corruption am: aa5673385a am: 711ebe64dd am: f4481c4d98
Change-Id: I4b5e0308f7a5af5e0aaa4b85e458f0e90b4fac7b
2020-03-04 18:28:55 +00:00
Automerger Merge Worker
711ebe64dd Camera: Fix possible ExifUtils heap corruption am: aa5673385a
Change-Id: I209742be498ea65b6763cf673514e74241b75717
2020-03-04 17:58:31 +00:00
Emilian Peev
aa5673385a Camera: Fix possible ExifUtils heap corruption
Both EXIF_TAG_IMAGE_WIDTH and EXIF_TAG_IMAGE_LENGTH
expect short values as per EXIF spec. Call appropriate
libexif function to avoid possible heap corruption.

Bug: 148223871
Test: Successful build
Change-Id: Ib16bf1ae8ab2093da529efe6ff0778331c3e9eb3
2020-02-18 10:20:02 -08:00
Yin-Chia Yeh
97978fbe32 Camera: fix offline processing VTS/CTS
Test: camera VTS test + add manual delay to webcam HAL output thread
      so there will be some requests left for offline processing
      camera CTS OfflineSessionTest
Bug: 135142453
Change-Id: If5718350707ef051f96b96da75f934089b10467d
2020-02-03 10:30:05 -08:00
Marissa Wall
9c5ebfc5ba gralloc: update lock and lockYCbCr
IMapper 4.0 does support lockYCbCr functionality through lock and
BufferMetadata getters. However, we will wait to add the support in
one central gralloc library. For now just stub out the call so
there aren't any compiler errors.

Bug: 141631415
Test: Compiles

Change-Id: I9d2f70c87412f8ac2114db85eb6dc01539876e2b
2019-11-21 17:43:41 -08:00
Marissa Wall
a51eb93c51 gralloc: add IAllocator/IMapper 4.0 to camera HIDL
Add support for gralloc 4.0 to camera interface.

Bug: 136016160
Test: VtsHalCameraProviderV2_4TargetTest on a pixel
      with a local rev'd version of gralloc 4.0.

Change-Id: I7f2e14c291fbdafcb68c1e9c6e94fed87d810191
2019-08-20 15:36:41 -07:00
Shuzhen Wang
d31d87a4d0 Merge "Camera: Add support for IMapper 3.0" into qt-dev
am: 057de3759f

Change-Id: I27626fd07bd275d28a14eeee332e9498a85e9673
2019-05-20 21:56:22 -07:00
TreeHugger Robot
057de3759f Merge "Camera: Add support for IMapper 3.0" into qt-dev 2019-05-21 04:35:47 +00:00
Shuzhen Wang
a96fe52bfc Merge "Camera: Fix remaining OWNER file include" into qt-dev
am: 9aec56107a

Change-Id: I0c47687bcb1589dbbe5e9961e1856bdce06ac556
2019-05-20 21:23:29 -07:00
Shuzhen Wang
0c6f8b6859 Camera: Fix remaining OWNER file include
Bug: 133188173
Test: None
Change-Id: I2da75bf9a7480974b3ca1c6eea52a58b46b0cc97
2019-05-20 17:30:40 -07:00
Shuzhen Wang
915115e381 Camera: Add support for IMapper 3.0
Use IMapper 3.0 if available. Otherwise, fall back to IMapper 2.0.

Test: Update camera VTS test passes
Bug: 128013727
Change-Id: I9bb54bbc290f1b90ef593dee9796b22b0dd49671
2019-05-14 10:39:25 -07:00
Steven Moreland
6d494b2346 Merge "Update hidl makefiles for bpfmt" am: ff0bd741ca
am: 96f40f7b02

Change-Id: Idbf030e4993067bdb8181321bca2de00c9b6f7ef
2019-04-18 14:34:45 -07:00
Steven Moreland
1ae4615d9f Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
2019-04-17 09:38:50 -07:00
Jayant Chowdhary
661f4410f4 Allow android.hardware.camera.common@1.0-helper to access vendor tags
This allows vendor camera clients to access provider specific vendor
tags. No expected behavior changes to camera HAL process(es).

Also fixes OWNERS file.

Bug: 129688550

Test: AImageReaderTest modified to set a vendor tag in CaptureRequest
Test: Take still pictures / record video (sanity)
Test: camera CTS tests

Change-Id: I18b678e7e0db7f1b29c3de0b762cb65e25842fa8
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-04-04 14:24:06 -07:00
Eino-Ville Talvala
d1ce4e664a Camera: Centralize OWNERS
Test: Builds
Change-Id: I9b8d1675566db44b959c633c25ceaf61a6dc08db
2019-03-13 15:15:45 -07:00
Steven Moreland
7f4e21adda Merge "Update makefies: no 'types'" am: 4ee5ec1469 am: bab622f6a6
am: 7224bc9bcf

Change-Id: I434939e0770afa436c532a945542fce30a71ef7d
2019-03-04 16:05:59 -08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Shuzhen Wang
892e826a32 Camera: Handle binder call failure due to static metadata size
For physical camera static metadata, we should reduce its size before
passing it across binder if possible.

Test: Camera CTS
Bug: 124129552
Change-Id: I0d9129642ddcbb4c1a1c7fcf7a88bac734be4f5a
2019-02-12 08:54:45 -08:00
Eino-Ville Talvala
2951804146 Camera: Restructure default camera.provider 2.4
To allow for implementation inheritance of @2.4 legacy wrapper and
@2.4 external webcamera HALs in the @2.5 implementations, restructure
the existing default provider to separate the service interface into a
thin shim that calls the implementations.

Test: Camera starts as usual after refactor, VTS tests pass
Bug: 121379978
Change-Id: Id40790ed4fb495577fd2b885c706b2ed7a96d64e
2019-02-07 16:20:35 -08:00
Sasha Smundak
791b843bcb Merge "Explicitly include log/log.h or android/log.h instead of cutils/log.h" am: b5db125860 am: 4a1f714ed0
am: 1e45903dd5

Change-Id: I1a54776b7560154304573a8cd3dfeae5babf43e5
2019-02-01 13:22:37 -08:00
Sasha Smundak
769c053d7c Explicitly include log/log.h or android/log.h instead of cutils/log.h
Eliminates the warning.
Test: treehugger

Bug: 123758136
Change-Id: Ibe50261efc18d659a10129977342bc765a9ba9d5
2019-02-01 10:52:09 -08:00
Jayant Chowdhary
8cd3ba8fdf Add VendorTagDescriptorCache to android.hardware.camera.common@1.0-helper
Since android.hardware.camera.common@1.0-helper is a utility VNDK
library, where the implementation isn't linked to a specific version of
any HIDL interface we don't uprev the library.

Bug: 122477622

Test: builds

Change-Id: Idb7cb9569cf4490659be0090d72f91f411c8dbc8
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-01-14 12:39:38 -08:00
Emilian Peev
40a8c6ed51 Camera: Add support for stream combination query
Camera devices 3.5 and later can optionally support
stream combination queries. These use the regular
'StreamConfiguration' structure however in contrast
to normal stream configuration, the query will be
much faster and will not cause any HW/SW side effects.
Additionally it will be possible to run stream
combination queries at any time after the camera
device is open.
Implement stream combination query for the external
camera provider.

Bug: 111593096
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO
Change-Id: I59ec936d17dabc89ba49407a750df1cd2e61b145
2018-11-29 16:40:36 +00:00
Shik Chen
d4b8d2179f Camera: Fix a crash in removeCamera()
mCameraInfoMap is a KeyedVector, we should use .valueFor() instead of
operator[] to get the value from a key.

Bug: 118364955
Bug: 118359878
Bug: 77833131
Test: Plug and unplug the external camera 10+ times.
Change-Id: Ibf48e5a78b16bdeba08b02242379eaf571fc76cb
2018-11-14 08:10:04 +00:00
Yin-Chia Yeh
ccc05ec9b7 Camera: update camera HAL owners
Add OWNER file to device 3.5 default implementation and
add new owners to existing owner file.

Test: N/A
Bug: N/A
Change-Id: I09bae8a6bbdf48bd27cba8675d979c65b51a3e6b
2018-10-16 08:47:03 -07:00
Shuzhen Wang
6bdeaf55bf VTS: Add test for device version 3.5
Also includes:
- Add test for getPhysicalCameraCharacteristics.
- Doc update for the new HIDL API.
- Tighten boundary check for camera ID in CameraModule.

Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO

Bug: 79523700
Bug: 115969176
Bug: 116512585
Change-Id: I051d1b0c91834781a1f8d893ed5ebfa579b03774
2018-10-04 11:56:20 -07:00
Shuzhen Wang
d3feb3d62c Camera: Add support for physical camera characteristics query
- Add version 3.5 for ICameraDevice for physical camera characteristics
query.
- Add version 3.5 for ICameraDeviceSession to work around HIDL
versioning bug.

Test: Camera CTS
Bug: 79523700
Change-Id: I8df6cdd4ee6ac5755758510c0dc1ea1cec31aa73
2018-09-13 09:25:34 -07:00
Chih-Hung Hsieh
820868b72e Merge "Fix unnecessary copy initialization warnings"
am: f110ea4893

Change-Id: If17584a8ed6fc53f3681a6ac298730dfbbaf4623
2018-07-13 15:59:07 -07:00
Chih-Hung Hsieh
091880882c Fix unnecessary copy initialization warnings
Bug: 30413862
Test: build with WITH_TIDY=1
Change-Id: I5de56c163d26e7522141ca06020321c481eea233
2018-07-13 11:48:16 -07:00
Yin-Chia Yeh
090872abcf Camera: use compact copy when necessary
When camera HAL sends redundant metadata (reserved space >> actual
used space), create a compact copy to save IPC overhead.

Test: Camera CTS/camera app smoke test
Bug: 79838637
Change-Id: I02657deb377c43c65d111d1fc894eb3c20ad3b8f
2018-05-23 09:43:03 -07:00
Yin-Chia Yeh
8b699aaf37 Camera: various external camera CTS fixes
1. Update the FPS range to list (0.5*fps, fps) only
   as webcams tends to skip a lot of frames and not
   able to output at stable framerate.
2. Exif: don't expect focal length to present
3. Thumbnail: allow 0x0 size for no thumbnail output
4. Allow retry some ioctl during configureStream as
   some webcams seems having problem in quick close
   reopen operation.

Test: CTS CameraTest
Bug: 72261912
Change-Id: Ic23b7fb293b7579694c59240e854d750c842886d
2018-03-06 10:35:12 -08:00
Chris Jenneisch
356e28fdb1 Use std::unordered_map for mTagToTypeMap
In the profile we notice that  SortedVectorImpl::_indexOrderOf is
almost 1.6% which is quite high considering it is an access to
a container. We make mTagToNameMap as a std::unordered_map
to store the Tag and the types. The accesses would be in constant time.

This change removes this from the profile and give ~10% improvement.

Bug: 72526772
Change-Id: Iffd244febd093bdfec9fe4d5e846a0e59c0ecdce
2018-02-28 23:14:31 +00:00
Yuriy Romanenko
33d5f66633 Common: Added CameraMetadata -> libexif converter
A fully-ported version of the ExifUtils class from
ChromeOS (see [chromeos]/src/platform/arc-camera/common/exif_utils.cc)

 * Made into an interface to remove libexif dependencies
   from header file
 * Rewrote ChromeOS dependencies
 * Minor fixes

Change-Id: I2e93fa3e08e6b82b26641cc736eeb1c61b04a2c0
2018-01-26 21:23:56 -08:00
Yuriy Romanenko
d0bd4f11f8 Common: Added lock() to camera HandleImporter
Effectively a counterpart to lockYCbCr() but for generic single-plane
buffers

Change-Id: I73d051c085fe2b96810a1ed761deac177db2733d
2018-01-25 12:50:40 -08:00
Yin-Chia Yeh
ab4502c707 Merge "Camera: Add external camera provider" 2018-01-23 02:54:27 +00:00
Yin-Chia Yeh
1903059507 Camera: Add external camera provider
Bug: 64874137 63873538

Change-Id: I4309874a7dedd3dd71d4bd0c2004d460421db679
2018-01-22 17:04:28 -08:00
Guennadi Liakhovetski
eca1d45ba7 camera: add support for camera removal
Add camera removal support to CameraProvider and CameraModule.

Change-Id: I047e486d1665ba9e0b1455f77a7bbbb5e0d66653
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
2018-01-22 12:01:08 -08:00
Xin Li
bb9e38fef9 Merge commit '1a06284b24f5eb7bb9c1fea0817da8898b3b1bff' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: I2a044eb8c9981d0a8198ffe2df55559afbd76341
Merged-In: I4fb9f18884f7ef21162015a0032c4431444f7025
2017-11-14 12:08:38 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Steven Moreland
a1169dd600 Update makefiles for hidl_interface.
Bug: 35570956
Test: manual
Change-Id: I7a220b78ee081240e1dc30ef5672ba39e3e98375
2017-11-10 09:06:55 -08:00
Steven Moreland
116161d94e Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1
am: 6c811964a1

Change-Id: I85ccbb4a15cd18938607f5bca4e065b9d7e0182b
2017-10-11 16:31:07 +00:00
Steven Moreland
0fff75dee1 Update for Soong java makefiles.
am: c3e80fa01e

Change-Id: Ia8835f9c95bd98a96f5fd3aff11191e7d3726fb9
2017-10-11 16:23:54 +00:00
Steven Moreland
c3e80fa01e Update for Soong java makefiles.
Test: pass
Bug: 33420795
Change-Id: Id9b1919a19b8ff682738cfb0869a479b4dbb4293
2017-10-10 23:07:20 +00:00
Martijn Coenen
567cbf1148 Make camera/drm helper classes available to system.
As VTS tests are considered system and link against these.

Bug: 38302533
Bug: 62523241
Test: builds
Change-Id: Iac5c872c58ec9646d6d6974aacceb930daad7e5e
2017-09-06 10:45:14 -07:00