iMX8M Plus ISP on Android - how to enable AutoFocus function ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX8M Plus ISP on Android - how to enable AutoFocus function ?

1,875 Views
DVideray
Contributor I

Hi all,

I'm working on implementing auto focus function of ISP on iMX8M Plus under Android for AR1335 camera with DW9790 focus lens driver.

I was able to compile libar1335.so for ISP-IMX and getting image and even see ISP trying to set focus (based on TRACE/DEBUG output). DW9790 driver inserted successfully too, but where are no IOCTL calls to it to set/change focus. Now I noticed that all ISI focus related methods are empty for the only sources code example available to public, specifically OS08A20.c

So, my question, do I have to implement them and if so, where I can get an example ?

Or I'm on the wrong path ?

Thank you in advance!

 

static RESULT AR1335_IsiFocusSetupIss(IsiSensorHandle_t handle)
{
    TRACE(AR1335_INFO, "%s (enter)\n", __func__);
    TRACE(AR1335_INFO, "%s: (exit)\n", __func__);
    return RET_SUCCESS;
}

static RESULT AR1335_IsiFocusReleaseIss(IsiSensorHandle_t handle)
{
    TRACE(AR1335_INFO, "%s (enter)\n", __func__);
    TRACE(AR1335_INFO, "%s: (exit)\n", __func__);
    return RET_SUCCESS;
}

static RESULT AR1335_IsiFocusGetIss(IsiSensorHandle_t handle, IsiFocusPos_t *pPos)
{
    TRACE(AR1335_INFO, "%s (enter)\n", __func__);
    TRACE(AR1335_INFO, "%s: (exit)\n", __func__);
    return RET_SUCCESS;
}

static RESULT AR1335_IsiFocusSetIss(IsiSensorHandle_t handle, IsiFocusPos_t *pPos)
{
    TRACE(AR1335_INFO, "%s (enter)\n", __func__);
    TRACE(AR1335_INFO, "%s: (exit)\n", __func__);
    return RET_SUCCESS;
}

static RESULT AR1335_IsiGetFocusCalibrateIss(IsiSensorHandle_t handle, IsiFoucsCalibAttr_t *pFocusCalib)
{
    TRACE(AR1335_INFO, "%s (enter)\n", __func__);
    TRACE(AR1335_INFO, "%s: (exit)\n", __func__);
    return RET_SUCCESS;
}

 

0 Kudos
Reply
12 Replies

1,842 Views
malik_cisse
Senior Contributor I

Hi @DVideray 
You must be using quite old version of isp-imx.
In newer version (I believe from v18 on. Current version is v22 if I am not wrong) these functions are implemented.

For example, if you download and deploy (simply execute *.bin file on Ubuntu host), you will see that all above function are filled with life.
isp-imx v20 (in link bellow, you can replace 20 with other numbers to download the version u want):
https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/isp-imx-4.2.2.20.0.bin

0 Kudos
Reply

1,827 Views
DVideray
Contributor I

I just downloaded it again and where is no ar1335.c at all and os08a20.c example have empty autofocus  related methods. I believe, NXP removed those from the package for some reason.

 

0 Kudos
Reply

1,813 Views
joanxie
NXP TechSupport
NXP TechSupport

current bsp doesn't support ar1335 as default, for os08a20, pls find the path as below

isp-imx-4.2.2.22.0/units/isi/drv/OS08a20/source/

0 Kudos
Reply

1,806 Views
malik_cisse
Senior Contributor I

Hi @joanxie 
What is actually the point of adding drivers in earlier versions and removing them afterwards?

0 Kudos
Reply

1,746 Views
joanxie
NXP TechSupport
NXP TechSupport

what kind of driver adding you mean? could you give me a copy of what you need from old version? let me double check it, I only have 6.1 bsp version right now

0 Kudos
Reply

1,739 Views
DVideray
Contributor I

AR1335.c (with implemented AutoFocus fuctions) and dewarp XML and JSON files from ISP-IMX/units/isi/drv directory present in original 4.2.2p18 release, but deleted afterwards.

 

I also interested in reasons why it was removed after releasing. It doesn't work properly? Some kind of NDA violations? or what ?

0 Kudos
Reply

1,798 Views
DVideray
Contributor I

It's worse! Support for ar1335 and Auto-Focus removed from all releases, including 4.2.2p18 and p19.

I hope to get some explanation and future release plans, so we can plan HW/SW development on our end.

0 Kudos
Reply

1,728 Views
joanxie
NXP TechSupport
NXP TechSupport

I don't think we have tested this driver(ar1335_mipi_v3.c) since current nxp imx8mp board doesn't support ar1335 as default, but I found internal team tested ar1335 on nxp converter board, but I couldn't share the patches here, if you need it, let me check how you can get it

joanxie_0-1701322792850.png

 

0 Kudos
Reply

1,220 Views
jnettlet
Contributor II

Would it be possible for you to share the patches? We have also have a customer that has developed a camera module based on the ar1335 and has found the support missing now.  Thanks

0 Kudos
Reply

1,674 Views
DVideray
Contributor I

The piece I'm missing is AutoFocus functions/methods implementation example for OS08A20.c

Best regards!

 

0 Kudos
Reply

1,640 Views
joanxie
NXP TechSupport
NXP TechSupport

function of IsiFocusSetIss, which is called by AF algorithm and then set focus position to Driver under vvcam/v4l2/focus/vcm_dw9790/dw9790.c

0 Kudos
Reply

1,634 Views
DVideray
Contributor I

Correct. Current example of sensor driver for OS08A20.c for ISP looks like this:

static RESULT OS08A20_IsiFocusSetupIss(IsiSensorHandle_t handle)
{
    TRACE(OS08A20_INFO, "%s (enter)\n", __func__);
    TRACE(OS08A20_INFO, "%s: (exit)\n", __func__);
    return RET_NOTSUPP;
}

static RESULT OS08A20_IsiFocusReleaseIss(IsiSensorHandle_t handle)
{
    TRACE(OS08A20_INFO, "%s (enter)\n", __func__);
    TRACE(OS08A20_INFO, "%s: (exit)\n", __func__);
    return RET_SUCCESS;
}

static RESULT OS08A20_IsiFocusGetIss(IsiSensorHandle_t handle, IsiFocusPos_t *pPos)
{
    TRACE(OS08A20_INFO, "%s (enter)\n", __func__);
    TRACE(OS08A20_INFO, "%s: (exit)\n", __func__);
    return RET_SUCCESS;
}

static RESULT OS08A20_IsiFocusSetIss(IsiSensorHandle_t handle, IsiFocusPos_t *pPos)
{
    TRACE(OS08A20_INFO, "%s (enter)\n", __func__);
    TRACE(OS08A20_INFO, "%s: (exit)\n", __func__);
    return RET_SUCCESS;
}

static RESULT OS08A20_IsiGetFocusCalibrateIss(IsiSensorHandle_t handle, IsiFoucsCalibAttr_t *pFocusCalib)
{
    TRACE(OS08A20_INFO, "%s (enter)\n", __func__);
    TRACE(OS08A20_INFO, "%s: (exit)\n", __func__);
    return RET_SUCCESS;
}

 

0 Kudos
Reply