-
Posts
44 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Everything posted by schunckt
-
duo2 6.1.34-sunxi ov5640 video capture kernel oops
schunckt replied to schunckt's topic in Allwinner sunxi
Did further play around with ffmpeg and v4l pipeline. This now WORKS also 6.4.8-sunxi (Armbian_23.08.0-trunk_Nanopiduo2_jammy_edge_6.4.8_minimal build from 07-Aug) v4l2-ctl --device /dev/video1 --set-fmt-video=width=1280,height=720,pixelformat=YUYV media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/1280x720]' ffmpeg -i /dev/video1 -q 10 -pix_fmt yuv420p -video_size 1280x720 -r 5 -listen 1 -f avi http://192.168.179.55:8080/stream VLC http://192.168.179.55:8080/stream ffmpeg is version 4.4.2-0ubuntu0.22.04.1 This means, there was a problem "behind the scenes" in 6.1x which is now fixed. Other parameters which did work in the past and now failing might be a side effect of internal improvments. I'll figure out anyway because this kernel now also contains the cedrus video engine and I want to use that for encoding and decoding. So from my point of view the issue is solved. @going the highest resolution 2592x1944 did work in friendlycore xenial 4.14 so the driver WAS able to do so. Don't know yet if something is now broken - but as said above need to play around anyways. Thanks @all! Thilo -
duo2 6.1.34-sunxi ov5640 video capture kernel oops
schunckt replied to schunckt's topic in Allwinner sunxi
Progress still on nanopiduo2 6.4.8-sunxi Meaniwhile i tried ustreamer which now WORKS at least with 640x480 like so: v4l2-ctl --device /dev/video1 --set-fmt-video=width=640,height=480,pixelformat=YUYV media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/640x480]' ./ustreamer -d /dev/video1 --host 192.168.179.55 -r 640x480 and VLC plays http://192.168.179.55:8080/stream will now go ahead trying ffmpeg and will test ustreamer on 6.1.x (But I'd prefer using latest build anyway!) Thanks! Thilo -
duo2 6.1.34-sunxi ov5640 video capture kernel oops
schunckt replied to schunckt's topic in Allwinner sunxi
Did build 'edge' have now Linux nanopiduo2 6.4.8-sunxi #1 SMP Thu Aug 3 08:26:15 UTC 2023 armv7l armv7l armv7l GNU/Linux No more crashes 😀 but now no video🙄. mjpg_streamer says "cant enable video" dmesg shows sun6i-csi 1cb0000.camera: invalid input/output format combination tried sveral params which did work in the past, no luck as yet. Will do further testing later on. v4l2-ctl -d /dev/video1 --all Driver Info: Driver name : sun6i-csi Card type : sun6i-csi-capture Bus info : platform:1cb0000.camera Driver version : 6.4.8 Capabilities : 0xa4200001 Video Capture Streaming Extended Pix Format Device Capabilities Device Caps : 0x24200001 Video Capture Streaming Extended Pix Format Media Driver Info: Driver name : sun6i-csi Model : Allwinner A31 CSI Device Serial : Bus info : platform:1cb0000.camera Media version : 6.4.8 Hardware revision: 0x00000000 (0) Driver version : 6.4.8 Interface Info: ID : 0x0300000e Type : V4L Video Entity Info: ID : 0x0000000c (12) Name : sun6i-csi-capture Function : V4L2 I/O Pad 0x0100000d : 0: Sink, Must Connect Link 0x02000010: from remote pad 0x1000003 of entity 'sun6i-csi-bridge' (Video Interface Bridge): Data, Enabled, Immutable Priority: 2 Video input : 0 (sun6i-csi-capture: ok) Format Video Capture: Width/Height : 640/480 Pixel Format : 'YUYV' (YUYV 4:2:2) Field : None Bytes per Line : 1280 Size Image : 614400 Colorspace : sRGB Transfer Function : Default (maps to sRGB) YCbCr/HSV Encoding: Default (maps to ITU-R 601) Quantization : Default (maps to Limited Range) Flags : looks good but that "sun6i-csi-bridge" seems to be different!?! also i have spi-spidev overlay enabled but there is no /dev/spi* Maybe I made something wrong when building the image!?!? ov5640 load shows root@nanopiduo2:~# dmesg | grep ov5640 [ 8.767826] ov5640 2-003c: supply DOVDD not found, using dummy regulator [ 8.768164] ov5640 2-003c: supply AVDD not found, using dummy regulator [ 8.768320] ov5640 2-003c: supply DVDD not found, using dummy regulator [ 8.775980] ov5640 2-003c: Consider updating driver ov5640 to match on endpoints The last line is new i think. Need to figure out what that means... Thilo -
duo2 6.1.34-sunxi ov5640 video capture kernel oops
schunckt replied to schunckt's topic in Allwinner sunxi
I've a armbian VM build environment ready, did build once successfully but I'm not experienced in linux. Is there an easy way to find and integrate the changes mentioned above? Then I could give it a try, maybe just the code to be pasted into the respecitve files... Thilo -
duo2 6.1.34-sunxi ov5640 video capture kernel oops
schunckt replied to schunckt's topic in Allwinner sunxi
Update: after boot simple v4l2-ctl -d /dev/video1 --all also causes the crash. Output ends here in the middle: Driver Info: Driver name : sun6i-csi Card type : sun6i-csi Bus info : platform:1cb0000.camera Driver version : 6.1.34 Capabilities : 0x84200001 Video Capture Streaming Extended Pix Format Device Capabilities Device Caps : 0x04200001 Video Capture Streaming Extended Pix Format Media Driver Info: Driver name : sun6i-csi Model : Allwinner A31 CSI Device Serial : Bus info : platform:1cb0000.camera Media version : 6.1.34 Hardware revision: 0x00000000 (0) Driver version : 6.1.34 Interface Info: ID : 0x03000003 Type : V4L Video Entity Info: ID : 0x00000001 (1) Name : sun6i-csi Function : V4L2 I/O Pad 0x01000002 : 0: Sink, Must Connect Link 0x02000007: from remote pad 0x1000006 of entity 'ov5640 2-003c' (Camera Sensor): Data, Enabled Priority: 2 Video input : 0 (Camera: ok) Format Video Capture: Width/Height : 1280/720 Pixel Format : 'BA81' (8-bit Bayer BGBG/GRGR) Field : None Bytes per Line : 1280 Size Image : 921600 Colorspace : sRGB Transfer Function : Default (maps to sRGB) YCbCr/HSV Encoding: Default (maps to ITU-R 601) Quantization : Default (maps to Full Range) Flags : Thilo -
OV5640 device tree overlay for OrangePi One H3
schunckt replied to rreignier's topic in Orange Pi One
Did you ever solve this? Maybe try this: media-ctl --device /dev/media1 --set-v4l2 '"ov5640 1-003c":0[fmt:UYVY8_2X8/1920x1080]' note the _2X8 (I found this while searching for latest DT overlay) T. -
duo2 6.1.34-sunxi ov5640 video capture kernel oops
schunckt replied to schunckt's topic in Allwinner sunxi
Just FYI i did update/upgrade recently and just NOW again but the result is the same. Will test latest image just in case. Thanks! Thilo -
duo2 6.1.34-sunxi ov5640 video capture kernel oops
schunckt replied to schunckt's topic in Allwinner sunxi
Done. Here is the link https://paste.armbian.com/ufihilozam Thilo -
Hi there! I've recently configured the ov5640 camera overlay and was able to capture videos either with mjpg-streamer of ffmpeg. Now on 6.1.34 both causes now a kernel oops. From the stack trace it looks like it happens inside v4l2 "media_pad_remote_pad_first" Unable to handle kernel NULL pointer dereference at virtual address 00000030 ... ... PC is at media_pad_remote_pad_first+0xa/0x58 I don't think v4l2 is the root cause because this may mean it fails alle the time which is unlikely. Looks like a null ptr gets passed in into media_pad_remote_pad_first ffmpeg used like this, but other parameters all resulting in the kernel oops at the same location. sudo media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:UYVY8_2X8/1280x720@1/15]' ffmpeg -hwaccel_device 0 -framerate 15 -f v4l2 -video_size 1280x720 -i /dev/video1 -r 15 -pix_fmt yuv420p -b:v 1280k test1280-15.mp4 WORKS on 4.14.x (was video0 and media0 here) mjpeg streamer testing ./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -y 1 -r 1920x1080 -f 5 -q 30 -n " -o "./output_http.so -w ./www" Possible root causes: 1) Something is now wrong inside my DT overlay due to kernel changes? I'm thinking about the i2c and spi relationships 2) Something is broken inside ov5640 driver 3) Something is broken inside v4l Maybe someone can provide some hints to point me in the right direction for further investigation? Attached are the dmesg output and overlay source. Thilo mjpg-streamer with camera overlay oops 06.08.2023 output.txt sun8i-h3-ov5640.dts
-
Nanopi Duo2 Forum - Nevermind :-)
schunckt replied to schunckt's topic in Framework and userspace feature requests
YES, thats great! In fact I realized it's supported state later after my post. T. -
Regarding the fixed dts, can one provide the original dts? I'd like to have some base to diff because i want to figure out what has been changed. I'll try to port these to a Nannopi Duo2 6.1.30 T.
-
Armbian_23.5.2_Nanopiduo2_bookworm_current_6.1.30.img works, had to fix wired ethernet. See other topic if interested in https://forum.armbian.com/topic/28911-nanopi-duo2-wired-ethernet-fix-bookworm-6130-tested/ also it seems armbian-config doesn't work properly. I had to enable spi and i2c overlays manually (not really a problem IMHO) . T.
-
Image Armbian_23.5.2_Nanopiduo2_bookworm_current_6.1.30.img uname -a Linux nanopiduo2 6.1.30-sunxi #1 SMP Wed May 24 16:32:53 UTC 2023 armv7l GNU/Linux It turns out the dtb has some missing pieces: ethernet@1c30000 { compatible = "allwinner,sun8i-h3-emac"; syscon = <0x1e>; reg = <0x1c30000 0x10000>; interrupts = <0x00 0x52 0x04>; interrupt-names = "macirq"; resets = <0x03 0x0c>; reset-names = "stmmaceth"; clocks = <0x03 0x1b>; clock-names = "stmmaceth"; status = "okay"; phy-handle = <0x69>; // differs from NEO phy-mode = "mii"; allwinner,leds-active-low; after adding phy-handle, phy-mode and allwinner.. wired ethernet works. Of course NetworkManager config /etc/network interfaces must be configured properly. In my case # Network is managed by Network manager auto lo iface lo inet loopback # network interface not managed by Network Manager allow-hotplug eth0 iface eth0 inet static address 192.168.179.222 netmask 255.255.255.0 gateway 192.168.179.1 dns-nameservers 192.168.179.1 Possibly the leds* are not required. Maybe these can be tweaked for other IO's then 🙂 btw. would be nice to thave a separate Nanopi duo2 section here. T.
