From 1bded05663a0aea1702e531a19694c6b670dc7d2 Mon Sep 17 00:00:00 2001 From: Steven Toth Date: Thu, 25 Sep 2008 23:29:49 -0400 Subject: S2API: Add DTV_API_VERSION command From: Steven Toth 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 --- linux/drivers/media/dvb/dvb-core/dvb_frontend.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'linux/drivers/media/dvb/dvb-core') 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 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; } -- cgit v1.2.3