summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-09-25 23:29:49 -0400
committerSteven Toth <stoth@linuxtv.org>2008-09-25 23:29:49 -0400
commit1bded05663a0aea1702e531a19694c6b670dc7d2 (patch)
tree351434b3e0e30d003313db9b6c2cbb37d0fe4be9 /linux
parent506cfbf07f4322d8a43fd8bd0055c142db5cf615 (diff)
downloadmediapointer-dvb-s2-1bded05663a0aea1702e531a19694c6b670dc7d2.tar.gz
mediapointer-dvb-s2-1bded05663a0aea1702e531a19694c6b670dc7d2.tar.bz2
S2API: Add DTV_API_VERSION command
From: Steven Toth <stoth@linuxtv.org> This allows application developers to query the dvb-core API version dynamically, helping developers understand whether certain features will be available. Priority: normal Signed-off-by: Steven Toth <stoth@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c9
-rw-r--r--linux/include/linux/dvb/frontend.h1
-rw-r--r--linux/include/linux/dvb/version.h4
3 files changed, 12 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 9f3a61827..6f0dc252f 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -45,6 +45,7 @@
#include "dvb_frontend.h"
#include "dvbdev.h"
#include "compat.h"
+#include <linux/dvb/version.h>
static int dvb_frontend_debug;
static int dvb_shutdown_timeout;
@@ -906,6 +907,11 @@ struct dtv_cmds_h dtv_cmds[] = {
.set = 0,
},
#endif
+ [DTV_API_VERSION] = {
+ .name = "DTV_API_VERSION",
+ .cmd = DTV_API_VERSION,
+ .set = 0,
+ },
};
void dtv_property_dump(struct dtv_property *tvp)
@@ -1210,6 +1216,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;
}
diff --git a/linux/include/linux/dvb/frontend.h b/linux/include/linux/dvb/frontend.h
index ecac80d32..d28f21796 100644
--- a/linux/include/linux/dvb/frontend.h
+++ b/linux/include/linux/dvb/frontend.h
@@ -299,6 +299,7 @@ struct dvb_frontend_event {
#define DTV_ISDB_LAYERC_SEGMENT_WIDTH 33
#define DTV_ISDB_LAYERC_TIME_INTERLEAVING 34
#endif
+#define DTV_API_VERSION 35
typedef enum fe_pilot {
PILOT_ON,
diff --git a/linux/include/linux/dvb/version.h b/linux/include/linux/dvb/version.h
index 126e0c26c..25b823b81 100644
--- a/linux/include/linux/dvb/version.h
+++ b/linux/include/linux/dvb/version.h
@@ -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_*/