Other Parts Discussed in Thread: TAS2552, DAC124S085
Tool/software: Linux
Hello everyone;
We have checked the "ov490" driver then we developed our driver.
now we are configured our sensor in RAW8 data mode. for that we have been changes as per below in i2c v4l2 subdriver.
static const struct AR1335_color_format AR1335_cfmts[] = {
{
.code = MEDIA_BUS_FMT_SRGGB8_1X8 ,
.colorspace = V4L2_COLORSPACE_RAW ,
},
};
but still image is not perfect.
Please check the below log for reference.
root@am57xx-evm:/boot# dmesg | grep cal
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000781] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
[ 38.897956] cal-000: Using sensor AR1335 4-0036 for capture
[ 38.903385] cal-000: subdev AR1335 4-0036: code: 3014 idx: 0
[ 38.903391] cal-000: matched fourcc: RGGB: code: 3014 idx: 0
[ 38.908171] cal-000: V4L2 device registered as video0
[ 38.930784] cal-000: __subdev_get_format 640x480 code:3014
[ 38.930792] cal-000: cal_calc_format_size: fourcc: RGGB size: 640x480 bpl:640 img_size:307200
root@am57xx-evm:/boot# ./yavta --enum-formats /dev/video0
Device /dev/video0 opened.[ 136.198099] 1332 - AR1335_enum_size()
Device `cal' on `platform:cal-000' is a video output (without [ 136.206698] 1332 - AR1335_enum_size()
mplanes) device.
- Available formats:
Format 0: SRGGB8 (42474752)
Type: Video capture (1)
Name: 8-bit Bayer RGRG/GBGB
Frame size: 640x480 ()
Video format: SRGGB8 (42474752) 640x480 (stride 640) field none buffer size 307200
284.154862] video0: VIDIOC_QUERYCAP: driver=cal, card=cal, bus=platform:cal-000, version=0x0004093b, capabilities=0x85200001, device_caps=0x05200001
[ 284.154917] video0: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=RGGB, description='8-bit Bayer RGRG/GBGB'
[ 284.154985] 1332 - AR1335_enum_size()
[ 284.160874] cal-000: cal_enum_framesizes: index: 0 code: 3014 W:[640,640] H:[480,480]
[ 284.160878] video0: VIDIOC_ENUM_FRAMESIZES: index=0, pixelformat=RGGB, type=1, wxh=640x480
[ 284.160915] video0: VIDIOC_ENUM_FRAMEINTERVALS: error -515: index=0, pixelformat=RGGB, wxh=640x480, type=0
[ 284.160949] 1332 - AR1335_enum_size()
[ 284.175204] video0: VIDIOC_ENUM_FRAMESIZES: error -22: index=1, pixelformat=RGGB, type=0
[ 284.175258] video0: VIDIOC_ENUM_FMT: error -22: index=1, type=vid-cap, flags=0x0, pixelformat=
[ 284.175281] video0: VIDIOC_ENUM_FMT: error -22: index=0, type=vid-cap-mplane, flags=0x0, pixelformat=
[ 284.175302] video0: VIDIOC_ENUM_FMT: error -22: index=0, type=vid-out, flags=0x0, pixelformat=
[ 284.175321] video0: VIDIOC_ENUM_FMT: error -22: index=0, type=vid-out-mplane, flags=0x0, pixelformat=
[ 284.175341] video0: VIDIOC_ENUM_FMT: error -22: index=0, type=vid-overlay, flags=0x0, pixelformat=
[ 284.175362] video0: VIDIOC_G_FMT: type=vid-cap, width=640, height=480, pixelformat=RGGB, field=none, bytesperline=640, sizeimage=307200, colorspace=11, flags=0x0, ycbcr_enc=23344, quantization=61034, xfer_func=41040
root@am57xx-evm:/boot# lsmod
Module Size Used by
ov490 15326 1
dwc3 71701 0
udc_core 19450 1 dwc3
usb_common 4737 2 udc_core,dwc3
snd_soc_simple_card 5844 0
snd_soc_simple_card_utils 5095 1 snd_soc_simple_card
omap_aes_driver 19101 0
omap_sham 21602 0
omap_wdt 4634 0
ahci_platform 3474 0
libahci_platform 8821 1 ahci_platform
libahci 28679 2 ahci_platform,libahci_platform
libata 205982 3 ahci_platform,libahci_platform,libahci
scsi_mod 133717 1 libata
dwc3_omap 5260 0
rtc_omap 9662 0
rtc_palmas 5322 0
extcon_palmas 5917 0
extcon_core 17190 3 dwc3_omap,extcon_palmas,dwc3
omap_des 11525 0
snd_soc_tas2552 9509 1
ti_cal 26655 0
leds_dac124s085 2315 0
des_generic 17608 1 omap_des
crypto_engine 6458 2 omap_des,omap_aes_driver
sch_fq_codel 9039 1
gpio_interrupt_driver 2639 0
root@am57xx-evm:/boot# ./yavta -f SRGGB8 -s 640x480 -n 4 --capture=1 --file=image.raw -F /dev/video0
Device /dev/video0 opened.[ 61.258588] 1332 - AR1335_enum_size()
Device `cal' on `platform:cal-000' is a video output (without [ 61.266344] 89 - to_AR1335()
mplanes) device.
[ 61.274542] 1300 - AR1335_set_fmt()
Video format set: SRGGB8 (42474752) 640x480 (stride 640) field n[ 61.279047] vb2-core: __setup_offsets: buffer 0, plane 0 offset 0x00000000
one buffer size 307200
Video format: SRGGB8 (42474752) 640x480 [ 61.295552] vb2-core: __setup_offsets: buffer 1, plane 0 offset 0x0004b000
(stride 640) field none buffer size 307200
[ 61.304534] vb2-core: __setup_offsets: buffer 2, plane 0 offset 0x00096000
[ 61.315152] vb2-core: __setup_offsets: buffer 3, plane 0 offset 0x000e1000
[ 61.322792] vb2-core: __vb2_queue_alloc: allocated 4 buffers, 1 plane(s) each
4 buffers requested.[ 61.330213] vb2-core: vb2_mmap: buffer 0, plane 0 successfully mapped
length: 307200 offset: 0 timestamp type/source: mono/EoF
[ 61.341604] vb2-core: vb2_mmap: buffer 1, plane 0 successfully mapped
Buffer 0/0 mapped at address 0xb6d84000.
length: 307200 offset:[ 61.350020] vb2-core: vb2_mmap: buffer 2, plane 0 successfully mapped
307200 timestamp type/source: mono/EoF
Buffer 1/0 mapped at ad[ 61.365969] vb2-core: vb2_mmap: buffer 3, plane 0 successfully mapped
dress 0xb6d39000.
length: 307200 offset: 614400 timestamp type/[ 61.376078] vb2-core: vb2_core_qbuf: qbuf of buffer 0 succeeded
source: mono/EoF
Buffer 2/0 mapped at address 0xb6cee000.
leng[ 61.386407] vb2-core: vb2_core_qbuf: qbuf of buffer 1 succeeded
th: 307200 offset: 921600 timestamp type/source: mono/EoF
Buffe[ 61.397898] vb2-core: vb2_core_qbuf: qbuf of buffer 2 succeeded
r 3/0 mapped at address 0xb6ca3000.
[ 61.409436] vb2-core: vb2_core_qbuf: qbuf of buffer 3 succeeded
[ 61.419908] 1211 - AR1335_s_stream()
[ 61.427664] 89 - to_AR1335()
[ 61.430646] 1362 - AR1335_init_gpios()
[ 61.990885] vb2-core: vb2_core_streamon: successful
[ 61.998004] vb2-core: __vb2_wait_for_done_vb: will sleep waiting for buffers
As per above command we try to capture the image using yavta application but appliation is does not complete and still wait at this point.
Please help us to solve this issue.
Thanks & Best Regards;
Nikunj Patel