Commit graph

940 commits

Author SHA1 Message Date
Siarhei Vishniakou
14f4acea32 Merge "Remove custom timestamp from hw/libhw/input"
am: 6b14bd1a08

Change-Id: If9a4cf1d3ac09a1a1b853951f3af417669f10c54
2019-08-13 22:09:38 -07:00
Siarhei Vishniakou
1fc88e88f6 Remove custom timestamp from hw/libhw/input
These are no longer used by EventHub, and should not be carried forward.

Bug: 116601048
Test: presubmit only
Merged-In: I35129484d9945dcd4d291e0f2fac894e07c53c04
Change-Id: I35129484d9945dcd4d291e0f2fac894e07c53c04
2019-08-13 14:41:47 -05:00
Mikhail Naganov
5290206202 Merge "Remote submix: replace include path with module dependency"
am: 9359ffb16b

Change-Id: Ifb7af40f20ee05a034063c3c179282c301926344
2019-08-05 11:08:23 -07:00
Mikhail Naganov
282ca7a544 Remote submix: replace include path with module dependency
The include path was needed because libnbaio_mono was missing
an include export for libaudioutils headers.

Test: make
Change-Id: I6d6aa2826ed259b682e8a417557fb6fdfb3caea6
2019-08-02 08:55:16 -07:00
Mikhail Naganov
fcaa728e9e Merge "r_submix: Fix compilation for non-default configurations"
am: a5c2957f63

Change-Id: Iaa60e3cf875ce2f0606b4080eff06b66e8fa0072
2019-07-26 21:10:35 -07:00
Mikhail Naganov
1462c760d7 r_submix: Fix compilation for non-default configurations
Fix compilation for:
  #define ENABLE_LEGACY_INPUT_OPEN 0
  #define ENABLE_RESAMPLING 0

Test: make
Change-Id: I11a868c49181b35d3b85ea62a372a94a1b589bc1
2019-07-26 15:11:41 -07:00
Eric Laurent
f76f1832d1 remote submix: force pipe shutdown on input close
Force mono pipe shutdown when all input stream clients are closed
so that a pending write is not stuck waiting for available buffer.

Bug: 119057550
Test: abort search on BLE remote
Merged-In: I4391e73874e502da5000b1746436fb61bb2fe869
Change-Id: I4391e73874e502da5000b1746436fb61bb2fe869
2019-07-26 15:10:03 -07:00
Changyeon Jo
b6f4830d89 Remove libBionicGtestMain
This change removes libBionicGtestMain from the dependency of
camera.v4l2_test target.

Bug: 134488555
Change-Id: Ia719f770b03fa1679bb9467f58806e64b05eb469
Signed-off-by: Changyeon Jo <changyeon@google.com>
2019-06-04 09:18:28 -07:00
François Gaffie
71832e785c Fix remote submix MIX_RECORD stop
Since rework of presentationTimestamp in AudioFlinger, it is expecting
to drain correctly before stopping an output.
When a MIX RECORDER is set,
1/ Dynamic Policy Mix is registered
2/ Extraction Sink Port is made available
3/ Player is started on this sink
4/ Extraction source port is connected upon start Output
4/ Capture may be launched on the source to be rerouted
5/ All Capture are stopped, player is stopped
6/ Extraction source port shall be disconnected on stopOutput

Step 6 does not happen as the track is never set as drained.

Upon capture stop, rxSink MonoPipe is put in shutdown state. Any further
write will discard the buffer. However, frames written shall be
incremented of these frame discarded to be able to set the track as
drained.

This CL fixes this issue.

Test: AudioPolicyEmulatorTests --gtest_filter=RecordInjectionSourceMatch/DynamicPolicyMixRecordInjectionTest.RecordingInjection/*
Bug: 130356101
Change-Id: I861c4867991da8bcc1090be56d64e69646d58dc2
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
2019-04-15 14:34:06 -07:00
Eric Laurent
5b78d41954 remote submix: force pipe shutdown on input close
Force mono pipe shutdown when all input stream clients are closed
so that a pending write is not stuck waiting for available buffer.

Bug: 119057550
Test: abort search on BLE remote
Change-Id: I4391e73874e502da5000b1746436fb61bb2fe869
2019-03-04 19:45:12 +00:00
Changyeon Jo
7451fc7e50 Fixes incorrect array initialization.
This change fixes an array initialization failure due to recent
resizing of camera_module structure's reserved variable.

Bug: 126418509
Change-Id: Ifda61b5427f317192976aee788d0e6849f7d189f
Signed-off-by: Changyeon Jo <changyeon@google.com>
2019-02-26 14:35:33 -08:00
Sasha Smundak
77972f7c48 Merge "Explicitly include log/log.h instead of cutils/log.h" am: 68222be667 am: 4b0a646750
am: 99e3058602

Change-Id: I9ccccabeeadaf742ebb4e00264c9dfbd8e769e3c
2019-01-31 20:14:43 -08:00
Sasha Smundak
b41d1a0a74 Explicitly include log/log.h instead of cutils/log.h
Eliminates the warning.
Test: treehugger

Change-Id: I567d8fea169e688165ede1fb35d1338c565e3645
2019-01-31 17:18:27 -08:00
Sergii Piatakov
79facac0f7 Merge "camera: add info about current status into README" am: 3d7f02b0ee am: 11f257623b
am: af36e97a4b

Change-Id: I95f2896055e353060c1a3395520aeb719e986832
2019-01-28 23:38:14 -08:00
Treehugger Robot
3d7f02b0ee Merge "camera: add info about current status into README" 2019-01-28 21:20:03 +00:00
Paul Mclean
83b4d508b9 Merge "Adding Audio HAL V5: Direction API" 2019-01-17 21:34:33 +00:00
Ivan Lozano
f2ce75ef3b Merge "Revert "Disable XOM in camera.v4l2."" am: 06ea58579b am: 36de427e99
am: ac77fa8c78

Change-Id: Ia803f91a5487bb0d42ecc73163c34c151795d1c3
2019-01-15 18:02:30 -08:00
Treehugger Robot
06ea58579b Merge "Revert "Disable XOM in camera.v4l2."" 2019-01-16 00:41:52 +00:00
Ivan Lozano
2bf3340e78 Revert "Disable XOM in camera.v4l2."
This reverts commit 7c7c62db25.

Reason for revert: libjpeg-turbo has been updated with XOM compatibility.

Change-Id: If1daae895f9cfe08c03169ed2546c81c51a94117
2019-01-15 22:17:46 +00:00
Ari Hausman-Cohen
662b32fcf2 Merge "camera: add a lock for the request tracker" am: 8c3812f639 am: 421cd310cf
am: 7bac9b0e96

Change-Id: Ie4877dd1169e99fe8e2dcfa64cc9a77de44492ae
2019-01-10 12:19:52 -08:00
Ari Hausman-Cohen
8c3812f639 Merge "camera: add a lock for the request tracker" 2019-01-10 19:01:26 +00:00
Sergii Piatakov
f16950bbf2 Merge "camera: remove redundant and unnecessary includes" am: 9dae907ea0 am: 547abc4ae4
am: eb83d293ff

Change-Id: I38c53a926e1cabd67c194714ca52e4f5f0b417e3
2019-01-09 17:22:16 -08:00
Treehugger Robot
9dae907ea0 Merge "camera: remove redundant and unnecessary includes" 2019-01-10 00:39:43 +00:00
Sergii Piatakov
807028ce53 Merge "camera: allow to get size of JPEG after conversion" am: 3664a25aa7 am: 18033cb5d5
am: ddcd9c949f

Change-Id: I00e6cba64605a7669b7fc127bb70cc2b83dda4bc
2019-01-08 17:49:39 -08:00
Treehugger Robot
3664a25aa7 Merge "camera: allow to get size of JPEG after conversion" 2019-01-09 01:23:12 +00:00
Paul McLean
fa3ae3ed74 Adding Audio HAL V5: Direction API
Bug: 119137468
Test: Tesbed App

Change-Id: I0dfc773344654f61f2ad9f5e8ed22a96e6b26ad5
2018-12-19 12:00:22 -07:00
Chih-Hung Hsieh
3f0f82b63d Merge "Fix cert-dcl16-c clang-tidy warnings" am: 48d500c9e3 am: 71062f3f98
am: d93a0ebf49

Change-Id: Id249d36d6f6c3be45c9d426365ce69e85a05269b
2018-12-13 14:56:58 -08:00
Chih-Hung Hsieh
0dfc1ec6cb Merge "Fix performance-for-range-copy warnings" am: a6a462a015 am: 71e5bab1db
am: 922e84c2fd

Change-Id: Idee25a2fa2009e203c1ecd378236fdfb92edd747
2018-12-13 13:14:26 -08:00
Ivan Lozano
3fac49442d Merge "Disable XOM in camera.v4l2." am: 1908ba0732 am: 6ca60bc346
am: c334599dfe

Change-Id: I730f62bfb2f28cf919614af3a5f7e0b8445079b0
2018-12-13 10:40:14 -08:00
Treehugger Robot
48d500c9e3 Merge "Fix cert-dcl16-c clang-tidy warnings" 2018-12-13 00:40:34 +00:00
Treehugger Robot
a6a462a015 Merge "Fix performance-for-range-copy warnings" 2018-12-13 00:08:05 +00:00
Chih-Hung Hsieh
3d68176cfd Fix cert-dcl16-c clang-tidy warnings
Bug: 120614316
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,cert-dcl16-c
Change-Id: I744040edc476bf2bb58413a2a14965c27113a5bd
2018-12-12 22:23:40 +00:00
Chih-Hung Hsieh
6c8e827c61 Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I800b659c039c54fd52a927a88904d642604722f7
2018-12-12 14:22:28 -08:00
Treehugger Robot
1908ba0732 Merge "Disable XOM in camera.v4l2." 2018-12-12 21:30:30 +00:00
Brian Duddie
4435ec4bb5 Merge "Add bstack to sensors OWNERS file" am: 0b2aabd6e6 am: 40283a933d
am: 11c3ef4db8

Change-Id: I7d5ed4e11c48deabd10db640cd7059dc8f3a491f
2018-11-30 20:42:28 -08:00
Brian Duddie
7b007c989f Add bstack to sensors OWNERS file
Test: n/a
Change-Id: I25ae89abe1dfe1552e92cccf0354a269959c0c13
2018-11-30 13:33:20 -08:00
Ivan Lozano
7c7c62db25 Disable XOM in camera.v4l2.
Disable execute-only memory layouts in camera.v4l2.

This relies on libjpeg_static_ndk, which contains some data mixed into
code and thus requires a readable .text.

Bug: 77958880
Test: Built the library, checked the program headers with readelf.

Change-Id: I5646b8c5e9a0ad151663df29f019b5a84db4b15c
2018-11-29 14:37:38 -08:00
mike dooley
737f4ce99d Converting sound trigger v2.2 getModelState to be asynchronous
Test: built android with checkbuild flag

Change-Id: I8e927125dcedbc4b98ceb2886806225b2851c082
Bug-Id: 70206501
2018-11-08 08:11:02 +01:00
Ari Hausman-Cohen
efc1372b00 Merge "camera: initialize smart pointer before usage" am: 8f89886dad am: b893b0cedb
am: c8083cac38

Change-Id: I11bdbcdb80fa772d17c9088f43c01581d00e7851
2018-10-31 11:59:00 -07:00
Ari Hausman-Cohen
8f89886dad Merge "camera: initialize smart pointer before usage" 2018-10-31 18:34:16 +00:00
Michael Dooley
ffd8e9a65a Merge "Revert "Revert "Adding getModelState API to sound trigger""" 2018-10-24 06:04:42 +00:00
Sergii Piatakov
688d3bf720 camera: allow to get size of JPEG after conversion
The member function `ImageProcessor::GetConvertedSize` is called by the
`ImageProcessor::ConvertFormat` every time when conversion is performed.
But for JPEG destination format it leads to error. It is proposed to add
the handling of the JPEG format with postponed size calculation.

Test: try to take a picture via camera with YUYV output format.
Change-Id: I1ec564e2434361c82b5d93348511116494249f06
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
2018-10-22 09:37:07 +03:00
Sergii Piatakov
16d9135088 camera: initialize smart pointer before usage
Test: try to scale image and get SIGSEGV crash of the `cameraserver`
      in the `CachedFrame` class.
Change-Id: I17ab13f7c9e7fc84cd38f89dce30e6e5e0535cc7
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
2018-10-22 08:59:57 +03:00
Chih-hung Hsieh
1d8e980e25 Merge "Allow implicit-fallthrough warnings locally." am: e45fc974db am: 7da8404d40
am: f68d1864d9

Change-Id: Id3dfe43b6d433e7cc627d294e7397622fa680897
2018-10-20 01:30:38 -07:00
Chih-Hung Hsieh
f91bd7232d Allow implicit-fallthrough warnings locally.
It will be a global error by default.

Test: make checkbuild
Bug: 112564944
Change-Id: Ifdcaca758036cf9624f79befb65a1cbbd2f9b010
Exempt-From-Owner-Approval: do not block on new warnings
2018-10-19 15:26:45 -07:00
Sergii Piatakov
b8f073fb8a camera: remove redundant and unnecessary includes
Remove unused or already included headers. Sort and format includes
accordind to the "Google C++ Style Guide". Replace C-headers by C++
analog when it's possible.

Test: build
Change-Id: I19fa6abb5bb68e0257c9c933e68f42f92b394ce7
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
2018-10-18 13:39:48 +03:00
Sergii Piatakov
082a87bc0b camera: add info about current status into README
Test: n/a.
Change-Id: I9e62a8a6d8c04dac2c36bc483f011cb75ce20b2e
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
2018-10-17 10:12:31 +03:00
Sergii Piatakov
48ac84b8be camera: add a lock for the request tracker
The request tracker manages "in flights" buffers and frames. These
two containers are modified by calling the tracker's member functions.
Such functions are called from at least three threads: (see
`v4l2_camera.cpp` for more details):
 - "main" thread;
 - separate buffer enqueue thread ("Enqueue buffers");
 - separate buffer dequeue thread ("Dequeue buffers").
It is proposed to introduce additional mutex for the request tracker
to prevent a race condition.

An alternative approach is introducing an additional mutex for the
shared containers inside the `RequresTracker` class. But such approach
requires more changes and may lead to problems with design in the
future.

This commit contains a few additional changes which are not directly
related to the topic:
 - as far as more than one local lock is used all of them are renamed;
 - the `mFlushLock` member is removed because it is completely covered
   by the new mutex.

Test: try to use a camera with more than one buffer and get SIGSEGV
      crash of the `cameraserver` in the `RequestTracker` class.
Change-Id: I2c1901722289cee9f0cb05a11a4dabe70d18f2ba
Signed-off-by: Sergii Piatakov <sergii.piatakov@globallogic.com>
2018-10-17 09:52:09 +03:00
Michael Dooley
c2704a5fac Revert "Revert "Adding getModelState API to sound trigger""
This reverts commit 5ac2672ce3.

Reason for revert: rolling forward with fix

Change-Id: Ib7d321f06c94f06a22e962542c9a4c8744702134
2018-10-16 19:55:18 +00:00
Ari Hausman-Cohen
81b19617db Merge "camera: avoid narrowing of the ioctl request" am: eef57caed9 am: 3d22b204f2
am: 00d9bf50ec

Change-Id: Idfca5de8347a38c3ab2cf0da002e3a2e4657d5e2
2018-10-11 18:32:18 -07:00