OSDN Git Service
Joshua Lang [Mon, 1 Aug 2016 23:36:44 +0000 (16:36 -0700)]
Fix audio output period size and buffer size
Previous values were causing many test failures due to increased audio latency
and incorrect buffer sizing.
Test: Run cts audio playback tests
Change-Id: If68449bbbca0ef219b44401192fa5d22a6c45413
(cherry picked from commit
0cc9aef3408231a7d5cec47879f2fe65102d9441)
Joshua Lang [Mon, 25 Jul 2016 23:09:57 +0000 (16:09 -0700)]
Adding goldfish specific audio_policy.conf
Test: Builds
Change-Id: I4c94401198d11303b858d7b58001f3ab23c692bd
(cherry picked from commit
f8c2f82716b285da79e420ab6caa5b9712e39acc)
Joshua Lang [Sat, 23 Jul 2016 01:20:02 +0000 (18:20 -0700)]
Add tinyalsa goldfish audio device
This is a basic implementation of a tinyhal audio hal.
It reduces the restrictions on audio input to rates/formats described by 6.0 CDD.
It keeps legacy audio output restrictions: 44.1khz, stereo, 16 bit.
Fallback to legacy audio device when alsa device not detected.
Test: Boot emulator and test audio with kernel supporting both alsa and
legacy audio device
Change-Id: Ia2c92fc5f4858dcd007159d14c76b81d18a7b605
(cherry picked from commit
b002dd7726d2003d3294e026d61af90dc30f8efb)
Joshua Lang [Sat, 23 Jul 2016 01:18:11 +0000 (18:18 -0700)]
Deprecating old golfish_audio HAL
Moving to _legacy to use as fallback.
Test: Boot emulator kernel built with old goldfish_audio device
Change-Id: Ia2519589a3c6baf28a8b84eb4a8c6bcfe4a59d08
(cherry picked from commit
7c87461bf6f9dc1c211c33d241a0117c690ff5df)
Nimrod Gileadi [Wed, 18 Jan 2017 18:56:00 +0000 (18:56 +0000)]
Add Input Device Configuration for rotary input. am:
3aee924475 am:
a565e29dae
am:
78c8c0485d
Change-Id: Idf369b9c0ac58f620008b3e5de6dc61cd8a8d2bc
Nimrod Gileadi [Wed, 18 Jan 2017 18:18:27 +0000 (18:18 +0000)]
Add Input Device Configuration for rotary input. am:
3aee924475
am:
a565e29dae
Change-Id: Id855d9c58b2d4b70d2b80d927f8e544e0e517172
Nimrod Gileadi [Wed, 18 Jan 2017 17:06:17 +0000 (17:06 +0000)]
Add Input Device Configuration for rotary input. am:
3aee924475 am:
a9603177be
am:
8d458eeead
Change-Id: Ie296f750e435e0f9698065cc35240964cda5e6d8
Nimrod Gileadi [Wed, 18 Jan 2017 16:59:47 +0000 (16:59 +0000)]
Add Input Device Configuration for rotary input. am:
3aee924475
am:
a9603177be
Change-Id: I4b699f08c4d67ea3859789803e0fa282b36d066c
Nimrod Gileadi [Wed, 18 Jan 2017 16:53:17 +0000 (16:53 +0000)]
Add Input Device Configuration for rotary input.
am:
3aee924475
Change-Id: I990b0b9c996ab94b509c62fd0348ec7a122f2e6a
Nimrod Gileadi [Wed, 18 Jan 2017 16:53:17 +0000 (16:53 +0000)]
Add Input Device Configuration for rotary input.
am:
3aee924475
Change-Id: Ibf3469f38e28edbdf909d5f786e671dd7b8da5b6
Nimrod Gileadi [Tue, 17 Jan 2017 18:02:31 +0000 (18:02 +0000)]
Add Input Device Configuration for rotary input.
This file adjusts InputReader's response to rotary input.
The rotary input driver is added to the qemu kernel in
http://r.android.com/321420
Rotary input events are added to the emulator in
http://r.android.com/312364
Bug:
33292948
Change-Id: I8d311dcd3ccaa06283e5ac51c70f7ea12ce9ca50
bohu [Tue, 17 Jan 2017 16:41:16 +0000 (08:41 -0800)]
Launcher3: add default wallpaper picker
Launcher3 has a bug in choosing the appropriate wallpaper picker,
give it a default one to workaround.
BUG:
34277051
Change-Id: I58a744e98f5f2ed85e9cfeef3f7692a4615c980f
Lingfeng Yang [Tue, 17 Jan 2017 01:13:27 +0000 (01:13 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc am:
b4e6cf1a59 am:
a4e238a6d2
am:
c321338a65
Change-Id: If724c4b016cffca02d814ea1846945e4b70db74a
Lingfeng Yang [Tue, 17 Jan 2017 01:12:56 +0000 (01:12 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc am:
b4e6cf1a59 am:
6a68330757
am:
10d2891b14
Change-Id: I8e41e52217bdc6c40b826b25fd53205d45103333
Lingfeng Yang [Tue, 17 Jan 2017 00:51:26 +0000 (00:51 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc am:
b4e6cf1a59
am:
a4e238a6d2
Change-Id: Ia23cc4654b411bfd2ae5797904eceef4a7b4b4df
Lingfeng Yang [Tue, 17 Jan 2017 00:50:23 +0000 (00:50 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc am:
b4e6cf1a59
am:
6a68330757
Change-Id: I42fd4714cab3932ed7426b810c11df9dfdffc213
Lingfeng Yang [Tue, 17 Jan 2017 00:45:24 +0000 (00:45 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc
am:
b4e6cf1a59
Change-Id: Ia621a20e20414422cdb245d2865032efcd707d21
Lingfeng Yang [Tue, 17 Jan 2017 00:45:23 +0000 (00:45 +0000)]
Add /dev/goldfish_sync to ueventd.ranchu.rc
am:
b4e6cf1a59
Change-Id: I7ce104a8b2a8837e0144cbe6f33ceeff70d58118
Lingfeng Yang [Mon, 18 Jul 2016 19:52:34 +0000 (12:52 -0700)]
Add /dev/goldfish_sync to ueventd.ranchu.rc
Change-Id: I7855f2f8b535310e59a5f2ffa0f00ee78e475d66
(cherry picked from commit
550585135a1a82283a0484f48a16a78c990508bc)
Bjoern Johansson [Thu, 12 Jan 2017 16:35:03 +0000 (16:35 +0000)]
Merge changes from topic 'camera_cps'
* changes:
Strip alignment bytes for camera video frames
Set Emulated camera's view angles based on Logitech webcam
Use YU12 instead of YV12 for camera video frames
Start video on request even without recording hint
Fix camera incorrectly using YU12 instead of YV12
Make fake camera frames resolution independent
Set correct EXIF picture size in camera pictures
Fix format of camera preview FPS range parameter
Use correct pixel format for camera videos
Prevent camera deadlocks when taking pictures
Filter out invalid webcam resolutions for camera
Separate camera frame production and delivery
Consolidate camera preview enabled checks
Only restart camera preview if it's running
Forget camera preview window on preview disabled
Respond to camera auto-focus requests
Correct camera YV12 format usage
Restart camera preview on pixel format change
Set default values for supported camera parameters
Set a preferred video preview size for camera
Restart camera preview on preview size change
Add thumbnails to camera pictures
Fix build for EXIF processing on 64-bit platforms
Attach EXIF data to images from camera
CTS: Camera: set supported effects
CTS camera: Set camrecorder framerate to 24
Emulator: wait for qemu-props to finish
Emulator: Set supported antibanding values for emulated camera
Verify preview size parameters in emulated camera
Verify focus mode and distances in emulated camera
Reject face detection commands in emulated camera
Update media_codecs_performance.xml
Port Emulator camera and location CTS fixes from mnc-emu-dev
emulator: set max-video-encoder-input-buffers value in media_codecs.xml
Weilun Du [Thu, 12 Jan 2017 02:10:53 +0000 (02:10 +0000)]
Merge "Emulator: add overlay for goldfish device"
Bjoern Johansson [Tue, 6 Dec 2016 19:08:09 +0000 (11:08 -0800)]
Strip alignment bytes for camera video frames
The encoder path in the emulator images do not expect any kind of
padding for YUV frames. After changing the emulator to correctly pass a
planar YUV format instead of a semiplanar format the encoding path
started breaking for resolutions with padding. This is because the
planar formats used by the camera had alignment padding. Since the video
encoding path is internal to the framework it's safe to use whatever
format works best. This change strips out any padding bytes used for
alignment for video frames, allowing the affected tests to pass.
BUG:
33382525
Test: ran camera CTS tests
Change-Id: I75cef46b03b90da13d91945cda8e2d2972df2f55
(cherry picked from commit
82a66bd172613835976e714d33fffa82412c88d6)
Jim Kaye [Thu, 1 Dec 2016 01:13:50 +0000 (17:13 -0800)]
Set Emulated camera's view angles based on Logitech webcam
Use values based on a Logitech B910 HD Webcam:
Focal length: 4.90 mm (from specs)
Horizontal view angle: 61 degrees for 4:3 sizes, 70 degrees
for 16:9 sizes (empirical)
Vertical view angle: 45.8 degrees (= 61 * 3 / 4)
BUG:
33269957
Test: ran camera CTS tests
Change-Id: I84a2ead84f298ae55ade87e570131c2c53070d1e
(cherry picked from commit
a49a912125c02f213bc96f7bc82bc818be58df5d)
Bjoern Johansson [Fri, 18 Nov 2016 20:28:12 +0000 (12:28 -0800)]
Use YU12 instead of YV12 for camera video frames
The camera parameters API only supports formats where Y, U and V
components are in the YVU order, such as YV12 or NV21. Unfortunately the
software encoders that the emulator images use to encode video only
support YUV order. This presents a configuration problem as there is no
way to straight up match these. The CameraSource class in stagefright
that configures the encoder to match the camera settings actually
converts the YV12 setting to YU12 which leads to U and V components
being swapped. This caused problems as soon as we fixed the issue where
we were actually treating YV12 as YU12.
Fortunately it turns out that the data provided in the timestamped data
callback can be pretty much whatever format that the camera and the
encoder can agree upon. The settings and frames are only available
internally so it's mostly an implementation detail. This allows us to
generate YV12 frames and then convert them to YU12 before passing them
to the timestamped data callback. The regular data callback will still
receive YV12 frames, just like the caller asked for, but the encoder
will receive frames in a YU12 format that it will handle properly.
YU12 is the format of choice for video recording because the software
encoders do not seem to require extra conversion steps for this. As a
bonus the conversion from YV12 to YU12 is very cheap in this case. We
always had to copy memory, the only difference now is that we copy each
Y, U and V plane separately and just switch the order of the U and V
planes.
In more modern version of the camera HAL the camera does not provide raw
byte buffers like this but instead it feeds frames into a gralloc buffer
queue. This way the camera has a lot more flexibility in what formats it
can use and the encoders can also support YVU formats. So when we switch
to a new HAL version we shouldn't have to deal with this anymore.
BUG:
32771006
Test: ran camera CTS tests
Change-Id: Ic05c1f816dbb09d027f08dea59095a935716309c
(cherry picked from commit
d7506ee34e9ccda8a8c7866706b8a2b897e842d7)
Bjoern Johansson [Fri, 18 Nov 2016 20:21:30 +0000 (12:21 -0800)]
Start video on request even without recording hint
The camera parameter API contains a recording hint that we used to
determine if video recording was to be enabled or not. Unfortunately not
all clients use the recording hint so we cannot rely solely on that.
Luckily the camera is explicitly told when recording should start. This
change uses that mechanism to determine if we need to restart frame
delivery with a new pixel format or frame size because they might have
changed to something different than what the preview is using.
BUG:
32771006
Test: ran camera CTS tests
Change-Id: I0e0aac4915aa97d0cba71a4b652e6e2a68da7b6e
(cherry picked from commit
7705b5d1c27b8c4bb4865b1defcb160b0e1eecef)
Bjoern Johansson [Thu, 27 Oct 2016 23:27:07 +0000 (16:27 -0700)]
Fix camera incorrectly using YU12 instead of YV12
The pixel formats provided to the emulated camera are translated from
the camera parameter string value to a fourcc code. This translation was
incorrect for YV12, instead the camera interpreted it as YU12. This
caused the U and V components to be switched, altering the color of
images received when requesting YV12. This change makes sure that the
correct pixel format is used.
BUG:
32489697
Test: ran camera CTS tests
Change-Id: I65c908873631d58248fea6abad440125a91ac850
(cherry picked from commit
13650c14d59c7bd0247bb26e7e2599832581cc2d)
Bjoern Johansson [Fri, 7 Oct 2016 18:25:00 +0000 (11:25 -0700)]
Make fake camera frames resolution independent
Make the generation of the checkerboard frames resolution independent
so that the frames look the same after changing resolution. This allows
seamless switches between resolutions without any noticable differences.
This change also modifies the animation of the moving square so that it
now bounces off the edges of the frame instead of a 255x255 invisible
square. This is to ensure that the square ends up in a place that does
not depend on a fixed pixel location. Instead it will appear in a
similar location regardless of resolution. This satisfies a newly added
test in the N CTS tests that will compare preview frames at certain
resolutions with the JPEG created when taking a picture.
BUG:
31913409
Test: ran camera CTS tests
Change-Id: I12fc47aaf3ed678383b70d6e91060e05aaf41452
(cherry picked from commit
1ac0584457f60b314a90fa6233c52c0d8ebb1ade)
Bjoern Johansson [Mon, 3 Oct 2016 21:58:51 +0000 (14:58 -0700)]
Set correct EXIF picture size in camera pictures
The EXIF data created by the camera had pixel dimensions set to zero by
default. Newer versions of the camera app requires that these dimensions
are non-zero. This change updates the default values to match the
picture dimensions. In order to update a value this change also removes
an entry if it already exists and then recreates it.. This is to make it
easier to update tags without having to reallocate memory.
Test: ran camera CTS tests
Change-Id: If2d1b9714fe16d55f4d2a68e2cd6927d1d4866f6
(cherry picked from commit
7ef96014694a23e2d117544f2cca19a8b7ac0e01)
Bjoern Johansson [Mon, 3 Oct 2016 22:07:36 +0000 (15:07 -0700)]
Fix format of camera preview FPS range parameter
The parameter for the preview FPS range contains two integers separated
by a comma. In the existing code the two integers were placed inside
parentheses which matches the list of support preview FPS ranges. It
seems however that this is not valid, the parentheses only exist in the
list of supported ranges so that treating it as a list becomes easier.
Newer versions of the Camera app relies on this parameter having the
correct format as does the getPreviewFpsRange method in the
CameraParameters class.
Test: ran camera CTS tests
Change-Id: If95fb0f2db2116a9c6452ac78da8f5fa077ee602
(cherry picked from commit
887d8c6b8ff6d037cc652fe59f4c160fa6de0d46)
Bjoern Johansson [Tue, 27 Sep 2016 23:59:39 +0000 (16:59 -0700)]
Use correct pixel format for camera videos
A previous change removed code that would use the video pixel format if
video recording was enabled. This change was made because it didn't seem
to have any effect and it was causing problems because the code could
not reliably detect when recording was enabled. It turns out the video
pixel format is important and that the reason it was causing problems
was because the recording hint parameter was not properly reset and did
not cause preview restarts when needed. This change makes sure to use
the correct pixel format and correctly handles the recording hint
parameter.
Test: ran camera CTS tests
Change-Id: I7466a750f799c89a2933ccd712386fe6380c01d7
(cherry picked from commit
61cad039974014f0c6f29abe4b3519741c36074d)
Bjoern Johansson [Tue, 27 Sep 2016 18:05:15 +0000 (11:05 -0700)]
Prevent camera deadlocks when taking pictures
The camera in the emulator would sometimes end up in a deadlock when
taking pictuers. This happened because the request to take a picture
could be blocked on waiting for the frame delivery thread to end. But
the frame delivery thread was waiting to acquire a lock in the image
delivery callback, a lock that was held by the take picture call in the
camera client. This change changes the synchronous take picture call
into an asynchronous request. The take picture functionality is moved to
the same thread that delivers frames which ensures that all callbacks to
the camera client happen from the same thread.
BUG:
31599348
Test: ran camera CTS tests
Change-Id: Ib8d3a6c04e7e9bf7f297e1aafcd73d7f2e629132
(cherry picked from commit
31466a4d2304d5097e70d6437c7bd7c8b08d961b)
Bjoern Johansson [Tue, 20 Sep 2016 22:44:15 +0000 (15:44 -0700)]
Filter out invalid webcam resolutions for camera
To be able to use camera API v2 even with cameras that only implement
API v1 there is a wrapper in the Android framework. This wrapper
attempts to figure out the camera sensor size by looking at the
resolution with the highest area. Any attempt to use a resolution with a
width or height exceeding the width or height of the sensor size is
rejected. Since the emulator will filter out higher resolutions this
means that this is not a reliable way to determine the sensor size. In
order to work around this the camera will now filter out resolutions
that do not meet the criteria of the framework wrapper. This code is
placed in the guest since that where the check occurs, if we switch to
API v2 or the framework changes the guest camera code can change with it
without creating a dependency between the emulator and the image.
BUG:
30034008
Test: ran camera CTS tests
Change-Id: Iea85ae99031b49e669181c7a5626f7a8aab22353
(cherry picked from commit
f96a76aa99eb449631e58e701103e7b4d7721816)
Bjoern Johansson [Mon, 19 Sep 2016 22:49:24 +0000 (15:49 -0700)]
Separate camera frame production and delivery
Separate the production and delivery of camera frames into two separate
worker threads. The previous implementation did both at once and did not
take time taken for production and delivery into account when sleeping
between frames. Decoupling production and delivery allows the camera to
always deliver frames on time even if production can't keep up. The same
frame might be delivered more than once but performance testing
has not yet shown that this is happening. This also adjusts the sleeping
strategy in between frames to take the delivery or production time into
consideration. The goal is to deliver frames with very little deviation
from the configured frame rate.
BUG:
30034008
Test: ran camera CTS tests
Change-Id: I01d9c07795993e79c475249d87d9da32d7d14256
(cherry picked from commit
c5f193548f3461a41b80b9720d66836e20b0999a)
Bjoern Johansson [Thu, 8 Sep 2016 18:01:03 +0000 (11:01 -0700)]
Consolidate camera preview enabled checks
A previous patch introduced a boolean to keep track of whether the
camera preview was running or not. Such a mechanism already existed in
the preview window class. This removes the boolean in favor of using the
older mechanism instead.
Test: ran camera CTS tests
Change-Id: Id62003c9596edf53d702c080455cf940524d4877
(cherry picked from commit
804fb7575829203017638401c93c987c11b1e120)
Bjoern Johansson [Thu, 8 Sep 2016 17:56:42 +0000 (10:56 -0700)]
Only restart camera preview if it's running
Previously the camera preview would be restarted even if it wasn't
running. The end result of that was that the camera preview would be
started simply by changing parameters. This caused problems because the
camera client had not set everything up yet.
Test: ran camera CTS tests
Change-Id: I5b3356d1ee952a2b2a88a24072172d8069140461
(cherry picked from commit
9067964fd899de66e0be77b75332c76b852b4da3)
Bjoern Johansson [Fri, 2 Sep 2016 21:21:24 +0000 (14:21 -0700)]
Forget camera preview window on preview disabled
The camera client does not informat the HAL that a preview window has
been destroyed unless the preview is running. This means that the
preview window can be destroyed and then later on when preview is
enabled the HAL will attempt to use a destroyed window. This fixes that
by setting the preview window pointer to NULL whenever previews stop.
The client will then set the preview window to use once it has enabled
preview again and that new window will be used.
BUG:
30034008
Test: ran camera CTS tests
Change-Id: I3b372d8e3d9732e87d05535867a1f67eba9e3170
(cherry picked from commit
1d812bda533463a7781589134cba834576ef9958)
Bjoern Johansson [Thu, 1 Sep 2016 18:34:46 +0000 (11:34 -0700)]
Respond to camera auto-focus requests
Even though the emulated cameras do not support auto-focus they are
required to respond to auto-focus commands. They should immediately
signal a successful auto-focus complete event to the client. This change
implements this behavior by setting a flag that is inspected as long as
the worker thread that generates preview frames is running. This is safe
since the documentation mentions that the camera must be in preview mode
for the auto-focus request to work.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: I2be24c734255bba2dcb55a73b84b49f7ee3e2232
(cherry picked from commit
01089051c75ff1e00476191614911f6046862fb3)
Bjoern Johansson [Wed, 31 Aug 2016 00:18:39 +0000 (17:18 -0700)]
Correct camera YV12 format usage
The camera code incorrectly generated and decoded YV12 encoded images.
The format requires that row strides are aligned to 16 bytes which
introduces padding at some of the resolution that the camera supports,
most notably 176x144 where half of 176 is not divisible by 16. The width
is halved because the U and V components each cover 2x2 pixel blocks so
the effective width of each row is 88 pixels, this has to be padded to 96
bytes. This change ensures that the images generated by the fake camera
have the required alignment and also that decoding the YV12 images to RGB
for the preview window correctly takes the alignment into consideration.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: I16590551af59c730c0c8b024dbaee40f5c8e9ab2
(cherry picked from commit
ddeced00136c1299dfca1ea5066f23b5ada2a142)
Bjoern Johansson [Tue, 30 Aug 2016 16:26:27 +0000 (09:26 -0700)]
Restart camera preview on pixel format change
Make sure the camera preview is restarted if the preview pixel format
changes. Otherwise preview frames will be delivered with the wrong
format. In addition to this also make sure that the camera only cares
about the preview pixel format, not the video pixel format. The video
pixel format parameter key is not even exposed in the higher level APIs
and CTS tests do not seem to exercise this setting, it seems to be an
unused parameter.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: Ife3ad70ab8fe2f1f834a057bdbf5558f684ec7df
(cherry picked from commit
f4455dcc522ed67052e911e245eef7927e76b8f2)
Bjoern Johansson [Thu, 25 Aug 2016 21:15:48 +0000 (14:15 -0700)]
Set default values for supported camera parameters
CTS requires that values which we indicate support for also have a
default value. In this cause anti-banding and effects had entries
indicating what values were supported but no value was set when querying
for the current value. This change sets reasonable defaults for these
values.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: I855b9bf84a1545c169412d8ea56e3ebb3bdcf136
(cherry picked from commit
765503a76856609705e7222a165a5739055e9d24)
Bjoern Johansson [Thu, 25 Aug 2016 19:49:57 +0000 (12:49 -0700)]
Set a preferred video preview size for camera
CTS requires that a preferred video preview size is set if video
previews are supported.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: I52cc96c6745330e4609f925ca8087167523880db
(cherry picked from commit
a3a7b67621d89e651ff08596586815296bc3b548)
Bjoern Johansson [Thu, 25 Aug 2016 19:24:56 +0000 (12:24 -0700)]
Restart camera preview on preview size change
Whenever the camera preview or video size changes the preview must be
restarted to ensure that the camera supplies correctly sized frames to
the camera client. In some instances the client will not validate buffer
sizes and will write into a buffer that's either too small or too large,
potentially causing data corruption or crashes.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: Ie2e7726c05be1f39463654f1b8af6216d4b4cd9d
(cherry picked from commit
68d799a4c615be7a428d23fa7fa3137ae87340b9)
Bjoern Johansson [Mon, 22 Aug 2016 23:57:10 +0000 (16:57 -0700)]
Add thumbnails to camera pictures
This adds EXIF thumbnails to pictures taken by the camera. The
thumbnails will be of the size specified in the camera parameters and
JPEG compressed.
Test: ran camera CTS tests
Change-Id: Icddc435726dde748791be2f1dd2dd68fdcbc8f7e
(cherry picked from commit
833a0978d5abc730eca1975af20a4ebd9a754d7d)
Bjoern Johansson [Fri, 19 Aug 2016 23:06:37 +0000 (16:06 -0700)]
Fix build for EXIF processing on 64-bit platforms
64-bit builds do not have time64_t since time_t itself is 64-bit, make
sure the EXIF code that processes GPS timestamps uses a 64-bit version
of time_t that exists on the current platform.
Test: ran camera CTS tests
Change-Id: Ia32ad546c57e685ec9dfdf47c65aa10fe5b5a120
(cherry picked from commit
5f9bf798dfb618fc204dfa422e89e75bbd5a7abd)
Bjoern Johansson [Wed, 17 Aug 2016 22:24:44 +0000 (15:24 -0700)]
Attach EXIF data to images from camera
Create a default set of EXIF tags for any JPEG picture taken by the
emulator camera. In addition some camera parameters, such as GPS data
and focal length, will be converted to EXIF tags and placed in the
picture if they are available. This fixes the testJpegExif test in
android.hardware.cts.CameraTest and will serve as the base for fixing
other EXIF tests.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: I42a4abb0190c3eb61c32b11d52a467965a9621ae
(cherry picked from commit
33ce097dedaf750d276ca5a8b7932de566e01399)
bohu [Mon, 15 Aug 2016 15:16:42 +0000 (08:16 -0700)]
CTS: Camera: set supported effects
To pass the following test with emulated camera
android.hardware.camera2.cts.CaptureRequestTest#testEffectModes
Bug:
30862244
Test: ran camera CTS tests
Change-Id: Iaccdab91f03aebced72ad3d5e9e823f1e7ad2acb
(cherry picked from commit
74c4369bc503f87f2517a08acc1d3c42d5466128)
bohu [Tue, 16 Aug 2016 00:30:36 +0000 (17:30 -0700)]
CTS camera: Set camrecorder framerate to 24
As requred by CTS, 24 is the minimum.
This fixes the following two cases:
android.hardware.camera2.cts.RecordingTest#testBasicRecording
android.hardware.camera2.cts.RecordingTest#testRecordingFromPersistentSurface
Bug:
30034008
Test: ran camera CTS tests
Change-Id: Iadd340c30eab5f449834958f83561201810e86ad
(cherry picked from commit
075f1aa4544d2f3512c8612bd607107772228d38)
bohu [Wed, 10 Aug 2016 15:34:13 +0000 (08:34 -0700)]
Emulator: wait for qemu-props to finish
Emulator camera module checks the qemu.sf.fake_camera property
to decide how to setup emulated cameras. If qemu-props has not
set it up yet, there will be no emulated cameras and any later
usage of emulated camera will fail.
Bug:
30768229
Test: ran camera CTS tests
Change-Id: Idb2bebd5ca3737aa416fc3094ecf15c1132ed989
(cherry picked from commit
144ee8937774ba95e9b80882b37f9f5310d498cd)
bohu [Tue, 9 Aug 2016 19:26:38 +0000 (12:26 -0700)]
Emulator: Set supported antibanding values for emulated camera
Bug:
30699754
Test: ran camera CTS tests
Change-Id: Iae95ee59d15d05cc39bbcdf3e96767c42d24fa81
(cherry picked from commit
5cb2b74b7c6e67955f2ccd90f7a254d8cc0076f0)
Bjoern Johansson [Fri, 5 Aug 2016 22:24:52 +0000 (15:24 -0700)]
Verify preview size parameters in emulated camera
The camera preview size cannot have a negative width or height. Return
an error code if the caller attempts to set a negative value.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: I90a0afc8ee5dce006b93cbce002029f80c4042e0
(cherry picked from commit
db6633937b79829da23a9f22d91cd1be98001f3d)
Bjoern Johansson [Fri, 5 Aug 2016 19:18:29 +0000 (12:18 -0700)]
Verify focus mode and distances in emulated camera
The emulated camera did not have any focus distances set by default
which is required. It also did not validate that focus mode parameters
when setting camera parameters. This fix sets default focus distances at
infinity and allows all focus modes that are currently supported by the
platform.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: Ic3455447a13dcf35cef8054262d68b51e1b03ede
(cherry picked from commit
02427837f62f62df0d1bd567090fd580e36563af)
Bjoern Johansson [Fri, 5 Aug 2016 19:04:11 +0000 (12:04 -0700)]
Reject face detection commands in emulated camera
The emulated camera does not support hardware face detection. It
indicates this by returning zero for the number of supported faces for
face detection. However when sending commands to the camera to start or
stop face detection it would indicate success. This is not valid
behavior and with this change those commands will now indicate failure.
BUG:
30700822
Test: ran camera CTS tests
Change-Id: I27982b8c850a85cc7f415397eee07c8096a82795
(cherry picked from commit
cfd4e6c764c64369247796d3adb7379964a050c0)
Joshua Lang [Tue, 27 Sep 2016 21:53:44 +0000 (14:53 -0700)]
Update media_codecs_performance.xml
Update performance numbers to pass CTS tests.
Bug:
31648354
Test: ran camera CTS tests
Change-Id: I019642d165f0df08eca75ce006706e95407dd0ee
(cherry picked from commit
e6a5deace6ff39a47975408c6beccfe819e4ff23)
Jim Kaye [Fri, 23 Sep 2016 23:48:51 +0000 (16:48 -0700)]
Port Emulator camera and location CTS fixes from mnc-emu-dev
Fix Emulator CTS test for video performance
https://googleplex-android-review.git.corp.google.com/933627
If2ec61f2fbd3e8dd314b93b4d81c32f76847f990
Fix Emulator CTS tests for Camera, Location, Sensors, Telephony
https://googleplex-android-review.git.corp.google.com/915391
Icc42989d094856f13bd3655e528ebdaa8890c2b5
Fixes these CTS tests in NYC:
android.app.cts.SystemFeaturesTest#testLocationFeatures
android.app.cts.SystemFeaturesTest#testSensorFeatures
BUG: http://b/
31751499
Test: ran camera CTS tests
Change-Id: Ic108b393e481930c2fe1a3d62d621765f96d2126
(cherry picked from commit
5c9383aeec4f92a6286ed3508e26abfcebf5b87a)
bohu [Tue, 12 Jul 2016 18:59:22 +0000 (11:59 -0700)]
emulator: set max-video-encoder-input-buffers value in media_codecs.xml
Without this value, mediacodec cannot create persistent input surface
error message:
MediaCodec: Failed to get encoder input buffer count!
Bug:
30088791
Test: ran camera CTS tests
Change-Id: I0306a676de564642684335b0a1c6cff5ca41011a
(cherry picked from commit
0e5dd1ded31423da7a0696761753d156aeab4cb0)
Joshua Lang [Thu, 6 Oct 2016 00:46:37 +0000 (17:46 -0700)]
Add video codec config xml to goldfish devices
Copied from libstagefright/data
Increased H264 encoder bitrate range as required for CTS test.
Bug:
31648354
Test: ran camera CTS tests
Change-Id: I4c1630a723ef96c69466759d3dee072554233693
(cherry picked from commit
fd02c63870dec2ccb7f787483be660743b9e65c3)
Weilun Du [Tue, 10 Jan 2017 19:32:23 +0000 (19:32 +0000)]
Merge "Add /dev/goldfish_sync to ueventd.ranchu.rc"
Lingfeng Yang [Fri, 6 Jan 2017 20:18:42 +0000 (20:18 +0000)]
Merge "Allow emulator goldfish-setup to take wake locks" am:
d1dad67cd7 am:
9f751f6eab am:
af75232eed
am:
a573a30dfe
Change-Id: I177e5b44fd6c8018afb51bbdc452ac012a75d0ab
Lingfeng Yang [Fri, 6 Jan 2017 20:11:11 +0000 (20:11 +0000)]
Merge "Allow emulator goldfish-setup to take wake locks" am:
d1dad67cd7 am:
9f751f6eab
am:
af75232eed
Change-Id: Ia09e3f510f1ed64659d54dce2ccdae47836811e3
Lingfeng Yang [Fri, 6 Jan 2017 20:07:11 +0000 (20:07 +0000)]
Merge "Allow emulator goldfish-setup to take wake locks" am:
d1dad67cd7
am:
9f751f6eab
Change-Id: I9dfe23339ba1e57709395b07e81b85e3d47b4fc9
Lingfeng Yang [Fri, 6 Jan 2017 20:03:41 +0000 (20:03 +0000)]
Merge "Allow emulator goldfish-setup to take wake locks"
am:
d1dad67cd7
Change-Id: I221a66b609a887d06fe65a5719e3bf69dcfa9193
Treehugger Robot [Fri, 6 Jan 2017 19:57:52 +0000 (19:57 +0000)]
Merge "Allow emulator goldfish-setup to take wake locks"
Weilun Du [Fri, 6 Jan 2017 19:43:34 +0000 (11:43 -0800)]
Emulator: add overlay for goldfish device
To install multiple chrome and webview packages
This CL is for bugs:
b/
32449025 and b/
32451806
Change-Id: Ia51eb85204986300299c36865a26ab734cca9445
Signed-off-by: Weilun Du <wdu@google.com>
Lingfeng Yang [Fri, 6 Jan 2017 18:12:35 +0000 (10:12 -0800)]
Allow emulator goldfish-setup to take wake locks
Change-Id: Ic8938ebbdced308b523620cf3ab4d0ac1214106f
Lingfeng Yang [Thu, 5 Jan 2017 19:47:23 +0000 (11:47 -0800)]
Update init.goldfish.sh
This allows internet to work on emulator
Change-Id: I903f3b6fb709ad936145537f1e6615f7afcc8058
Lingfeng Yang [Mon, 18 Jul 2016 19:52:34 +0000 (12:52 -0700)]
Add /dev/goldfish_sync to ueventd.ranchu.rc
Change-Id: I7855f2f8b535310e59a5f2ffa0f00ee78e475d66
(cherry picked from commit
550585135a1a82283a0484f48a16a78c990508bc)
(cherry picked from commit
f721e3e84ea4ad9c53cadd5b9811d57c9164de3c)
Ben Wagner [Thu, 15 Dec 2016 23:06:03 +0000 (18:06 -0500)]
Use bytesWritten instead of getOffset on SkDynamicMemoryWStream.
These two methods do the same thing and bytesWritten makes more sense
and is also a proper SkWStream override. As a result, getOffset is being
removed. This updates the calling code.
Test: refactoring CL. Existing unit tests still pass.
Change-Id: I2e2b60c1c86d07c5ab7ec6518d689e8bf700e5d2
Yahan Zhou [Wed, 30 Nov 2016 01:59:15 +0000 (01:59 +0000)]
Remove old opengl code and update references am:
7db3441edb -s ours am:
4deb9fb1c0 -s ours
am:
a46b52a4d1 -s ours
Change-Id: Iee8934cb461a44654488e68ad7084c3e4437317e
Yahan Zhou [Wed, 30 Nov 2016 01:53:45 +0000 (01:53 +0000)]
Remove old opengl code and update references am:
7db3441edb -s ours
am:
4deb9fb1c0 -s ours
Change-Id: Iec9299bda3581583dffaa4b54592b6548f766463
Yahan Zhou [Wed, 30 Nov 2016 01:48:16 +0000 (01:48 +0000)]
Remove old opengl code and update references
am:
7db3441edb -s ours
Change-Id: Ia2a0d1894b496ac15923e5793a60d351263fed63
Yahan Zhou [Mon, 18 Jul 2016 21:44:07 +0000 (14:44 -0700)]
Remove old opengl code and update references
The opengl code is moved to goldfish-opengl.
BUG:
32183368
Test: make
Merged-In: Ib8348464c2218c51fc8133396e6eacd5b86ec297
Change-Id: Iabfdcbbc974b78e907dfcdaf5dfdd27e103c7424
(cherry picked from commit
d0e256aaacda3cf51066419be4b4a815c61994ba)
Yahan Zhou [Mon, 24 Oct 2016 19:36:26 +0000 (19:36 +0000)]
Remove old opengl code and update references am:
7d37b2d066
am:
e3c3917ea7
Change-Id: I5a88b8957c26640b7d749a40ffe5193a1f5d4784
Yahan Zhou [Mon, 24 Oct 2016 19:32:57 +0000 (19:32 +0000)]
Remove old opengl code and update references
am:
7d37b2d066
Change-Id: I645939717766c985197bdb7b3333e0a26b93e6db
Yahan Zhou [Tue, 12 Jul 2016 21:55:28 +0000 (14:55 -0700)]
Remove old opengl code and update references
The opengl code is moved to goldfish-opengl.
Test: make
Test: fix breakage
Change-Id: Ib8348464c2218c51fc8133396e6eacd5b86ec297
Bo Hu [Sat, 22 Oct 2016 01:57:00 +0000 (01:57 +0000)]
Merge "Remove old opengl code and update references" into nyc-mr1-dev am:
df5624ac36 am:
3941aa6201
am:
4050f0d35f -s ours
Change-Id: Ief3baafea7435250f602f0f61057dbcffb6602d1
Yahan Zhou [Sat, 22 Oct 2016 01:56:57 +0000 (01:56 +0000)]
Remove old opengl code and update references am:
c32dbea669 am:
4c91e07bd2 -s ours
am:
60c787bfb8 -s ours
Change-Id: I35a9a3e301c40552e0f72ef308ae70cade5cd061
Bo Hu [Sat, 22 Oct 2016 01:54:34 +0000 (01:54 +0000)]
Merge "Remove old opengl code and update references" into nyc-mr1-dev am:
df5624ac36
am:
3941aa6201
Change-Id: I0d3db9e2d2c54be6767dec1c2f1555555e402b53
Yahan Zhou [Sat, 22 Oct 2016 01:54:31 +0000 (01:54 +0000)]
Remove old opengl code and update references am:
c32dbea669
am:
4c91e07bd2 -s ours
Change-Id: I736394bbeb45a6d68e3d2ae787de9b0ae23303cb
Bo Hu [Sat, 22 Oct 2016 01:20:38 +0000 (01:20 +0000)]
Merge "Remove old opengl code and update references" into nyc-mr1-dev
am:
df5624ac36
Change-Id: If546db92964adda9bc712139bb792f0ba3c1622f
Yahan Zhou [Sat, 22 Oct 2016 01:20:29 +0000 (01:20 +0000)]
Remove old opengl code and update references
am:
c32dbea669
Change-Id: I7f565caf1f0160aebdc5c65db9998c2b97367eb5
Bo Hu [Sat, 22 Oct 2016 00:04:51 +0000 (00:04 +0000)]
Merge "Remove old opengl code and update references" into nyc-mr1-dev
Lingfeng Yang [Fri, 21 Oct 2016 00:38:55 +0000 (00:38 +0000)]
DO NOT MERGE ANYWHERE Add /dev/goldfish_sync to ueventd.ranchu.rc am:
aea8e4a192 -s ours am:
cd5cb7aba5 -s ours
am:
552acc97a9 -s ours
Change-Id: I565ae7856bffe11066e58b2c57d4c19bd54f5ca5
Lingfeng Yang [Fri, 21 Oct 2016 00:31:00 +0000 (00:31 +0000)]
DO NOT MERGE ANYWHERE Add /dev/goldfish_sync to ueventd.ranchu.rc am:
aea8e4a192 -s ours
am:
cd5cb7aba5 -s ours
Change-Id: I1808d8f5d3e0a15da19fb4ee7d9ebb3a0f32a68c
Lingfeng Yang [Fri, 21 Oct 2016 00:23:04 +0000 (00:23 +0000)]
DO NOT MERGE ANYWHERE Add /dev/goldfish_sync to ueventd.ranchu.rc
am:
aea8e4a192 -s ours
Change-Id: Icadcc53a6552daa3df7c40bcf57a2589f86967d2
Lingfeng Yang [Mon, 18 Jul 2016 19:52:34 +0000 (12:52 -0700)]
DO NOT MERGE ANYWHERE Add /dev/goldfish_sync to ueventd.ranchu.rc
Change-Id: I7855f2f8b535310e59a5f2ffa0f00ee78e475d66
(cherry picked from commit
550585135a1a82283a0484f48a16a78c990508bc)
Yahan Zhou [Mon, 18 Jul 2016 21:44:07 +0000 (14:44 -0700)]
Remove old opengl code and update references
The opengl code is moved to goldfish-opengl.
BUG:
32183368
Merged-In: Ib8348464c2218c51fc8133396e6eacd5b86ec297
Change-Id: Iabfdcbbc974b78e907dfcdaf5dfdd27e103c7424
(cherry picked from commit
d0e256aaacda3cf51066419be4b4a815c61994ba)
David Turner [Mon, 17 Oct 2016 16:27:58 +0000 (16:27 +0000)]
Merge "init.goldfish.rc: Allow running 3.10+ kernels on Goldfish" am:
a652a0995f am:
939d3d5f35
am:
28e667ab96
Change-Id: Ic304cfd6e440180b75ab51c889a390a3c54f7c5a
David Turner [Mon, 17 Oct 2016 16:20:58 +0000 (16:20 +0000)]
Merge "init.goldfish.rc: Allow running 3.10+ kernels on Goldfish" am:
a652a0995f
am:
939d3d5f35
Change-Id: Ia87559be7ab96a674e139052e39cd11ae1401745
David Turner [Mon, 17 Oct 2016 16:13:57 +0000 (16:13 +0000)]
Merge "init.goldfish.rc: Allow running 3.10+ kernels on Goldfish"
am:
a652a0995f
Change-Id: Ica4aeba1d8867d4aae834c16eb319958ade0db92
David Turner [Mon, 17 Oct 2016 16:05:15 +0000 (16:05 +0000)]
Merge "init.goldfish.rc: Allow running 3.10+ kernels on Goldfish"
Miodrag Dinic [Mon, 12 Sep 2016 08:57:33 +0000 (10:57 +0200)]
init.goldfish.rc: Allow running 3.10+ kernels on Goldfish
Since qemud service is removed and all devices use pipe device
directly, add symlinks to the pipe device file to accommodate
device naming scheme changes between kernel versions.
Without this change, Goldfish emulators won't be able to
boot if the kernel 3.10+ is used. This is the case with x86_64
emulator which uses 3.10 Goldfish kernel.
Change-Id: I451f75890c28c812e94948b31a0050bf839ea313
Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Dmitriy Filchenko [Thu, 18 Aug 2016 19:32:05 +0000 (19:32 +0000)]
Merge "Remove unused include." am:
1bdcd4fe9b am:
1cea79e4ff am:
084416512d
am:
c80beadf8d -s ours
Change-Id: I1b42f8089ca0ee8989b67ef34f178a869ba13547
Dmitriy Filchenko [Thu, 18 Aug 2016 19:24:33 +0000 (19:24 +0000)]
Merge "Remove unused include." am:
1bdcd4fe9b am:
1cea79e4ff
am:
084416512d
Change-Id: I322be7460ff65b69e76d08d0e11c320fd01d439c
Dmitriy Filchenko [Thu, 18 Aug 2016 19:21:32 +0000 (19:21 +0000)]
Merge "Remove unused include." am:
1bdcd4fe9b
am:
1cea79e4ff
Change-Id: I732be4edfcd3d6fdfd7460653e220777986801cc
Dmitriy Filchenko [Thu, 18 Aug 2016 19:15:41 +0000 (19:15 +0000)]
Merge "Remove unused include."
am:
1bdcd4fe9b
Change-Id: Ia757c04441404f38a59f535ed5dfdaa8a2bb436f
Treehugger Robot [Thu, 18 Aug 2016 19:11:27 +0000 (19:11 +0000)]
Merge "Remove unused include."
Dmitriy Filchenko [Thu, 18 Aug 2016 00:59:37 +0000 (17:59 -0700)]
Remove unused include.
BUG:
29824203
Change-Id: Ie5f5de25221d38f81befbaa965427650cdac44c2
Merged-In: Ib764899053dffabae325b8e4e7488afa3892ee85
Dmitriy Filchenko [Wed, 17 Aug 2016 21:58:39 +0000 (21:58 +0000)]
Merge "Update the get_process_name call." am:
7a723567f4 am:
d8bc1d3bb2 am:
5b2472a373
am:
afeebfd899 -s ours
Change-Id: Ia12850810b87802f1e5bf03b2b41ce25531d6cc9
Dmitriy Filchenko [Wed, 17 Aug 2016 18:45:56 +0000 (18:45 +0000)]
Merge "Update the get_process_name call." am:
7a723567f4 am:
d8bc1d3bb2
am:
5b2472a373
Change-Id: Ia80656ce1e5314c854d88cd5be4735d3f4964816
Dmitriy Filchenko [Wed, 17 Aug 2016 18:42:56 +0000 (18:42 +0000)]
Merge "Update the get_process_name call." am:
7a723567f4
am:
d8bc1d3bb2
Change-Id: I249ec1f0a156b73d751018eba1a5a9be52f48527