* soc_camera, v4l2 api, gstreamer: setting errno ?
@ 2009-11-10 16:13 Philipp Wiesner
2009-11-10 20:27 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Wiesner @ 2009-11-10 16:13 UTC (permalink / raw)
To: linux-media
I'm having some trouble using gstreamer with soc_camera and am a
modified tw9910 driver. I had difficulties compiling the latest sources
for my target so I'm using old kernel and gstreamer versions. But my
question may still be valid, because the problem doesn't seem to be fixed
and this may be interesting for driver programming in the future.
The part I'm suspecting is
if (v4l2_ioctl (fd, VIDIOC_S_FMT, &format) < 0) {
if (errno != EINVAL)
goto set_fmt_failed;
[v4l2src_calls.c,1223]
According to V4L2 api documentation drivers should set errno, but all drivers I've seen in the soc_camera framework (including soc_camera.c)
only 'return -errno'. Should device drivers (like tw9910) set errno or
should soc_camera use return values and set errno? Is it correct that
none of them happens at the moment?
--
DSL-Preisknaller: DSL Komplettpakete von GMX schon für
16,99 Euro mtl.!* Hier klicken: http://portal.gmx.net/de/go/dsl02
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: soc_camera, v4l2 api, gstreamer: setting errno ?
2009-11-10 16:13 soc_camera, v4l2 api, gstreamer: setting errno ? Philipp Wiesner
@ 2009-11-10 20:27 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2009-11-10 20:27 UTC (permalink / raw)
To: Philipp Wiesner; +Cc: linux-media
Hi Philipp,
On Tuesday 10 November 2009 17:13:18 Philipp Wiesner wrote:
> I'm having some trouble using gstreamer with soc_camera and am a
> modified tw9910 driver. I had difficulties compiling the latest sources
> for my target so I'm using old kernel and gstreamer versions. But my
> question may still be valid, because the problem doesn't seem to be fixed
> and this may be interesting for driver programming in the future.
>
> The part I'm suspecting is
>
> if (v4l2_ioctl (fd, VIDIOC_S_FMT, &format) < 0) {
> if (errno != EINVAL)
> goto set_fmt_failed;
>
> [v4l2src_calls.c,1223]
> According to V4L2 api documentation drivers should set errno, but all
> drivers I've seen in the soc_camera framework (including soc_camera.c)
> only 'return -errno'. Should device drivers (like tw9910) set errno or
> should soc_camera use return values and set errno? Is it correct that none
> of them happens at the moment?
errno is a userspace variable. Kernel drivers return a negative error code
which is stored into errno by the ioctl() function in glibc.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-10 20:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10 16:13 soc_camera, v4l2 api, gstreamer: setting errno ? Philipp Wiesner
2009-11-10 20:27 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox