diff options
author | Steven Toth <stoth@linuxtv.org> | 2008-09-25 23:29:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:11 -0400 |
commit | eacf8d8d6bc6798f6870a2cf2c159bfcde3759ac (patch) | |
tree | b3c7d3d709a8754f22b6385c70b6ac4bfb4d4f88 | |
parent | d48cb402a1ba48c4ad4a36c3c561386027318459 (diff) |
V4L/DVB (9072): S2API: Add DTV_API_VERSION command
This allows application developers to query the dvb-core API version
dynamically, helping developers understand whether certain features
will be available.
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 9 | ||||
-rw-r--r-- | include/linux/dvb/frontend.h | 1 | ||||
-rw-r--r-- | include/linux/dvb/version.h | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 0ef9c2a2af87..4c3f0d7e355c 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include "dvb_frontend.h" | 41 | #include "dvb_frontend.h" |
42 | #include "dvbdev.h" | 42 | #include "dvbdev.h" |
43 | #include <linux/dvb/version.h> | ||
43 | 44 | ||
44 | static int dvb_frontend_debug; | 45 | static int dvb_frontend_debug; |
45 | static int dvb_shutdown_timeout; | 46 | static int dvb_shutdown_timeout; |
@@ -836,6 +837,11 @@ struct dtv_cmds_h dtv_cmds[] = { | |||
836 | .set = 0, | 837 | .set = 0, |
837 | .buffer = 1, | 838 | .buffer = 1, |
838 | }, | 839 | }, |
840 | [DTV_API_VERSION] = { | ||
841 | .name = "DTV_API_VERSION", | ||
842 | .cmd = DTV_API_VERSION, | ||
843 | .set = 0, | ||
844 | }, | ||
839 | }; | 845 | }; |
840 | 846 | ||
841 | void dtv_property_dump(struct dtv_property *tvp) | 847 | void dtv_property_dump(struct dtv_property *tvp) |
@@ -1104,6 +1110,9 @@ int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp, | |||
1104 | case DTV_TONE: | 1110 | case DTV_TONE: |
1105 | tvp->u.data = fe->dtv_property_cache.sectone; | 1111 | tvp->u.data = fe->dtv_property_cache.sectone; |
1106 | break; | 1112 | break; |
1113 | case DTV_API_VERSION: | ||
1114 | tvp->u.data = (DVB_API_VERSION << 8) | DVB_API_VERSION_MINOR; | ||
1115 | break; | ||
1107 | default: | 1116 | default: |
1108 | r = -1; | 1117 | r = -1; |
1109 | } | 1118 | } |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index b561626fc8a0..eb98f8c37cad 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -268,6 +268,7 @@ struct dvb_frontend_event { | |||
268 | #define DTV_FE_CAPABILITY 16 | 268 | #define DTV_FE_CAPABILITY 16 |
269 | #define DTV_DELIVERY_SYSTEM 17 | 269 | #define DTV_DELIVERY_SYSTEM 17 |
270 | 270 | ||
271 | #define DTV_API_VERSION 35 | ||
271 | 272 | ||
272 | typedef enum fe_pilot { | 273 | typedef enum fe_pilot { |
273 | PILOT_ON, | 274 | PILOT_ON, |
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h index 126e0c26cb09..25b823b81734 100644 --- a/include/linux/dvb/version.h +++ b/include/linux/dvb/version.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #ifndef _DVBVERSION_H_ | 23 | #ifndef _DVBVERSION_H_ |
24 | #define _DVBVERSION_H_ | 24 | #define _DVBVERSION_H_ |
25 | 25 | ||
26 | #define DVB_API_VERSION 3 | 26 | #define DVB_API_VERSION 5 |
27 | #define DVB_API_VERSION_MINOR 2 | 27 | #define DVB_API_VERSION_MINOR 0 |
28 | 28 | ||
29 | #endif /*_DVBVERSION_H_*/ | 29 | #endif /*_DVBVERSION_H_*/ |