hello
for zoran, I need to write a jpeg header filter, does it already exists one driver doing this ?
hi
i have been trying to use the linux uvc gadget, and for some reason most dequeued buffers have their ERROR flag set
it appears that the DQBUF ioctl can return buffers before the data has been sent to usb
so i wonder, how do i limit the frame rate at which my frames are output?
(i am currently synthesizing images, so i need to limit the frame rate on the sender site.)
if i am asking in the wrong channel, can you point me somewhere instead?
while the /dev/videoN fd is writable [select()], the code will do { ioctl(VIDIOC_DQBUF), fill_buffer(), ioctl(VIDIOC_QBUF) }. ignoring the ERROR flag causes a frame rate of 200~4000 fps (for a 30 fps mode). the O_NONBLOCK flag has no effect, DQBUF does not block in either case.
simply adding a delay before doing VIDIOC_QBUF sometimes causes the kernel to panic; i am not sure why
i am a bit out of ideas here. does someone have knowledge how to use the uvc gadget?
i have seen this behaviour on kernels 4.14, 4.19 and 5.4 - i did not see any significant changes to linux-master when i last checked
does anyone have any ideas?
svenska: it's the right channel. I haven't been able to do much work on UVC gadget for a few years though, so I can't really help at this point :-S
it's on my long todo list to revive this project, and there has been a couple of occasions when I thought it would happen, but in the end it didn't
kbingham: ^^
Do you have any idea how the gadget is to be used correctly?
By the way, your reference implementation (at ideasonboard) can be viewed online, but I can't seem to clone the repository...
(I mean this link: https://git.ideasonboard.org/uvc-gadget.git but don't know if it current.)
pinchartl: Sorry if I am annoying.
can you clone git://git.ideasonboard.org/uvc-gadget.git ?
I need to move that server to cgit, gitweb doesn't work well with http it seems
you're not annoying :-)
I just wish I could dedicate more time to UVC gadget
Yes, I can clone that one correctly.
I used to have a gitweb setup, but the web server would redirect depending on whether the user agent was "git" or not.
Hmm, I changed the setup a few years ago to redirect based on the link itself.
svenska, what platform are you running on ?
Android.
kbingham: Which is why I can't easily change the kernel a lot. I can chose to use the uvc-gadget as-is, or I can aim for a complete userspace implementation (which seems like a waste of time and effort).
svenska: why can't you change the kernel ? because it's a stock Android device, not a device you are developing ?
(oletko ruotsalainen ? ;-))
pinchartl: it is a vendor kernel. the usb gadget routines are unchanged, though.
google's long-term strategy seems to center around a common kernel for all devices
(or at least a common kernel for all devices based on a platform).
so changes to kernel code are restricted. changes to modules are fine though.
so i can't test with kernel 5.12, for example. :)
right
is UVC gadget compiled as a module in the Android kernel ?
depends on the device, i guess
i've seen some defconfigs with UAC2 enabled, others with UAC2 disabled, and none with UVC enabled by default
generally, the UVC gadget seems to be disabled
jo tuxers
montjoie: i think there is one.
somewhere.
jpeg_parse_frame_header at v4l2_jpeg.c ?
sorry, v4l2-jpeg.c i mean
ezequielg: thanks I will check it
it seems there are no user in kernel of it:)
does I have the right to modify a buffer in vb2_ops.buf_prepare ?
does anyone actually use the uvc gadget?