Camera: pass proper zoomCropInfo parameters to overlay setCrop

Pass the x and y parameters of overlay's setCrop as zero when they
are negative. These values will become negative when the crop
information recevied at camera HAL has in1_wXin1_h and out1_wXout1_h
the same.

Change-Id: I407fb551771130cec3f103b7927001f9c43deeb4
CRs-Fixed: 260180
camera: calculate the postview dimensions based on picture size aspect
ratio.

To support picture size aspect ratios in general, calculate postview
dimensions based on picture size aspect ratio instead of using preview
sizes. Call PRAM_DIMENSION ioctl before allocating the thumbnail
buffers, beacuse this ioctl can return the updated thumbnail dimensions
based on picture size aspect ratio and camera stack requirement.

Change-Id: Ibd7eb4344d86cb48fa1b8fbd14c587bd5e46b878
Camera: Add thumbnail size for new snapshot resolution

Difference in aspect ratios of snapshot and thumbnail resolutions
is causing corruption in thumbnail.New thumbnail resolution(256X154)
matches the aspect ratio of snapshot resolution 2048X1232.
Adding this new thumbnail size resolves the issue.

Change-Id: I95b6d5d4582fc1e55a94e73565cfacf8ec30a527
CRs-Fixed: 257974
Camera: wait for the snapshot thread to complete before clearing
resources.

Wait for the snapshot thread to get exited, before clearing the
mainimage, thumbnail and other buffers, so that there won't be any
reference to cleared memory at camera stack.

Change-Id: I8f5910f4c89d36ff0f9eb0297707d1342d7693d8
Camera : Fix the issue of overlay having to refer to de-allocated buffers.

Both before and after the postview is displayed when the snapshot is taken,there is a possiblity of the
display referring to de-allocated preview or display buffer.So making an offline copy in first case
and delaying de-allocation in the second case so as to always queue a new buffer and de-allocate the old one.

CRs-Fixed : 254637

Change-Id: I970ed2311bb87721cafaf2e4e1d03876bc32784a
Camera: Remove redundant ashmem buffer for RAW Snapshot.

The RAW Snapshot is copied into ashmem buffer before sending
to the application, which is not necessary. The Pmem buffer
which contains the raw snapshot can be directly sent to the
application. Hence removing the mRawSnapshotAshmemHeap.

Change-Id: I57e569ccff0cad6d7c63e5d72c1a49684300dba4
Camera: HAL Interface Rearchitecture.

- Added start and stop ops Interface
- Added set param Interface
- Query Zoom paramters using querying interface.

Change-Id: I881c9ca52106ce0b067dee6b421b24f0d00ac613
Camera: Pass top left co-ordinate for Touch AF.

Change-Id: I97fd1913336a9f3d120e7c57ec7f1feae42e7850
CRs-Fixed: 260871
Camera : Use thumbnail dimensions for snapshot post view for 7x27

Change-Id: Ib3a1f0e1105ec1422d371e68bc87bd5b84fa0b32
Camera: pass null data jpeg callback for the application to resume
preview

- When takePicture is called from application, application will be waiting
  for jpeg callback to restore preview.
- When get picture fails at lower layers, give a jpeg callback with null
  data so that the application will resume preview and ready for next
  operations.

Change-Id: Ib49169bfa54201c570ae4688730b2bece40bf9f6
Camera: Fix the issue of mismatch in the  captured JPEG image and the postview.

Padding and Crop values are incompatible with new jpeg downscaling method(change#34186).
Adjusting them fixes the issue.

Change-Id: Ic40e35b5ff19d5436b6cf40d693974a2161a3f87
CRs-Fixed: 253598
Camera: correct the max zoom check and consider the video buffers
allocation failure message.

Consider the initRecord return value for handling buffer allocation
failure scenarios. Also correct the max zoom check in setZoom, as HAL
receives the zoom table size value when queries for max zoom.

Change-Id: I75c3270d06c9f05499bd2c9bf10598a2c5c44768
Camera: Call native_prepare_snapshot only while taking snapshot.

Currently native_prepare_snapshot is called while auto focus.
Removing this call and allowing native_prepare_snapshot to be
called only before taking snapshot.

Change-Id: Ib36029509aadce71f4ae196eab42e5598902587f
CRs-Fixed: 261438
camera: de-couple the adreno format and streaming textures

De-couple the Adreno format and streaming textures, so that
non-streaming textures applications can also use Adreno format.

Change-Id: I05b6f54071b1b1924a7853e25d638affb711d081
Add HAL support for face detection feature.

Change-Id: Ic8a307db5e9a68ce696929e91f6442a9986c9830
Camera: clear the preview crop information with overlay while displaying
postview image.

Camera HAL is not receiving any crop information for postview, as the
VFE/VPE block is taking care of necessary cropping. Hence clear the
preview crop information with overlay, so that the preview cropping
won't be applied to postview.

Change-Id: I1aca4f9c25246b37387f1118cff01b161062692a
CRs-Fixed: 264659
Camera: Camera interface Rearchitecture Phase 2.

- Register Callback functions with Notify interface.
- Add query for preview size table, to check if dis is supported
- Add 3D Camera Interface.
- Remove SensorType table and SensorInfo ioctl.

Change-Id: I367f4134fbdeeaf502637eecf3f3a4dca7f59c2f
Camera: Fix typewriter error when unregistering Preview and Record Buffers

Ensure that close on Camera_control only during the destructor of HAl
so that it would always be valid at the time of unregistering the Buffers

Change-Id: I85719eec162abce7f36926c62b2b419f2facf9e0
CRs-Fixed : 266416
Camera: Pass Exif Altitude value in meters.

EXIF standards required the GPSAltitude tag should be specified in meters

Change-Id: I2c1e3cf17f913a466c314887f00f5bb6175a3478
libcamera2 now honors USE_CAMERA_STUB build flags

Change-Id: I8b584c66a23a60d52daf35368ffaef17449ea527