Commit graph

213 commits

Author SHA1 Message Date
bohu
294d44be33 DO NOT MERGE ANYWHERE Qemu-pipe: refactor qemu_pipe.h into libqemu_pipe
Traditionally, qemu_pipe has both the declaration and implentation of each
function in one header file--qemu_pipe.h, and it is getting incovenient to
maintain.

This CL separates the implementation of functions from the header file,
and makes qemu_pipe a static library for other modules to link to.

Note that the interface and implementation of qemu_pipe are kept unchanged,
and future CLs will enhance the implementation to make it more reliable and
more compatible with old and new API levels.

Following projects are affected by this refactoring, and they are modified
accordingly:

device/generic/goldfish
device/generic/goldfish-opengl
hardware/ril/reference-ril

Change-Id: I541ecbf0cc7eadeef9d4e37ffd9ca7bfcc5c94c0
2017-03-01 16:33:44 -08:00
Tomasz Wasilczyk
3eba74fec1 Fix typo in radio_metadata_t definition.
Test: none, this struct is opaque.
Change-Id: I6b8f5787441618a7a818c7d4595010d241574c13
2017-01-12 11:15:32 -08:00
Tomasz Wasilczyk
70a8148b52 Make metadata field mandatory for program info struct.
Also, make metadata struct aligned.

Test: VTS, manual
Change-Id: I7dbd62d36ac21475fdbc49723ba3ea6744460d21
2017-01-09 14:26:43 -08:00
Miodrag Dinic
53be7eb3d0 Merge "[qemu]: Fix payload size format in qemu_pipe_frame_send()" am: e5976bea7a am: 8c274361fb
am: f610eaac14

Change-Id: I890fbb885044e82d4ec66a5a400240124003ac25
2016-09-30 18:00:16 +00:00
Miodrag Dinic
192be1dcae [qemu]: Fix payload size format in qemu_pipe_frame_send()
The following change introduced regression for booting AOSP
on emulator for all architectures:

7c7990e Fix warnings in system/ headers

qemu_pipe expects payload size in the message header to be in hex format,
as stated in the comment for qemu_pipe_frame_send().

Change-Id: I32cfa9c9b2af56f93bbda0ea5597451c389ae45e
Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
2016-09-30 13:58:11 +02:00
Colin Cross
bd45ba6972 Merge "Fix warnings in system/ headers" am: d7f60fd871 am: 299df0bf01
am: 88fd7e2ec4

Change-Id: I94891ea3c3a00ee39b48531fcc8e5e3d6ebe724a
2016-09-22 22:52:44 +00:00
Colin Cross
7c7990e6fd Fix warnings in system/ headers
system/core/include is included in the global include path using
-isystem, which hides all warnings.  Fix warnings in
system/core/include/system in preparation for moving from -isystem to -I.

- Fix invalid doxygen syntax in graphics.h
- Use a pragma to hide a C99 extension warning on the flexible length
  array in graphics.h
- Make static functions in radio.h static inline
- Fix size_t printf and size_t vs. ssize_t comparision in qemu_pipe.h
- Fix old style cast in window.h

Test: m -j native
Bug: 31492149
Change-Id: I857f289e4c8e303494831873282bbb69de155c10
2016-09-21 17:46:59 -07:00
Courtney Goeltzenleuchter
a2e874eabc Add color mode enums
The android_color_mode_t defines the color modes supported
by a display. A display can support multiple different
color modes.

sRGB mode and AdobeRGB are deliberately placed at 7 and 8
so that they match mode ID's used on prior devices.

bug: http://b/27926012
Change-Id: I9ab41b56ec0b495c02539665da5be158ffddf843
2016-09-08 11:39:32 -07:00
Lajos Molnar
0e10df4dd6 add android_flex_layout for describing all flexible formats.
Bug: 22767098
Bug: 24759202
Change-Id: I61e4ca9bd71e8da88a9571ec4effc7165026715b
2016-09-08 11:38:53 -07:00
Dan Stoza
5d636e830f NativeWindow: Add LAST_[DE]QUEUE_DURATION queries
am: 94ededa387

Change-Id: I4fb6c849cf97dcd70cc7b7345e230238870e7d3a
2016-07-06 16:27:37 +00:00
Dan Stoza
94ededa387 NativeWindow: Add LAST_[DE]QUEUE_DURATION queries
Adds two new enums to enable querying the duration of the last
dequeue or queue operations to a Surface/ANativeWindow.

Bug: 29413700
Change-Id: Ifa16755911c4a3c013a7128dd4038d328109c32d
2016-07-01 16:07:00 -07:00
Courtney Goeltzenleuchter
b7d9991277 Add color mode enums
am: bf8132a7c1

Change-Id: I9fcf65efe519cc41358f5031741b5c4d3024cd9f
2016-06-22 00:18:20 +00:00
Courtney Goeltzenleuchter
bf8132a7c1 Add color mode enums
The android_color_mode_t defines the color modes supported
by a display. A display can support multiple different
color modes.

sRGB mode and AdobeRGB are deliberately placed at 7 and 8
so that they match mode ID's used on prior devices.

bug: http://b/27926012
Change-Id: I9ab41b56ec0b495c02539665da5be158ffddf843
2016-06-21 14:47:23 -06:00
David 'Digit' Turner
3a72d0fc79 Merge \\\"[qemu]: Move qemu_pipe.h from include/system/ directory.\\\" am: 44b7339aa2 am: 1c01bae82a
am: 6bcf0cf1e7

Change-Id: I85589757feb3aac19469afd97b8e98a74373acab
2016-06-21 08:10:38 +00:00
David 'Digit' Turner
1c01bae82a Merge \"[qemu]: Move qemu_pipe.h from include/system/ directory.\"
am: 44b7339aa2

Change-Id: I59b9a896058dea76f69b9ba757890d4a42952a66
2016-06-21 08:05:18 +00:00
David 'Digit' Turner
c7b098ceb5 [qemu]: Move qemu_pipe.h from include/system/ directory.
The <hardware/qemu_pipe.h> header isn't related to any loadable
hardware module, this patch thus relocates it to <system/qemu_pipe.h>
which is a much more logical location.

Note the following changes:

  - The pipe name must begin with the 'pipe:' prefix to avoid an
    un-necessary snprintf() and buffer copy.

  - Does not probe for the obsolete /dev/goldfish_pipe device, i.e.
    only use /dev/qemu_pipe instead.

  - Use QEMU_PIPE_DEBUG() instead of D() as the debugging macro.

+ Update ADB to use the newest <system/qemu_pipe.h>

+ Add qemu_pipe_frame_send() and qemu_pipe_frame_recv() utility
  functions which replace the obsolete qemud_channel_send() and
  qemud_channel_recv() from the defunct <hardware/qemud.h>
  header.

BUG=25875346

Change-Id: Ic290a5b79d466c2af64b49bd9134643277c11bfd
2016-06-17 09:21:59 +02:00
Dan Stoza
c873d44942 Merge "add android_flex_layout for describing all flexible formats." into nyc-mr1-dev 2016-06-14 19:59:38 +00:00
Pablo Ceballos
c2efc32a0f Header changes for getFrameTimestamps
Change-Id: Iee9e0485544fac435e800ea869a8e4c2ed90bba9
2016-06-04 03:36:40 +00:00
Lajos Molnar
276f382722 add android_flex_layout for describing all flexible formats.
Bug: 22767098
Bug: 24759202
Change-Id: I61e4ca9bd71e8da88a9571ec4effc7165026715b
2016-06-03 00:59:30 +00:00
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