Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6de9f60 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] vivid: fix compliance error



If vivid is loaded with the no_error_inj=1 option, then v4l2-compliance will
fail for the video and vbi output nodes because the vivid control class has no
controls.

Don't add the control class for video and vbi output if no_error_inj is true.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent ba463988
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1340,10 +1340,12 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap,
	v4l2_ctrl_handler_init(hdl_vid_cap, 55);
	v4l2_ctrl_handler_init(hdl_vid_cap, 55);
	v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_class, NULL);
	v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_class, NULL);
	v4l2_ctrl_handler_init(hdl_vid_out, 26);
	v4l2_ctrl_handler_init(hdl_vid_out, 26);
	if (!no_error_inj)
		v4l2_ctrl_new_custom(hdl_vid_out, &vivid_ctrl_class, NULL);
		v4l2_ctrl_new_custom(hdl_vid_out, &vivid_ctrl_class, NULL);
	v4l2_ctrl_handler_init(hdl_vbi_cap, 21);
	v4l2_ctrl_handler_init(hdl_vbi_cap, 21);
	v4l2_ctrl_new_custom(hdl_vbi_cap, &vivid_ctrl_class, NULL);
	v4l2_ctrl_new_custom(hdl_vbi_cap, &vivid_ctrl_class, NULL);
	v4l2_ctrl_handler_init(hdl_vbi_out, 19);
	v4l2_ctrl_handler_init(hdl_vbi_out, 19);
	if (!no_error_inj)
		v4l2_ctrl_new_custom(hdl_vbi_out, &vivid_ctrl_class, NULL);
		v4l2_ctrl_new_custom(hdl_vbi_out, &vivid_ctrl_class, NULL);
	v4l2_ctrl_handler_init(hdl_radio_rx, 17);
	v4l2_ctrl_handler_init(hdl_radio_rx, 17);
	v4l2_ctrl_new_custom(hdl_radio_rx, &vivid_ctrl_class, NULL);
	v4l2_ctrl_new_custom(hdl_radio_rx, &vivid_ctrl_class, NULL);