Title: [Fireprime] s5k4ec AF function has some error!! [Print This Page] Author: jaymoon Time: 6/12/2018 13:05 Title: [Fireprime] s5k4ec AF function has some error!! Hi,
I have a problem using the s5k4ec module that you made.
I modified your /media/video/s5k4ec.c to use Auto Focus as follows:
static unsigned int SensorConfiguration = (CFG_WhiteBalance|CFG_Effect
|CFG_Scene|CFG_Focus
|CFG_FocusZone);
//below is original code.
//static unsigned int SensorConfiguration = (CFG_WhiteBalance|CFG_Effect
// |CFG_Scene
// |CFG_FocusZone);
Without the AF function, the captured image is too burred, that is, it is not clean.
If I use AF, the image is better than no AF.
But it is still burr.
So, I debugged the code, and then I found some error in your code
the debugging message as follows:
== error log ->why this log is happening?
[ 72.292728] s5k4ec[8452] [jaym ################ single focus mode set !
[ 74.265015] s5k4ec(8479): s5k4ec[8479] [jaym ######]focus state(0x4718) is error!
== source code s5k4ec.c
static int sensor_focus_af_single_usr_cb(struct i2c_client *client)
{
int ret = 0;
char cnt;
u16 state;
struct af_cmdinfo cmdinfo;
//char s_zone[5],i;
cmdinfo.cmd_tag = 0x01;
cmdinfo.validate_bit = 0x80;
printk("%s[%d] [jaym ################ single focus mode set !\n",SENSOR_NAME_STRING(),__LINE__);