[REVIEW PATCH 15/16] rtl2832_sdr: expose R820T controls to user

2014-02-26 Thread Antti Palosaari
R820T tuner driver provides now some controls. Expose those to
userland.

Signed-off-by: Antti Palosaari 
---
 drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c 
b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
index 38000d2..f39e4e8 100644
--- a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
+++ b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
@@ -26,6 +26,7 @@
 #include "rtl2832_sdr.h"
 #include "dvb_usb.h"
 #include "e4000.h"
+#include "r820t.h"
 
 #include 
 #include 
@@ -1394,10 +1395,13 @@ struct dvb_frontend *rtl2832_sdr_attach(struct 
dvb_frontend *fe,
v4l2_ctrl_add_handler(&s->hdl, hdl, NULL);
break;
case RTL2832_TUNER_R820T:
-   v4l2_ctrl_handler_init(&s->hdl, 2);
+   v4l2_ctrl_handler_init(&s->hdl, 8);
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, 0, 800, 10, 0);
v4l2_ctrl_auto_cluster(2, &s->bandwidth_auto, 0, false);
+   hdl = r820t_get_ctrl_handler(fe);
+   if (hdl)
+   v4l2_ctrl_add_handler(&s->hdl, hdl, NULL);
break;
case RTL2832_TUNER_FC0012:
case RTL2832_TUNER_FC0013:
-- 
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


[REVIEW PATCH 15/16] rtl2832_sdr: expose R820T controls to user

2014-02-10 Thread Antti Palosaari
R820T tuner driver provides now some controls. Expose those to
userland.

Signed-off-by: Antti Palosaari 
---
 drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c 
b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
index 18f8c56..cc554f7 100644
--- a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
+++ b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
@@ -26,6 +26,7 @@
 #include "rtl2832_sdr.h"
 #include "dvb_usb.h"
 #include "e4000.h"
+#include "r820t.h"
 
 #include 
 #include 
@@ -1398,6 +1399,9 @@ struct dvb_frontend *rtl2832_sdr_attach(struct 
dvb_frontend *fe,
s->bandwidth_auto = v4l2_ctrl_new_std(&s->hdl, ops, 
V4L2_CID_BANDWIDTH_AUTO, 0, 1, 1, 1);
s->bandwidth = v4l2_ctrl_new_std(&s->hdl, ops, 
V4L2_CID_BANDWIDTH, 0, 800, 10, 0);
v4l2_ctrl_auto_cluster(2, &s->bandwidth_auto, 0, false);
+   hdl = r820t_get_ctrl_handler(fe);
+   if (hdl)
+   v4l2_ctrl_add_handler(&s->hdl, hdl, NULL);
break;
case RTL2832_TUNER_FC0012:
case RTL2832_TUNER_FC0013:
-- 
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