1 From d9dc4b7760b20885d5bd1d17fd6dce818f1141e0 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dsteve@broadcom.com>
3 Date: Mon, 9 Dec 2013 15:30:48 +0000
4 Subject: [PATCH 134/174] V4L2: Fix ISO controls.
6 Driver was passing the index to the GPU, and not the desired
9 Signed-off-by: Dave Stevenson <dsteve@broadcom.com>
11 drivers/media/platform/bcm2835/controls.c | 21 ++++++++++++++++++++-
12 1 file changed, 20 insertions(+), 1 deletion(-)
14 --- a/drivers/media/platform/bcm2835/controls.c
15 +++ b/drivers/media/platform/bcm2835/controls.c
16 @@ -178,6 +178,25 @@ static int ctrl_set_value(struct bm2835_
17 &u32_value, sizeof(u32_value));
20 +static int ctrl_set_value_menu(struct bm2835_mmal_dev *dev,
21 + struct v4l2_ctrl *ctrl,
22 + const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl)
25 + struct vchiq_mmal_port *control;
27 + if (ctrl->val > mmal_ctrl->max || ctrl->val < mmal_ctrl->min)
30 + control = &dev->component[MMAL_COMPONENT_CAMERA]->control;
32 + u32_value = mmal_ctrl->imenu[ctrl->val];
34 + return vchiq_mmal_port_parameter_set(dev->instance, control,
36 + &u32_value, sizeof(u32_value));
39 static int ctrl_set_value_ev(struct bm2835_mmal_dev *dev,
40 struct v4l2_ctrl *ctrl,
41 const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl)
42 @@ -601,7 +620,7 @@ static const struct bm2835_mmal_v4l2_ctr
44 V4L2_CID_ISO_SENSITIVITY, MMAL_CONTROL_TYPE_INT_MENU,
45 0, ARRAY_SIZE(iso_qmenu) - 1, 0, 1, iso_qmenu,
46 - MMAL_PARAMETER_ISO, &ctrl_set_value
47 + MMAL_PARAMETER_ISO, &ctrl_set_value_menu
50 V4L2_CID_IMAGE_STABILIZATION, MMAL_CONTROL_TYPE_STD,