Commit graph

1052 commits

Author SHA1 Message Date
Simon Wilson
7ad4534e1e am 907b20aa: Initial version of the MCU HAL
* commit '907b20aa7475a91a148bb655b0d80cecabb130f6':
  Initial version of the MCU HAL
2014-02-10 20:38:51 +00:00
Simon Wilson
907b20aa74 Initial version of the MCU HAL
Change-Id: Ic88da7e825b67ed64cde4eed3055022daabe9830
2014-02-07 18:07:39 -08:00
Ashok Bhat
d2be74aa57 AArch64: Calculate private_handle_t's numInts
A constant sNumInts with a value of 6 was being assigned to the numInts
attribute in the private_handle_t constructor, and was also used in the
validate method. That constant value is appropriate for 32-bit systems
but is not appropriate for a 64-bit system where uintptr_t used for
base attribute will be 64-bit.

sNumInts is now changed to a static inline function that calculates
numInts.

Change-Id: I482ddb5915c9ff55fb2e2a87887a0ec2dc2299ed
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-07 17:52:08 +00:00
Colin Cross
d39b2a8a98 am 5dbc98ff: am 037335eb: Merge "gralloc: fix warnings"
* commit '5dbc98ff2c6714d66a1377ed9c9030d130ed7ebb':
  gralloc: fix warnings
2014-02-06 03:11:39 +00:00
Colin Cross
5dbc98ff2c am 037335eb: Merge "gralloc: fix warnings"
* commit '037335ebe826289445fd2ba14e95ff41d57ad928':
  gralloc: fix warnings
2014-02-06 03:03:12 +00:00
Colin Cross
febaaa937f gralloc: fix warnings
Fix LP64 pointer casting warnings, unused parameters, and
turn off missing initializer warnings.

Change-Id: Idb70f4534282fed64ae81cb1e154d3f5b93091b0
2014-02-05 18:21:09 -08:00
Ruben Brunk
093e8e8b9b Merge "camera3: Update maxRegions tag." 2014-02-04 21:00:59 +00:00
Ruben Brunk
80df5b529f camera3: Update maxRegions tag.
Change-Id: I22501cbf7f941d9626b88182e2dda8a13a620d01
2014-02-03 17:40:43 -08:00
Amit Shekhar
f9953b7d52 usbaudio: fix for out->dev->lock remains locked in error case
out->dev->lock remains locked in error case in out_write()
Added pthread_mutex_unlock() in the error case

Bug: 12824374
Change-Id: Ibbbd5ced1f9d469cfba3b33a94414d0b94affa8f
Signed-off-by: Glenn Kasten <gkasten@google.com>
2014-01-30 16:23:21 -08:00
Colin Cross
0ab48411fe am 8ded7780: am 3da0d0f4: am 662e97ee: am aea8c156: Merge "hardware/libhardware: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH"
* commit '8ded7780c6658d6db011f642206726234098388f':
  hardware/libhardware: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
2014-01-28 01:08:45 +00:00
Colin Cross
8ded7780c6 am 3da0d0f4: am 662e97ee: am aea8c156: Merge "hardware/libhardware: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH"
* commit '3da0d0f4c7a02cbb510d65def4e87eb31c97948b':
  hardware/libhardware: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
2014-01-28 01:03:07 +00:00
Colin Cross
3557abaae2 hardware/libhardware: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
LOCAL_MODULE_PATH doesn't work for multiarch builds, replace it
with LOCAL_MODULE_RELATIVE_PATH.

Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
2014-01-24 21:00:32 -08:00
David 'Digit' Turner
8690233d7a am ae2e54fa: resolved conflicts for merge of 017649d6 to klp-modular-dev
* commit 'ae2e54faf71f4ff3d96216031c66d14dfbbceb5f':
  Vibra: Adapt AOSP (default) vibrator HAL into a hardware module.
2014-01-23 23:26:23 +00:00
David 'Digit' Turner
ae2e54faf7 resolved conflicts for merge of 017649d6 to klp-modular-dev
Conflicts:
	modules/Android.mk

Change-Id: I6b84d2320be98b6af1f0cab729a917cf84cd9524
2014-01-23 23:34:45 +01:00
Ruben Brunk
b35bee2a90 Fix build. Missing vendor tags header. 2014-01-17 14:48:19 -08:00
Ruben Brunk
61cf9eb920 camera3: Update vendor tag spec for HAL 3.2.
- Deprecates vendor tag specification in camera3 device.
- Moves vendor tag ops declaration to camera metadata library and
  cleans up definitions.
- Updates the example HAL.

Change-Id: Ifb16bb0d4bbc896bc32d33dd150e7e174af57dad
2014-01-16 18:27:08 -08:00
Vincent Becker
022224fbf8 Vibra: Adapt AOSP (default) vibrator HAL into a hardware module.
Android's implementation of vibrator needs to be done inside a
hardware module, so that it can make a vendor implementation possible.

Hw module's name becomes vibrator.default.so.

This change is related to other changes in:
 - frameworks/base
 - hardware/libhardware_legacy
 - device/generic/goldfish
 - platform/build

Change-Id: I844279f5535289f079d412fdc44c5cb3c9c1130c
Author: Vincent Becker <vincentx.becker@intel.com>
Signed-off-by: Vincent Becker <vincentx.becker@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: David Wagner <david.wagner@intel.com>
Author-tracking-BZ: 49760 94611
2014-01-13 15:07:41 +01:00
Mike Lockwood
f847762477 DO NOT MERGE: Sensor multi HAL
Squashed commit of:

Move sensors multi HAL to libhardware

Added a SensorEventQueue, a circular buffer meant for reading with one thread
and polling a subhal with another. The writing thread gets access to pointers
in the internal buffer. This design avoids a memcpy on write when the multihal
fetches subhal events using poll().

Unit-tests include multithreaded reading and writing lots of events, in
random-sized chunks.

This is not used by the multihal yet. That will be a different CL.

MultiHal multithreaded polling

Tests SensorEventQueue I/O when the queue is full.
Reduced debug logging in multihal.

deactivated multihal logspam, made warnings warnings, left critical startup info

Removed unneeded linux/input.h includes, to fix Mac SDK build

Change-Id: I1e35508949df98a1acef7a4a2d012eea87b4a5eb
2013-12-09 15:26:55 -08:00
Alex Ray
215913e370 Merge "modules: camera: replace pthread mutex with utils'" 2013-12-05 22:17:07 +00:00
Rom Lemarchand
2955fe2083 am e735e5fa: am 047510b1: Merge "gralloc: delete unused mutex declaration"
* commit 'e735e5fa42f62d856e6c86d7ee785bb9797b6750':
  gralloc: delete unused mutex declaration
2013-11-27 10:32:10 -08:00
Rom Lemarchand
0287721d28 gralloc: delete unused mutex declaration
Change-Id: Ibc7e70887b61f7dd885c86d412387636d3a6a867
2013-11-26 10:01:25 -08:00
The Android Open Source Project
bae5cf92cf Merge commit 'c9940a2bfe94dbe2ef3bfe5e8692bf4e3cea5ba0' into HEAD 2013-11-22 10:35:26 -08:00
Aaron Whyte
22bf9724a1 Removed unneeded linux/input.h includes, to fix Mac SDK build
Change-Id: I3bcfadb9c95a9239d8098989c60d5604bfdfb66f
2013-11-14 19:15:25 -08:00
Aaron Whyte
97b3fe17c9 deactivated multihal logspam, made warnings warnings, left critical startup info
Change-Id: I6a53cef28ab87ca0d7f4668070e4d93ff726cf0d
2013-11-14 11:25:10 -08:00
Aaron Whyte
c69f3a70ec Tests SensorEventQueue I/O when the queue is full.
Reduced debug logging in multihal.

Change-Id: I30e80630ce5d97776c53f26d6096ef59b9b2f35a
2013-11-14 11:25:00 -08:00
Aaron Whyte
92863c14b7 MultiHal multithreaded polling
Change-Id: I3ebe380169eed1c8deeca2860d1788be6c14837e
2013-11-14 11:24:51 -08:00
Aaron Whyte
ab6ec384c4 Added a SensorEventQueue, a circular buffer meant for reading with one thread
and polling a subhal with another. The writing thread gets access to pointers
in the internal buffer. This design avoids a memcpy on write when the multihal
fetches subhal events using poll().

Unit-tests include multithreaded reading and writing lots of events, in
random-sized chunks.

This is not used by the multihal yet. That will be a different CL.

Change-Id: I58418d69eebebeb96befb08ba3aed080f0f08551
2013-11-14 11:24:15 -08:00
Mike Lockwood
079083281e Move sensors multi HAL to libhardware
Change-Id: I12ba76291990264a2db61069f9610c40e96a9695
2013-11-14 11:21:46 -08:00
Alex Ray
555676430e modules: camera: replace pthread mutex with utils'
Change-Id: Id974e4cc743d27d59634023cfdbba545fbb64e5f
2013-11-12 18:32:51 -08:00
Nick Kralevich
375f4e3bfb am 15f0d47d: am af822c43: Merge "gralloc: do not use GNU old-style field designators"
* commit '15f0d47dc6611150be34bc98a8f328df53c93397':
  gralloc: do not use GNU old-style field designators
2013-11-06 19:42:41 -08:00
Nick Kralevich
15f0d47dc6 am af822c43: Merge "gralloc: do not use GNU old-style field designators"
* commit 'af822c43cf144a991db49d8c25068d054265ae37':
  gralloc: do not use GNU old-style field designators
2013-11-06 19:40:57 -08:00
synergy dev
6abbed5093 gralloc: do not use GNU old-style field designators
Avoiding the use of gnu extensions improves code portability

Change-Id: Icf8e3d4813bcddff40548bb5e65e615f8697b75c
2013-11-06 17:29:22 -08:00
Alex Ray
62735086ed modules: camera: Metadata refactor
Add* functions const to protect data being added.
Initiailze metadata object from a camera_metadata_t.
Remove template-specific constructor.
Add convenience "add1" method to abvoid stack-allocated data.
Construct templates manually (in ExampleCamera) from base.

Change-Id: I3201f61e9d32841ea7a769d69242b40d8727c02e
2013-10-28 14:40:28 -07:00
Alex Ray
69f1f9166a modules: camera: dump device and stream state
Change-Id: Iae3badba71f13784dfdd65d6e77b20283437935a
2013-10-21 12:21:08 -07:00
Alex Ray
7915e97d63 modules: camera: add vendor tag functionality
Vendor Tag operations were added in module api v2.2

Change-Id: I352a50759d8bb9389d904bb774659e4be883794b
2013-10-21 12:20:41 -07:00
Alex Ray
61f7a0c1c1 modules: camera: Abstract device-specific camera
ExampleCamera represents a specific (e.g. front or back) camera device,
and contains all the device and logic for that device/sensor.

Change-Id: Iecc1a1d905501a66edb6e3994ff93d8761b82f8b
2013-10-17 16:50:48 -07:00
Alex Ray
3e8a9fe5e0 modules: camera: Add android.jpeg.maxSize metadata
Change-Id: I0984b55df0adf8c60b07844003e97b5aac8ece3f
2013-10-14 15:58:02 -07:00
Alex Ray
ea80382be1 modules: camera: Update trace headers to libutils
Now that libutils is outside of frameworks, use that for c++-style
scoped tracing and remove the temporary shim header.

Change-Id: I913767aed8ff70abb9299e7a7b318b24a25e23c1
2013-10-14 15:56:43 -07:00
Alex Ray
d9d105a0ce consumer_ir: add array length to get carrier freq
Change-Id: Iefb424db6f16ffefa40da56c765c9b7a24bea397
2013-09-11 17:51:19 -07:00
Alex Ray
09875a2eab modules: add demo consumer IR HAL
Change-Id: Iaae40c06af0dc008429d5dee4f45dc0b156957a1
2013-09-09 23:55:26 -07:00
Glenn Kasten
59caeb14a7 Merge "Fix file permissions" into klp-dev 2013-08-22 22:26:35 +00:00
Eric Laurent
9595f7cff6 remote submix: fix test on sampling valid rates
Change-Id: I4e9e378940bb56202a6e6882f561b3293ad7225d
2013-08-22 10:25:22 -07:00
Glenn Kasten
08708c5e1f Fix file permissions
Change-Id: Iffc2941d98ee16796cf3d44dec1cfa376d9362bb
2013-08-20 12:49:27 -07:00
Alex Ray
0f82f5a73a modules: camera: Separate locking for static characteristics
Static camera characteristics can be queried on any device at any time.
Separate the locking for it from the rest of the device to eliminate any
contention between operations on the device and static characteristic
initialization.

Change-Id: I8076378699f274e70c6318e537df4758972de9db
2013-07-26 16:36:43 -07:00
Mathias Agopian
ba9c8badb7 get rid of HAL pixelformats 5551 and 4444
Change-Id: I196ee30ed57707ed4cc46fb3a9c5c07c5bac6fff
2013-07-26 16:23:33 -07:00
Eric Laurent
ad3f4624b4 Merge "Code changes for offload support in hardware libhardware" 2013-07-25 21:15:23 +00:00
Zhijun He
bd1468921e modules: camera: Fix build break due to metadata change
Change-Id: I085796569ea77336d32907ee2287ff7533b0c122
2013-07-18 17:59:30 -07:00
Richard Fitzgerald
072a79d3e4 Code changes for offload support in hardware libhardware
Change-Id: Icfe9bf4b4768bbdcb11e6c77ac26163018f9c7c8
2013-07-18 09:23:27 -07:00
Alex Ray
9cd49c9c4e modules: camera: simplify metadata list traversal
keep traveling pointer local to the walking loop

Change-Id: I0038007d6e7a45e519b9b2162c674132477879cc
2013-07-09 12:59:42 -07:00
Alex Ray
764e442baf modules: camera: Shutter notify message support
The shutter callback timestamp should originate from the sensor itself,
since it knows exactly when the first line of the frame started
exposing.  However, as a fallback (or in the CPU-painting case) query
CLOCK_BOOTTIME instead.

Change-Id: Id57c05525e9c575d009b9deb96a69557fccac16b
2013-07-09 12:19:04 -07:00
Alex Ray
90c0af71f6 modules: camera: make Metadata a delete-able object
Metadata is currently only used for immutable persistent settings
(static camera characteristics, and the capture templates), but will be
used for dynamic metadata as well.  Make it deleteable so we can
create/destroy these at will.

Change-Id: I7372b07b904d5a6b55453093712e0bb2675918b5
2013-07-03 14:32:59 -07:00
Alex Ray
77ecfd76d7 modules: camera: only wait on valid acquire fence
Change-Id: I4f51e509d86722c18308f4f1312ca3379cffd795
2013-07-03 14:32:59 -07:00
Alex Ray
2b286dab84 modules: camera: Write back stream parameters
max_buffers and usage are read by the framework inside the struct used
to pass the stream configuration parameters;  scribble our new
calculated values whever they are updated internally.

Adds logging to stream creation method (reuse/new).

Change-Id: I04e12880820571900f2ae80c27100f8aedcf9d02
2013-07-03 18:01:54 +00:00
Alex Ray
768216ee2c modules: camera: Fix stream type characterization
Type is now enum, not mask.

Change-Id: I264da26a457957a7659154e507970e0303c76e25
2013-07-03 18:00:21 +00:00
Alex Ray
0d2a5220ba modules: camera: Dirty metadata objects on update
Change-Id: I4fbd4ad919b855168e3ff5424613271b1fa907af
2013-07-03 10:55:04 -07:00
Alex Ray
89a82661e0 modules: camera: default request templates
Change-Id: I0a4b389e1850c10e12a65b3c8a5670c78c6746f7
2013-07-02 15:47:50 -07:00
Alex Ray
c6bf2f291d modules: camera: fix compiler warnings
Change-Id: Id1aa624d377776a7e37b52978664d30c927595be
2013-06-28 21:07:42 +00:00
Alex Ray
b0be1039c1 modules: camera: add get_camera_info support
Basic static metadata statically constructed from preprocessor passes
over an array of camera metadata tags.

Change-Id: I16ea9f4d68120d5a0bc010a4a67b0cbcd761329e
2013-06-28 13:52:50 -07:00
Alex Ray
083315c85b modules: camera: No-op result submission with request
Change-Id: If4e377ba0ac327cc02ac2b9765ce5d406b8960a8
2013-05-29 03:39:00 +00:00
Alex Ray
11bbeefaf9 modules: camera: Input buffer reprocessing scaffolding
Change-Id: I158ba833549aee47ca3be5673f6f5d33e455ef59
2013-05-29 03:38:20 +00:00
Alex Ray
bfcbd95a1f modules: camera: memoize request settings metadata
Change-Id: I19c3a6a55a42e60f627702cd4a995664a0dfc4d2
2013-05-29 03:36:19 +00:00
Alex Ray
8a8f86bbe6 modules: camera: Add buffer registration scaffold
Change-Id: Ic1d20dd7f93a0ca3cd2c3af3b33a7a9df47b5e89
2013-05-13 19:47:47 +00:00
Alex Ray
bcaf788434 modules: camera: Add Streams
Adds a Stream object, and configureStreams support in parsing the
provided stream_array. Streams are naively setup for sync-less software
painting.

Change-Id: Ibbd90e3e2c7fa984dd5d2dcbd4da7bf4dad43aa1
2013-05-03 12:16:18 -07:00
Alex Ray
c16e56dd43 modules: camera: Add scoped trace helper
This c++ helper class is normally provided by frameworks/native's
libutils, but cannot be used from the context of a hardware module.  For
now just add the required functionality locally in the hardware module.

Change-Id: I5b399cbeb1c017a95baf19456dbf20569e677fbe
2013-04-29 14:16:57 -07:00
Alex Ray
005c9da544 modules: camera: remove unused variable
Change-Id: Ic21cd58a750411167ef4b060e8d3abc295edc83d
2013-04-29 14:16:57 -07:00
Alex Ray
af3a4617b4 modules: camera: fix dump log message
Change-Id: I2511653b3d2d21d03785ea220c760e2b65f0b035
2013-04-29 14:16:27 -07:00
Jesse Hall
0d8f81a984 Log when creating a second buffer mapping in a process
Bug: 8468756
Change-Id: Ia883f459ea9e2648ca4a0b5a6f09ded4f46f13b3
2013-03-28 16:51:25 -07:00
Jesse Hall
c71b6caece Remove pid check in register/unregister
The register/unregister gralloc calls were avoiding
mmapping/munmapping the shared memory region if the buffer was created
by the current process. This is left over from the pmem-based
implementation, where trying to map the same region twice in the same
process would fail, or would reuse a single mapping without
refcounting.

This causes problems if a buffer is
- allocated in process A,
- transferred from A to process B and registered there
- unregistered/freed in A
- transferred back from B to A and re-registered

Process A then has a new handle to the buffer, but since it originally
created the buffer it will not be mmapped, so trying to read or write
the buffer will crash.

With ashmem, mmaping a region twice in the same process creates two
distinct mappings which can be used and munmapped independently. So
we no longer need to avoid mmapping again in the allocating process.

Bug: 8468756
Change-Id: I167bec5ca07e5534c5e2115630fe8386e481388e
2013-03-28 11:21:25 -07:00
Alex Ray
1f8af678c9 modules: camera: make Camera object id const
Change-Id: Ic36fa7c6193086aa6415647ff8fe59cc358dd99f
2013-02-28 15:41:55 -08:00
Alex Ray
a0ed4bead4 modules: camera: Camera v3 Devices
Default camera HAL statically allocates camera devices. Update camera
device to API v3.

Change-Id: Ic53ffcf3b746b9b4011b932e26dbb0f533cba554
2013-02-27 00:02:37 -08:00
Alex Ray
819cfd87ba modules: camera: Update to v2.1 camera module API
Refactor the camera module into a single CameraHAL object.  Adds
set_callbacks, new in the v2.1 module API.

Change-Id: I4da677c28d7425f545f68998844fcfa4caf0feb9
2013-02-26 15:26:26 -08:00
Alex Ray
bb13a3231d modules: camera: Hide HAL symbols DO NOT MERGE
Explicitly hide all symbols from being exported from the camera HAL
except the symbol required to load the module.

Change-Id: I940b24b8d3895f46e63df3c28e43b8cb012bd637
2013-02-26 15:08:45 -08:00
Alex Ray
ed6b8a7710 modules: camera: Add tracing
Change-Id: I00ee447e6b57bc57fd09b6e7d8c62cb07cb37cf0
2013-01-03 21:06:27 -08:00
Alex Ray
a48dd3fb34 modules: camera: Defer documenting API
Avoid duplicating the api docs in the example HAL, instead point to
canonical source for them.

Change-Id: If3f5acb7a73260248bd00ce01cb1c80f230f7188
2013-01-03 21:06:17 -08:00
Jean-Michel Trivi
eafbfa4058 Use strong pointers and scope
Rely on strong pointers and scope rather than the more error prone
 incStrong / decStrong approach which can cause object leaks.
No change in functionality.

Change-Id: I1bfc7f0cdeeac022e4120482cd3521e52ffea94e
2012-12-21 12:24:58 -08:00
Alex Ray
7ee0b7aac2 Reference Camera v2 HAL Implementation
This is meant to be an example and a reference for device manufacturers
on how to build a new Camera v2 HAL.  This first patch has basic
configuration and entry/exit.

Change-Id: Ib4166e2eadb813228af38ec31a1215940c070bbf
2012-11-28 12:35:29 -08:00
Glenn Kasten
430ac66690 Fix build
Change-Id: I17094052b67f2069d80ea140442e5a969bd4e96f
2012-11-02 11:16:13 -07:00
Jean-Michel Trivi
90b0fbd13f Shutdown audio pipe when closing input stream
Writing to the audio pipe for the remote submix is blocking, unless
 the audio output pipe is in shutdown mode. The playback thread
 could stay blocked on the write if the input stream has already
 been closed.
The change consists in shutting down the pipe also when the input
 stream gets closed. When the pipe is in this state, simulate
 timing in the write operation so we don't drain the output faster
 than realtime.

Bug 7424646

Change-Id: I5feb3be642b0ee7eef10dee0141308684ee9c811
2012-10-30 19:03:22 -07:00
Martijn Coenen
3fb2be64ff Merge "NFC HAL: Use a separate callback for data." into jb-mr1-dev 2012-10-01 14:02:07 -07:00
Jean-Michel Trivi
d44130339c bug 7253033 Add "exiting" state to remote audio submix module
Support receiving a parameter that sets the remote audio submix
 module in a state where the audio pipe will unblock any current
 write operation and not block anymore.

Change-Id: Ia3119cd79972afff0de24187dae627855a468ebf
2012-09-30 11:12:28 -07:00
Martijn Coenen
442752aecd NFC HAL: Use a separate callback for data.
Bug: 7258325
Change-Id: I02d8ea1bdcb8ea6a9430e3dc286f5c2647277f72
2012-09-30 11:08:49 -07:00
Jean-Michel Trivi
97c262fc84 Remote submix: fix sink/source reference count handling
The reference count on the strong pointers to the audio sink and
 source should be done on the object retrieved from the device
 structure, not by accessing the corresponding fields, as they
 can be cleared while reading or writing audio data.

Change-Id: I446a2c7bdcb0758b4013b0ad75450a15203fb9da
2012-09-17 18:27:56 -07:00
Jean-Michel Trivi
35a2c167b4 Turn off logs in remote submix audio module
Change-Id: I61cd15534b1cd764b06f615569cdf02edbba909c
2012-09-17 10:13:26 -07:00
Jean-Michel Trivi
eec87706d2 Remote audio submix: blocking writes and sleeping reads.
Change how the remote audio submix is handling piping audio
 through the pipe:
 - use a MonoPipe as audio sink for blocking writes,
 - use a MonoPipeReader as audio source for non blocking reads,
  and keep track of when recording started to align the
  time at which the in_read() call should return with the
  projected time of the recording duration.

Change-Id: I8b0f8c56a0486806101e272dfbf9c6d2d1c11112
2012-09-17 09:59:42 -07:00
Martijn Coenen
1c970f1a49 Initial NFC HAL for NCI controllers.
Bug: 7123942
Change-Id: Ic64aa6477f2eb65b489b3be5d49ad21ccce63e2d
2012-09-14 13:56:58 -07:00
Jean-Michel Trivi
6acd966320 Remote submix audio module: sleep less, log errors
Neither write nor read are blocking, but write simulates
 timing by checking the clock between two writes and
 computing how long the next sleep should last.

Change-Id: I495ae6d44b0cf75a24fe4b70662cfac679049c67
2012-09-13 12:23:43 -07:00
Eric Laurent
5d85c537fc update audio remote submix API revision
Update remote submix audio HAL API revision to 2.0
(new audio device enums).

Change-Id: I61d5faf498144002929e570ee50375b059fb17c5
2012-09-10 10:36:09 -07:00
Eric Laurent
43110fa5e5 Merge "audio: new audio devices enums" into jb-mr1-dev 2012-09-07 14:52:28 -07:00
Jean-Michel Trivi
416d37b37b Audio remote submix in hardware modules
Change-Id: I878c6f36685eff48a3cd51acceec812b61994945
2012-09-07 11:25:59 -07:00
Eric Laurent
85e08e2625 audio: new audio devices enums
Changed audio device API version to 2.0 because of
new enums for audio input and output devices.

Removed implementations of get_supported_devices() in
stub and usb audio modules.

Change-Id: I09345d38929d931e5015e36d18259f5a5f950298
2012-09-07 10:32:57 -07:00
Jean-Michel Trivi
88b79cb001 Add audio module for remote submix
New definitions of audio devices for remote submix: one representing
  a sink for writing the audio buffers that won't be played directly
  locally, another representing the audio source that can be read from
  to obtain the audio mix.

New audio hardware module encapsulating the submix loop functionality.
  Create a Pipe to serve as non-blocking audio ring buffer between
  the output device (the sink) and the input device (the source).

Change-Id: I527f4721a69ced0430a99ebba3b4db7d419f2bb2
2012-09-06 18:33:04 -07:00
John Grossman
47bf3d7ea5 Extend the audio HAL interface to support get/set master mute
(cherry picked from commit d245968b7ef0be5c776c9aefff3eca9e293d1b35)

> Extend the audio HAL interface to support get/set master mute
>
> Hand merge from ics-aah
>
> > Extend the audio HAL interface to support get/set master mute: DO NOT MERGE
> >
> > Extend the audio HAL interface to allow HALs to optionally support HW
> > level master mute.  This follows the same pattern as master volume and
> > is part of the fix for bug 6828363.  Because of the divergences
> > between ICS and master, this change will need to be merged by hand.
> >
> > Signed-off-by: John Grossman <johngro@google.com>
> > Change-Id: Ica6f5e37e13d13dde60463966f41f271ffa104fd
>
> Change-Id: I5e7aea6d7da0012dcc077281f9077fc04cfb9889
> Signed-off-by: John Grossman <johngro@google.com>

Change-Id: I2011cc5bc41ca7081ce255a4bfba65f36f899bc4
Signed-off-by: John Grossman <johngro@google.com>
2012-08-07 15:59:07 -07:00
Jesse Hall
f9d6cd7dee Add multi-display and flip fence to HWC
Change-Id: I3b0446050648e2b386ffb32976c9943b6fd9793d
2012-08-07 12:26:59 -07:00
Jesse Hall
85ab59a147 Revert "Add multi-display and flip fence to HWC"
This reverts commit 1d51b2b9fc713da6de18117bc19508ecdfde4f23

Change-Id: I1ae46d8cae1cb3064800cd24df56347b05eb6059
2012-07-31 12:16:24 -07:00
Jesse Hall
65bed1f947 Add multi-display and flip fence to HWC
Change-Id: I31b4fc293220bc51169971df93347dd35fdc30ef
2012-07-30 16:52:21 -07:00
Glenn Kasten
48915acb39 struct effect_descriptor_s const correctness
Also struct audio_stream in audio_stream_frame_size

Change-Id: Ie0de708e38a1850c186a8b4eb5f491adc44b3275
2012-07-24 07:53:14 -07:00
Glenn Kasten
a635449697 Use audio_channel_mask_t consistently
Change-Id: Ib832c0b707b1e0b82adf4ab3d4d18a2dc459d240
2012-06-25 10:45:43 -07:00
Jesse Hall
d479ad22a0 Introduce HWC_DEVICE_API_VERSION_1_0
The new version adds an acquire and release fence to each layer,
providing explicit producer->hwc and hwc->producer synchronization.

Change-Id: Ibd6e3c7b3515c012c767246e6d6514274fdef01d
2012-06-18 15:53:25 -07:00
Jean-Baptiste Queru
186f8c5268 am 8405fe5a: am 1fbbb08d: Merge "remove seemed useless gralloc_open() call in fb_device_open()"
* commit '8405fe5a5203af18f39fd47b35606f0b32cd956c':
  remove seemed useless gralloc_open() call in fb_device_open()
2012-06-12 15:18:23 -07:00
Jean-Baptiste Queru
8405fe5a52 am 1fbbb08d: Merge "remove seemed useless gralloc_open() call in fb_device_open()"
* commit '1fbbb08ddda4321ccdb05345658044c1f0235997':
  remove seemed useless gralloc_open() call in fb_device_open()
2012-06-12 15:16:18 -07:00
Eino-Ville Talvala
15d4e5d073 Merge "Add RAW_SENSOR to gralloc sample" 2012-05-14 15:57:29 -07:00
Eino-Ville Talvala
984272d92e Add RAW_SENSOR to gralloc sample
Change-Id: I0621bd70896385c3d522d283a1be714f5f29df3b
2012-05-07 11:01:17 -07:00
Colin Cross
a3e364144c remove triggering suspend from power hal
PowerManagerService will trigger suspend after calling into the
power hal, remove it from here.

Change-Id: I98cc096413bd5c9e39a28b2bfc376d3d30544193
2012-05-03 19:01:02 -07:00
Mathias Agopian
5cb1de89a9 add version number to power HAL
Change-Id: I6acf4523b5878565035ea6c85bddd58f9b20ef1b
2012-04-26 19:49:40 -07:00
Todd Poynor
2f143fba74 hardware: libhardware: Power HAL add power hints -- DO NOT MERGE
Change-Id: I8ab0376e4f5d8ef09d5b1062cbfbb30c30c5bb96
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-04-25 18:16:40 -07:00
Mike Lockwood
46a9809e9c Update USB audio HAL to use API
Also don't clear card and device when out_set_parameters is called
to set other parameters.

Change-Id: I4feda9f6a2e76cb45bbc8a8f8256bb1760302707
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-04-24 16:46:24 -07:00
Eric Laurent
da4b0b26d1 rename audio policy output flags.
Change-Id: I965fa9bcba45f223f2f2cbc4adccfb5491414c8b
2012-04-18 13:58:44 -07:00
Eric Laurent
55786bcf3c audio: updated audio HAL device API
Modified open output and input stream functions to add new
parameters needed by audio HAL. Also grouped parameters
in a config structure for clarity.

Change-Id: I60832d8e5b5e4a48f209a6d83f5ca9c044be61f1
2012-04-17 16:02:48 -07:00
Simon Wilson
19957a37a0 usbaudio: add initial usbaudio default HAL
Change-Id: I6e93b2512883f3697683a74cadb9a29113966bc0
2012-04-12 22:48:10 -07:00
suyi Yuan
539c9936ae remove seemed useless gralloc_open() call in fb_device_open()
Change-Id: I520e460bd558934c71042b5a4fdb03b3935ad720
Signed-off-by: suyi Yuan <yuan.suyi@gmail.com>
2012-03-15 15:27:02 +08:00
Rakesh Goyal
a776bb2e81 am 6d2bc4fc: am 4cbd62c2: add i2c_device_address member to nfc_pn544_device_t
* commit '6d2bc4fc11ca04326eaf982f97d13d6410a73af2':
  add i2c_device_address member to nfc_pn544_device_t
2012-03-09 11:43:56 -08:00
Rakesh Goyal
4cbd62c2ca add i2c_device_address member to nfc_pn544_device_t
Add I2C slave address. Multiple I2C addresses are possible
for PN544 module. Configure address according to board design.

Change-Id: I847e8f3db631f5039cf15143a9982f4b9b209f27
2012-03-09 08:51:15 -08:00
Eric Laurent
83c62ce4e3 audio policy: use audio_devices_t when appropriate
Change-Id: Iee57cf5c3bdfefd981e1ed5958df10171f8716e6
2012-03-08 13:45:03 -08:00
Todd Poynor
c82792c0a4 Power HAL: Add initial header file and default/legacy implementation
Change-Id: I43a515a8ffe72a9c4e7d5f7470a5e73e76d5e1b1
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2012-02-17 16:26:32 -08:00
Mike J. Chen
5ad38a901d Modifications to audio_hal for Android@Home.
This is a squashed merge of the following changes:

Commit f560da61a5e128ca9f82f7fe939afcf1f09188c7
Author: John Grossman <johngro@google.com>
Date:   Thu Aug 11 15:34:55 2011 -0700

    Fill out a missing entry in the audio HAL function table.

    The entry for get_initial_master_volume was missing from the non-legacy audio
    HAL and needs to be filled out.  Also fix up the order of the comments
    describing the get_initial_master_volume method.

    Change-Id: I87d5415ef92611497a6dab4c657fc00367c4d80b

commit cea82facb63fd237a4ea6fb770605fcb500850ff
Author: Jason Simmons <jsimmons@google.com>
Date:   Thu Jun 16 14:24:24 2011 -0700

    Define a replacement for getSampleDelta that returns a DMA start time and count of samples queued

    Change-Id: I2d13f57b5a8c5b97fb3aa0a90834ce91c56864ef

commit 60a9acd7eee470a8d870218e8be618bfa3be15a5
Author: Mike J. Chen <mjchen@google.com>
Date:   Tue Jun 7 09:13:23 2011 -0700

    Add Android@Home extensions to new Audio HAL interface.

    Change-Id: I3ea4676d4b7d2afd78a5a7a7003ad5c437276d05
    Signed-off-by: Mike J. Chen <mjchen@google.com>

Change-Id: I09f3756d12a1ce4f9af39610ed857890742a72df
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: John Grossman <johngro@google.com>

Conflicts:

	include/hardware/audio.h
	modules/audio/audio_hw.c
2012-02-10 08:58:32 -08:00
Mike J. Chen
ad255ee424 Add a HAL representing a system-wide local time counter.
This is a squashed merge of the following changes:

commit 9def1ae65f6b4d6a8fdec147fdcd34f22f08174a
Author: John Grossman <johngro@google.com>
Date:   Fri Aug 12 11:47:20 2011 -0700

    Change the signature of set_local_slew.

    Changed the definition of the slew function in the local time HAL to take an
    int16 instead of an int32 and to use the full range of the int instead of
    attempting to imply any particular PPM range.

    Change-Id: Ia67f50e77f1fe674a63ec69460e830d1191ef5a0

commit afab51327453d1bfc7423f8ce7a28933d8fc49b2
Author: John Grossman <johngro@google.com>
Date:   Mon Jun 27 17:29:07 2011 -0700

    Remove "primary" from the local_time HAL.

    Interface instances are a pattern which should only be used by audio.  Remove
    its use from the local_time HAL.

    Change-Id: If4c458cf16a02d9dc63c04185111ae793fc57801

commit 1c26e59a66e75ccb31027f42183aaa32bde6e456
Author: John Grossman <johngro@google.com>
Date:   Fri Jun 17 14:19:24 2011 -0700

    Refactor the local/common clock services.

    This change is one of a set of 5 changes made to different repositories.  Look
    for this comment in all of them.

    Refactor the local/common clock services to match android best
    practice.  Notable changes include

    + The kernel no longer knows anything about common time.  Common time has been
      moved completely up into user land.  This has an impact on the accuracy of the
      timesync debugging code, and the netfilter assisted approach to network based
      timesync is going to have to be modified.
    + The timesync driver used by A@H is now just local time driver.
    + The kernel no longer needs access to the linear transform math code, and it
      has been removed.
    + A new HAL has been introduced to expose the concept of local time to the
      system.
    + A non-slewable stub implementation of the local time HAL based on
      CLOCK_MONOTONIC has been added.
    + The old library has been eliminated.  Its functionality has been
      distributed among the common time binder service, the local time hal and the
      linear transform utility code.
    + All clients of the old library have been changed to be clients of
      the binder service, the hal and the utility code.
    + The reset_tt utilities have been removed, they no longer have a purpose in the
      system.

    Change-Id: I39843b94f9b6d13f63b22145a2edcafe4ca87349

Change-Id: Ib264c992d564b99ef7c7847a788e4fa7f5e101b4
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: John Grossman <johngro@google.com>

Conflicts:

	modules/Android.mk
2012-02-10 08:57:16 -08:00
Glenn Kasten
ae2e42b244 Use audio_source_t consistently
Change-Id: Ie25ddeb091646b7e24149b3b23a18ce0807e1891
2012-01-26 16:47:25 -08:00
Glenn Kasten
ea84c55f2c Merge "Use audio_format_t consistently" 2012-01-20 14:50:29 -08:00
Glenn Kasten
080a80212b Audio policy HAL set_ringer_mode is deprecated
Change-Id: If0f82d5c1cb9a0faf70f5a8434f68cdc39784ee6
2012-01-18 15:15:07 -08:00
Eric Laurent
d4cf73b362 Merge "audio policy: manage stream volume per device" 2012-01-17 17:34:53 -08:00
Glenn Kasten
fad1f606a2 Merge "set_mode and set_phone_state now take audio_mode_t" 2012-01-17 11:33:22 -08:00
Eric Laurent
ca20b17b41 audio policy: manage stream volume per device
Improve volume management by keeping track of volume for each type
of device independently.

Added functions at the audio policy interface to set and get stream volume
for a particular device.

Change-Id: Ic8899e82e48193cb65b3673e9d20383efed943b5
2012-01-17 09:10:45 -08:00
Glenn Kasten
5161a847dd Use audio_stream_type_t consistently
Change-Id: I1e92f018a07e4b1b73ef8d4de461ef1e08bc48e7
2012-01-12 16:55:03 -08:00
Glenn Kasten
fe79eb3f06 Use audio_format_t consistently
Was sometimes int or uint32_t

Change-Id: Ib3d82f5aefeda371c0439e43e72737a54882f519
2012-01-12 14:55:57 -08:00
Glenn Kasten
6df641e269 set_mode and set_phone_state now take audio_mode_t
Change-Id: I12a3a5ad6c3cadc6b9de8281f78edfef53908e2d
2012-01-12 10:06:24 -08:00
Steve Block
60d056bf29 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: I0cbe865d464a37365fa3be84948b07e5a0d181d0
2012-01-08 11:03:25 +00:00
Steve Block
22d351317a Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I135fadaf10e95af1eb918889a22980c194c650ca
2012-01-05 23:27:52 +00:00
Steve Block
b224b78c14 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ia8b6f74b27098b3dba27f177a76264eb23f849ee
2012-01-04 20:07:12 +00:00
Steve Block
cee8501c16 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I98e83cc9d22f0ea8fbf397ccccd9ce7773119551
2012-01-03 22:31:17 +00:00
Martijn Coenen
44ae5b2476 New NFC HAL.
First implementation of a NFC HAL. This implementation doesn't
offer a generic NFC device HAL (yet), but offers typed interfaces
for different NFC controllers. Currently only the PN544 is supported.

Change-Id: I3ac04dcd767fb12a433edbe88ec7068eb1930a57
2011-11-04 09:05:22 -07:00
Eric Laurent
78d2c69af4 audio policy: register effect CPU on enable
Added a method on audio policy interface to register
audio effect CPU usage on enable and unregister on disable
instead of when the effect is created or destroyed.

Change-Id: Iee20bf70fee7302f817ec4c7d9bf7640caca2e95
2011-08-11 08:48:25 -07:00
Mathias Agopian
e25e1969dd get rid of overlay HAL
Change-Id: I1ba7ffac8776a8d59a5cc4e7688c3a5bd02e6647
2011-07-12 15:48:30 -07:00
Eric Laurent
f3008aa707 Audio HAL: added interface for audio preprocessing
Change-Id: I032f6dd8f9ad11283a3f0a6721018dabfd12236d
2011-07-08 09:59:52 -07:00
Dima Zavin
3bc15860a9 hardware: drop the _hal suffixes from audio.h and audio_policy.h
Change-Id: Ib9bfc4049cf350f72af3ee577ce4756ac4118cfc
Signed-off-by: Dima Zavin <dima@android.com>
2011-06-13 18:12:17 -07:00
Dima Zavin
1199865d0c hardware: move audio_policy.h to system/
Change-Id: I392c5f91db88ca923dead7202064169edc1cc0c7
Signed-off-by: Dima Zavin <dima@android.com>
2011-06-13 18:10:06 -07:00
Jean-Baptiste Queru
57adb36c30 Remove workarounds for buggy /dev/fb0 drivers
Change-Id: Ideadd5f39693d05cf29a81d9f87ed804d7e52380
2011-06-06 13:28:45 -07:00
Dima Zavin
aa21172bcd audio: move audio.h to system/core/include/system/audio.h
Change-Id: I523dfb361b1b3862cf8bc41c1691c607b2c815b0
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-12 14:10:06 -07:00
Mathias Agopian
03dd9c671d remove deprecated/unused HAL headers
copybit, overlay, sensors_deprecated are no longer supported.

Change-Id: Ie5da20bd4ff95f7565a162d628bf572a76327b7b
2011-04-28 20:09:45 -07:00
Dima Zavin
8cc353abc9 libhardware: add stub audio and audio_policy modules
Change-Id: Ib6c0c49dbc369b735b2ac5fb5b583de96c3e9f3e
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-27 14:08:57 -07:00
Dima Zavin
7e03316618 libhardware: add separate makefile for modules subdir
Change-Id: I787c444ee1c3a687ee6f8f551c359e5e908ed7f5
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-27 14:08:57 -07:00
Jean-Baptiste Queru
c9881d8c56 am cb4ea7ac: am 7b584867: am cd347fdf: Allow to force 16bpp when 32bpp has problems
* commit 'cb4ea7ac8af7ac0732f480dc4938e62566bd5550':
  Allow to force 16bpp when 32bpp has problems
2011-04-05 11:27:14 -07:00
Jean-Baptiste Queru
cb4ea7ac8a am 7b584867: am cd347fdf: Allow to force 16bpp when 32bpp has problems
* commit '7b584867cdfef3ba393e308471d5da76024e249c':
  Allow to force 16bpp when 32bpp has problems
2011-04-05 11:22:04 -07:00
Jean-Baptiste Queru
cd347fdf74 Allow to force 16bpp when 32bpp has problems
Bug: 4197654

Change-Id: Icf1e8793d6a4d2e070a8f232efd4136d79339496
2011-03-31 19:58:27 -07:00
Iliyan Malchev
14e3641c32 hardware/libhardware: remove LOCAL_PRELINK_MODULE
Change-Id: I8a0ba7e4c99e334b9789d88b48383439eb7cc780
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-14 14:24:25 -07:00
David 'Digit' Turner
d8c4b8c050 am 36292755: am 25b68b5c: gralloc: Add support for 32-bit framebuffers.
* commit '3629275560f4a952cedd69c76b7b96b3b490f6f6':
  gralloc: Add support for 32-bit framebuffers.
2011-01-17 14:59:26 -08:00
David 'Digit' Turner
25b68b5c24 gralloc: Add support for 32-bit framebuffers.
Note: The code under hardware/libhardware/modules/gralloc/ is only used
      when running the system under the emulator.

Change-Id: I022978aeaacc5137c9917cd2ef6952dd3897ece4
2011-01-17 22:04:52 +01:00
David 'Digit' Turner
d72be75b45 am f540c44f: am 80d3699c: gralloc: Fix division-by-0 during system emulation.
* commit 'f540c44fc218bffcdfbc226187d3cdc08e213c32':
  gralloc: Fix division-by-0 during system emulation.
2011-01-16 13:06:33 -08:00
David 'Digit' Turner
80d3699c9e gralloc: Fix division-by-0 during system emulation.
This patch avoids a division-by-0 when the system is running
under emulation (the kernel driver reports pixclock as 0, for
some reason). Which results in a SIGFPE during the boot sequence.

Change-Id: Idb6bcdd58999ea9231f2411481c25929d5d02f1d
2011-01-15 21:06:12 +01:00
Jean-Baptiste Queru
f30ac95400 am 4829b184: am 118b5d79: Allow disabling page-flipping.
Merge commit '4829b184f15350de20096a97e583ed4c2b3d6427'

* commit '4829b184f15350de20096a97e583ed4c2b3d6427':
  Allow disabling page-flipping.
2010-10-18 16:41:56 -07:00
Jean-Baptiste Queru
118b5d7961 Allow disabling page-flipping.
Some devices have low-level bugs in their page-flip.

Disabling it at this level gives us more flexibility
than trying to control it elsewhere.

Bug: 3097357
Change-Id: Icc6ae172264e453bec0680e74a497a2b24299c4a
2010-10-14 19:05:09 -07:00
Mathias Agopian
2698f0cd99 Revert hwcomposer HAL. DO NOT MERGE.
This reverts commit cdd44a0db3.
This reverts commit e6b5c05aa0.
This reverts commit 5d3de309f4.
2010-08-17 20:29:08 -07:00
Mathias Agopian
e6b5c05aa0 Add a helper for dumping layers into the log
Change-Id: I0943d9114c33b4800fb797bac316041dec992f5e
2010-08-11 16:15:42 -07:00
Mathias Agopian
60d641e5eb Merge "first stab at hwcomposer HAL and default implementation." into gingerbread 2010-08-10 13:50:35 -07:00
Mathias Agopian
5d3de309f4 first stab at hwcomposer HAL and default implementation.
Change-Id: I7ff47b94a6b34a8f61031bd94e936a088dcea6ab
2010-08-09 17:15:16 -07:00
Mathias Agopian
a7932f47f1 fix typo in default overlay hal
Change-Id: I5313691acee74dfd69639946c01232256b22bc51
2010-08-06 17:50:56 -07:00
Mathias Agopian
7e734baec7 don't use undefined constants 2010-02-16 17:03:50 -08:00
Mathias Agopian
9da751bbf7 fix [2444483] gralloc size for YUV formats 2010-02-16 14:04:00 -08:00
Mathias Agopian
ee4e57e949 remove unused code 2009-12-15 17:22:56 -08:00
Mathias Agopian
f96b2064d7 remove all references to pmem and simplify the lock/unlock hooks
this gralloc module is only used on the emulator or without a h/w
renderer. therefore there is no synchronization to do in lock/unlock
and pmem buffers are not relevant.

hopefully this will remove some of the confusion about how gralloc
should be implemented and make it more obvious that this implementation
is not intended to be used by h/w renderers.
2009-12-15 15:00:57 -08:00
Patrick Scott
baf99300f7 Remove call to dump_l.
This fail to compile without NDEBUG and the following log statement does
something similar.
2009-10-29 08:33:42 -04:00
Mathias Agopian
fc05413281 split gralloc_priv.h and make sure it is C friendly 2009-08-18 17:35:44 -07:00
Mathias Agopian
876b4e8b84 integrate this change from the generic gralloc 2009-08-18 17:24:52 -07:00
Mathias Agopian
ed04f7871b don't memset ashmem region, especially before they're mmapped 2009-08-08 17:01:18 -07:00
Mathias Agopian
7d512e3dc3 add support for RGBX_8888 2009-08-07 20:55:37 -07:00
Mathias Agopian
e83629abb9 make sure to clear surface's buffers when they are allocated 2009-08-07 18:13:47 -07:00
Marco Nelissen
15c9d3af0d Fix the simulator build. 2009-07-17 11:15:18 -07:00
Mathias Agopian
3e1f89bcca fix [1980202] Surfaceflinger crash with transparent rollo on firestone
we now automatically size the pmem region isntead of using hardcoded values
2009-07-16 18:06:19 -07:00
Mathias Agopian
6d125da5d2 generic gralloc HAL doesn't need to support partial updates using msm7k specific ioctl. 2009-07-15 15:12:13 -07:00
Mathias Agopian
05eacf533e better logs 2009-07-13 18:32:37 -07:00
Mathias Agopian
82aee24379 automatically detect update-on-demand 2009-07-13 14:54:52 -07:00
Mathias Agopian
bd80b38f29 more fixes for [1965730]. We now free (unmap) both ashmem and pmem regions. 2009-07-07 17:53:43 -07:00
Mathias Agopian
440d4e4741 for [1965730], give a better name to gralloc buffers 2009-07-07 16:36:31 -07:00
Mathias Agopian
85ce19a4d3 fix [1965730] Device always give force close screen and completely unusable in Éclair build ERC07,rebooted automatically 2009-07-07 16:30:42 -07:00
Mathias Agopian
bfc010a750 better fix for gralloc on sim 2009-07-07 12:43:35 -07:00
Android (Google) Code Review
d34fd72bfd Merge change 6375
* changes:
  Fix build on some linux distros.
2009-07-07 12:21:48 -07:00
Mathias Agopian
d28d7e87f8 fix [1965734] Screen flickers a lot [Sholes] 2009-07-07 12:20:31 -07:00
Andy McFadden
f84106910d Fix build on some linux distros.
The place where the PAGE_SIZE value is defined varies, mostly because
you're not supposed to be using it directly.  sysconf(_SC_PAGE_SIZE)
is the approved method, and in fact some Linux distros actually #define
PAGE_SIZE to the library call.
2009-07-07 11:29:32 -07:00
Marco Nelissen
a4b587cb06 Simulator build fixes for the new GL stuff. The simulator still doesn't run, but at least it builds. 2009-07-07 09:29:00 -07:00
Mathias Agopian
cdb66fbc8a workaroud [1964234] emulator renders funny with new gralloc.
we detect we're running on the emu (using a very bad heuristic, see 1964251) and switch UPDATE_ON_DEMAND off.
2009-07-06 20:56:13 -07:00
Mathias Agopian
3d6ddfe771 fix [1964228] emulator crash with the new GL
gralloc didn't keep the error state properly, so after the first pmem allocation failure, it would systematically fail without reverting to ashmem.
2009-07-06 20:54:51 -07:00
Mathias Agopian
14784235ab make sure to UNSLAP pmem buffers when they're destroyed/freed, as the client could still have them mmapped 2009-07-02 17:32:15 -07:00
Mathias Agopian
8bf1f75268 add support for YUV formats 2009-06-25 17:38:50 -07:00
Mathias Agopian
689fa73c06 copybit now uses a native_handle_t* instead of a fd/offset 2009-06-24 20:36:52 -07:00
Mathias Agopian
31802ca9c0 fallback to ashmem when pmem is not availlable 2009-06-19 16:14:09 -07:00
Mathias Agopian
ed93e8b392 suppress debug log 2009-06-16 18:26:17 -07:00
Mathias Agopian
8c4ab1fa14 pmem allocator in gralloc. enabled for all surfaces. currently it uses a lot more address space than needed. 2009-06-16 18:16:38 -07:00
Mathias Agopian
72c8508db9 add an offset field to gralloc handles so the framebuffer can work with copybit 2009-06-10 16:06:28 -07:00
Mathias Agopian
5115665397 with the new lock/unlock API we don't really mean reference counting on mmap/munmap because we're guaranteed to map the buffers only once within a process.
no need to track all handles anymore, which simplifies the code a lot.
2009-06-09 20:50:34 -07:00
Mathias Agopian
82f7c04155 suppress spurious debug log 2009-06-03 19:03:26 -07:00
Mathias Agopian
f5cf8f842a better documentation for (*setUpdateRect)() 2009-05-07 17:39:31 -07:00
Mathias Agopian
485e69809a better documentation and implementation for lock/unlock 2009-05-05 20:49:49 -07:00
Mathias Agopian
295190f426 get rid of unused/needed flags 2009-05-05 18:30:52 -07:00
Mathias Agopian
988b8bd553 lock will now return the vaddr of the buffer. map/umap are gone.
- make sure to return an error if a buffer is locked twice or unlocked while not locked.
- added registerBuffer() and unregisterBuffer() to the gralloc module so that we can do some cleanup when a buffer is no longer needed. this became necessary after we removed map/unmap so we have a place to unmap buffers without the need of a kernel module.
- change the constants for GRALLOC_USAGE_SW_{READ|WRITE}_NEVER to 0, so that NOT specifying them means "NEVER".
2009-05-04 14:26:56 -07:00
Mathias Agopian
c3ce41d319 don't automatically unmap buffers when they're freed
this is in preparation to an api change wrt gralloc map/unmap
2009-04-14 18:24:09 -07:00
Mathias Agopian
a8a75166a2 Integrate from //sandbox/mathias/donut/...@145728
SurfaceFlinger rework for new EGL driver model support.
2009-04-10 14:24:31 -07:00
The Android Open Source Project
f53ebec387 auto import from //depot/cupcake/@135843 2009-03-03 19:32:14 -08:00
The Android Open Source Project
d51f49a11d auto import from //depot/cupcake/@135843 2009-03-03 18:28:48 -08:00
The Android Open Source Project
b376203efb auto import from //branches/cupcake/...@130745 2009-02-10 15:44:04 -08:00
The Android Open Source Project
f87393cb24 auto import from //branches/cupcake/...@127101 2009-01-20 14:03:59 -08:00
The Android Open Source Project
0100d517b1 auto import from //branches/cupcake/...@126645 2009-01-15 16:12:12 -08:00
The Android Open Source Project
699d24ab11 auto import from //branches/cupcake/...@125939 2009-01-09 17:51:24 -08:00
The Android Open Source Project
51704bed79 Code drop from //branches/cupcake/...@124589 2008-12-17 18:05:50 -08:00