Hello
I have a problem in capturing video with HDMI receiver chip connected to VIN3A port of EVM TMDSEVM572x.
the connection between ADV7611 and TMDSEVM572x board are same as Camera module interface.
some specifications of my test setup are :
- SDK version : 06.00.00.07
- video input port : VIN3A
- HSYNC , VSYNC , Reset, DE, FID & CLK connection : same as Camera module (FID and VS is one same net that connected to P9 pins 27 & 56 on LCD module of EVM)
- data pins P8~P16 of ADV7611 are connecte to D0~D7 of EVM (I supposed that ADV7611 works in 8Bit SDR BT656 YCbCr and EVM works in 8Bit YUV422 mode)
- the dts file am57xx-evm-reva3-cam-ov1063x.dts is changed as follows and used as device tree :
adv7611@4c {
compatible = "adi,adv7611";
reg = <0x4c>;
#address-cells = <1>;
#size-cells = <0>;
default-input = <0>;
//reset-gpios = <0xa9 0x11 0x1>;
port@0{
reg = <0>;
};
port@1 {
reg = <1>;
endpoint {
phandle = <0x21d>
remote-endpoint = <0x21c>;
channels = <0>;
pixel-mux;
bus-width= <8>;
};
};
};
- the adv7604 is enabed in kernel config as module (m) and compiled the modules to generate adv7604.ko file.
- the driver file adv7604.ko is copyied to EVM in path /lib/modules/4.19.38-g4dae378bbe/kernel/drivers/media/i2c/
- before installing module adv7604.ko , the dmesg log is :
root@am57xx-evm:~# dmesg | grep vip
[ 7.513164] vin3: vip_set_slice_path:
[ 7.513182] vin3: vip_set_slice_path: DATA_PATH_SELECT(0000010C): 80008000
[ 7.513615] vin4: vip_set_slice_path:
[ 7.513628] vin4: vip_set_slice_path: DATA_PATH_SELECT(00000110): 80008000
[ 7.513689] vip 48990000.vip: loading firmware vpdma-1b8.bin
[ 7.549924] vip 48990000.vip: VPDMA firmware loaded
- after reboot, I installed adv7604.ko by command insmod /lib/modules/4.19.38-g4dae378bbe/kernel/drivers/media/i2c/adv7604.ko . the output log is :
root@am57xx-evm:~# insmod /lib/modules/4.19.38-g4dae378bbe/kernel/drivers/media/i2c/adv7604.ko
[ 40.804116] adv7611 4-004c: adv7611 found @ 0x98 (OMAP I2C adapter)
[ 40.812274] vin3a: Port A: Using subdev adv7611 4-004c for capture
[ 40.820363] vin3a-0: device registered as video1
- the input video to ADV7611 HDMI port is 720p (1280x720)
The results which is seen are as follows :
- the device adv7611 is detected and recognized as video device. dmesg log is :
root@am57xx-evm:~# dmesg | grep adv76
[ 50.801147] adv7604 4-004c: detecting adv76xx client on address 0x98
[ 50.801207] adv7604 4-004c: GPIO lookup for consumer hpd
[ 50.801221] adv7604 4-004c: using device tree for GPIO lookup
[ 50.801246] of_get_named_gpiod_flags: can't parse 'hpd-gpios' property of node '/ocp/i2c@4807c000/adv7611@4c[0]'
[ 50.801262] of_get_named_gpiod_flags: can't parse 'hpd-gpio' property of node '/ocp/i2c@4807c000/adv7611@4c[0]'
[ 50.801273] adv7604 4-004c: using lookup tables for GPIO lookup
[ 50.801282] adv7604 4-004c: No GPIO consumer hpd found
[ 50.801293] adv7604 4-004c: GPIO lookup for consumer reset
[ 50.801301] adv7604 4-004c: using device tree for GPIO lookup
[ 50.801316] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/i2c@4807c000/adv7611@4c[0]'
[ 50.801330] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/i2c@4807c000/adv7611@4c[0]'
[ 50.801338] adv7604 4-004c: using lookup tables for GPIO lookup
[ 50.801347] adv7604 4-004c: No GPIO consumer reset found
[ 50.863248] adv7611 4-004c: set_rgb_quantization_range: RGB quantization range: 0, RGB out: 0, HDMI: 1
[ 50.863256] adv7611 4-004c: adv76xx_set_gain: Auto gain: a = 0x100, b = 0x100, c = 0x100
[ 50.863431] adv7611 4-004c: adv76xx_set_offset: Auto offset: a = 0x3ff, b = 0x3ff, c = 0x3ff
[ 50.867072] adv7611 4-004c: set_rgb_quantization_range: RGB quantization range: 0, RGB out: 0, HDMI: 1
[ 50.867077] adv7611 4-004c: adv76xx_set_gain: Auto gain: a = 0x100, b = 0x100, c = 0x100
[ 50.867248] adv7611 4-004c: adv76xx_set_offset: Auto offset: a = 0x3ff, b = 0x3ff, c = 0x3ff
[ 50.868629] adv7611 4-004c: adv7611 found @ 0x98 (OMAP I2C adapter)
[ 50.877317] vin3a: Port A: Using subdev adv7611 4-004c for capture
[ 50.883793] vin3a: subdev adv7611 4-004c: code: 100a idx: 0
[ 50.883810] vin3a: subdev adv7611 4-004c: code: 2008 idx: 1
[ 50.883816] vin3a: subdev adv7611 4-004c: code: 2009 idx: 2
[ 50.883821] vin3a: subdev adv7611 4-004c: code: 201e idx: 3
[ 50.883826] vin3a: subdev adv7611 4-004c: code: 201f idx: 4
[ 50.883831] vin3a: subdev adv7611 4-004c: code: 200f idx: 5
[ 50.883836] vin3a: subdev adv7611 4-004c: code: 2010 idx: 6
[ 50.883841] vin3a: subdev adv7611 4-004c: code: 2011 idx: 7
[ 50.883846] vin3a: subdev adv7611 4-004c: code: 2012 idx: 8
[ 50.883850] vin3a: subdev adv7611 4-004c: code: 2020 idx: 9
[ 50.883855] vin3a: subdev adv7611 4-004c: code: 2021 idx: 10
[ 50.883861] vin3a: subdev adv7611 4-004c: code: 2022 idx: 11
[ 50.883866] vin3a: subdev adv7611 4-004c: code: 2023 idx: 12
- the resolution and fourcc type is not recognized correctly. dmesg log is :
root@am57xx-evm:~# dmesg | grep vip
[ 8.101353] vin3: vip_set_slice_path:
[ 8.101364] vin3: vip_set_slice_path: DATA_PATH_SELECT(0000010C): 80008000
[ 8.101750] vin4: vip_set_slice_path:
[ 8.101761] vin4: vip_set_slice_path: DATA_PATH_SELECT(00000110): 80008000
[ 8.101819] vip 48990000.vip: loading firmware vpdma-1b8.bin
[ 8.209268] vip 48990000.vip: VPDMA firmware loaded
[ 39.956770] vin3a: vip_async_bound
[ 39.974514] vin3a: vip_create_streams[channel-0]: bus_type = V4L2_MBUS_BT656
[ 39.974523] vin3a: vip_async_complete
[ 39.980869] vin3a-0: vip_open
[ 39.980912] vin3a: vip_init_port: g_mbus_fmt subdev mbus_code: 100A fourcc:RGB3 size: -1056617069x-718341108
root@am57xx-evm:~# v4l2-ctl --list-devices
omapwb-cap (platform:omapwb-cap):
/dev/video11
omapwb-m2m (platform:omapwb-m2m):
/dev/video10
vip (platform:vip2:vin3a:stream0):
/dev/video1
vpe (platform:vpe):
/dev/video0
- the ADV7611 is generating output signals on HS, VS, CLK & Data pins in frame rate as the it's input HDMI port. (seems it works fine)
The problem is that it can not capture video and returne Error as bellow:
root@am57xx-evm:~# gst-launch-1.0 -e v4l2src device=/dev/video1 num-buffers=-1 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)30/1' ! vpe num-input-buffers=1 ! ducatih264enc inter-interval=1 bitrate=5000 ! h264parse ! ducatih264dec ! vpe ! 'video/x-raw,format=(string)NV12, width=480,height=360' ! waylandsink sync=false
Setting pipeline to PAUSED ...
[ 7112.784528] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
** (gst-launch-1.0:1515): WARNING **: 05:13:19.753: Could not bind to zwp_linux_dmabuf_v1
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../../../../gstreamer-1.14.4/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
note that when using TVP5150AM1 instead of Camera with above setting and setup, it has no problem and can capture video.
also I should mention that when I add "reset-gpios = <0xa9 0x11 0x1>;" to dts, it gives error as follows :
root@am57xx-evm:~# insmod /lib/modules/4.19.38-g4dae378bbe/kernel/drivers/media/i2c/adv7604.ko
[ 30.355811] adv7611 4-004c: Error -121 reading IO Regmap
any help will be appreciated.
Best Regards,
Ali