ION test case with advanced options

This ION test case is an enhancement over basic ion_test.c
It provides following options.
1) Allocate Multiple buffers and Free.
Ex : Allocate 10 2D TILER buffers of 1920x1080 size in 16-bit mode.
	as iontest2 --alloc -t -w 1920 -h 1080 -r 1 -n 10
2) Allocate Multiple buffers, test Mapping and Free.
Ex : Allocate 10 1D buffers of 1MB size and test mapping.
	as iontest2 --map -l 1048576 -f 4 -n 10
3) Allocate Multiple buffers and Free repeated number of times.
Ex : Allocate 10 2D TILER buffers of 1280x720 size in 32-bit mode and Free
	Repeat the sequence for 10000 times.
	as iontest2 --alloc -t -w 1280 -h 720 -r 2 -n 10 -i 30000
4) Go on allocating buffers of specified size & type, until allocations fail.
   Then free 10 buffers and allocate 10 buffers again.
Ex : Perform above test for 2D TILER buffers of 640x480 size in 8-bit mode
	as iontest2 --custom 1 -t -w 640 -h 480 -r 0

Change-Id: I3eecbc15a913c0f17fd90be2a6a315cbde6331a1
Signed-Off-By: Kalpesh Patil <kalpeshpatil@ti.com>
CameraHal: Disables SW video scaling if framerate is above 15

- Fix for DR: OMAPS00254351

Change-Id: I053288d70df9cfd81ad0028f99a1c7ff9c606a57
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Test application: Validate MM VTC use cases

Application for testing VTC requirements
Usage: /system/bin/VTCTestApp test_case_id

Test Case ID can be any of the following
0 - Runs all the tests listed in the UTR. Pass/Fail must be determined by the tester after examining the recorded clips.
1 - Default test case. Does not require any parameters to be set.
2 - Tests the ability to request I-Frame generation real time. Option: -I
3 - Tests the ability to specify the maximum allowed frame size. Option: -s
4 - Tests the ability to change the bitrate at runtime. Option: -B
5 - Tests the ability to change the framerate at runtime. Option: -F
6 - Test Playback and Record. Option: -p, -n
7 - Test PIP. Option: -p, -n
8 - Test Video playback Only. Option: -p
9 - Robustness. Default: play and record the predefined resolutions (VGA & 720p). Option: -c, -v

Available Options:
-n: Record Filename(/mnt/sdcard/vtc_videos/video_0.3gp) is appended with this number. Default = 0
-w: Preview/Record Width. Default = 1280
-h: Preview/Record Height. Default = 720
-d: Recording time in secs. Default = 10 seconds
-i: I Frame Interval in secs. Default = 1
-s: Slice Size bytes. Default = 500
-M: Slice Size Macroblocks. Default = 100
-b: Bitrate. Default = 1000000
-f: Framerate. Default = 30
-I: Insert I Frames. Specify the period in secs. Default = 1 second
-B: Change bitrate at runtime to this new value. Default = 100000
-F: Change framerate at runtime to this new value. Default = 15
-p: Playback Filename. Default = /sdcard/nasa.mp4
-c: Robustness, number of cycles of Playback & Record. Default = 10
-t: Playback Duration in milli secs. Default = 0 = Play till EOF
-v: Robustness. Which test to repeat? Range: 1-8. Read test descriptions above.
Default = -1 = play and record the predefined resolutions (VGA & 720p)

Change-Id: I884e654c3f3f7c4bb6e742a9ac4ea745ae875d85
Signed-off-by: Jorge E. Solano <jsolano@ti.com>
Signed-off-by: Anu Sundararajan <sanuradha@ti.com>
Revert "Remove non-(calibrated, api, or verified) 3A settings"

This reverts commit 0aa3eea21098a49cf7601d135945d0feae9c3e72.

Change-Id: I06f5182a9b8ccc2544bcf24b72274df225125e9c
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
CameraHAL: Fix some corner cases while handling Variable FPS Handling

Port FPS takes lower priority than VFR. But there was invalid check to take of
this priority which resulted in incorrect setting of VFR in some corner cases.
This patch makes sure Port FPS is considered only if no Range is Provided.
This patch partially resolves the DR : OMAPS00254364
This patch along with #16816 in Application completely resolves the DR.

Signed-off-by: Sathya Prakash M R <a0393677@ti.com>
Change-Id: I8aa2b5019ddd433d82fff1bad65f8cd16d2778df
Fix PIP mode and update automated testing

PIP was not exiting at the end of playback.
Automated testing parameters were updated.

Change-Id: Idc264f0ba98f3398e9930b3e8372d035f9ec6c52
Signed-off-by: Jorge E. Solano <jsolano@ti.com>
CameraHal: Add missing null check in OMX3A

Check for null before strcmp

b/5639860

Change-Id: I552213c9894679eeb64cd06419f3f430276b273e
Signed-off-by: Tyler Luu <tluu@ti.com>
Prevent out of bounds access to gralloc handle map

1) Flush DisplayQ when stopping display adapter so subsequent
usecases are not affected with display adapter is restarted
2) Protect against out of bounds access to gralloc handle map
by checking buffer index

Change-Id: I3d3d61abffb792f34c1d3740f8c9879c6657392a
Signed-off-by: Tyler Luu <tluu@ti.com>
CameraHal: Fixes a corner case with temporal bracketing

- Currently it is possible for the camera client to cause
  CameraHal to allocate just one image buffer when in
  temporal bracketing mode. This might lead to crashes when
  image capture is started. The patch should handle this
  special case by allocating the required buffer count in
  advance.

Change-Id: I3ca2a96cb03eae2cfd39d4449f9dae09ef6266ee
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Add EDID userspace parser

Currently only short video descriptors and
s3d formats are parsed if available.

Change-Id: I2ff6ea413f57b89b11df0d04d45a3735b36cd4da
Signed-off-by: Alberto Aguirre <a-aguirre@ti.com>
Enabling selection of hardware/ti/domx by ENHANCED_DOMX

Enabling the selection of hardware/ti/domx using the
ENHANCED_DOMX directory.  Fixes the compilation conflicts.

Change-Id: I40905d48a581982d33fa8b3bb89385b9659f9f34
Signed-off-by: Jean Johnson <jean-johnson@ti.com>
Revert "Test application: Validate MM VTC use cases"

This reverts commit 8bc9a80cc69844394b4379133e2bb760405a217b.

Conflicts:

	test/VTC/VTCTestApp.cpp

Note# Since there are interface level changes for
MediaPlayer between MR0 and MR1, this test app
needs to be revisited.

Change-Id: Ie4d92f27f95e400f6f88c7a9bdd75b0cdbb8660a
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
CameraHal: Populate default flash mode in supported flash modes.

Populates the default flash mode (off) in to supported flash modes
when ducati doesn't send the supported flash modes.

[DR]
-
Signed-off-by: Solaiyappan Saravanan <saravanan.s@ti.com>
Patch set 3:  Simple cherry-pick; no changes made.  Taking
approvals and verifications from patch set 2.
Signed-off-by: Jean Johnson <a0271255@ti.com>
Change-Id: Ifbf990d97af10250bc752eb80d005163b01b85ff
CameraHAL: Re-enable burst support Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vicky Martinez-DeFrain <a0869710@ti.com>

Change-Id: I3f5aa35b07ee2735ffd6c0d0539ba8f4a8ed790d
CameraHAL: Fixes a couple of inconsistencies in OMX capabilities

- The default VFR range from 'encodeVFramerateCap()' is
  never used. Instead a hard-coded one is inserted, which
  will lead to a camera crash on sensors with capabilities
  not within this default.
- The order in which constant framerates could be inserted
  is wrong. It should always be descending.
- Removes a minor of issue with the inserted commas as well.

Change-Id: Icfaf2553852ba8ff9a954ed135edf0e0a9930330
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
CameraHAL: Add OMAP_ENHANCEMENT around BURST mode

Since the value CAMERA_MSG_COMPRESSED_BURST_IMAGE is wrapped
with the OMAP_ENHANCEMENT flag the useage should be wrapped as
well so builds without the OMAP_ENHANCEMENT flags will not fail

Change-Id: I8e36d0f052624590257e5360822841c45132dcdd
Signed-off-by: Dan Murphy <dmurphy@ti.com>
camera_test: 3A settings can be applied before starting the preview

- When preview is stopped camera is not closed.
- This prevents calling the default parameters when the preview is started again.
- The set parameters before starting the preview are applied.
Signed-off-by: Dimitar Borisov <dborisov@mm-sol.com>
Signed-off-by: Vicky Martinez-DeFrain <a0869710@ti.com>
Change-Id: I56db429c403e841b2c937e401169df4bfea6d32d
CameraHAl : FPS check updates and Secondary Camera FPS support

1. Secondary Camera on Blaze supports max of 27 FPS. Hence added (27,27)
   as supported FPS. This is necessary to validate constant FPS on Secondary
   Camera in Camcorder mode using OMAPCamera app.
2. The FPS parameter validation is modified to make sure the deprecated
   FRAME RATE validity is checked only if FPS Range is invalid. Earlier FPS
   parameter check failed even though the FPS range was correct.
Patch set#2 : Some coding style corrections.

Signed-off-by: Sathya Prakash M R <a0393677@ti.com>

Change-Id: I615b394fbc12818128d041d6495b55b8ecf09870
Signed-off-by: Solaiyappan Saravanan <saravanan.s@ti.com>
CameraHAl: Test App: reset the preview count.

Resets the preview count to zero during startpreview().
Fixes the issue of not getting the preview dumps from
2nd start preview command.

Signed-off-by: Solaiyappan Saravanan <saravanan.s@ti.com>

Patch Set 2:  Simple cherry-pick on the current tree.  No
changes made.
Signed-off-by: Jean Johnson <a0271255@ti.com>
Change-Id: I2eca1bb3990153069a7278f968422085abb41947
camera_test: Fix for zooming the preview

 - KEY_ZOOM values can be set from 0 to 30 instead of 0 to 60.

Change-Id: Icf79f6388c0aaab7657fb1fc6829fab7483d4014
Signed-off-by: Dimitar Borisov <dborisov@mm-sol.com>