Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera Module V3 LMX708 not working VIDIOC_STREAMON error code 22 #1561

Open
1 task done
Bigfoot30 opened this issue Jan 28, 2023 · 6 comments
Open
1 task done

Camera Module V3 LMX708 not working VIDIOC_STREAMON error code 22 #1561

Bigfoot30 opened this issue Jan 28, 2023 · 6 comments
Labels
needs investigation Further testing is required

Comments

@Bigfoot30
Copy link

  • I confirm that this is an issue rather than a question.

Bug report

Hyperion installed on rpi4 bullseye with raspberry pi camera module V3 lmx708 not working

Steps to reproduce

  1. install os with pi-imager
  2. install hyperion with apt-get as mentioned here Install Doku
  3. in webinterface Capture Hardwar -> USB Capture -> unicam-imager
  4. Test Live-View

What is expected?

Picture in live-view and no error messages in journalctl

What is actually happening?

sudo journalctl -f
Jan 28 13:56:14 hyperion hyperiond[599]: 2023-01-28T13:56:14.624 |__| V4L2              : <DEBUG> V4L2Grabber.cpp:152:init() | Set device (path) to: unicam-image (/dev/video0)
Jan 28 13:56:14 hyperion hyperiond[599]: 2023-01-28T13:56:14.625 |__| V4L2              : <DEBUG> V4L2Grabber.cpp:489:init_device() | Set device input to: unicam-image
Jan 28 13:56:14 hyperion hyperiond[599]: 2023-01-28T13:56:14.625 |__| V4L2              : <DEBUG> V4L2Grabber.cpp:615:init_device() | Set resolution to width=4608 height=2592
Jan 28 13:56:14 hyperion hyperiond[599]: 2023-01-28T13:56:14.625 |__| V4L2              : <DEBUG> V4L2Grabber.cpp:708:init_device() | Pixel format=YUYV
Jan 28 13:56:14 hyperion hyperiond[599]: 2023-01-28T13:56:14.759 |__| V4L2              : <ERROR> Throws error nr: VIDIOC_STREAMON error code 22, Invalid argument
Jan 28 13:56:14 hyperion hyperiond[599]: 2023-01-28T13:56:14.759 |__| V4L2              : <INFO> Started
Jan 28 13:56:14 hyperion hyperiond[599]: 2023-01-28T13:56:14.760 |__| V4L2              : <ERROR> Throws error nr: VIDIOC_DQBUF error code 22, Invalid argument
Jan 28 13:56:14 hyperion hyperiond[599]: Throws error nr: VIDIOC_STREAMON error code 22, Invalid argument
Jan 28 13:56:14 hyperion hyperiond[599]: Throws error nr: VIDIOC_DQBUF error code 22, Invalid argument
Jan 28 13:56:14 hyperion kernel: unicam fe801000.csi: Failed to start media pipeline: -22
Jan 28 13:56:14 hyperion hyperiond[599]: 2023-01-28T13:56:14.797 |__| V4L2              : <INFO> Stopped
hyperiond --version
Hyperion Ambilight Deamon
      Version   : 2.0.14 ((HEAD detached at 2.0.14) (LordGrey-c9a1c88/b109703-1669566414))
      Build Time: Nov 27 2022 18:59:25
v4l2-ctl --all
Driver Info:
      Driver name      : unicam
      Card type        : unicam
      Bus info         : platform:fe801000.csi
      Driver version   : 5.15.84
      Capabilities     : 0xa5a00001
              Video Capture
              Metadata Capture
              Read/Write
              Streaming
              Extended Pix Format
              Device Capabilities
      Device Caps      : 0x25200001
              Video Capture
              Read/Write
              Streaming
              Extended Pix Format
Media Driver Info:
      Driver name      : unicam
      Model            : unicam
      Serial           :
      Bus info         : platform:fe801000.csi
      Media version    : 5.15.84
      Hardware revision: 0x00000000 (0)
      Driver version   : 5.15.84
Interface Info:
      ID               : 0x03000008
      Type             : V4L Video
Entity Info:
      ID               : 0x00000006 (6)
      Name             : unicam-image
      Function         : V4L2 I/O
      Flags         : default
      Pad 0x01000007   : 0: Sink
        Link 0x0200000a: from remote pad 0x1000002 of entity 'imx708': Data, Enabled, Immutable
Priority: 2
Video input : 0 (unicam-image: ok)
Format Video Capture:
      Width/Height      : 4608/2592
      Pixel Format      : 'pBAA' (10-bit Bayer BGBG/GRGR Packed)
      Field             : None
      Bytes per Line    : 5760
      Size Image        : 14929920
      Colorspace        : Raw
      Transfer Function : Default (maps to None)
      YCbCr/HSV Encoding: Default (maps to ITU-R 601)
      Quantization      : Default (maps to Full Range)
      Flags
v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
      /dev/video10
      /dev/video11
      /dev/video12
      /dev/video18
      /dev/video31
      /dev/media1

bcm2835-isp (platform:bcm2835-isp):
      /dev/video13
      /dev/video14
      /dev/video15
      /dev/video16
      /dev/video20
      /dev/video21
      /dev/video22
      /dev/video23
      /dev/media0
      /dev/media2

unicam (platform:fe801000.csi):
      /dev/video0
      /dev/video1
      /dev/media3

rpivid (platform:rpivid):
      /dev/video19
      /dev/media4
v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
      Type: Video Capture

      [0]: 'YUYV' (YUYV 4:2:2)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [1]: 'UYVY' (UYVY 4:2:2)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [2]: 'YVYU' (YVYU 4:2:2)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [3]: 'VYUY' (VYUY 4:2:2)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [4]: 'RGBP' (16-bit RGB 5-6-5)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [5]: 'RGBR' (16-bit RGB 5-6-5 BE)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [6]: 'RGBO' (16-bit A/XRGB 1-5-5-5)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [7]: 'RGBQ' (16-bit A/XRGB 1-5-5-5 BE)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [8]: 'RGB3' (24-bit RGB 8-8-8)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [9]: 'BGR3' (24-bit BGR 8-8-8)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [10]: 'RGB4' (32-bit A/XRGB 8-8-8-8)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [11]: 'BA81' (8-bit Bayer BGBG/GRGR)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [12]: 'GBRG' (8-bit Bayer GBGB/RGRG)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [13]: 'GRBG' (8-bit Bayer GRGR/BGBG)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [14]: 'RGGB' (8-bit Bayer RGRG/GBGB)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [15]: 'pBAA' (10-bit Bayer BGBG/GRGR Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [16]: 'BG10' (10-bit Bayer BGBG/GRGR)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [17]: 'pGAA' (10-bit Bayer GBGB/RGRG Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [18]: 'GB10' (10-bit Bayer GBGB/RGRG)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [19]: 'pgAA' (10-bit Bayer GRGR/BGBG Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [20]: 'BA10' (10-bit Bayer GRGR/BGBG)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [21]: 'pRAA' (10-bit Bayer RGRG/GBGB Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [22]: 'RG10' (10-bit Bayer RGRG/GBGB)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [23]: 'pBCC' (12-bit Bayer BGBG/GRGR Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [24]: 'BG12' (12-bit Bayer BGBG/GRGR)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [25]: 'pGCC' (12-bit Bayer GBGB/RGRG Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [26]: 'GB12' (12-bit Bayer GBGB/RGRG)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [27]: 'pgCC' (12-bit Bayer GRGR/BGBG Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [28]: 'BA12' (12-bit Bayer GRGR/BGBG)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [29]: 'pRCC' (12-bit Bayer RGRG/GBGB Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [30]: 'RG12' (12-bit Bayer RGRG/GBGB)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [31]: 'pBEE' (14-bit Bayer BGBG/GRGR Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [32]: 'BG14' (14-bit Bayer BGBG/GRGR)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [33]: 'pGEE' (14-bit Bayer GBGB/RGRG Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [34]: 'GB14' (14-bit Bayer GBGB/RGRG)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [35]: 'pgEE' (14-bit Bayer GRGR/BGBG Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [36]: 'GR14' (14-bit Bayer GRGR/BGBG)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [37]: 'pREE' (14-bit Bayer RGRG/GBGB Packed)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [38]: 'RG14' (14-bit Bayer RGRG/GBGB)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [39]: 'GREY' (8-bit Greyscale)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [40]: 'Y10P' (10-bit Greyscale (MIPI Packed))
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [41]: 'Y10 ' (10-bit Greyscale)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [42]: 'Y12P' (12-bit Greyscale (MIPI Packed))
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [43]: 'Y12 ' (12-bit Greyscale)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [44]: 'Y14P' (14-bit Greyscale (MIPI Packed))
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
      [45]: 'Y14 ' (14-bit Greyscale)
              Size: Stepwise 16x16 - 16376x16376 with step 1/1
hyperion-v4l2 --device /dev/video0
hyperion-v4l2:
      Version   : 2.0.14 ((HEAD detached at 2.0.14) (LordGrey-c9a1c88/b109703-1669566414))
      build time: Nov 27 2022 18:59:25
2023-01-28T14:17:18.968 |__| V4L2              : <INFO> Set flipmode to NO_CHANGE
2023-01-28T14:17:18.968 |__| V4L2              : <INFO> Signal threshold set to: {0, 0, 0}
2023-01-28T14:17:18.969 |__| V4L2GRABBER       : <INFO> Connecting to Hyperion host: 127.0.0.1, port: 19400 using service: hyperion
2023-01-28T14:17:18.969 |__| FLATBUFCONN       : <INFO> Connecting to Hyperion: 127.0.0.1:19400
2023-01-28T14:17:19.038 |__| V4L2              : <ERROR> Throws error nr: VIDIOC_STREAMON error code 22, Invalid argument
2023-01-28T14:17:19.038 |__| V4L2              : <INFO> Started
2023-01-28T14:17:19.039 |__| V4L2              : <ERROR> Throws error nr: VIDIOC_DQBUF error code 22, Invalid argument
2023-01-28T14:17:19.067 |__| V4L2              : <INFO> Stopped

libcamera-hello
Preview window unavailable
[1:48:01.868988903] [2396]  INFO Camera camera_manager.cpp:299 libcamera v0.0.3+40-9b860a66
[1:48:01.978480984] [2397]  INFO RPI raspberrypi.cpp:1425 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media3 and ISP device /dev/media0
[1:48:01.979371209] [2396]  INFO Camera camera.cpp:1028 configuring streams: (0) 2304x1296-YUV420
[1:48:01.979639329] [2397]  INFO RPI raspberrypi.cpp:805 Sensor: /base/soc/i2c0mux/i2c@1/imx708@1a - Selected sensor format: 2304x1296-SBGGR10_1X10 - Selected unicam format: 2304x1296-pBAA
#0 (0.00 fps) exp 29981.00 ag 1.66 dg 1.00
#1 (30.01 fps) exp 29981.00 ag 1.66 dg 1.00
#2 (30.01 fps) exp 29981.00 ag 1.64 dg 1.01
#3 (30.00 fps) exp 29981.00 ag 1.64 dg 1.00
#4 (30.02 fps) exp 29981.00 ag 1.65 dg 1.00
#5 (30.01 fps) exp 29981.00 ag 1.65 dg 1.00
#6 (30.01 fps) exp 29981.00 ag 1.65 dg 1.00
#7 (30.01 fps) exp 29981.00 ag 1.66 dg 1.00
#8 (30.01 fps) exp 29981.00 ag 1.66 dg 1.00
#9 (30.01 fps) exp 29981.00 ag 1.66 dg 1.00
#10 (30.01 fps) exp 29981.00 ag 1.66 dg 1.00
...

System

Hyperion Server:

  • Build: (HEAD detached at 2.0.14) (LordGrey-c9a1c88/b109703-1669566414)
  • Build time: Nov 27 2022 18:59:25
  • Git Remote: https://github.com/hyperion-project/hyperion.ng
  • Version: 2.0.14
  • UI Lang: en (BrowserLang: de-DE)
  • UI Access: expert
  • Avail Screen Cap.: dispmanx,framebuffer,qt
  • Avail Video Cap.: v4l2
  • Avail Services: boblight,cec,effectengine,forwarder,flatbuffer,protobuffer,mDNS,SSDP,borderdetection
  • Config path: /home/pi/.hyperion
  • Database: read/write

Hyperion Server OS:

  • Distribution: Debian GNU/Linux 11 (bullseye)
  • Architecture: arm64
  • CPU Type: Raspberry Pi 4 Model B Rev 1.4
  • CPU Revision: c03114
  • CPU Hardware: BCM2835
  • Kernel: linux (5.15.84-v8+ (WS: 64))
  • Root/Admin: false
  • Qt Version: 5.15.2
  • Python Version: 3.9.2
  • Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 OPR/94.0.0.0
@Lord-Grey
Copy link
Collaborator

Hi

did you also test with a lower resolution or alternate pixelformat, e.g. MJPEG?
What does the UI present for selection?
You might need to switch settings level to „Expert“ and to see all options.

@Bigfoot30
Copy link
Author

Bigfoot30 commented Jan 28, 2023

Hi

also tested with lover resolution
formats
reslolution

Testet multiple combinations of resolution/pixelformat and framerate. Every time the same result.

In the "Device Resolution" is only one resolution at a time.

@tpmodding
Copy link
Collaborator

Did you test if the camera works in general?

@Bigfoot30
Copy link
Author

Bigfoot30 commented Jan 29, 2023

Yes i get a picture with the libcam tools and also the video is working on the os level

@Paulchen-Panther
Copy link
Member

As per the blog post for the release of Raspberry Pi OS Bullseye, the default camera stack is now libcamera. Please follow these instructions to re-enable the compatible v4l2 mode.

@Bigfoot30
Copy link
Author

Hi @Paulchen-Panther

no difference with this config

pi@hyperion:~ $ 2023-02-18T18:19:40.926 || V4L2 : Throws error nr: VIDIOC_STREAMON error code 22, Invalid argument
2023-02-18T18:19:40.929 |
| V4L2 : Throws error nr: VIDIOC_DQBUF error code 22, Invalid argument
2023-02-18T18:19:52.664 || V4L2 : Throws error nr: VIDIOC_STREAMON error code 22, Invalid argument
2023-02-18T18:19:52.665 |
| V4L2 : Throws error nr: VIDIOC_DQBUF error code 22, Invalid argument
2023-02-18T18:20:18.031 || V4L2 : Throws error nr: VIDIOC_STREAMON error code 22, Invalid argument
2023-02-18T18:20:18.032 |
| V4L2 : Throws error nr: VIDIOC_DQBUF error code 22, Invalid argument

image

I dont think that the V3 Camera imx-708 will work in legacy mode. It only get driver support with the newest updates.

@Paulchen-Panther Paulchen-Panther added needs investigation Further testing is required and removed Waiting for Input labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Further testing is required
Projects
None yet
Development

No branches or pull requests

4 participants