Re: [PATCH] [media] v4l2-subdev: return -EPIPE instead of -EINVAL in link validate default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux