aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid/vivid-ctrls.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/vivid/vivid-ctrls.c')
-rw-r--r--drivers/media/platform/vivid/vivid-ctrls.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/platform/vivid/vivid-ctrls.c b/drivers/media/platform/vivid/vivid-ctrls.c
index 4ab7c4b6aaca..089ee4d12b4b 100644
--- a/drivers/media/platform/vivid/vivid-ctrls.c
+++ b/drivers/media/platform/vivid/vivid-ctrls.c
@@ -116,6 +116,7 @@ static int vivid_user_gen_s_ctrl(struct v4l2_ctrl *ctrl)
clear_bit(V4L2_FL_REGISTERED, &dev->vbi_cap_dev.flags);
clear_bit(V4L2_FL_REGISTERED, &dev->vbi_out_dev.flags);
clear_bit(V4L2_FL_REGISTERED, &dev->sdr_cap_dev.flags);
+ clear_bit(V4L2_FL_REGISTERED, &dev->sdr_out_dev.flags);
clear_bit(V4L2_FL_REGISTERED, &dev->radio_rx_dev.flags);
clear_bit(V4L2_FL_REGISTERED, &dev->radio_tx_dev.flags);
break;
@@ -983,6 +984,8 @@ static int vivid_streaming_s_ctrl(struct v4l2_ctrl *ctrl)
vb2_queue_error(&dev->vb_vbi_out_q);
if (vb2_start_streaming_called(&dev->vb_sdr_cap_q))
vb2_queue_error(&dev->vb_sdr_cap_q);
+ if (vb2_start_streaming_called(&dev->vb_sdr_out_q))
+ vb2_queue_error(&dev->vb_sdr_out_q);
break;
case VIVID_CID_SEQ_WRAP:
dev->seq_wrap = ctrl->val;
@@ -1331,6 +1334,7 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap,
struct v4l2_ctrl_handler *hdl_radio_rx = &dev->ctrl_hdl_radio_rx;
struct v4l2_ctrl_handler *hdl_radio_tx = &dev->ctrl_hdl_radio_tx;
struct v4l2_ctrl_handler *hdl_sdr_cap = &dev->ctrl_hdl_sdr_cap;
+ struct v4l2_ctrl_handler *hdl_sdr_out = &dev->ctrl_hdl_sdr_out;
struct v4l2_ctrl_config vivid_ctrl_dv_timings = {
.ops = &vivid_vid_cap_ctrl_ops,
.id = VIVID_CID_DV_TIMINGS,
@@ -1367,6 +1371,8 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap,
v4l2_ctrl_new_custom(hdl_radio_tx, &vivid_ctrl_class, NULL);
v4l2_ctrl_handler_init(hdl_sdr_cap, 19);
v4l2_ctrl_new_custom(hdl_sdr_cap, &vivid_ctrl_class, NULL);
+ v4l2_ctrl_handler_init(hdl_sdr_out, 18);
+ v4l2_ctrl_new_custom(hdl_sdr_out, &vivid_ctrl_class, NULL);
/* User Controls */
dev->volume = v4l2_ctrl_new_std(hdl_user_aud, NULL,
@@ -1611,6 +1617,8 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap,
return hdl_streaming->error;
if (hdl_sdr_cap->error)
return hdl_sdr_cap->error;
+ if (hdl_sdr_out->error)
+ return hdl_sdr_out->error;
if (hdl_loop_cap->error)
return hdl_loop_cap->error;
@@ -1673,6 +1681,13 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap,
return hdl_sdr_cap->error;
dev->sdr_cap_dev.ctrl_handler = hdl_sdr_cap;
}
+ if (dev->has_sdr_out) {
+ v4l2_ctrl_add_handler(hdl_sdr_out, hdl_user_gen, NULL);
+ v4l2_ctrl_add_handler(hdl_sdr_out, hdl_streaming, NULL);
+ if (hdl_sdr_out->error)
+ return hdl_sdr_out->error;
+ dev->sdr_out_dev.ctrl_handler = hdl_sdr_out;
+ }
return 0;
}
@@ -1685,6 +1700,7 @@ void vivid_free_controls(struct vivid_dev *dev)
v4l2_ctrl_handler_free(&dev->ctrl_hdl_radio_rx);
v4l2_ctrl_handler_free(&dev->ctrl_hdl_radio_tx);
v4l2_ctrl_handler_free(&dev->ctrl_hdl_sdr_cap);
+ v4l2_ctrl_handler_free(&dev->ctrl_hdl_sdr_out);
v4l2_ctrl_handler_free(&dev->ctrl_hdl_user_gen);
v4l2_ctrl_handler_free(&dev->ctrl_hdl_user_vid);
v4l2_ctrl_handler_free(&dev->ctrl_hdl_user_aud);

Privacy Policy