Commit Graph

1231 Commits

Author SHA1 Message Date
Yuncheol Heo
2b0da5c4c8 CEC: Fix apilint errors.
- Change 'protected' to 'package private'.
- Change '@hide' to '{@hide}' for methods which should be still hidden
  for linting.
- Rename addVendorCommandListener to setVendorCommandListener and make sure to be called once.
- Fix the implementation of removeHotplugEventListener().

Bug: 18063669
Change-Id: I5c032736f17bab9518f21596f7adeac2f88ba4c1
2014-10-24 15:30:48 +09:00
Yuncheol Heo
5487ab07c7 CEC: Fix JavaDoc errors.
- Removed the link tag to the non-public objects.

Bug: 18063758
Change-Id: I17c79510c184df8a62cde9a6a1d18109c299c15d
2014-10-24 08:16:31 +09:00
Yuncheol Heo
0608b9328b CEC: Add a callback for vendor when HDMI control setting is changed.
- removed unregisterContentObserver() to reactivate the service later.
- added the parameter destAddress to onReceived() callback to
  distinguish whether the message is broadcast or not.

Bug: 17962624
Change-Id: I552d14661583f63bb66b07866092f972b259b15a
2014-10-20 16:47:24 +09:00
Jinsuk Kim
bdf27fbf74 CEC: add getDeviceList()
Returns the list of all the connected CEC device information. This is
different from getInputDevices() which returns devices of source type only.

For this, turned the local device address list to unmodifiable so that it can
be used by any threads.

Now respects the device type info passed through <Report Physical Address>
rather than always defaulting to the one from HdmiUtil.getTypeFromAddress().
This ensures future compatibility when a device of reserved logical address
comes with a specific type.

Bug: 18046603
Change-Id: I5f7d5e31706efba1ad5dcf4bcfd4ffc918d1d940
2014-10-20 11:32:47 +09:00
Aravind Akella
1f9b32f006 Sensor documentation fixes.
Change-Id: I664e5e2d5103b87ed02f082551e46513f64b95a1
2014-10-13 22:25:46 +00:00
Eino-Ville Talvala
7e7a14c541 am eeec4b9e: am ef773e35: Merge changes Id09663d8,Ie88f3750 into lmp-dev
* commit 'eeec4b9ebc15545e59985eab29385157cbbd8e9f':
  Camera2: Docs cleanup, especially units and range
  camera2: Update docs only for legacy devices
2014-10-09 13:04:08 +00:00
Dianne Hackborn
d83e9e4280 am 0761b1b5: am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '0761b1b5ebb453a411e3289c1c972dbfddcee880':
  Put in real "code" (aka marketing) name.
2014-10-09 13:03:21 +00:00
Eino-Ville Talvala
ef773e3569 Merge changes Id09663d8,Ie88f3750 into lmp-dev
* changes:
  Camera2: Docs cleanup, especially units and range
  camera2: Update docs only for legacy devices
2014-10-08 18:48:31 +00:00
Eino-Ville Talvala
fd3e2892f2 Camera2: Docs cleanup, especially units and range
- Add entries for units and range into javadoc
- Fix up existing units entries and add new ones
- Fix up range entries to be consistent for enums
- Add range entries where it makes sense
- Minor fix to javadoc gen to allow for code indentation
- Lots of edits for consistency, especially to
  available* entries.

Bug: 16525650

Change-Id: Id09663d897ec98122073e6e13719731ec0de4dad
2014-10-08 11:28:59 -07:00
Dianne Hackborn
955d8d69ea Put in real "code" (aka marketing) name.
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
2014-10-07 20:17:19 -07:00
Igor Murashkin
4b8cd6b44c camera2: Update docs only for legacy devices
Bug: 17788234
Change-Id: Ie88f3750cc06d889c6750f2099598d53ccb601b7
2014-10-03 17:55:18 -07:00
Jungshik Jang
0c5c24f234 Change visibility of RecordSource into public.
RecordSource should be accessible outside of
android.hardware.hdmi.

Bug: 17775014
Change-Id: I4c8879dc1504aad9672555c17d5b7f6643ed5188
2014-10-02 15:10:54 +09:00
Eino-Ville Talvala
0a62ab7079 Merge "Camera2 Legacy: Set a default thumbnail size" into lmp-dev 2014-09-30 23:44:58 +00:00
Ruben Brunk
0c79884076 camera2: Use valid dimensions for RGBA8888 gralloc buffers.
Bug: 17675571

- All of the mistakes were made.  Unmake them.

Change-Id: I23ff7a553347d4d9588c728219f4bf0604ba2e38
2014-09-30 13:54:20 -07:00
Eino-Ville Talvala
3adf18dc33 Camera2 Legacy: Set a default thumbnail size
Generally, JPEGs are better with thumbnails, and the default parameters
typically set a basic thumbnail size. In legacy, include a default size in the
templates.

This also works around issues with some devices not producing valid images with no
thumbnail.

Bug: 17724701
Change-Id: I2ad1449fc8c6d1fdec609af55f53db7491abbb92
2014-09-30 17:42:17 +00:00
Ruben Brunk
7b28c66a6c Merge "camera2: Fix native ImageReader test segfaults." into lmp-dev 2014-09-27 02:16:30 +00:00
Ruben Brunk
31798f3318 camera2: Fix native ImageReader test segfaults.
Bug: 17675571

- Check for JPEG footer in correct location from ImageReader
  when using the RGBA override.
- Add additional error checks in produceFrame method.
- Avoid allocating extra space for jpeg buffers due to
  incorrect width calculations.

Change-Id: I926f37e8b3e5c4bad24c16dcee48d52adb1706dd
2014-09-26 18:00:21 -07:00
Eino-Ville Talvala
56fbbeab79 Camera2: Fix parallel session and device close() exception
It's possible for the device to have close() called on it
during the session close sequence such that the session still
tries to do a stream reconfiguration on the closed device.

Handle the exception thrown by this attempt.

Bug: 17661765

Change-Id: Iee63c5c559405abe5c044ae251ad56edd1fb3e79
2014-09-26 15:37:26 -07:00
Igor Murashkin
381d22f706 Merge "camera2: Fix race conditions and deadlocks around configuration" into lmp-dev 2014-09-26 22:20:12 +00:00
Igor Murashkin
51dcfd65a6 camera2: Fix race conditions and deadlocks around configuration
Fixes an illegal state exception that sometimes occurs during
configuration. Fixes a deadlock during unconfiguration. Fixes
the idle handler never being run during configuration.

Bug: 17628736
Change-Id: Id2c5e416f96fcbac9c718fca3cc2cf21734bc6a4
2014-09-25 16:57:18 -07:00
Eino-Ville Talvala
52571b9032 Camera2 Legacy: Clear JPEG ids when reconfiguring.
Otherwise, stale IDs for old streams will be left around, causing
JPEGs to be sent to the wrong consumers.

Bug: 17659125
Change-Id: I98e1a1d389147631bc80eaeb10d57f74a6256f32
2014-09-25 14:06:55 -07:00
Eino-Ville Talvala
eecc904f13 Camera2 legacy: Improve robustness to camera service crashes
When the camera service dies, the getParameters call is often the first
to fail, and on legacy mode, this frequently happens in a background thread.
Catch the runtime exceptions and convert to device errors, instead of killing
the process.

Bug: 17587496

Change-Id: I6757961e7c0387defd368a13cb7c343950602400
2014-09-25 14:06:55 -07:00
Ruben Brunk
820a08a555 Merge "camera2: Fix null check in PictureCallback." into lmp-dev 2014-09-25 19:23:00 +00:00
Ruben Brunk
2c3d7c5f68 camera2: Fix null check in PictureCallback.
Bug: 17636586
Change-Id: Ieddc106e14c97dc78405821e83e346d626127e2c
2014-09-25 11:48:27 -07:00
Ruben Brunk
81ba98619b Merge "camera2: Hide JPEGs in RGBA gralloc buffers." into lmp-dev 2014-09-24 22:51:55 +00:00
Igor Murashkin
1dbf7248ea Merge "camera2: Increase preview frame timeout" into lmp-dev 2014-09-24 20:58:18 +00:00
Igor Murashkin
3e2c14f3d6 camera2: Increase preview frame timeout
Some devices, especially those with HAL2/HAL3 frames will have a large
delay between the first preview frame and and the camera open. This is
because the streams are configured lazily so it adds extra latency.

Increase the timeout to make it significantly less likely to get frame drops.

Bug: 17628866
Change-Id: I48dcda8507fb7eb31c3f426f833418126171c204
2014-09-24 13:53:40 -07:00
Ruben Brunk
0fd198ad89 camera2: Hide JPEGs in RGBA gralloc buffers.
Bug: 17379185

- WAR for SW Write usage flags being unavailable on
  certain devices for JPEG (blob) format buffers.

Change-Id: Ic7299785b743f35dd47264b9d1cea01a88b71d91
2014-09-24 10:43:12 -07:00
Igor Murashkin
4f17981fdc Merge "camera2-legacy: Workaround max jpeg/preview size AR mismatch" into lmp-dev 2014-09-23 22:50:30 +00:00
Igor Murashkin
a0496d34ff camera2-legacy: Workaround max jpeg/preview size AR mismatch
Filter out the largest preview sizes (from the stream configuration map)
until we find one whose aspect ratio matches the max jpeg aspect ratio.
Keep all other (smaller) preview sizes.

Bug: 17589233
Change-Id: I8ebcaef6439691eff3312da2c37b9abe08a067ad
2014-09-23 15:11:36 -07:00
Ruben Brunk
b0ddd2e0d6 Merge "camera2: Update EACCES to throw correct exception in LEGACY." into lmp-dev 2014-09-23 18:08:42 +00:00
Ruben Brunk
3084c2f519 camera2: Update EACCES to throw correct exception in LEGACY.
Bug: 17595068
Change-Id: I1a88568822237d3609c3342a21e2ca81ca935408
2014-09-23 10:32:18 -07:00
Ruben Brunk
fcb086c8e7 Merge "camera2: Docs update for available AF modes." into lmp-dev 2014-09-23 00:06:15 +00:00
Ruben Brunk
6f387098c2 camera2: Docs update for available AF modes.
Bug: 17588783
Change-Id: If4010517e79b3a51bd6231424a10be672ff5a252
2014-09-22 16:13:54 -07:00
Ruben Brunk
72a23d7b50 camera2: Add missing whitebalance mapping.
Bug: 17588192
Change-Id: I5d161dd22f2057a33a461157d678d4217a5f88f8
2014-09-22 15:59:50 -07:00
Ruben Brunk
4aed87a9ed camera2: Avoid spurious IDLE transitions.
Bug: 17594247

- Avoid spurious IDLE transitions when waiting for
  prior requests to complete.
- Clean up error reporting for GL thread and CameraDeviceState.
- Add error handling for Camera1 ErrorCallback calls.

Change-Id: I72850251d8965139b6db2193e91483a3d3409b7c
2014-09-21 20:09:38 -07:00
Ruben Brunk
97b5301b09 camera2: Avoid setting null metering regions in LEGACY.
Bug: 17587491

- If a single region with zero weight is set, revert to default
  metering region rather than attempting to set a null to
  avoid setParameters failure.

Change-Id: Iccd4d53d5a2134a9d744eafb731f464b653a154d
2014-09-21 16:09:34 -07:00
Ruben Brunk
09a6bed6c6 camera2: Fix JPEG orientation set by LEGACY request.
Bug: 17589231
Change-Id: Id449bc7a39a6550413e6c441b6dc204e11eacda9
2014-09-21 16:09:34 -07:00
Ruben Brunk
2610a1ba5d Merge "camera2: refactor LEGACY mode error handling." into lmp-dev 2014-09-21 19:16:57 +00:00
Ruben Brunk
e663cb7728 camera2: refactor LEGACY mode error handling.
Bug: 17431462
Bug: 17407537

- Add Surface format/size validation during configure.
- Update exception error codes used in binder calls.
- Report dropped requests, frames, captures, and device
  errors in binder callback properly.
- Fixes CameraDeviceTest errors for incorrect metering
  rectangle weight in template tests.
- Fixes CameraDeviceTest errors for missing
  noiseReductionMode field in template tests.
- Implement flush call.

Change-Id: I0da803bccf2bfb9b4c0cf61208e160a86c577497
2014-09-21 12:09:23 -07:00
Michael Wright
8ebac23196 Respect intent-filter priority for system keyboard layouts.
Bug: 17573945
Change-Id: Id357e199b37ef771c4362c2a5c4ae762071f0042
2014-09-18 18:48:19 -07:00
Igor Murashkin
4e5eddff5e Merge "camera2-legacy: Fix jpeg thumbnail quality not being set" into lmp-dev 2014-09-16 00:58:24 +00:00
Igor Murashkin
89bb63f395 camera2-legacy: Fix jpeg thumbnail quality not being set
Bug: 17472049
Change-Id: I6ce9f2bb07def86bc58b4b2495c58ee6762a65e1
2014-09-15 17:54:09 -07:00
Eino-Ville Talvala
848fe733f3 Camera2: Check for sequence complete sooner.
It's possible, especially with legacy mode, for a last frame for a
sequence to have already arrived when a repeating sequence is stopped.

In that case, need to check for sequence complete as soon as the
requestId, framenumber pair is added to the pending queue of completions.

Bug: 17428716
Change-Id: Ie5c6ea5a43639c812b8441da326c6303e150fce0
2014-09-15 16:28:02 -07:00
Eino-Ville Talvala
5fa15be4e9 Merge "Camera2: Clean up corner case error handling" into lmp-dev 2014-09-15 18:11:11 +00:00
Eino-Ville Talvala
9503785393 Camera2: Clean up corner case error handling
- If a session is closed, and a new session is created immediately
afterwards, but then fails to be configured, the first session sees an
onUnconfigured call which it wasn't expecting, and throws an
exception on an internal thread, leading to app death.
Add a guard against this case.

- If the lower levels skip a frame (illegal per design), be slightly more
robust to that by accepting any successful result as the latest completed
frame, instead of just incrementing the completed frame count. This will
lead to missing results, but should allow shutdown, etc, to complete
cleanly.

- Convert TIMED_OUT error codes to CAMERA_ERROR CameraAccessExceptions.
This is a common error code returned by waitUntilIdle.

Also, improve debug logging to log a session ID with verbose logging,
and add a few verbose logs.

Bug: 16899526
Change-Id: I7a31f0a12effc2611e1f9c2408224ee82c37c912
2014-09-14 14:41:47 -07:00
Eric Laurent
76466c7be3 Merge "SoundTrigger: fix KeyphraseRecognitionEvent parceling" into lmp-dev 2014-09-13 00:21:48 +00:00
Eric Laurent
75b433f737 SoundTrigger: fix KeyphraseRecognitionEvent parceling
Always include the Audioformat in the parcel if not
null.

Bug: 17489186.
Change-Id: I8bea031942b55078e5637959d5bf70961d134733
2014-09-12 15:45:47 -07:00
Yin-Chia Yeh
b086421b41 Camera2: add toString for TonemapCurve
Bug: 16899576
Change-Id: Id7c08afed8606efc880cc75201287cd70a0e301c
2014-09-12 14:12:13 -07:00
Jinsuk Kim
d4a94db1cd CEC: Bug fixes for vendor-specific command handling
- Add sendStandby()
- Respond with <Feature Abort>[INCORRECT_MODE] when the listener
  is not ready

Bug: 17379243
Bug: 17358887
Change-Id: I26a4157a70f11206978763fbbe69e4190e3e1d5c
2014-09-12 16:22:23 +09:00