All of lore.kernel.org
 help / color / mirror / Atom feed
* Gstreamer / V4L support for MIPI CSI transmitter device
@ 2019-04-09 15:39 Matt Redfearn
  0 siblings, 0 replies; only message in thread
From: Matt Redfearn @ 2019-04-09 15:39 UTC (permalink / raw)
  To: linux-media, gstreamer-devel

Hi,

I'm writing a Linux driver for a MIPI CSI transmitter device. This 
hardware allows the Linux system to transmit a MIPI CSI stream to a 
suitable MIPI CSI receiver i.e. Linux behaves like a camera.
So far I have added a V4L output driver for the hardware and I am able 
to transmit a video stream. To do this I am using gstreamer with v4l2sink:

gst-launch-1.0 videotestsrc  ! 
video/x-bayer,width=640,height=480,format=bggr ! v4l2sink device=/dev/video0

The issue is that the MIPI CSI transmitter needs to know the video 
timings (pixelclock & blanking periods) that it should drive to the MIPI 
CSI bus. For now, I just hardcoded 640x480@60fps numbers into the driver.
Ideally, I think I need to add support for DV_TIMINGS ioctls such that 
userspace can enumerate the possible video timings (probably just a 
subset of v4l2_dv_timings_presets)

I would then need to add support to Gstreamer's v4l2sink to get the 
dv_timings, if supported, pick one compatible with the video caps, and 
set it, along with the pixel format.

Is this the best approach? Are there any gotchas in this or other things 
I should consider doing instead? One possibility is that I should 
instead make the driver in the DRM subsystem. I didn't initially do that 
do to missing support for the more exotic pixel formats that MIPI CSI 
has e.g. raw bayer. But of course, DRM would give me much easier access 
to video timings...

Thanks for any advice.
Matt

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-09 15:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 15:39 Gstreamer / V4L support for MIPI CSI transmitter device Matt Redfearn

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.