Message ID | 1dd09050-40ca-4c5b-b985-819731140388@xs4all.nl |
---|---|
State | New |
Headers | show |
Series | media: vicodec: add V4L2_CID_MIN_BUFFERS_FOR_* controls | expand |
diff --git a/drivers/media/test-drivers/vicodec/vicodec-core.c b/drivers/media/test-drivers/vicodec/vicodec-core.c index 00c84a06f343..50c46b00d2d8 100644 --- a/drivers/media/test-drivers/vicodec/vicodec-core.c +++ b/drivers/media/test-drivers/vicodec/vicodec-core.c @@ -1852,6 +1852,11 @@ static int vicodec_open(struct file *file) 1, 31, 1, 20); v4l2_ctrl_new_std(hdl, &vicodec_ctrl_ops, V4L2_CID_FWHT_P_FRAME_QP, 1, 31, 1, 20); + if (!ctx->is_stateless) + v4l2_ctrl_new_std(hdl, &vicodec_ctrl_ops, ctx->is_enc ? + V4L2_CID_MIN_BUFFERS_FOR_OUTPUT : + V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, + 1, 32, 1, 2); if (ctx->is_enc) v4l2_ctrl_new_std(hdl, &vicodec_ctrl_ops, V4L2_CID_MIN_BUFFERS_FOR_OUTPUT, 1, 1, 1, 1);
Stateful codecs must support the V4L2_CID_MIN_BUFFERS_FOR_OUTPUT and V4L2_CID_MIN_BUFFERS_FOR_CAPTURE controls. The vicodec driver was missing support for these controls. Add them. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> --- drivers/media/test-drivers/vicodec/vicodec-core.c | 5 +++++ 1 file changed, 5 insertions(+)