Camera: Call jpeg join in snapshot thread instead of jpeg thread
context.

Jpeg join shouldn't be called in the same thread context. Fix this by
calling join in snapshot thread. Add mInSnaphotMode flag so that preview
mode won't be entered without finishing snapshot mode.

CRs-Fixed: 239909

Change-Id: Ic548b66529a749e801bc82a7777ea4b46fa07d8a
Camera: Set the snapshot buffer offsets and size as required by target's
jpeg offline encoder.

Get the required Y offcet, CbCr offset and the rawHeap size from the
encoder and use the same while registering the buffer with driver, as part of
target's offline encoder requirement for different rotation values.
Corrected a few compile warnings.

Change-Id: Idea66c697796f390d41654feaef11416753ff152
Camera: Enabled torch mode for Led flash

Change-Id: Iec2a472414ae7ee0a0f40ee71087a36cdaf715ef
Camera: Adding HAL support for Touch AEC.

Change-Id: Id8854293d47d5b958ae0d112e09b1011bd851b8b
Camera: Add support for zoom ratios

Add zoom ratios support by querying mm camera

Change-Id: I49eb0157b03f8021d9d8f414321e06ef4206f531
Camera : Add support for setting FPS

Provide support for fps in HAL.

Change-Id: Ie6682df8ed7e7b5e4ce8230cd9513e78192f0c71
Camera: Ignore set fps call for mipi sensor

This is a temporary workaround till mipi sensor supports set fps

Change-Id: I5b06d918d0b0efbfee964a986bbf818302d62281
Camera: Enable the buffer allocation for snapshot and encoder from smi memory region for 8x60

Change-Id: Ib79edc440d03fc6254b5d446e81f39e5fd653ee8
Camera: Add support to set frame rate modes

Add support to change frame rate modes between fixed and auto.
Set the current FPS value whenever a mode change occurs.

Change-Id: Ibd164e9eb7c143ca83e12ef508fd7e8d6e0771fe
Camera: Align the CbCr offset in record buffers to 2k as required by encoders in 8x60

Change-Id: I7c7a27bb650f077f1f747f58353d44c0c81ad016
Camera: changes to take into account of video record resolution values

Consider record dimensions if available or use preview dimensions as
record dimensions. Remove 720P video record preview-resizing logic, as
application needs the preview frames of actual size.

Change-Id: I61b65b4510dbf5d4e0453c3d745804511c9201a6
Camera: Disable set fps for 2mp sensor

Change-Id: I1e98527f232de04c6b61a9c3c9fd0eef5685ef34
Camera: Fix to wait for snapshot to complete on cancelPicture call.

Added a check for 7x27 target to wait for SNAPSHOT_DONE before issuing
STOP_SNAPSHOT.

Change-Id: I144129867d7e6ca88f3d86f9e8fe3ddb26dde478
Camera: Maintain reference to shared camera library for the Snapshot Thread

A reference to libqcamera.so is maintained for the duration of the Snapshot thread as LINK_jpeg_encoder_join
should be executed only for the lifetime of this object.

Change-Id: I398c7b6b84f109b1b36976a6bc0f31000b4408a1
Camera: 720p encoding optimisations.

1. Moving recording input buffers to EBI1 for 8x50
2. Increasing the input buffer count from 6 to 8 for
   8x50 to avoid any DSP idle time.

With these changes, under good lighting conditions
24 fps can be achieved for 720p recording.

CRs-fixed: 239926

Change-Id: I548e0169c2c3faa231e86826ffebf4c21eee9145
Camera: Adding HAL support for Auto Scene Detection feature.

Change-Id: Ie74cb52cac99249c859c20b3e1eafe9403f37475
Camera: Align the CbCr offset to multiple of 16 blocks for jpeg encoding.

Align the CbCr offsets to multiple of 16 boundries for
targets using Hardware Jpeg encoder(7x27, 7630). This
padding is needed only for thumbnail buffer.

Allocate a seperate buffer to display postview for 7x27.

Change-Id: I0db4121addcca17b8a4c87b7d4ebb9ffbe963720
Camera: The Chroma buffer should be aligned to 2K for the encoder on 8x60

Change-Id: I9885b63956420a1c4910f5c16c5c264a63ecec3a
Camera: Temporarily migrating the preview buffer allocation to smi on 8x60

The preview buffer allocation on 8x60 is temporarily migrated to smi memory because there
is a bug with the ebi memory region. The Y and CbCr offset get messed up randomly causing
scroll of the preview frames.

Change-Id: Ia9bf618b5ec95c75e66b5839844f1a5048538d2e
Camera: Fix to pass the correct yOffset for thumbnail encoding.

Thumbnail encoding is always done by software encoder. Set the
yOffset to 0 for thumbnail buffer for all rotation angles.

Change-Id: I22e074c0fac38b806b5930da3882d2064ffe07e2