aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-core
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-09-25 23:29:49 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:37:11 -0400
commiteacf8d8d6bc6798f6870a2cf2c159bfcde3759ac (patch)
treeb3c7d3d709a8754f22b6385c70b6ac4bfb4d4f88 /drivers/media/dvb/dvb-core
parentd48cb402a1ba48c4ad4a36c3c561386027318459 (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>
Diffstat (limited to 'drivers/media/dvb/dvb-core')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 0ef9c2a2af8..4c3f0d7e355 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
44static int dvb_frontend_debug; 45static int dvb_frontend_debug;
45static int dvb_shutdown_timeout; 46static 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
841void dtv_property_dump(struct dtv_property *tvp) 847void 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 }