Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Steven Toth and committed by
Mauro Carvalho Chehab
eacf8d8d d48cb402

+12 -2
+9
drivers/media/dvb/dvb-core/dvb_frontend.c
··· 40 40 41 41 #include "dvb_frontend.h" 42 42 #include "dvbdev.h" 43 + #include <linux/dvb/version.h> 43 44 44 45 static int dvb_frontend_debug; 45 46 static int dvb_shutdown_timeout; ··· 837 836 .set = 0, 838 837 .buffer = 1, 839 838 }, 839 + [DTV_API_VERSION] = { 840 + .name = "DTV_API_VERSION", 841 + .cmd = DTV_API_VERSION, 842 + .set = 0, 843 + }, 840 844 }; 841 845 842 846 void dtv_property_dump(struct dtv_property *tvp) ··· 1109 1103 break; 1110 1104 case DTV_TONE: 1111 1105 tvp->u.data = fe->dtv_property_cache.sectone; 1106 + break; 1107 + case DTV_API_VERSION: 1108 + tvp->u.data = (DVB_API_VERSION << 8) | DVB_API_VERSION_MINOR; 1112 1109 break; 1113 1110 default: 1114 1111 r = -1;
+1
include/linux/dvb/frontend.h
··· 268 268 #define DTV_FE_CAPABILITY 16 269 269 #define DTV_DELIVERY_SYSTEM 17 270 270 271 + #define DTV_API_VERSION 35 271 272 272 273 typedef enum fe_pilot { 273 274 PILOT_ON,
+2 -2
include/linux/dvb/version.h
··· 23 23 #ifndef _DVBVERSION_H_ 24 24 #define _DVBVERSION_H_ 25 25 26 - #define DVB_API_VERSION 3 27 - #define DVB_API_VERSION_MINOR 2 26 + #define DVB_API_VERSION 5 27 + #define DVB_API_VERSION_MINOR 0 28 28 29 29 #endif /*_DVBVERSION_H_*/