]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (9072): S2API: Add DTV_API_VERSION command
authorSteven Toth <stoth@linuxtv.org>
Fri, 26 Sep 2008 03:29:49 +0000 (00:29 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:37:11 +0000 (09:37 -0200)
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>
drivers/media/dvb/dvb-core/dvb_frontend.c
include/linux/dvb/frontend.h
include/linux/dvb/version.h

index 0ef9c2a2af879646d9515faf9f6e9ae2a10dd358..4c3f0d7e355c5e4c27c71a407ffc1d50524d6a90 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "dvb_frontend.h"
 #include "dvbdev.h"
+#include <linux/dvb/version.h>
 
 static int dvb_frontend_debug;
 static int dvb_shutdown_timeout;
@@ -836,6 +837,11 @@ struct dtv_cmds_h dtv_cmds[] = {
                .set    = 0,
                .buffer = 1,
        },
+       [DTV_API_VERSION] = {
+               .name   = "DTV_API_VERSION",
+               .cmd    = DTV_API_VERSION,
+               .set    = 0,
+       },
 };
 
 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,
        case DTV_TONE:
                tvp->u.data = fe->dtv_property_cache.sectone;
                break;
+       case DTV_API_VERSION:
+               tvp->u.data = (DVB_API_VERSION << 8) | DVB_API_VERSION_MINOR;
+               break;
        default:
                r = -1;
        }
index b561626fc8a098388b322fa69270d817a53f2fdf..eb98f8c37cad5b8da5f685340328e343d50dac0d 100644 (file)
@@ -268,6 +268,7 @@ struct dvb_frontend_event {
 #define DTV_FE_CAPABILITY      16
 #define DTV_DELIVERY_SYSTEM    17
 
+#define DTV_API_VERSION                                35
 
 typedef enum fe_pilot {
        PILOT_ON,
index 126e0c26cb091aa6a647dd0f8359662d143d3ed8..25b823b81734e969db634b384f5bc52031a4b16e 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef _DVBVERSION_H_
 #define _DVBVERSION_H_
 
-#define DVB_API_VERSION 3
-#define DVB_API_VERSION_MINOR 2
+#define DVB_API_VERSION 5
+#define DVB_API_VERSION_MINOR 0
 
 #endif /*_DVBVERSION_H_*/