Skip to content

USB audio and video class gadget drivers

Laurent Pinchart linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3USB gadget: audio class function driverdrivers/usb/gadget/f_uac.c drivers/usb/gadget/uac.h drivers/usb/gadget/uac_alsa.c +1 more+1339 -01 reply
2/3USB gadget: video class function driverdrivers/usb/gadget/f_uvc.c drivers/usb/gadget/f_uvc.h drivers/usb/gadget/uvc.h +5 more+3621 -00 replies
3/3USB gadget: Webcam Audio/Video devicedrivers/usb/gadget/Kconfig drivers/usb/gadget/Makefile drivers/usb/gadget/webcam.c+430 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] USB audio and video class gadget drivers

Hi everybody,

here are two new gadget function drivers for USB audio class and USB video class as well as a webcam gadget driver that combines both audio and video. All those drivers are work in progress (though not progressing much for the moment, as I'm busy with other development) and should probably not be applied before (at least) v2, but can still be useful as-is.

The code was developed and tested on TI DM365 hardware using a MUSB controller. I unfortunately don't have access to the hardware anymore for the time being, but I got an OMAP3-based platform in the meantime. If spare time permits I'll test the driver on the OMAP3 platform.

The audio class driver is based on Bryan Wu's work. It requires the "USB
gadget: Handle endpoint requests at the function level" patch that I've posted on the list. Only the microphone use case is supported at the moment. If anyone wants to implement speaker support patches are welcome :-)

The video class driver reuses some of the UVC host driver code, mostly for video buffers queue management. It currently has its own copy of the code, so there's room for improvement there.

If you look closely you will notice that the UVC driver uses the V4L2 device node to forward events (connection/disconnection, UVC request arrival, ...) to userspace. I will soon post an RFC to the linux-media list to document the interface.

The webcam driver combines a UAC microphone (at 16kHz) and a UVC camera (at 360p and 720p in YUYV and MJPEG).

Comments and ideas are welcome.

Signature · 3 lines
Best regards,

Laurent Pinchart