Here is ISP tuner that I used.
https://dl.khadas.com/.test/isp.zip
Just to confirm, your IMX477 DOES NOT change exposure, analogue and digital gains automatically?
Meanwhile, I found debug switch and turned it on:
export persist_camera_engine_log=0xffffffffff
Now I see some errors and warnings.
XCORE:D:device(/dev/video18) dequeue buffer failed since not activated
XCORE:W:dequeue buffer failed
XCORE:D:device(/dev/video18) dequeue buffer failed since not activated
XCORE:W:dequeue buffer failed
XCORE:D:device(/dev/video18) dequeue buffer failed since not activated
XCORE:W:dequeue buffer failed
XCORE:D:device(/dev/video18) dequeue buffer failed since not activated
XCORE:W:dequeue buffer failed
XCORE:D:device(/dev/video18) dequeue buffer failed since not activated
XCORE:W:dequeue buffer failed
XCORE:D:device(/dev/video18) dequeue buffer failed since not activated
XCORE:W:dequeue buffer failed
XCORE:D:device(/dev/video18) dequeue buffer failed since not activated
XCORE:W:dequeue buffer failed
XCORE:D:device(/dev/video18) dequeue buffer failed since not activated
XCORE:W:dequeue buffer failed
XCORE:D:ioctl return ok on fd(5), cmd:0x80885659
CAMHW:D:camId: 0, frameId: 30: dequeue the event on dev: /dev/v4l-subdev3
ANALYZER:D:camId:0, sequence(30), expDelay(4), id(33), maxId(33)
ANALYZER:D:Handle message(SOF_INFO) id[33] on group(GRP_OTHER), flags 1
ANALYZER:D:Handle message(SOF_INFO) id[33] on group(GRP1), flags 101
ANALYZER:D:Handle message(SOF_INFO) id[33] on group(GRP_AWB), flags 41001
ANALYZER:D:camId: 0, group(GRP1): id[33] push msg(SOF_INFO), msg delayCnt(0), map size is 6
ANALYZER:D:Handle message(SOF_INFO) id[33] on group(GRP0), flags 41a01
ANALYZER:W:camId:0 group(GRP1): id[28] map size is 6, erase 1, element, missing conditions: AWB_PROC_RES,
ANALYZER:D:Handle message(SOF_INFO) id[33] on group(AF), flags 42a01
ANALYZER:D:>>> Framenum=30, id=34, Cur sgain=0.000000,stime=0.000000,mgain=0.000000,mtime=0.000000,lgain=0.000000,ltime=0.000000
ANALYZER:D:>>> Framenum=30, id=34, nxt sgain=0.000000,stime=0.000000,mgain=0.000000,mtime=0.000000,lgain=0.000000,ltime=0.000000
ANALYZER:D:analyze the id(34), sequence(30), mLastAnalyzedId(33)
ANALYZER:D:camId: 0, group(GRP0): id[33] push msg(SOF_INFO), msg delayCnt(0), map size is 6
ANALYZER:D:camId: 0, group(GRP_OTHER): id[33] push msg(SOF_INFO), msg delayCnt(0), map size is 1
ANALYZER:E:no free cp buffer!
But I’m out of ideas. Camera driver works fine and returns correct data, but AE is just not working. Would be glad if someone with working AE would capture the log with debug enabled and attach here.
The only idea that I have now is to purchase imx415 sensor, create adapter for it and check how it works, because it seems to be the only imx sensor that stock ubuntu image has iqfile for and also I saw multiple chineese articles with working isp with it.
p.s. I also see that 3A tool makes a lot of ioctl calls to the camera when scene changes it’s brightness, maybe that is another direction to dive into…
[ 2658.797121] ov13850: imx477_update_image_pad_format
[ 2658.797124] ov13850: imx477_get_format_code
[ 2658.797139] ov13850: imx477_g_frame_interval
[ 2658.797147] ov13850: imx477_ioctl cmd=-2146412855
[ 2658.797150] RKMODULE_GET_NR_SWITCH_THRESHOLD
[ 2658.797154] ov13850: imx477_ioctl => -515
[ 2658.797164] ov13850: imx477_ioctl cmd=1074026182
[ 2658.797168] RKMODULE_SET_CONVERSION_GAIN
[ 2658.797171] ov13850: imx477_ioctl => -515
[ 2658.797177] ov13850: imx477_ioctl cmd=1074812616
[ 2658.797180] RKMODULE_SET_DPCC_CFG
[ 2658.797183] ov13850: imx477_ioctl => -515
[ 2658.897111] ov13850: imx477_get_fmt pad=0
[ 2658.897119] ov13850: imx477_update_image_pad_format
[ 2658.897122] ov13850: imx477_get_format_code
[ 2658.897136] ov13850: imx477_g_frame_interval
[ 2658.897145] ov13850: imx477_ioctl cmd=-2146412855
[ 2658.897148] RKMODULE_GET_NR_SWITCH_THRESHOLD
[ 2658.897151] ov13850: imx477_ioctl => -515
[ 2658.897161] ov13850: imx477_ioctl cmd=1074026182
[ 2658.897164] RKMODULE_SET_CONVERSION_GAIN
[ 2658.897167] ov13850: imx477_ioctl => -515
[ 2658.897174] ov13850: imx477_ioctl cmd=1074812616
[ 2658.897176] RKMODULE_SET_DPCC_CFG
[ 2658.897179] ov13850: imx477_ioctl => -515```