[v3,3/4] media-ctl: propagate frame interval
Commit Message
Same as the media bus format, the frame interval should be propagated
from output pads to connected entities' input pads.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
utils/media-ctl/libv4l2subdev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
@@ -694,8 +694,8 @@ static int v4l2_subdev_parse_setup_format(struct media_device *media,
return ret;
- /* If the pad is an output pad, automatically set the same format on
- * the remote subdev input pads, if any.
+ /* If the pad is an output pad, automatically set the same format and
+ * frame interval on the remote subdev input pads, if any.
*/
if (pad->flags & MEDIA_PAD_FL_SOURCE) {
for (i = 0; i < pad->entity->num_links; ++i) {
@@ -709,6 +709,10 @@ static int v4l2_subdev_parse_setup_format(struct media_device *media,
link->sink->entity->info.type == MEDIA_ENT_T_V4L2_SUBDEV) {
remote_format = format;
set_format(link->sink, &remote_format);
+
+ ret = set_frame_interval(link->sink, &interval);
+ if (ret < 0)
+ return ret;
}
}
}