E4000 tuner driver provides now some controls. Expose those to
userland.

Signed-off-by: Antti Palosaari <cr...@iki.fi>
---
 drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c 
b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
index dea7743..38000d2 100644
--- a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
+++ b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
@@ -25,6 +25,7 @@
 #include "dvb_frontend.h"
 #include "rtl2832_sdr.h"
 #include "dvb_usb.h"
+#include "e4000.h"
 
 #include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
@@ -1347,6 +1348,7 @@ struct dvb_frontend *rtl2832_sdr_attach(struct 
dvb_frontend *fe,
        struct rtl2832_sdr_state *s;
        const struct v4l2_ctrl_ops *ops = &rtl2832_sdr_ctrl_ops;
        struct dvb_usb_device *d = i2c_get_adapdata(i2c);
+       struct v4l2_ctrl_handler *hdl;
 
        s = kzalloc(sizeof(struct rtl2832_sdr_state), GFP_KERNEL);
        if (s == NULL) {
@@ -1386,10 +1388,10 @@ struct dvb_frontend *rtl2832_sdr_attach(struct 
dvb_frontend *fe,
        /* Register controls */
        switch (s->cfg->tuner) {
        case RTL2832_TUNER_E4000:
-               v4l2_ctrl_handler_init(&s->hdl, 2);
-               s->bandwidth_auto = v4l2_ctrl_new_std(&s->hdl, ops, 
V4L2_CID_RF_TUNER_BANDWIDTH_AUTO, 0, 1, 1, 1);
-               s->bandwidth = v4l2_ctrl_new_std(&s->hdl, ops, 
V4L2_CID_RF_TUNER_BANDWIDTH, 4300000, 11000000, 100000, 4300000);
-               v4l2_ctrl_auto_cluster(2, &s->bandwidth_auto, 0, false);
+               hdl = e4000_get_ctrl_handler(fe);
+               v4l2_ctrl_handler_init(&s->hdl, 9);
+               if (hdl)
+                       v4l2_ctrl_add_handler(&s->hdl, hdl, NULL);
                break;
        case RTL2832_TUNER_R820T:
                v4l2_ctrl_handler_init(&s->hdl, 2);
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to