Commit graph

194 commits

Author SHA1 Message Date
Dan Stoza
7f7c1c5de6 graphics.h: Add android_hdr_t
Adds android_hdr_t, which specifies different types of high dynamic
range encodings to be used throughout the system.

Bug: 25684127
Change-Id: Ic92bb5dc64494e643b828a8e24af8760e74e2360
2016-04-06 14:52:10 -07:00
Pablo Ceballos
0e28c1fa4a Merge "Rename single buffer mode to shared buffer mode" into nyc-dev 2016-03-28 19:34:27 +00:00
Dan Stoza
bb1deda59b graphics.h: Add android_color_transform_t
Adds android_color_transform_t, which specifies a range of color
transforms which may be applied to the whole display.

Bug: 22767098
Change-Id: Iaf03915c09ac0bdd18512b5f78c39da1705bda08
2016-03-24 10:38:46 -07:00
Pablo Ceballos
248e77156d Rename single buffer mode to shared buffer mode
Change-Id: If5d45b2955d1219687c624395799b81e432dcfcc
2016-03-17 16:11:08 -07:00
Lajos Molnar
88a5ad3f13 keep legacy HAL_DATASPACE enums unchanged
Bug: 25975353
Change-Id: I092b568420aa605425c12de9b245bca7ed602f43
2016-02-24 15:36:57 -08:00
Pablo Ceballos
f411123ea0 Merge "Add the setAutoRefresh interface in ANativeWindow" into nyc-dev 2016-02-20 18:22:29 +00:00
Pablo Ceballos
3daa57490e Add the setAutoRefresh interface in ANativeWindow
Bug 24940410

Change-Id: I6c0d149c63236f169897c64b21563630fb034338
2016-02-09 17:17:21 -08:00
Lajos Molnar
9136922045 Expand HAL_DATASPACE to include range, standard and transfer bitfields
Bug: 25975353
Change-Id: Id2668508b523130e5fa3496440d9423682b31632
2016-02-10 00:21:37 +00:00
Mattias Nissler
9cf80c6b40 graphics: Include stddef.h for size_t.
graphics.h uses size_t, but doesn't pull in a declaration. This results
in compile errors if code that includes graphics.h (such as
hardware/hardware.h) doesn't happen to have a size_t declaration from
elsewhere.

Change-Id: I0f3882c3dce20425697d25366d49930b2251ef7f
2016-02-03 22:24:53 +01:00
Dan Stoza
c003b515e9 Merge "Name the pixel format and transform enums" am: 53529ecacd
am: 65823b7820

* commit '65823b78207f7636e4d7ad8a4104ed663336c159':
  Name the pixel format and transform enums
2016-01-28 23:25:38 +00:00
Dan Stoza
48cd34080c Name the pixel format and transform enums
Adds an actual enum name for the HAL_PIXEL_FORMAT_* and
HAL_TRANSFORM_* enums.

Change-Id: I8d03c3695e8956b3b525559edcb37213ade6a0de
2015-12-17 13:58:19 -08:00
Robert Carr
f3954fba2d Add comment to keep enum in sync.
Now that we expose SCALING_MODE_* constants
out to Java add a comment to keep the bindings
in sync.

Bug: 26010823
Change-Id: I35473c673b79223ea3bebc118d3a31fc82f37381
2015-12-17 11:38:39 -08:00
Sanket Agarwal
2ccc52c3bb Add emergency announcement to definitions.
Change-Id: I57b1d6d5a0f8142efba27a17e6015429eba04f5c
(cherry picked from commit 2d0a4c10b6601e5f16a336d44f8536a7277d52d3)
2015-11-05 19:23:01 +00:00
Pablo Ceballos
923d27f20d Expose setSingleBufferMode in ANativeWindow
Bug 24940410

Change-Id: Ied57f1bef1988bdd0bf4dd95572f0985c9d43c2d
2015-11-03 10:56:25 -08:00
Yin-Chia Yeh
e49b696a35 graphics: update flexible YUV format gralloc requirement
Require gralloc accept flexible YUV when SW READ/WRITE usage is
set. Also decouple flexible YUV from camera usage flag.

Bug: 22379456
Change-Id: I5a82a8360b08036c31dc03cd639d449ba1e3ed01
2015-07-14 12:28:38 -07:00
Eino-Ville Talvala
414fb90eae Camera: Add new set video format/dataspace command
This allows the video encoding subsystem inform the camera what format
and dataspace should be used for metadata-mode buffers.

This is necessary to allow software encoders and other generic
consumers that cannot interpret
HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED buffers.

Bug: 13222807
Change-Id: I01090dc4dce11f075f7d3cd86daca5ecf3d9e995
2015-06-08 13:21:27 -07:00
Eino-Ville Talvala
20651b5c7d Graphics depth formats: Add confidence values
Supplement the dense and sparse depth image formats with
confidence values.

For {HAL_PIXEL_FORMAT_Y_16, HAL_DATASPACE_DEPTH}, use the 3 MSBs
for confidence.

For {HAL_PIXEL_FORMAT_BLOB, HAL_DATASPACE_DEPTH}, add a 4th float
value for confidence.

Bug: 20123879
Change-Id: Idc27081efec682a712ce77ccfec59328f298b944
2015-05-26 14:50:48 -07:00
Dan Stoza
0a866ea450 ANativeWindow: Add NATIVE_WINDOW_BUFFER_AGE query
Adds a NATIVE_WINDOW_BUFFER_AGE query, which returns the age of the
contents of the most recently dequeued buffer as the number of frames
that have elapsed since it was last queued.

Change-Id: Ib6fd62945cb62d1e60133a65beee510363218a23
(cherry picked from commit 19df32cd19)
2015-04-28 13:42:30 -07:00
Lajos Molnar
e632c1bf0c media: reserve color formats used by flex-YUV422/444 and RGB/A888
These are used by Image when MediaCodec produces a non-surface
higher-resolution YUV image, or codec-specific ordered RGB/A image

Change-Id: Ie5cd8236586b375cbc707d45584bd35415c274fc
2015-04-24 23:43:57 +00:00
Dan Stoza
3c4074bfb4 am a197c3b7: am 3ec9c17f: am 04274a29: Merge "Add NATIVE_WINDOW_SET_SURFACE_DAMAGE"
* commit 'a197c3b74b50bbdf88a9214269e29db7286338c1':
  Add NATIVE_WINDOW_SET_SURFACE_DAMAGE
2015-04-15 20:29:57 +00:00
Dan Stoza
238ec985f9 Add NATIVE_WINDOW_SET_SURFACE_DAMAGE
Adds a new perform action: NATIVE_SET_WINDOW_SURFACE_DAMAGE, which
allows the producer to describe the region of the surface that has
changed since the previous frame.

Bug: 11239309

Change-Id: Ie645e6a52b37b5c1b3be19481e8348570d1aa62c
2015-04-15 12:49:41 -07:00
Rom Lemarchand
be7aca60f3 Move audio includes to system/media/audio
Change-Id: I21bed541dbd81127e6b8340f7f14b5523f7c5c0d
2015-04-03 15:12:01 -07:00
Phil Burk
7c6f796df4 Merge "audio.h: add AUDIO_FORMAT_DTS" 2015-04-02 23:10:23 +00:00
Phil Burk
103c2d2203 audio.h: add AUDIO_FORMAT_DTS
Bug: 18292317
Change-Id: Icb3855e958d02e3b03517ac0fcf7de743d896c12
Signed-off-by: Phil Burk <philburk@google.com>
2015-04-01 16:54:41 -07:00
Yin-Chia Yeh
3fcb735030 Merge "graphics: add android raw12 format" 2015-03-31 18:27:11 +00:00
Yin-Chia Yeh
9a5eeba588 graphics: add android raw12 format
Change-Id: I1c528ecf62746aa96d6e132eaa874015d9d7c446
2015-03-30 16:35:56 -07:00
Jean-Michel Trivi
187f67695a Merge "Fix comment in audio definitions header" 2015-03-25 01:14:54 +00:00
Jean-Michel Trivi
1ede5537a3 Fix comment in audio definitions header
Change-Id: I08f23f3feaacf4cb39e93992fe839f1c1f084363
2015-03-24 17:17:45 -07:00
Eino-Ville Talvala
b93343d199 DO NOT MERGE Add ANativeWindow dataSpace; update graphics formats, color spaces
First stage of adding a new dataSpace field for ANativeWindow,
for communicating format- (and endpoint-) dependent information
about graphics buffers. For most formats, dataSpace describes the
color space of the buffer, while format describes the memory layout.

For some formats, the dataSpace may also specify that the buffer
contains depth measurements, encoded images, or other kinds of
information that is not necessarily a simple 2D image.
Rename the existing colorspace enumeration to dataspace, with an added
dataspace for depth, and sRGB gamma-corrected and linear colorspaces.

Add in a definition for Android depth point clouds as a
variable-length list of float-triplet coordinates, as the underlying
layout of buffers with format HAL_PIXEL_FORMAT_BLOB and dataSpace of
HAL_DATASPACE_DEPTH.

Also remove now-unnecessary sRGB HAL graphics formats, and remove the
alias RAW_SENSOR that was left in to ease transition to RAW16.

Cherry pick of I8797f67fb9c2b18da5975f2145303ca0bf98e62d with the
following diff to maintain source compatibility:

@@ -58,6 +58,11 @@ enum {
     HAL_PIXEL_FORMAT_RGB_565            = 4,
     HAL_PIXEL_FORMAT_BGRA_8888          = 5,

+    // Deprecated sRGB formats for source code compatibility
+    // Not for use in new code
+    HAL_PIXEL_FORMAT_sRGB_A_8888        = 0xC,
+    HAL_PIXEL_FORMAT_sRGB_X_8888        = 0xD,
+
     /*
      * 0x100 - 0x1FF
      *
@@ -189,6 +194,9 @@ enum {
      */
     HAL_PIXEL_FORMAT_RAW16 = 0x20,

+    // Temporary alias for source code compatibility; do not use in new code
+    HAL_PIXEL_FORMAT_RAW_SENSOR = HAL_PIXEL_FORMAT_RAW16,
+
     /*
      * Android RAW10 format:
      *

Change-Id: I5c5ba98b297436f950e06a181eb0ff955747680f
2015-03-19 13:19:48 -07:00
Eric Laurent
699ce298ca Definitions for broadcast radio.
Added common definitions for broadcast radio
HAL and native service implementation.

Change-Id: Id7061bcca5ac6d83a1b96ca8ccf6894c0364629c
2015-03-13 15:35:35 -07:00
Andy Hung
17e8158635 Merge "Fix comment on AUDIO_FORMAT_PCM_SUB_8_24_BIT" 2015-03-10 23:25:02 +00:00
Andy Hung
4ff72b52a2 Fix comment on AUDIO_FORMAT_PCM_SUB_8_24_BIT
Should be Q8.23 (24 bits packed in the least significant
3 bytes).

Change-Id: If5ca27c27249487e28c0be42ebdd283308ff8552
2015-03-10 16:01:49 -07:00
Eino-Ville Talvala
03743414cb Add ANativeWindow dataSpace; update graphics formats, color spaces
First stage of adding a new dataSpace field for ANativeWindow,
for communicating format- (and endpoint-) dependent information
about graphics buffers. For most formats, dataSpace describes the
color space of the buffer, while format describes the memory layout.

For some formats, the dataSpace may also specify that the buffer
contains depth measurements, encoded images, or other kinds of
information that is not necessarily a simple 2D image.
Rename the existing colorspace enumeration to dataspace, with an added
dataspace for depth, and sRGB gamma-corrected and linear colorspaces.

Add in a definition for Android depth point clouds as a
variable-length list of float-triplet coordinates, as the underlying
layout of buffers with format HAL_PIXEL_FORMAT_BLOB and dataSpace of
HAL_DATASPACE_DEPTH.

Also remove now-unnecessary sRGB HAL graphics formats, and remove the
alias RAW_SENSOR that was left in to ease transition to RAW16.

Change-Id: I8797f67fb9c2b18da5975f2145303ca0bf98e62d
2015-03-04 11:59:51 -08:00
Paul McLean
9bc8190442 Adding name field to AudioPort for enum/select API.
Change-Id: I9e7a6476f7f2658c6ea1ac255683fefb9f598a2d
2015-02-02 12:45:38 -08:00
Zhijun He
46e0a589d5 camera: add external camera facing enum
This is to enable the external camera support.

Change-Id: Id8329e31ad0622bdc06c60e87e97c742a9719b3b
2015-01-22 13:43:09 -08:00
Eric Laurent
4fca59181c audio: add usage "virtual source" to audio attributes.
Bug: 16006090.
Change-Id: I2d22b52e97095b57a6508b82bd11e27f860bb2e7
2014-12-09 12:13:13 -08:00
Eric Laurent
47f52f247d audio: new stream types
Added stream types for internal use by audio policy
and audio flinger.

Bug: 18067208.
Change-Id: I90fd4df9ed5e0d8fb8c220d67e95fd0e32a06f14
2014-11-24 10:41:21 -08:00
Carson Liao
4c4cf467f5 modified AUDIO_SOURCE_FM_TUNER enum value for FM feature
Review: https://partner-android-review.git.corp.google.com/#/c/183993

    Signed-off-by: Carson Liao <carson.liao@mediatek.com>

Change-Id: I8d70b197bcdc710119031bcf622fee0c1b3b3aa7
2014-10-06 22:02:37 -07:00
Hochi Huang
fcbb23adc9 [AU] Update volume setting and Audio Device API 3.0
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
Change-Id: I772584ae05e6a8d2fdc8c4a52e44ad80c3c1a4a7
2014-09-25 21:26:02 +00:00
Eric Laurent
f6cce347a7 audio: add HW hotword capture flag
Bug: 17575019.
Change-Id: I12c0a2e0200f3d839dfd74650724391e54ac3534
2014-09-19 17:45:18 -07:00
Jon Eklund
fcfa86403e audio.h: Add "safe speaker" device for limited-loudness use cases
Bug: 17319721
Change-Id: Ie1af5b73258f8a0009c3bc3cecb3e0e8b2262ed7
2014-09-10 15:51:48 -07:00
Rachad
cc2566f127 Merge "Tunneled Video Playback support" into lmp-dev 2014-08-09 00:51:24 +00:00
Eric Laurent
d91e6df901 audio: add defines for audio HW sync source
Bug: 16132368.
Change-Id: I4008c315f2cba9c6027998be92f4af649359bcce
2014-08-05 15:02:57 -07:00
Rachad
d6d4c61a93 Tunneled Video Playback support
Added native_window_set_sideband_stream() method to window.h

Bug: 16132368
Change-Id: Iff5770cb2e2d27176bee37edacaed7b783bbce2a
2014-08-04 21:57:37 +00:00
Eric Laurent
3fc434e9c1 sound_trigger HAL update
Indicate if trigger capture is returned with
recognition event in implementation properties
Add coarse confidence level to keyphrase recognition event.
Add capture format to recognition event

Bug: 12378680.

Change-Id: I52303ce2e46b9ebfb9993e47d153799921f9f8e7
2014-08-03 17:52:10 -07:00
Eric Laurent
1e92ed5e83 audio: define type for unique audio Ids.
Define a type for unique audio Ids allocated by AudioFLinger
for use as session Ids or I/O handles.

Bug: 12378680.
Change-Id: Ic9019fff97a1227b60e48c88c57d25dbbdcd7d1e
2014-07-28 14:31:58 -07:00
Eric Laurent
a768c306b2 audio: add audio device address helper function
Add helper function to derive set_parameter command
string from device type and address.

14815883

Change-Id: Icf47218f1809f567ef93bdd99d6308475886b298
2014-07-28 19:24:50 +00:00
Eric Laurent
0a381a379d audio: move struct audio_config definition to audio.h
struct audio_config definition moved from hardware/audio.h to
system/audio.h for use inside the framework and not only at the HAL.

Added frame_count field to struct audio_config.

Bug: 14815883.

Change-Id: Ib0e99a60234b8e5302eb882b89e5a021a94ec2cb
2014-07-28 19:18:39 +00:00
Jean-Michel Trivi
c3dbe121be Define new audio attribute flag: beacon
Flag AUDIO_FLAG_BEACON characterizes streams where the system
  ensures that the playback of the sound will be compatible
  with its use as a broadcast for surrounding people
  and/or devices. Ensures audibility with no or minimal
  post-processing applied.

Bug 15415971

Change-Id: I1df9dc50e3fcc973a0709a55df5b3bd95f81eb58
2014-07-27 14:09:00 -07:00
Zhijun He
c73b73a3c9 graphics: update raw10 to allow padding between rows
Change-Id: Ied1f42bb977212d9e5f3b2b2b3caa9c8c2caac5d
2014-07-25 11:42:38 -07:00