From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Helen Fornazier <helen.fornazier@gmail.com>,
linux-media@vger.kernel.org, mchehab@osg.samsung.com,
laurent.pinchart@ideasonboard.com, hans.verkuil@cisco.com,
s.nawrocki@samsung.com
Subject: Re: [PATCH] [media] v4l2-subdev: return -EPIPE instead of -EINVAL in link validate default
Date: Mon, 29 Jun 2015 10:23:34 +0300 [thread overview]
Message-ID: <5590F276.40909@linux.intel.com> (raw)
In-Reply-To: <1435538742-32447-1-git-send-email-helen.fornazier@gmail.com>
Hi Helen,
Helen Fornazier wrote:
> According to the V4L2 API, the VIDIOC_STREAMON ioctl should return EPIPE
> when the pipeline configuration is invalid.
>
> As the .vidioc_streamon in the v4l2_ioctl_ops usually forwards the error
> caused by the v4l2_subdev_link_validate_default (if it is in use), it
> should return -EPIPE if it detects a format mismatch in the pipeline
> configuration
Only link configuration errors have yielded -EPIPE so far, sub-device
format configuration error has returned -INVAL instead as you noticed.
There are not many sources of -EINVAL while enabling streaming and all
others are directly caused by the application; I lean towards thinking
the code is good as it was. The documentation could be improved though.
It may not be clear which error codes could be caused by different
conditions.
The debug level messages from media module
(drivers/media/media-entity.c) do provide more information if needed,
albeit this certainly is not an application interface.
I wonder what others think.
--
Kind regards,
Sakari Ailus
sakari.ailus@linux.intel.com
next prev parent reply other threads:[~2015-06-29 7:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 0:45 [PATCH] [media] v4l2-subdev: return -EPIPE instead of -EINVAL in link validate default Helen Fornazier
2015-06-29 7:23 ` Sakari Ailus [this message]
2015-06-29 8:10 ` Laurent Pinchart
2015-06-30 9:19 ` Sakari Ailus
2015-06-30 19:26 ` Helen Fornazier
2015-07-12 17:11 ` Helen Fornazier
[not found] ` <CAPW4XYYETmTK8MfZd941B0rb1DWODH=ZqAJu=FdmkVFrO_=dXQ@mail.gmail.com>
2015-07-13 8:03 ` Sakari Ailus
2015-07-13 9:16 ` Laurent Pinchart
2015-07-14 14:19 ` Hans Verkuil
2015-07-14 14:32 ` Laurent Pinchart
2015-08-07 16:55 ` Helen Fornazier
2015-08-10 14:07 ` Hans Verkuil
2015-08-13 12:23 ` Sakari Ailus
2015-08-13 14:09 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5590F276.40909@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=hans.verkuil@cisco.com \
--cc=helen.fornazier@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=s.nawrocki@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox