All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Implementing input IOCTLs for imx capture
@ 2021-05-31 17:55 Fabio Estevam
  2021-05-31 18:22 ` Ian Arkver
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2021-05-31 17:55 UTC (permalink / raw
  To: Philipp Zabel
  Cc: linux-media, Tim Harvey, Schrempf Frieder, Rui Miguel Silva,
	Laurent Pinchart, Hans Verkuil

Hi,

On an imx6dl based board with an ADV7280, I can successfully capture
from an analog camera using the following Gstreamer pipeline:

gst-launch-1.0 v4l2src device=/dev/video2 ! kmssink

The next goal is to integrate it within the Qt multimedia application:
https://github.com/qt/qtmultimedia/blob/5.15.2/src/gsttools/qgstutils.cpp#L631-L687

The Qt app uses the VIDIOC_ENUMINPUT and VIDIOC_S_INPUT ioctl's, but
as these are not implemented by the imx-media-capture driver yet, it
causes the camera to not be detected.

Does anyone have any suggestions as to how to add support for
.vidioc_enum_input, .vidioc_g_input and .vidioc_s_input in
drivers/staging/media/imx/imx-media-capture.c ?

I tried to look at how the other drivers implement these hooks, but my
attempts to add support for them to the imx capture driver didn't
work.

Thanks,

Fabio Estevam

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

* Re: Implementing input IOCTLs for imx capture
  2021-05-31 17:55 Implementing input IOCTLs for imx capture Fabio Estevam
@ 2021-05-31 18:22 ` Ian Arkver
  2021-05-31 19:53   ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Arkver @ 2021-05-31 18:22 UTC (permalink / raw
  To: Fabio Estevam, Philipp Zabel
  Cc: linux-media, Tim Harvey, Schrempf Frieder, Rui Miguel Silva,
	Laurent Pinchart, Hans Verkuil

On 31/05/2021 18:55, Fabio Estevam wrote:
> Hi,
> 
> On an imx6dl based board with an ADV7280, I can successfully capture
> from an analog camera using the following Gstreamer pipeline:
> 
> gst-launch-1.0 v4l2src device=/dev/video2 ! kmssink
> 
> The next goal is to integrate it within the Qt multimedia application:
> https://github.com/qt/qtmultimedia/blob/5.15.2/src/gsttools/qgstutils.cpp#L631-L687
> 
> The Qt app uses the VIDIOC_ENUMINPUT and VIDIOC_S_INPUT ioctl's, but
> as these are not implemented by the imx-media-capture driver yet, it
> causes the camera to not be detected.

Seems to me (naively, without looking into it in depth) that the v4l2 
framework default should be to enumerate a single input, return that 
input with g_input and succeed in setting that input with s_input.

Maybe there's a reason why it doesn't?

Regards,
Ian

> 
> Does anyone have any suggestions as to how to add support for
> .vidioc_enum_input, .vidioc_g_input and .vidioc_s_input in
> drivers/staging/media/imx/imx-media-capture.c ?
> 
> I tried to look at how the other drivers implement these hooks, but my
> attempts to add support for them to the imx capture driver didn't
> work.
> 
> Thanks,
> 
> Fabio Estevam
> 

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

* Re: Implementing input IOCTLs for imx capture
  2021-05-31 18:22 ` Ian Arkver
@ 2021-05-31 19:53   ` Laurent Pinchart
  0 siblings, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2021-05-31 19:53 UTC (permalink / raw
  To: Ian Arkver
  Cc: Fabio Estevam, Philipp Zabel, linux-media, Tim Harvey,
	Schrempf Frieder, Rui Miguel Silva, Hans Verkuil

Hello,

On Mon, May 31, 2021 at 07:22:12PM +0100, Ian Arkver wrote:
> On 31/05/2021 18:55, Fabio Estevam wrote:
> > Hi,
> > 
> > On an imx6dl based board with an ADV7280, I can successfully capture
> > from an analog camera using the following Gstreamer pipeline:
> > 
> > gst-launch-1.0 v4l2src device=/dev/video2 ! kmssink
> > 
> > The next goal is to integrate it within the Qt multimedia application:
> > https://github.com/qt/qtmultimedia/blob/5.15.2/src/gsttools/qgstutils.cpp#L631-L687
> > 
> > The Qt app uses the VIDIOC_ENUMINPUT and VIDIOC_S_INPUT ioctl's, but
> > as these are not implemented by the imx-media-capture driver yet, it
> > causes the camera to not be detected.

I'd argue this should be fixed in Qt though :-) Those ioctls really
don't make sense for the IPU driver.

> Seems to me (naively, without looking into it in depth) that the v4l2 
> framework default should be to enumerate a single input, return that 
> input with g_input and succeed in setting that input with s_input.

This is done in

commit f645e6256bd1b12523b759fcc610861fb21c24c7
Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Date:   Tue Apr 21 15:57:38 2020 +0200

    media: v4l2-dev/ioctl: Add V4L2_CAP_IO_MC

but only when V4L2_CAP_IO_MC is set.

> Maybe there's a reason why it doesn't?
> 
> > Does anyone have any suggestions as to how to add support for
> > .vidioc_enum_input, .vidioc_g_input and .vidioc_s_input in
> > drivers/staging/media/imx/imx-media-capture.c ?
> > 
> > I tried to look at how the other drivers implement these hooks, but my
> > attempts to add support for them to the imx capture driver didn't
> > work.

-- 
Regards,

Laurent Pinchart

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

end of thread, other threads:[~2021-05-31 19:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-31 17:55 Implementing input IOCTLs for imx capture Fabio Estevam
2021-05-31 18:22 ` Ian Arkver
2021-05-31 19:53   ` Laurent Pinchart

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.