Commit graph

99 commits

Author SHA1 Message Date
Rom Lemarchand
ddc20de148 move sync headers from include to libsync
Make sw_sync.h private

Change-Id: I0b120ebe81fd4a191b7aa4b6a8de4f64d16e2b3e
2014-01-03 21:27:05 +00:00
Mathias Agopian
96675ed91f Fix rotation in camera2 API
Bug: 10804238
Change-Id: I093945789d9c6d373392fc9dfd18ec2c6058d3b9
2013-09-17 23:48:54 -07:00
Eric Laurent
04c12ca061 Add HOTWORD audio source to audio.h
- This is a complimentary change to the one adding this new source to
  MediaRecorder.java

Bug: 10640877.

Change-Id: Ie213e82b5a60dad2a277cef367c2f5e4df70df06
2013-09-09 15:42:31 -07:00
Jeff Brown
8ecc7afca4 Add helpers for audio remote submix devices.
Bug: 10265163
Change-Id: Iea7ecab4f2a655b719ff14b04c757d6dbd7a7ef3
2013-08-16 20:21:10 -07:00
Jesse Hall
1e26356da1 Replace sRGB_888 with sRGB_X_8888
Bug: 10357459
Change-Id: I23a3eca77acd8b4b40b1a67e7c050a7245b1821a
2013-08-16 08:40:52 -07:00
Glenn Kasten
c051ffd7c2 Add audio_input_flags_t
Change-Id: Ie65398cc67218cc63be4baa8a2a61d0ea591a2a3
2013-08-02 10:30:42 -07:00
Eino-Ville Talvala
f88a5b4f88 Window: Add query for consumer usage bits.
Bug: 9592202
Change-Id: Ied2fdb985dc59dd9c0f26c515353abdc37f0eb77
2013-07-30 21:38:13 +00:00
Mathias Agopian
6bac41f1bf get rid of HAL pixelformats 5551 and 4444
Change-Id: I047d948f2f3b5c681a0b187589775f92b4f01541
2013-07-26 14:50:26 -07:00
Mathias Agopian
224445c830 Merge "add sRGB pixel formats to the HALs" 2013-07-26 19:54:11 +00:00
Mathias Agopian
8d9da28ab5 add sRGB pixel formats to the HALs
Change-Id: I1d5f9dd14a6485dd3a29fb5960edfa79aa86da42
2013-07-25 17:07:11 -07:00
Glenn Kasten
87bc464a9f Merge "Valid channel mask must have at least one channel" 2013-07-24 15:49:13 +00:00
Alex Ray
000b1d0c50 thread_defs: remove trailing whitespace
Change-Id: Idba19c64dfde67c40a98c29f68d5e8d4e555a4cf
2013-07-23 22:20:45 -07:00
Colin Cross
42cf2b5945 fix windows build
thread_defs.h gets included by the windows host libandroidfw build,
which does not have sys/cdefs.h or BEGIN_DECLS.  Switch to using
extern "C" manually.

Change-Id: I363e6f2d3a64c5efeff54049a2e5dab080fd4715
2013-07-23 19:58:03 -07:00
Alex Ray
8a84c71acb cutils: add thread_defs header
Change-Id: I3b70054d9f9740a5980df514221de07df55e7176
2013-07-23 17:16:24 -07:00
Glenn Kasten
f7326dc0aa Valid channel mask must have at least one channel
Also:
 - Use correct type name audio_channel_mask_t
 - Use the parameter name 'channelMask' instead of the more ambiguous 'channels'

Change-Id: I22bc1821a1bded0e69fe7d99e7b981ff60d77cee
2013-07-23 16:47:17 -07:00
Richard Fitzgerald
05529a1a10 Add defines for audio offload and non-blocking write
- Defines audio output flags for offloaded playback of compressed
    streams, and non-blocking HAL write()/drain()
- Adds audio_offload_info_t to pass additional information about a
    compressed stream when offloading

Change-Id: I4592d0877edd39e68d0c1035d0652adbd397bf3a
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
2013-06-27 17:16:25 -07:00
Alex Ray
e13f15ab55 graphics: add Android flexible YCbCr format
Change-Id: I3f6676873febc793f7a4a5e06892cd9fadb35665
2013-04-09 15:09:35 -07:00
Mathias Agopian
bcfa910611 Refactoring: Rename SurfaceTextureClient to Surface
Change-Id: Ie745d9adf5465834bb8bf751a2f88b19435fdf46
2013-02-15 12:48:01 -08:00
Igor Murashkin
4869a68d56 am 1b69da3e: am 6711f76d: Merge "graphics.h: Remove unnecessary comments for Y8/Y16 formats" into jb-mr1-aah-dev
# Via Android (Google) Code Review (1) and others
* commit '1b69da3ef0f505b885f8621ca2dad44d46aa824e':
  graphics.h: Remove unnecessary comments for Y8/Y16 formats
2013-02-11 17:34:27 -08:00
Igor Murashkin
51b78949b2 am fbb4a5ac: am fba6c12a: Merge "graphics.h: add new Y8, Y16 formats" into jb-mr1-aah-dev
# Via Android (Google) Code Review (1) and others
* commit 'fbb4a5ac1b771b2df0786bb5587c7ed0d5f82089':
  graphics.h: add new Y8, Y16 formats
2013-02-11 17:34:14 -08:00
Igor Murashkin
d755b52b43 graphics.h: Remove unnecessary comments for Y8/Y16 formats
Change-Id: Ic80f6c4be7df9d9729334b97bb662eb2d0456c33
2013-02-11 11:34:53 -08:00
Igor Murashkin
9e00e66ebc graphics.h: add new Y8, Y16 formats
Change-Id: I0cb3786d91f442b5f3b665dd78bf5f0dd4ae4cf0
2013-02-08 13:40:59 -08:00
Eric Laurent
6c70ceeefe audio: added input device for front + back mic
Added a value to audio_channel_mask_t enum for front + back mic
combination to allow parsing of audio_policy.conf file by audio
policy manager.

Change-Id: I8412b4d3cfc03323eff867563a1a73322019c0f3
2013-01-22 17:09:30 -08:00
Jean-Michel Trivi
371fc00fc5 Remove force use definition for remote audio submix
Obsolete.

Bug 7318180

Change-Id: I3421ca554a4131d606bdee698aeb7b2091a5d966
2012-10-11 19:13:58 -07:00
Eric Laurent
4daa843432 audio policy: add forced uses for system
The volume and routing policy of AUDIO_STREAM_ENFORCED_AUDIBLE is
now controlled by AudioService by means of new forced use type
AUDIO_POLICY_FORCE_FOR_SYSTEM with config
AUDIO_POLICY_FORCE_SYSTEM_ENFORCED.

Bug 7032634.

Change-Id: Ib1834ec507f3aa726895b8fd3e8a91cc9cc601a7
2012-10-09 09:39:03 -07:00
Jesse Hall
bc930eda39 Move dequeue-buffer-and-wait out-of-line
The dequeueBuffer_DEPRECATED function also waits for the buffer fence,
so we can just call that. That way the wait call is compiled into our
code (instead of driver code) and we can see/modify it for debugging.

Bug: 7217641
Change-Id: Ie2ea85ed1543a4ff7986d0162aee773e93591309
2012-10-01 14:02:45 -07:00
Jamie Gennis
96094ae27c ANW: fix my fix for a file descriptor leak
Change-Id: Ief7b973fbdb76920abed19707963a0c3d306af31
2012-09-20 17:25:23 -07:00
Jamie Gennis
9bd8dd3b13 ANW: fix an fd leak
Change-Id: Id44cae6732c6694d2f470cbdfa5f59e7474f704f
2012-09-20 11:43:43 -07:00
Eric Laurent
eeeee802e9 audio: new audio devices enum values
Each audio device is identified by a bit in a 32 bit field with
16 bits for output devices and 16 bits for input devices.
The number of output devices is now exhausted.
In order to add new devices a new convention for audio device
identification is defined, allowing 31 different input and output
devices: Bit 31 of the bit field is reserved and when set indicates
an input device.

Also added new output device for wifi display and new input devices
for digital and analog docks, USB and wifi display send.

Change-Id: I849bec0b6d46e082e325a3f08890d313c8dc763b
2012-09-07 10:37:43 -07:00
Jean-Michel Trivi
e11866a879 Device and mode definitions for remote submix
A remote submix is an audio mix of audio streams that
 are not going to be played directly through the platform mix,
 but rather will be mixed together to be handled in a
 different manner. This mix can be obtained by recording
 it through the AUDIO_IN_REMOTE_SUBMIX and presenting it
 remotely (as opposed to local playback == on the device
 itself).

All changes marked "temporary" will be overriden by the
 changes to update the audio device definitions for
 the 2.0 API.

Change-Id: I9c6da607fc50b7b8545d189ac5b083107369cfb5
2012-09-06 15:08:17 -07:00
Jamie Gennis
febe9d904f Add an IMPL_DEFINED pixel format.
This change adds a new HAL pixel format that indicates that the specific format
is to be chosen by the gralloc implementation.

Change-Id: I326b5ec7347a20863b42119431ef1e4d22480fec
2012-08-22 14:44:51 -07:00
James Dong
6c4c66a767 Added a cmd for configuring number of video buffers for camera, if supported
o currently, only available in Camera2

Change-Id: Id9bf157496209af9be65d147e70aa4830158c88d
2012-08-01 17:00:12 -07:00
Glenn Kasten
16a7a0443a Declare audio_devices_t as uint32_t & enum consts
Declare audio_devices_t as uint32_t to permit bit operations,
and a separate anonymous enum for the constants.  This is similar to
audio_channel_mask_t.

Also remove spurious "typedef" on declaration of anonymous enum for
channel mask constants.

Change-Id: Ib4f92e9168261d44a475b3d48fe211e5c70ed441
2012-07-03 16:51:05 -07:00
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