v7.0-rc1 commit b70886ff5833 ("media: vb2: drop wait_prepare/finish
callbacks") has removed wait_prepare/wait_finish fields from struct
vb2_ops, which fails the build with following errors:
CC [M] fthd_v4l2.o
fthd_v4l2.c:306:10: error: ‘struct vb2_ops’ has no member named ‘wait_prepare’; did you mean ‘buf_prepare’?
306 | .wait_prepare = vb2_ops_wait_prepare,
| ^~~~~~~~~~~~
| buf_prepare
fthd_v4l2.c:306:35: error: ‘vb2_ops_wait_prepare’ undeclared here (not in a function)
306 | .wait_prepare = vb2_ops_wait_prepare,
| ^~~~~~~~~~~~~~~~~~~~
fthd_v4l2.c:307:10: error: ‘struct vb2_ops’ has no member named ‘wait_finish’
307 | .wait_finish = vb2_ops_wait_finish,
| ^~~~~~~~~~~
fthd_v4l2.c:307:35: error: ‘vb2_ops_wait_finish’ undeclared here (not in a function)
307 | .wait_finish = vb2_ops_wait_finish,
| ^~~~~~~~~~~~~~~~~~~
fthd_v4l2.c:307:35: warning: excess elements in struct initializer
fthd_v4l2.c:307:35: note: (near initialization for ‘vb2_queue_ops’)
make[3]: *** [/usr/src/linux-headers-7.0.0-3-generic/scripts/Makefile.build:289: fthd_v4l2.o] Error 1
Closes: #319
Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
Skype and other applications don't support stepwise frame sizes and
frame intervals. Instead they try to handle them as discrete devices
which fails. It seems they will never fix this so instead we reduce our
functionality to just support the discrete type.
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
In kernel 5.4 I otherwise get this warning
WARNING: CPU: 1 PID: 451 at drivers/media/v4l2-core/v4l2-dev.c:863 __video_register_device+0x64b/0xe90 [videodev]
The code there is:
/* the device_caps field MUST be set for all but subdevs */
if (WARN_ON(type != VFL_TYPE_SUBDEV && !vdev->device_caps))
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
V4L2_CAP_TIMERPERFRAME is a streaming paramater and must not go into the
device caps. This accidentally exposed mplane support which we don't
have yet.
In the current implementation it returns -1 on error, an offset value
otherwise. Change it to return a negative error value, and add a pointer
to an u32 for receiving the entry offset as an extra argument.
This makes the ugly (u32)-1 return code comparision obsolete, and we
can return a more detailed error code like EAGAIN if all ringbuffer slots
are busy.