All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/7] usb: gadget: uvc: use configfs entries for negotiation and v4l2 VIDIOCS
@ 2021-12-05 22:57 Michael Grzeschik
  2021-12-05 22:57 ` [PATCH v4 1/7] media: v4l: move helper functions for fractions from uvc to v4l2-common Michael Grzeschik
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Michael Grzeschik @ 2021-12-05 22:57 UTC (permalink / raw)
  To: linux-usb; +Cc: balbi, laurent.pinchart, paul.elder, kernel

This series improves the uvc video gadget by parsing the configfs
entries. With the configfs data, the driver now is able to negotiate the
format with the usb host in the kernel and also exports the supported
frames/formats/intervals via the v4l2 VIDIOC interface.

The uvc userspace stack is also under development. One example is an generic
v4l2uvcsink gstreamer elemnt, which is currently under duiscussion. [1]

[1] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304

With the libusbgx library [1] used by the gadget-tool [2] it is now also
possible to fully describe the configfs layout of the uvc gadget with scheme
files.

[2] https://github.com/linux-usb-gadgets/libusbgx/pull/61/commits/53231c76f9d512f59fdc23b65cd5c46b7fb09eb4

[3] https://github.com/linux-usb-gadgets/gt/tree/master/examples/systemd

The bigger picture of these patches is to provide a more versatile interface to
the uvc gadget. The goal is to simply start a uvc-gadget with the following
commands:

$ gt load uvc.scheme
$ gst-launch v4l2src ! v4l2uvcsink

--

v1: https://lore.kernel.org/linux-usb/20210530222239.8793-1-m.grzeschik@pengutronix.de/
v2: https://lore.kernel.org/linux-usb/20211117004432.3763306-1-m.grzeschik@pengutronix.de/
v3: https://lore.kernel.org/linux-usb/20211117122435.2409362-1-m.grzeschik@pengutronix.de/

Regards,
Michael

Michael Grzeschik (7):
  media: v4l: move helper functions for fractions from uvc to
    v4l2-common
  media: uvcvideo: move uvc_format_desc to common header
  usb: gadget: uvc: prevent index variables to start from 0
  usb: gadget: uvc: move structs to common header
  usb: gadget: uvc: track frames in format entries
  usb: gadget: uvc: add VIDIOC function
  usb: gadget: uvc: add format/frame handling code

 drivers/media/usb/uvc/uvc_ctrl.c           |   1 +
 drivers/media/usb/uvc/uvc_driver.c         | 281 +-------------
 drivers/media/usb/uvc/uvc_v4l2.c           |  14 +-
 drivers/media/usb/uvc/uvcvideo.h           | 144 --------
 drivers/media/v4l2-core/v4l2-common.c      |  82 +++++
 drivers/usb/gadget/function/f_uvc.c        | 262 +++++++++++++-
 drivers/usb/gadget/function/uvc.h          |  38 +-
 drivers/usb/gadget/function/uvc_configfs.c | 148 ++------
 drivers/usb/gadget/function/uvc_configfs.h | 120 +++++-
 drivers/usb/gadget/function/uvc_queue.c    |   3 +-
 drivers/usb/gadget/function/uvc_v4l2.c     | 403 ++++++++++++++++++---
 drivers/usb/gadget/function/uvc_video.c    |  71 +++-
 include/media/v4l2-common.h                |   4 +
 include/media/v4l2-uvc.h                   | 351 ++++++++++++++++++
 14 files changed, 1322 insertions(+), 600 deletions(-)
 create mode 100644 include/media/v4l2-uvc.h

-- 
2.30.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-12-06 14:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05 22:57 [PATCH v4 0/7] usb: gadget: uvc: use configfs entries for negotiation and v4l2 VIDIOCS Michael Grzeschik
2021-12-05 22:57 ` [PATCH v4 1/7] media: v4l: move helper functions for fractions from uvc to v4l2-common Michael Grzeschik
2021-12-05 22:57 ` [PATCH v4 2/7] media: uvcvideo: move uvc_format_desc to common header Michael Grzeschik
2021-12-05 22:57 ` [PATCH v4 3/7] usb: gadget: uvc: prevent index variables to start from 0 Michael Grzeschik
2021-12-05 22:58 ` [PATCH v4 4/7] usb: gadget: uvc: move structs to common header Michael Grzeschik
2021-12-05 22:58 ` [PATCH v4 5/7] usb: gadget: uvc: track frames in format entries Michael Grzeschik
2021-12-05 22:58 ` [PATCH v4 6/7] usb: gadget: uvc: add VIDIOC function Michael Grzeschik
2021-12-06 11:31   ` kernel test robot
2021-12-06 11:31     ` kernel test robot
2021-12-05 22:58 ` [PATCH v4 7/7] usb: gadget: uvc: add format/frame handling code Michael Grzeschik
2021-12-06 10:30   ` kernel test robot
2021-12-06 10:30     ` kernel test robot
2021-12-06 14:04   ` kernel test robot
2021-12-06 14:04     ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.