Commit graph

66 commits

Author SHA1 Message Date
Jamie Gennis
22aec573b7 ANativeWindow: update queue/dequeue/cancel w/ sync
This change deprecates the existing queueBuffer, dequeueBuffer, lockBuffer, and
cancelBuffer functions, and replaces them with a queueBuffer, dequeueBuffer,
and cancelBuffer function that accepts or returns a libsync fence file
descriptor.  It also adds the native_window_dequeue_buffer_and_wait convenience
function.

Change-Id: Ifaac91164d014993d7d1d96e0303e04e429f4d00
2012-06-19 09:52:24 -07:00
Eino-Ville Talvala
0a052487f4 Add HAL_PIXEL_FORMAT_BLOB
This format describes buffers that are not structured like normal
image data, and can only be meaningfully understood by the endpoints.

As an example, this format is used for transporting JPEG-compressed
image buffers from the Camera HAL to the framework/apps.

Buffers of this format must have a height of 1 and a width equal to
their size in bytes. Otherwise their interpretation is up to the two
endpoints.

Bug: 6243944
Change-Id: Ia81015694cbf3a89e29bfbf3624c3ea2ef4f66fd
2012-06-13 11:53:57 -07:00
Eric Laurent
88f11846a6 audio policy: allow disabling A2DP for media.
Added FORCE_NO_BT_A2DP forced use to allow applications to
override default policy to use A2DP whenever connected.

Bug 6485897.

Change-Id: I0039232ea6cce4121f375961b2c153d1a0d92e49
2012-05-24 10:10:45 -07:00
Eino-Ville Talvala
67fb73f5d5 Merge "Camera: Document expected error codes for start face detect." into jb-dev 2012-05-10 10:21:04 -07:00
Eino-Ville Talvala
58cfa8af0e Camera: Document expected error codes for start face detect.
Clarify when BAD_VALUE is expected from the camera start face detect
command.

Bug: 6459066
Change-Id: Id1b3d5047dee2c509aa6e374a5ed439a776b0b87
2012-05-09 18:32:36 -07:00
Jamie Gennis
d21113ac46 ANativeWindow: add set_post_transform_crop
This change replaces the set_active_rect function with set_post_transform_crop.
There is a temporary set_active_rect function that calls
set_post_transform_crop for compatibility while commiting to multiple git
repositories.

Change-Id: Ia7c171186fd277d5a36f6068ace93a9ce1c82d28
2012-05-07 14:21:46 -07:00
Jamie Gennis
190b6e2698 ANativeWindow: fix up some comments
This change clarifies in the ANativeWindow perform docs which perform calls are
private to the framework and should not be made by code below the HAL level.

Change-Id: Ibfeba0760d9a3f74996e6358d5ad89a408f80dfe
2012-04-30 16:32:06 -07:00
Jamie Gennis
185b300d6a graphics.h: clarify docs about stride for YV12
This change makes it clearer how to derive the stride of the Cr and Cb plane
from the stride of the Y plane for the YV12 pixel format.

Change-Id: I54a9a20f35224bd583e25c615014cc8d830a1dd0
2012-04-30 12:50:38 -07:00
Mathias Agopian
c36cc3b598 Merge "ANativeWindow: add set_active_rect" 2012-04-24 17:30:33 -07:00
Jamie Gennis
aa3f4c3591 add query for finding out if consumer runs behind of producer
Change-Id: I3baae99d4da00d962d3afe6bdfc16e3eb04ede24
2012-04-24 17:29:42 -07:00
Eric Laurent
92e6c88265 Merge "audio policy: add deep audio buffering flag." 2012-04-20 13:47:30 -07:00
Eric Laurent
9aec362e76 audio policy: add deep audio buffering flag.
Add a value in audio policy flags to indicate an output
stream providing deep audio PCM buffers. Such an output
helps reducing the power consumption at the expense of audio latency.

Stagefright will indicate a preference for such an output when playing music
only (no video) and the audio duration is more than a given threshold.

Change-Id: I0e6a9f5746a22d2bfea2b21dd182489a34a4b528
2012-04-19 17:57:34 -07:00
Eino-Ville Talvala
29dbf049bc Merge "Add new raw image sensor HAL pixel format." 2012-04-19 15:46:26 -07:00
Eric Laurent
577deda5e3 removed obsolete audio policy flags
Removed obsolete AUDIO_POLICY_OUTPUT_FLAG_xxx flags definition.
All project mmust use AUDIO_OUTPUT_FLAG_xxx flags from system/audio.h

Change-Id: Ib374dee96afcf176df35d9a621be02ce0e30caf5
2012-04-18 13:40:52 -07:00
Jamie Gennis
fb1ee57144 ANativeWindow: add set_active_rect
This change adds the set_active_rect 'method' to the ANativeWindow interface.

Change-Id: Iae910d259ba5c3e94594fa1ffec5fc0662546ad0
2012-04-17 19:37:48 -07:00
Eric Laurent
545ab46063 audio: added definitions for audio HAL device API.
Added definitions for output flags needed by new audio
HAL device API.

These flags where previously defined in audio_policy.h.
Definition in audio_policy.h remains temporarily until
all projects are changed to use new flags.

Change-Id: I371558c78050daae73942a36f51854372ab71068
2012-04-17 16:02:31 -07:00
Eino-Ville Talvala
0a85154c16 Add new raw image sensor HAL pixel format.
This format is exposed outside of the HAL to applications.

RAW_SENSOR is a single-channel 16-bit format, typically representing raw
Bayer-pattern images from an image sensor, with minimal processing.

The exact pixel layout of the data in the buffer is sensor-dependent, and
needs to be queried from the camera device.

Generally, not all 16 bits are used; more common values are 10 or 12
bits. All parameters to interpret the raw data (black and white points,
color space, etc) must be queried from the camera device.

This format assumes
- an even width
- an even height
- a horizontal stride multiple of 16 pixels (32 bytes).

Change-Id: I67fc72d1c2c899e258fcd53b3ab91b459e9210f0
2012-04-13 16:02:31 -07:00
Mathias Agopian
aab19bbcb6 Merge "Added flag for cropped scaling mode" 2012-04-12 17:34:51 -07:00
Daniel Lam
29392a4e5b Added flag for cropped scaling mode
NATIVE_WINDOW_SCALING_MODE_CROP forces the SurfaceTexture
to match the crop rect's aspect ratio to that of the window.

Change-Id: Id126b106eac06fd34d2d650a1bc66ffbac26c501
2012-04-12 14:33:31 -07:00
Michael I. Gold
afcdef6357 window: add API for native_window_set_buffers_user_dimensions
Add token and wrapper function for a new private function
native_window_set_buffers_user_dimensions which overrides the native window
size as the default buffer size.  This is intended for use primarily by
ANativeWindow_SetBuffersGeometry so that application-set buffer dimensions may
co-exist with pre-rotation in e.g. the GLES driver which calls
native_window_set_buffers_dimension.

Change-Id: I6c0fc334c070290cc15b04daae1484d0a28cd8ad
2012-04-10 18:15:48 -07:00
Eric Laurent
79f90bdc7d audio: added definitions for usb audio devices
Change-Id: I4a4f5919708a09f87974367961b1d09664ae6c06
2012-04-06 14:03:09 -07:00
Glenn Kasten
31af5f7beb Add AUDIO_POLICY_OUTPUT_FLAG_FAST
Change-Id: I513b84de9c08957e22bff1fc2f25e4f4098111ef
2012-03-26 14:08:34 -07:00
Glenn Kasten
b1108c8594 Merge "audio_channel_in/out_mask_from_count" 2012-03-19 07:31:50 -07:00
Jean-Michel Trivi
427d2b43c2 Fix switch indentation in audio_bytes_per_sample
Align "case" keyword with "switch" keyword.

Change-Id: I57ef96253fb1fc925315b557ea27ccc35f63c2f8
2012-03-15 10:18:42 -07:00
Glenn Kasten
89f7ba3df8 audio_channel_in/out_mask_from_count
Change-Id: I879d188cf64ea1dbfa1a0574dee77119c2b08e26
2012-03-14 17:06:13 -07:00
Wu-cheng Li
2923c0ba52 Add camera ping command and release message.
The problem is both face unlock and camera application try to open
the hardware camera at the same time. A new camera open API is
added to let face unlock take the camera away from the existing
client. The release message is used to notify the existing client,
so it has time to release the hardware camera and clean up.

If existing client tries to use the camera after it is released,
the method will return error. It is still possible that the
camera has been taken and the existing client has not got the
notification. When any method returns error, the existing client
can use ping command to check whether the camera has been released.
If yes, the client can silently finish the app itself or show a
toast if it wants.

bug:5584464

Change-Id: I87f9f7db2f7b2b70ab2405f9b3da0d8946d6a01b
2012-03-14 10:35:53 +08:00
Eric Laurent
11fd2beea0 audio policy: added flag for primary output
Added a flag for output stream attributes indicating a primary
audio output stream.
The primary audio output stream is unique on a platform and receives all volume,
routing and parameters related to telephony use case.

Change-Id: Ic50b3c02cc60805031f26b819da6cf9ad65ad11c
2012-03-08 13:18:20 -08:00
Jean-Michel Trivi
4ab051ab46 Add function to derive a channel mask from a channel count
Change-Id: I22523ded9cd8e5283a285a9db21d819bbbc1b6c3
2012-03-05 13:59:09 -08:00
Eric Laurent
2e9d845850 renamed audio policy output flag.
Renamed AUDIO_POLICY_OUTPUT_FLAG_INDIRECT to AUDIO_POLICY_OUTPUT_FLAG_NONE
which is more appropriate.

Change-Id: Ie898ddc2279db55a65ece96e09232163c2e78024
2012-03-01 09:43:07 -08:00
Mathias Agopian
c958a7f498 add missing include
Change-Id: Id93278c59cfdf72a62a4fe26178bd5c3e43b089e
2012-02-25 21:13:36 -08:00
Glenn Kasten
828bf0cdf4 Use audio_format_t consistently
Change-Id: I7eb489b1c1cbe9bfadd43cd7645da86b90fab652
2012-01-12 13:20:35 -08:00
Jesse Hall
e565492c6c am 3bc5e452: am 7cd3e0a3: Document ANativeWindow\'s buffer refcounting
* commit '3bc5e452808514c48cdb5d2c3ca14c022aeecf6f':
  Document ANativeWindow's buffer refcounting
2011-12-13 12:25:10 -08:00
Jesse Hall
7cd3e0a3a2 Document ANativeWindow's buffer refcounting
Change-Id: I5454e90afd1a1b7d4a75c503f8dca712dba33790
2011-12-12 16:54:14 -08:00
Wu-cheng Li
3dc54060c1 Add camera focus move message.
bug:5534973
Change-Id: I45213b1a4db3dbcfc0ab124689f27a88335fb26b
2011-11-29 14:28:54 +08:00
Wu-cheng Li
baad2843a1 Update camera documentation about face detection.
bug:5169599
Change-Id: I5280137cee5401fadec36cae732ecb78a2d44dc3
2011-10-13 12:07:05 +08:00
Wu-cheng Li
8d43cb6edb Allow CAMERA_CMD_SET_DISPLAY_ORIENTATION to change during preview.
bug:5422679
Change-Id: Ia4a09328bd9e1d36af680be4d065bc08cf0dec0f
2011-10-07 17:19:18 +08:00
Mathias Agopian
c9b06951e0 another attempt at fixing the SDK build.
Change-Id: I2b96cf7d046b694b232f0699257e4e0608fda660
2011-08-11 22:35:31 -07:00
Mathias Agopian
7934d18aa6 really fix the SDK build and fix THE build
Change-Id: I994cccf01bcafedc9ea11648eafc20300c58878b
2011-08-11 19:26:39 -07:00
Mathias Agopian
33a1d43636 attempt to fix SDK build.
missing cdefs.h include

Change-Id: Ic7dfdfe74976a459f166a7576b077965cd1fda6a
2011-08-11 19:09:33 -07:00
Mathias Agopian
5c9be402a4 Add a priority constant in to the graphics HAL header
this is needed if a display/gpu driver needs to create
service threads that can block the main ui thread.
to avoid priority inversions, these must run at
HAL_PRIORITY_URGENT_DISPLAY

Change-Id: I3af592e05a6d1b6f39a2b7885a7c842e54abfce2
2011-08-09 18:55:44 -07:00
Mathias Agopian
319f4e2793 fix a typo that prevented api_connect/api_disconnect to work
also make the original connect/disconnect inlines be no-ops.

Change-Id: Ic723e21455491c63ccbbcd01d3a47cd7ed788319
2011-08-03 11:37:27 -07:00
Wu-cheng Li
a43546a874 Change CAMERA_MSG_METADATA_FACE to CAMERA_MSG_PREVIEW_METADATA.
bug:4460717

Change-Id: Icb9c54fa35a1af7c4f761d1a25061e6993cfc4af
2011-08-02 13:24:48 +08:00
Mathias Agopian
ed7f9aaf76 Merge "connect/disconnect is now deprecated." 2011-08-01 16:35:51 -07:00
Mathias Agopian
8ad545297c connect/disconnect is now deprecated.
these hooks are replaced by api_connect/api_disconnect
which serve exactly the same purpose than before.
the old hooks are deprecated because they won't be called
from the gl driver anymore, but instead will be called
by our EGL wrapper. to maintain binary compatibility
it was necessary to introduce these new hooks.

Change-Id: I11756a5d99e3ea3d6fb61b943f82037932dfa56a
2011-07-29 17:52:36 -07:00
Wu-cheng Li
3ac91d178b Change int to int32_t in camera_frame_metadata and camera_face.
bug:4460717
Change-Id: I5c7e4ed117c2b481fb0f7d9db418f98b7459adde
2011-07-30 07:04:01 +08:00
Wu-cheng Li
9d5bfd3541 Add camera frame metadata and face detection structs.
bug:4460717
Change-Id: Ib72abfba080529472cf3fecb712043403bf7295f
2011-07-29 07:07:48 +08:00
Jean-Michel Trivi
c349636c7c Merge "Fix bug 4319552 Use commonly defined channel mask values in native" 2011-07-26 09:27:30 -07:00
Wu-cheng Li
4518e6a299 Merge "Add camera face detection enums." 2011-07-25 19:02:26 -07:00
Wu-cheng Li
de19ea2602 Add camera face detection enums.
bug:4460717
Change-Id: Id5cadcd7cdab9a9978569caf27d2ef2747fa6570
2011-07-26 08:45:50 +08:00
Jean-Michel Trivi
6d4f39754b Fix bug 4319552 Use commonly defined channel mask values in native
The native channel mask values are equal to the Java values, which
 differ from other standards simply for legacy reasons. It is
 preferrable to use commonly used values, and translate from the
 Java constants to the common values when specifying a Java mask.
The new definitions uses the same values and ordering as in
 OpenSL ES and other standards.

Change-Id: I879f64b281714c60684cd8b36fe6ae648a555121
2011-07-25 17:02:11 -07:00