| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
The camera driver claims to be in macro focus mode when the lens is
not. When the camera starts preview, default focus mode is auto,
and immediately the focus mode is switched to the new setting.
The second command must be executed with a 150ms delay so that the
camera module can process the first command.
Change-Id: I8e8b5eba8a0cf5e9caa5a370a4495e651bb199b1
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the main auto focus loop happened in the kernel and
a completion was used to finish to auto focus operation only
when a completion was signalled. However, since the main focus
loop was moved out of the kernel, waiting on a completion can
end in a deadlock if the user space process is blocked and will
never call complete() in a different thread. Since we no longer
loop in the kernel anyway, there is nothing to wait for, so
the completion has been removed.
Change-Id: I949fc42dbc2ebd159be5bbd0c24731edadce74dd
Signed-off-by: Simon Wilson <simonwilson@google.com>
|
|
|
|
|
|
|
|
| |
Preview is paused during auto focus.
To fix this problem, move polling code from driver to HAL.
Change-Id: I4b4e961cc5614579dfe419f14cc67bed6c6dda41
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
|
|
|
|
|
| |
Change-Id: Ie460f1ea3daa9b1dd55c33774388dc231168cfb5
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. When exposure time is very short, shutter speed value
in EXIF has abnormal values.
So, to calculate exactly, the value from sensor multipled by 1000,
before devided by 400.
Also, shutter speed value divided by 1000 in HAL
to maintain result value.
2. Techwin request to change ISO calculation denominator
for calculate more exactly.
Change-Id: Ifb2deb8d225f204912e9e97e4e22d1ee22c35069
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
|
|
|
|
|
|
|
|
|
|
|
| |
During focus, the flash LED may be used for AF assist. In
addition, during capture, the LED may be used as a flash. If
the torch is enabled before focus/capture, it will be kept
off afterwards because it shares the same flash_on status
variable with the flash and AF assit beam. Splitting out the
torch_on status to a separate variable fixes this.
Signed-off-by: Simon Wilson <simonwilson@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After taking a picture, the focus is maintained.
So if user change from camera mode to video mode after taking
a picture very closely to object,
focus in video mode is not normal.
So move lens to default position when preview starts.
But if latest focus mode is MACRO, the focus should be maintained
as MACRO default after taking a picture.
Change-Id: Ice86ffd9b5932635ba0b4861bc2168559aaafe76
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
|
|
|
|
|
| |
Change-Id: I37b207c90d6e14e69135f70ec30bf5892a6544f6
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
|
|
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
Change-Id: Ie8f43b6a5a6f3eda7ced8562e93831a8f1a90bf3
S5PC11X: CAMERA: Fixes for s5k4ecgx camera driver
Fix some locking issues in the driver. The main interfaces
are s_ctrl and g_ctrl. s_ctrl is already called with a lock
held by the fimc level above us, but no lock is held in g_ctrl.
Since the driver does i2c operations in batches (often multiple
writes of different lengths followed by a read), these really
need to be atomic. Change driver to use a global lock for
both s_ctrl and g_ctrl, and release it when we sleep.
Change the wait for autofocus cancel to use a completion rather
than polling.
Fix issue where auto focus request after a previously succesful
auto focus would return complete too early. Looks like the
sensor falsely reports success too quickly if we read the result
right away, so add a delay before we check for the result. This
is a fix based on emprical testing since we have no documentation
on the registers we're reading and writing.
Fix handling of restoring focus state when cancelled during
2nd phase of auto focus.
Change-Id: I872a4aa37c53da660a0923b76da6caef4d424ad9
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Add infinite focus support
Add support in back camera for infinite focus mode.
Change-Id: Icb7738c4576cd3d3e7b7855ea4c1affb1128028e
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Timing cleanup and new reg values
Cleanup some timings based on new info/clarification from SLSI
camera engineer. Also incorporate updated register values
in preparation for doing burst i2c writes in a next patch. The
new values have also been cleaned up to remove unneeded values
(i.e. register bank address changes that aren't necessary). We
leave the SOC in SW bank write mode by default and any switches
to read mode should restore write mode at the end.
Change-Id: Iadae0e328a61dc3326b11fb16d7e57aa63410f17
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Make get_iso get_shutterspeed function for EXIF
get_iso and get_shutterspeed is called in HAL.
And HAL add this information in EXIF information.
Change-Id: Ie8329b40b90280e9747e78c847f1c68757995ed0
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
S5PC11X: CAMERA: Optimization for startup time
Change the driver so that it knows the defaults it wrote
at init time so that when the HAL sends it parameters
for preview and they are the same as the defaults, it can
do nothing. This saves about 500ms for camera startup.
I also use s_parm API to set all the parameters at once,
instead of separate s_ctrls that were used before.
Change-Id: I692cb4864438f58742525ebc10a1cfda8fc55e99
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: fix scene mode operation, add torch mode
Fix scene mode operation in s_ctrl. Before this change, scene mode just call user setting value.
But for normal operation, there are need to add default value setting before user choiced value.
And add torch operation routine. This will turn on flash when user enable torch mode in video recording state.
Change-Id: I4ddf049c6b9dd5f87d720fae75dbe3bacb504962
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
S5PC11X: CAMERA: Fix checkpatch warning
Change-Id: Idb099f09d7be84ecec566ee0c8db664ac993e52b
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Use i2c burst of init to speed startup
Shaves about 500ms off of the init time of the sensor.
However, there appears to be a problem with the sensor
when we burst so much data out and I had to add a delay
after some bursts. This should be removed in Rev 1.1.
Change-Id: Ic3cdb5118c1e48c5cdc16a18b4e51ba5970f1c13
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Add support for rev EVT1.1 of s5k4ecgx
Change-Id: Idb50ed2094e53bc8c98adaacbf093d78d860cafa
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Update AF sequence using info from SLSI
1. Update register settings of camera sensor to version 14
2. Add settings of af flash assist
3. Add AF_Low_Light_Mode_On/OFF on auto focusing
4. Add AE_AWB_Lock_On/OFF on auto focusing
5. Add Checking AE stable on auto focusing
6. add for setting AWB locking on only auto AWB mode
Change-Id: I1737c22203e6f943f41643f8e360c4613339f15
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Fix resolutions
Change 1MP capture to 1280x960, because that's what the sensor
is actually generating. The info table was wrong. Fixes a
CTS test failure.
Reorder D1 preview after VGA, so it is sorted right. Doesn't
have a functonal impact, just makes it cleaner.
Change-Id: I57e7b75e5e0d71f7223e65c1c4e7c4656eacc002
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Change temp buffer to vmalloc
The temporary buffer used to do burst i2c writes
can be pretty large and the allocation can fail since
the driver is loaded not at boot but whenever camera
starts and stops. Change to use vmalloc so we are
less likely to fail. I2C doesn't use DMA so vmalloc
is fine.
Change-Id: I0bd1d9d5f6cf2ee6154355ecc4cd1dd2272ff560
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: Camera: Turn on flash always on torch mode
Turning off flash is controlled by FLASH_MODE_TORCH_OFF. And Torch
mode was made for working on only video recording mode.
But it is misunderstanding of torch mode.
So it is changed to turn on flash always on torch mode.
Change-Id: Iffc853821e83b9a2e45fec6b7fcf3352c68d8fa6
Signed-off-by: Jeong-Seok Yang <jseok.yang@samsung.com>
S5PC11X: Camera: for do not check ESD status on auto focusing
It shouldn't check ESD status in middle of auto focusing procedure
because it disturbs commands of auto focusing procedure
Change-Id: I2711d63d2331d51bd87ee73143124f90ed2420ce
Signed-off-by: Jeong-Seok Yang <jseok.yang@samsung.com>
S5PC11X: Camera: Increase waiting time for searching auto focusing
For camera vendor's recommendation, Increase waiting time for
searching auto focusing. It raise possiblility of searching auto
focusing.
Change-Id: I74a3d2e8e1318d79519cc3efb7648515187ae952
Signed-off-by: Jeong-Seok Yang <jseok.yang@samsung.com>
S5PC11X: Camera: for keeping exposure value until capturing
Exposure value which setting automatically on auto focusing should
be kept until capturing picture or until stopping auto focusing
not until finishing auto focusing.
Change-Id: I54a46490d06aab370312acc7ac97a0e7199568c6
Signed-off-by: Jeong-Seok Yang <jseok.yang@samsung.com>
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: Camera: Adjust the intensity of flash
Using the main flash for AF assist and torch mode will damage
the LED in the long term. Reduce the brightness for these modes
by programming the LED controller.
Signed-off-by: Simon Wilson <simonwilson@google.com>
S5PC11X: Camera: Adjust ISO information
ISO information is a field of EXIF. It is matched to HAL
Change-Id: I3c019914a214ee42844435d502f5ecb430c261fd
Signed-off-by: Jeong-Seok Yang <jseok.yang@samsung.com>
S5PC11X: CAMERA: Update register settings for s5k4ecgx sensor
Revision 1.24 from vendor. Change notes from Korea:
Changed item:
1. AWB starting point change to between 4000K and 5000K
- it is to reduce wrong color when enter camera
2. Applied Flash register setting and TnP
- TnP is kind of sensor firmware. this firmware
control AE and AWB when emit flash.
- Flash AWB setting is changed. this correct reddish image when flash.
3. Changed Color matrix.
- Out door color is changed from Samsung reliability test team request.
4. Changed Indoor register
- To meet Samsung reliablity specification.
Change-Id: I12ded5dda98e2f74220ac7dc2cb1cf79482179ea
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: add flash-state flag and frame rate setting
Add flash-state flag and get function for make EXIF.
Add frame rate setting routine for video recording.
Change-Id: I956d1405f62b1bea6524b3658cb1851a12525a91
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
S5PC11X: CAMERA: fix crash in s5k4ecgx driver when sensor not detected
We can't do detection in probe because the camera isn't powered, so
we can only notice that the sensor isn't communicating with us (for
whatever reason, like misconfig, or HW issues), later on. So we
need to keep track of initialization state in the main s_ctrl and
g_ctrl APIs and return error if initialization failed.
Change-Id: If6dc16540462061788e2786ff6346d8e708c09a5
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: add assist flash when infinity mode
In infinity mode, add assist flash to fix brightness exposure.
Change-Id: Ie8166a9dc5958f9ae1ab99119d750aa84812f54c
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
S5PC11X: CAMERA: new settings for preview
Settings to crop before scale to get less distortion on the
preview sizes that are not a multiple of the max resolution in
both axis.
Change-Id: I39cfc301825c24d3c717762d2a0bc56f29fdd3e7
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: Camera: for setting focus mode when stopping auto focusing
For camera vendor's recommendation, set current focus mode when
stopping auto focusing. and do not different working by checking
low light condition
Change-Id: I34e8becfec94ab43c236d8d81049789d629d022b
Signed-off-by: Jeong-Seok Yang <jseok.yang@samsung.com>
S5PC11X: CAMERA: fix capture resolution problem
Back camera was saying it supported capture resolutions it didn't
and would then fail at snapshot. Now properly do what was originally
intended, which is to round unsupported resolutions to next highest
supported resolution.
Change-Id: Ia35636cf0dbc6c2cb15c633e344bd9811e74bfd1
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: rev 1.27 register settings
Notes from vendor:
Changed part:
1. Indoor CCM
2. Indoor Sharpness
3. Low Light color improvement
Change-Id: Ied50f2eb598d5af842888f6188542f11de9a7156
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Fix ae_awb infinite locking problem
A recent change made ae_awb locked from start of
auto focus until it is cancelled or capture completes.
Some apps, like barcode scanner, just call auto focus
repeatedly and never cancel or do a capture. That
would leave ae_awb locked forever, usually in a bad
color state.
This change only locks ae_awb when auto-focus is complete,
allowing enough time for ae_awb to settle.
Signed-off-by: Simon Wilson <simonwilson@google.com>
S5PC11X: CAMERA: Fix capture resolutions when cropping done on previews
When the preview resolution is not 640x480, we enable cropping
in order to not get distorted preview images. However the change
that enabled cropping didn't disable it before the capture, resulting
in the captured images not being the right resolutions anymore.
This change undoes the cropping before capture if it active, then
restores it when preview starts again if needed.
Change-Id: Id5971667f339e7de7d187f6b426be31f0e043a57
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
S5PC11X: CAMERA: Fix capture error at Fireworks setting
[Fix Bug]
At Fireworks setting, sensor needs more exposure time than normal setting.
The maximum Exposure Time at Fireworks setting is 1000ms.
So change capture polling time from 500ms to 1000ms.
Change-Id: Iae4f7d714ad3a626c82b7780e7b5d3aa75a097ba
Signed-off-by: kyoungho.yun <kyoungho.yun@samsung.com>
|