smdk4412-common: Camera Enhancements

Upstream from CM.

smdk4412-common: camera: several fixes for autofocus
Setting the AutoFocus off using V4L2_CID_CAMERA_SET_AUTO_FOCUS will
reset the AF position of the sensor and this was done whenever
autofocus was completed. This totally defeated the purpose of touch
to focus since the sensor AF position was being reset after focus
and had to be refocussed while taking the snapshot. This also led to
several issues with third party applications since this kind of focus
behaviour was not intended.
S5C73M3 Back camera Interleaves YUV and JPEG along with metadata. This
metadata contains the AutoFocus result. Hence we could parse the
autofocus result instead of using V4L2 IOCTL, which is more efficient.
Also, the sensor exhibits issues when AutoExposure and AutoWhite Balance
locks are used with Flash ON. Improper locking could lead to freezing of
the sensor while taking a snapshot. Hence, only lock AEAWB when flash is
OFF and unlock them after AutoFocus finishes.

smdk4412-common: camera: enable ZSL mode on front camera
We are querying FIMC2 for the capture output and hence we
have no reason to restart the preview to have the preview
resolution match the capture resolution, which is not how
Zero Shutter Lag works. We could have different resolutions
for the preview and capture, hence don't stop the preview
for resizing.

smdk4412-common: camera: fix incorrect jpeg thumbnail height

smdk4412-common: camera: fix heap corruption

Change-Id: I7421596608543826391d4d67d09a68de0003a07c
smdk4412-common: camera: include support for face detection

Change-Id: I02bb3b9ab4656d2d928a48cbc81f8037f3feaf48
[1/2] smdk4412-common: overlay cleanup

i9300: https://gerrit.omnirom.org/#/c/2778
n7100: https://gerrit.omnirom.org/#/c/3135
n7105: https://gerrit.omnirom.org/#/c/3136

Change-Id: I5da2ae06f7835fe13bc786ae088aa739c5156e86
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
exynos_camera: update sports scene name

The 'sports' scene mode has been renamed to 'action' scene mode
to match the 4.4 camera configuration

Change-Id: I7c3d3bd35765330adfeb43820e12056b4593702f
Merge "[1/2] smdk4412-common: overlay cleanup" into kk4.4
smdk4412-common: Added libExynosHWCService.so to proprietary files list

It's required by 4.3 TVOut service libraries.

Change-Id: I3ecd4634241f6c12c1cb1c0b297dc22c9ebb377a
Bring back the SECONDARY_STORAGE variable

This variable is a requirement in KK as newly introduced APIs
such as Context.getExternalFilesDirs uses it to retrieve
secondary storage locations on the device.

Change-Id: I17708c93498da5979c5742cad32232a34490bf5f
smdk4412-common: update media codecs

Change-Id: I6730d0a10912688fa4fec2ec65582a9e2c940bca
smdk4412: audio: Remove hackaround for broken audio in first call

It's not needed anymore.

Change-Id: If8e15afa41bd328732e7c77f2d2027c310a9cc2c
smdk4412-common: init: remove duplicate socket contexts for wpa

Already set from the global file_contexts for /dev/socket/wpa_wlan[0-9],
they have no effect here

Change-Id: I7056ef311ee6636327a980f26b93f9fbfbd44b27
Modernize Advanced device settings icon

Opinions? might need compression

Change-Id: Ic615e2efe62ad8c21b5d48225d5e879f5508bd49
Merge "Bring back the SECONDARY_STORAGE variable" into kk4.4
Merge "smdk4412-common: update media codecs" into kk4.4
Merge "smdk4412: audio: Remove hackaround for broken audio in first call" into kk4.4
Merge "smdk4412-common: init: remove duplicate socket contexts for wpa" into kk4.4
Haptic feedback controll

set system as owner of the sysfs file /sys/vibrator/pwm_val

Change-Id: Ibcb8abd248b6fe9ec4eab7f6713a116c4130764d
Revert "smdk4412-common: camera: include support for face detection"

This reverts commit 8553629b0a37652082967b9389d22b6b74d9c9d0.

https://github.com/temasek/android_device_samsung_smdk4412-common/commit/914c222940ac651dcfb831bab3cbcdfb6fee9e42
According to temasek and many other devs, this commit has made the camera unstable. So I think reverting this is the best option for now.

Change-Id: I414a57ae57da9205626fa8c55859ec2d263a2e10
smdk4412: Enable "Without Sync Framework"

Change-Id: I11bf0a99996d3dc0f802fa3805bc9dd21bf14466
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
smdk4412-common: camera: don't defer picture if CAF is in progress

CAF is considerably slower than Auto or Touch Focus and since we
are deferring the picture while CAF is in progress, there are
delays while taking the picture and these delays are sometimes
huge.

Disregard the CAF state since we could Touch to Focus if required.

Change-Id: If981f6402cc97e0781060dc48fa7d8e44288168f
camera: Fix loss of focus mode between shots

exynos_camera->focus_mode can't be relied upon to verify the previous
state, since a snapshot will reset the focus state. This was causing
any mode besides auto-focus (enum 0) to fail after the first photo
was taken, including the default continuous-picture.

Always make sure the focus-mode is up to date when set_params is
called

Change-Id: I8e6f52093ad897bcf04bc5047bb1fcd4f109dc55