i.MX6Q kernel compilation for camera/video (gstreamer)

Hi everyone
I’have a problem with kernel compilation.
I’m using the Analogue Camera Adapter - Toradex Evaluation Board

And with the kernel from here:
Index of /Colibri/Linux/Images it’s ok.

and with my kernel i have these errors:

root@apalis-imx6:~# gst-launch-1.0 -v imxv4l2videosrc ! autovideosink
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (720x576).
====== OVERLAYSINK: 4.1.4 build [   27.675523] mxc_v4l2_output v4l2_out: Bypass IC.
on Oct  5 2017 04:46:09. ======
[   27.681795] mxc_v4l2_output v4l2_out: Bypass IC.
display(/dev/fb0) resolution is (720x576).
display(/dev/fb0) resolution is (720x576).
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
../../../../gstreamer-1.8.3/libs/gst/base/gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
Failed to start
Setting pipeline to NULL ...
Freeing pipeline ...
root@apalis-imx6:~#

I make a fresh start this week and anything goes better…

So i use the toolchain gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz
because i want to compile the kernel Apalis-iMX6_LXDE-Image_2.8b4.129-20181005.tar.bz2

That’s my process:

git clone -b toradex_4.9-1.0.x-imx git://git.toradex.com/linux-toradex.git
cd linux-toradex

export ARCH=arm
export PATH=~/gcc-linaro/bin/:$PATH
export CROSS_COMPILE=arm-linux-gnueabihf-

make apalis_imx6_defconfig
make -j3 uImage LOADADDR=10008000 2>&1 | tee build.log
make imx6q-apalis-eval.dtb

And i copy the kernel and the dtb on an functionnal SD card

cp ~/linux-toradex/arch/arm/boot/uImage /media/sf_partage
cp ~/linux-toradex/arch/arm/boot/dts/imx6q-apalis-eval.dtb /media/sf_partage

my u-boot version U-Boot 2016.11-2.7.4+g1b121c6

i use this command:

run setupdate
run update

If someone sees something that is wrong …

hi @mazareth

I tried the command with Bsp 2.7 and 2.8b4, it is working fine. Could you provide the dmesg log in a file with your custom compiled kernel and the output of lsmod?

Thanks and best regards, Jaski

Thank you jaski

link text

It seems that the kernel modules are not deployed. Could you deploy them as explained here?

I don’t understand this part…
This command as do be done on my ubuntu ?

sudo -E env "PATH=$PATH" make INSTALL_MOD_PATH=<path-to-rootfs>/ modules_install

What is my path-to-rootfs ?
I think the first option should be the easiest :
the rootfs folder of the previously extracted update package in which case one has to remember to re-generate and re-flash the root file system image afterwards

Is the rootfs my SD card? I:\apalis_imx6 ?

sudo -E env "PATH=$PATH" make INSTALL_MOD_PATH=/media/sf_I_DRIVE/apalis_imx6/ modules_install

And after this command i do again “run setupdate” and “run update” on my apalis?

EDIT 17-10-2018 : I can’t write link on my virtualbox share folder. I’ll try other solution…

adv@adv-VirtualBox:~/linux-toradex$ sudo -E env "PATH=$PATH" make INSTALL_MOD_PATH=/media/sf_I_DRIVE/apalis_imx6/ modules_install
ln: failed to create symbolic link '/media/sf_I_DRIVE/apalis_imx6//lib/modules/4.9.87/source': Read-only file system
Makefile:1227: recipe for target '_modinst_' failed
make: *** [_modinst_] Error 1

that not work with the temporary folder too:

adv@adv-VirtualBox:~/linux-toradex$ sudo -E env "PATH=$PATH" make INSTALL_MOD_PATH=~/sdcard/apalis_imx6 modules_install
cp: cannot stat './modules.order': No such file or directory
Makefile:1227: recipe for target '_modinst_' failed
make: *** [_modinst_] Error 1

I tried that but I can’t write on my virtualbox share folder. ( see virtualbox - Why can't I create soft link on vboxsf file system? - Super User )

adv@adv-VirtualBox:~/linux-toradex$ sudo -E env "PATH=$PATH" make INSTALL_MOD_PATH=/media/sf_I_DRIVE/apalis_imx6/ modules_install
ln: failed to create symbolic link '/media/sf_I_DRIVE/apalis_imx6//lib/modules/4.9.87/source': Read-only file system
Makefile:1227: recipe for target '_modinst_' failed
make: *** [_modinst_] Error 1

I have another error with the temporary folder method…:

adv@adv-VirtualBox:~/linux-toradex$ cp -r /media/sf_I_DRIVE/apalis_imx6/ ~/sdcard/
adv@adv-VirtualBox:~/linux-toradex$ sudo -E env "PATH=$PATH" make INSTALL_MOD_PATH=~/sdcard/apalis_imx6 modules_install
    cp: cannot stat './modules.order': No such file or directory
    Makefile:1227: recipe for target '_modinst_' failed
    make: *** [_modinst_] Error 1

Hi,
I found this people who had the same problem:

That help me to found the correct command :

adv@adv-VirtualBox:~/linux-toradex$ sudo -E env "PATH=$PATH" make INSTALL_MOD_PATH=~/Apalis-iMX6-LXDE-Image_2.8.4/rootfs/ modules_install
[sudo] password for adv: 
  INSTALL crypto/echainiv.ko
  INSTALL drivers/ata/ahci.ko
  INSTALL drivers/bluetooth/hci_uart.ko
  INSTALL drivers/crypto/caam/sm_test.ko
  INSTALL drivers/hid/hid-multitouch.ko
  INSTALL drivers/i2c/algos/i2c-algo-pca.ko
  INSTALL drivers/i2c/algos/i2c-algo-pcf.ko
  INSTALL drivers/input/serio/serport.ko
  INSTALL drivers/input/touchscreen/atmel_mxt_ts.ko
  INSTALL drivers/input/touchscreen/fusion_F0710A.ko
  INSTALL drivers/media/platform/mxc/capture/adv7180_tvin.ko
  INSTALL drivers/media/platform/mxc/capture/adv7280_tvin.ko
  INSTALL drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.ko
  INSTALL drivers/media/platform/mxc/capture/ipu_csi_enc.ko
  INSTALL drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.ko
  INSTALL drivers/media/platform/mxc/capture/ipu_prp_enc.ko
  INSTALL drivers/media/platform/mxc/capture/ipu_still.ko
  INSTALL drivers/media/platform/mxc/capture/max9526_tvin.ko
  INSTALL drivers/media/platform/mxc/capture/mxc_v4l2_capture.ko
  INSTALL drivers/media/platform/mxc/capture/ov5640_camera_int.ko
  INSTALL drivers/media/platform/mxc/capture/ov5640_camera_mipi_int.ko
  INSTALL drivers/media/platform/mxc/capture/ov5642_camera.ko
  INSTALL drivers/media/platform/mxc/capture/v4l2-int-device.ko
  INSTALL drivers/media/platform/mxc/subdev/mx6s_capture.ko
  INSTALL drivers/media/platform/mxc/subdev/mxc_vadc.ko
  INSTALL drivers/media/platform/mxc/subdev/ov5640_camera.ko
  INSTALL drivers/media/platform/mxc/subdev/ov5640_camera_mipi.ko
  INSTALL drivers/media/usb/gspca/gspca_main.ko
  INSTALL drivers/media/usb/uvc/uvcvideo.ko
  INSTALL drivers/media/v4l2-core/videobuf2-dma-contig.ko
  INSTALL drivers/media/v4l2-core/videobuf2-memops.ko
  INSTALL drivers/media/v4l2-core/videobuf2-vmalloc.ko
  INSTALL drivers/net/ppp/ppp_generic.ko
  INSTALL drivers/net/slip/slhc.ko
  INSTALL drivers/usb/class/cdc-acm.ko
  INSTALL drivers/usb/class/cdc-wdm.ko
  INSTALL drivers/usb/gadget/function/u_ether.ko
  INSTALL drivers/usb/gadget/function/u_serial.ko
  INSTALL drivers/usb/gadget/function/usb_f_acm.ko
  INSTALL drivers/usb/gadget/function/usb_f_ecm.ko
  INSTALL drivers/usb/gadget/function/usb_f_ecm_subset.ko
  INSTALL drivers/usb/gadget/function/usb_f_eem.ko
  INSTALL drivers/usb/gadget/function/usb_f_fs.ko
  INSTALL drivers/usb/gadget/function/usb_f_mass_storage.ko
  INSTALL drivers/usb/gadget/function/usb_f_ncm.ko
  INSTALL drivers/usb/gadget/function/usb_f_obex.ko
  INSTALL drivers/usb/gadget/function/usb_f_rndis.ko
  INSTALL drivers/usb/gadget/function/usb_f_serial.ko
  INSTALL drivers/usb/gadget/function/usb_f_ss_lb.ko
  INSTALL drivers/usb/gadget/legacy/g_ether.ko
  INSTALL drivers/usb/gadget/legacy/g_mass_storage.ko
  INSTALL drivers/usb/gadget/legacy/g_ncm.ko
  INSTALL drivers/usb/gadget/legacy/g_serial.ko
  INSTALL drivers/usb/gadget/legacy/g_zero.ko
  INSTALL drivers/usb/gadget/legacy/gadgetfs.ko
  INSTALL drivers/usb/gadget/libcomposite.ko
  INSTALL drivers/usb/host/xhci-hcd.ko
  INSTALL drivers/usb/host/xhci-pci.ko
  INSTALL drivers/usb/serial/option.ko
  INSTALL drivers/usb/serial/usb_wwan.ko
  INSTALL fs/binfmt_misc.ko
  INSTALL fs/configfs/configfs.ko
  INSTALL fs/fat/msdos.ko
  INSTALL fs/isofs/isofs.ko
  INSTALL fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko
  INSTALL fs/nls/nls_iso8859-15.ko
  INSTALL fs/squashfs/squashfs.ko
  INSTALL fs/udf/udf.ko
  INSTALL lib/crc-itu-t.ko
  INSTALL lib/crc7.ko
  INSTALL lib/libcrc32c.ko
  INSTALL net/bluetooth/bluetooth.ko
  INSTALL net/bluetooth/bnep/bnep.ko
  INSTALL net/bluetooth/hidp/hidp.ko
  INSTALL net/bluetooth/rfcomm/rfcomm.ko
  INSTALL net/ipv4/ip_tunnel.ko
  INSTALL net/ipv4/tunnel4.ko
  INSTALL net/ipv6/sit.ko
  INSTALL net/mac80211/mac80211.ko
  INSTALL net/wireless/cfg80211.ko
  INSTALL sound/core/snd-hwdep.ko
  INSTALL sound/core/snd-rawmidi.ko
  INSTALL sound/usb/snd-usb-audio.ko
  INSTALL sound/usb/snd-usbmidi-lib.ko
  DEPMOD  4.9.87

I do not have the same error now. But I like it better:

link text

Perfect that the modules got deployed. Is the Issue solved now?

I think i’m good with the kernelk compilation now…

I’ve another problem.

When i launch gstreamer like below i have a alloc memeory fail that i don’t have with the kernel give by toradex… :

root@apalis-imx6:~# gst-launch-1.0  imxv4l2videosrc ! autovideosink
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (720x576).
====== OVERLAYSINK: 4.1.4 build [ 9333.413106] mxc_v4l2_output v4l2_out: Bypass IC.
on Oct  5 2017 04:46:09. ======
[ 9333.419435] mxc_v4l2_output v4l2_out: Bypass IC.
display(/dev/fb0) resolution is (720x576).
display(/dev/fb0) resolution is (720x576).
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
g2d_alloc: alloc memory fail with size 622592!
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data flow error.
Additional debug info:
../../../../gstreamer-1.8.3/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
streaming task paused, reason error (-5)
Execution ended after 0:00:00.432891536
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@apalis-imx6:~# [ 9334.454732] imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00000001

hi @mazareth: Could you try the following command: gst-launch-1.0 imxv4l2src ! autovideosink

not good at all

root@apalis-imx6:~# gst-launch-1.0 imxv4l2src ! autovideosink
[   25.284008] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[   25.290733] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[   25.475768] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[   25.481641] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
====== IMXV4L2SRC: 4.1.4 build on Oct  5 2017 04:46:07. ======
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (720x576).
[   25.520865] mxc_v4l2_output v4l2_out: Bypass IC.6:09. ======

display(/dev/fb0) resolution is [   25.528428] mxc_v4l2_output v4l2_out: Bypass IC.
(720x576).
display(/dev/fb0) resolution is (720x576).
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
g2d_open: fail with status -7
g2d_open: fail with status -7
....
g2d_open: fail with status -7
g2d_open: fail with status -7
g2d_open: fail with status -7
g2d_open: fail with status -7
g2d_open: fail with status -7
g2d_open: fail with status -7
g2d_open: fail with status -7
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:02.101895334
Setting pipeline to PAUSED ...
g2d_open: fail with status -7
Setting pipeline to READY ...
Total showed frames (79), display master blited (0), playing for (0:00:02.102460334), fps (0.000).
Setting pipeline to NULL ...
Freeing pipeline ...
root@apalis-imx6:~#

for information :

this command have no error but the output seem to be interlaced.

root@apalis-imx6:~# gst-launch-1.0  imxv4l2videosrc ! imxipuvideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 1172.400734] imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_10 = 0x00000001
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:05.359685829
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@apalis-imx6:~#

May I suggest for you to follow the following article on our developer website?

If you keep having issues could you please post complete log files again?

I will try.

Do you think i have to come back in 800*600 VGA output?
With the old kernel, it works well but not interlaced and on VGA monitor only.

I need to have a NTSC/PAL output on VGA so i patch the kernel.

My last modification make the apalis say

[  263.594160] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  263.653699] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  263.713735] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  269.007157] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  269.074863] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  269.144250] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  269.204270] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  274.517065] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  274.585447] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  274.644878] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  274.704863] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  280.017666] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  280.086032] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  280.145438] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  280.205454] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[  285.518252] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  

I’ve already done this check with the previous kenrel and everything looks good.
Now i have this dmesg log

[   18.075763] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
 adv
[    0.000000] Linux version 4.9.87-00004-g2e7e056-dirty (adv@adv-VirtualBox) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #6 SMP Thu Oct 18 16:06:04 CEST 2018
[    3.902675] systemd[1]: System time before build time, advancing clock.
[    6.047775] adv7280 3-0021: chip found @ 0x42 (21a8000.i2c)
[    6.056636] adv7280 3-0021: no sensor pwdn pin available
[    6.217856] mxc_v4l2_master_attach: ipu0:/csi0 parallel attached adv7280:mxc_v4l2_cap0
root@apalis-imx6:~# [   19.224150] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[   19.301906] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz
[   19.361344] mxc_sdc_fb fb@0: 720x480 h_sync,r,l: 124,38,114  v_sync,l,u: 6,8,31 pixclock=13500000 Hz

Hi,

My camera input is not the problem. I can do broadcasting.

root@apalis-imx6:~# gst-launch-1.0 imxv4l2videosrc ! vpuenc_h264 bitrate=1500 ! mpegtsmux m2ts-mode=false alignment=7 ! queue ! udpsink port=3001 host=225.0.1.5 sync=false
Setting pipeline to PAUSED ...
[INFO]  Product Info: i.MX6Q/D/S
====== VPUENC: 4.1.4 build on Oct  5 2017 04:46:12. ======
        wrapper: 1.0.68 (VPUWRAPPER_ARM_LINUX Build on Oct  5 2017 04:35:40)
        vpulib: 5.4.35
        firmware: 3.1.1.46072
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[INFO]  ringBufferEnable 0, chromaInterleave 0, mapType 0, linear2TiledEnable 0
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:01:11.796395761
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@apalis-imx6:~#

But in VGA output i do these test

In 800x600 vga output
gst-launch-1.0  imxv4l2videosrc ! autovideosink	Alloc memory error
gst-launch-1.0  imxv4l2videosrc ! imxipuvideosink	Image not good
gst-launch-1.0  imxv4l2videosrc ! imxv4l2sink 	(gst-launch-1.0:815): GStreamer-CRITICAL **: gst_buffer_pool_config_set_params: assertion 'max_buffers == 0 || min_buffers <= max_buffers' failed
gst-launch-1.0 imxv4l2videosrc ! ximagesink sync=false	ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data flow error.
gst-launch-1.0 videotestsrc ! autovideosink	g2d_alloc: alloc memory fail with size 118784!
gst-launch-1.0 videotestsrc ! imxipuvideosink use-vsync=true	Image not good
gst-launch-1.0  videotestsrc ! imxv4l2sink 	Video OK full screen
gst-launch-1.0 videotestsrc ! ximagesink sync=false	Video OK little image

So the problem come from my kernel… What do you think?

EDIT : with your kernel

  • i don’t have to deploy it.

  • I don’t have error with the autovideosink

  • lsmod is different

     root@apalis-imx6:~# lsmod
     Module                  Size  Used by
     usb_f_rndis            11788  2
     u_ether                 8965  1 usb_f_rndis
     ov5640_camera_mipi_int    21468  0
     mxc_v4l2_capture       24816  2 ov5640_camera_mipi_int
     ipu_bg_overlay_sdc      4189  1 mxc_v4l2_capture
     max9526_tvin            5702  0
     ipu_still               1611  1 mxc_v4l2_capture
     ipu_prp_enc             4783  1 mxc_v4l2_capture
     ipu_csi_enc             2989  1 mxc_v4l2_capture
     ipu_fg_overlay_sdc      5074  1 mxc_v4l2_capture
     adv7280_tvin            6489  0
     v4l2_int_device         1743  4 adv7280_tvin,ov5640_camera_mipi_int,mxc_v4l2_capture,max9526_tvin
     libcomposite           35410  10 usb_f_rndis
     configfs               20473  3 usb_f_rndis,libcomposite
     galcore               209125  10
     root@apalis-imx6:~#
     
     gst-launch-1.0  imxv4l2videosrc ! autovideosink	Video OK full screen
     gst-launch-1.0  imxv4l2videosrc ! imxipuvideosink	Image not good / interlaced?
     gst-launch-1.0  imxv4l2videosrc ! imxv4l2sink 	(gst-launch-1.0:815): GStreamer-CRITICAL **: gst_buffer_pool_config_set_params: assertion 'max_buffers == 0 || min_buffers <= max_buffers' failed
     gst-launch-1.0 imxv4l2videosrc ! ximagesink sync=false	ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data flow error.
     gst-launch-1.0 videotestsrc ! autovideosink	g2d_alloc: alloc memory fail with size 118784!
     gst-launch-1.0 videotestsrc ! imxipuvideosink use-vsync=true	Image not good / interlaced?
     gst-launch-1.0  videotestsrc ! imxv4l2sink 	Video OK full screen
     gst-launch-1.0 videotestsrc ! ximagesink sync=false	Video OK little image
    

EDIT : Last point
What i really want to do is to send my NTSC input to the VGA so i get back in 720x480 interlaced mode but the command not work

gst-launch-1.0  -v imxv4l2videosrc ! imxipuvideosink
Can't get caps from capture device, use the default setting.
Perhaps haven't capture device.
display(/dev/fb0) resolution is (720x480).
[INFO]  Product Info: i.MX6Q/D/S
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
Additional debug info:
../../../../gstreamer-1.8.3/libs/gst/base/gstbasesrc.c(3354): gst_base_src_start (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
Failed to start
Setting pipeline to NULL ...
Freeing pipeline ...

Hi,

I have advanced a bit in my problems.

As the NTSC image size is 640*480 i got back to this resolution by setting my vga output in 640x480

I change the files adv@adv-VirtualBox:~/linux-toradex$ nano drivers/video/fbdev/mxc/mxc_vdacif.c

with

        /* 3 640x480-60 VESA */
        { NULL, 60, 640, 480,  79364,  48, 16, 33, 10, 96, 2,
          FB_SYNC_OE_LOW_ACT, FB_VMODE_INTERLACED, FB_MODE_IS_VESA },

To have interlaced mode.

My monitor (through the AD723) show the good definition NTSC 480/60I
the apalis spam this message :

[   30.946089] mxc_sdc_fb fb@0: 640x480 h_sync,r,l: 96,16,48  v_sync,l,u: 2,10,33 pixclock=12600000 Hz

and the fbset commande return

mode "640x480-60"
    # D: 12.600 MHz, H: 15.750 kHz, V: 60.001 Hz
    geometry 640 480 640 480 16
    timings 79364 48 16 33 10 96 2
    laced true
    rgba 5/11,6/5,5/0,0/0
endmode

The gstreamer work good in this configuration. But we can see that the input is in 720x480 format (I420)

[  879.014177] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[  879.027215] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)720\,\ height\=\(int\)480\,\ interlace-mode\=\(string\)interleaved\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
/GstPipeline:pipeline0/GstImxIpuVideoSink:imxipuvideosink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)720\,\ height\=\(int\)480\,\ interlace-mode\=\(string\)interleaved\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1"
Setting pipeline to PLAYING ...
New clock: GstSystemClock

The video have the good image but the color is not good at all and they are glitch.

Do you have an idea for having a good combination of fbset?

Did you find an error in my explanation?

hi @mazareth

The video have the good image but the color is not good at all and they are glitch.
Could you post a picture?

Do you have an idea for having a good combination of fbset?
Did you find an error in my explanation?

For what do you need a good combination of fbset. As I understand, everything is working with Kernel provided by Toradex. So what did you change?

I change the file
nano ~/linux-toradex/drivers/video/fbdev/mxc/mxc_vdacif.c

before compiling the kernel.

With this post :
https://community.nxp.com/message/442000?commentID=442000#comment-442000

I’m at this point now :

mode "720x487-60"
    # D: 13.500 MHz, H: 15.341 kHz, V: 60.397 Hz
    geometry 720 487 720 487 16
    timings 74074 16 2 17 3 142 1
    hsync high
    vsync high
    laced true
    rgba 5/11,6/5,5/0,0/0
endmode

with this config :

        /*NTSC */
        { NULL, 30, 720, 487, 74074, 16, 2, 17, 3, 142, 1,
          FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
          FB_VMODE_INTERLACED, FB_MODE_IS_DETAILED },
};

But this is not what i want i have to put 276 instead of 142 in hsync_len.

  * hsync_len: EAV Code + Blanking Video + SAV Code (in pixel clock count)

  *     For BT656 NTSC, it is 4 + 67*4 + 4 = 276.

  *     For BT1120 NTSC, it is 4 + 67*2 + 4 = 142.

But i think i have to target these values
pix clock 13.5MHz
Horizontal line rate 15.73426KHz
Vertical line rate 29.97Hz x 2 => 59.94Hz

There are a patch for this here :
link text

I work on it. I search about fbset parameters calculation.

EDIT 26/10/2018 :
According to this document :

I have to generate a
640x525 video
with a horizontale line rate of 15.734khz

I don’t know how to do that.
Video with the last configuration:
link text

Hi,

I asked for help on NXP :
https://community.nxp.com/message/1073212

Have you seen the video? video

EDIT 29/10/2018 13h36:

I have done this configuration :

mode "640x480-60"
    # D: 12.147 MHz, H: 15.734 kHz, V: 59.941 Hz
    geometry 640 480 640 480 16
    timings 82325 9 9 3 3 114 39
    laced true
    rgba 5/11,6/5,5/0,0/0
endmode

According to SMPTE 170M-2004

fH should be 15.734265kHz

fV sould be 59.94005994Hz

Timing are good, but the content is not ( i have to set the good margin)

One question,

What do you think about this patch for toradex platform?

https://community.nxp.com/docs/DOC-94019

Timing are good, but the content is not ( i have to set the good margin).
What do you mean with content is not good? What do you need the good margin for?