aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-06-29 07:56:22 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:53:34 -0400
commit60c0732244164f14e376cfae493dba368f761514 (patch)
tree104e04777d3239dabb1c4dba20ec17a7b1089c86 /drivers/media
parent3ad57c33846d884cfeed770238b27f3dcf3742f1 (diff)
[media] v4l2-ctrls.c: add support for V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK
Normally no control events will go to the filehandle that called the VIDIOC_S_CTRL/VIDIOC_S_EXT_CTRLS ioctls. This is to prevent a feedback loop. This can now be overridden by setting the new V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK flag. Based on suggestions from Mauro Carvalho Chehab <mchehab@redhat.com> and Laurent Pinchart <laurent.pinchart@ideasonboard.com>. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/v4l2-ctrls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
index a037739868e0..37a50e57f222 100644
--- a/drivers/media/video/v4l2-ctrls.c
+++ b/drivers/media/video/v4l2-ctrls.c
@@ -590,7 +590,8 @@ static void send_event(struct v4l2_fh *fh, struct v4l2_ctrl *ctrl, u32 changes)
590 fill_event(&ev, ctrl, changes); 590 fill_event(&ev, ctrl, changes);
591 591
592 list_for_each_entry(sev, &ctrl->ev_subs, node) 592 list_for_each_entry(sev, &ctrl->ev_subs, node)
593 if (sev->fh && sev->fh != fh) 593 if (sev->fh && (sev->fh != fh ||
594 (sev->flags & V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK)))
594 v4l2_event_queue_fh(sev->fh, &ev); 595 v4l2_event_queue_fh(sev->fh, &ev);
595} 596}
596 597