[PATCH] Re: [PATCH] Multi protocol support (stage #1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Johannes,

Updated Patch.

I hope it addresses a lot of small things here and there .. I will attach the STB0899's interface to the API in another mail.
Hope i haven't missed out anything that was mentioned.


Thanks,
Manu




diff -Naurp multiproto4.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.c multiproto4/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
--- multiproto4.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.c	2006-04-29 03:22:23.000000000 +0400
+++ multiproto4/linux/drivers/media/dvb/dvb-core/dvb_frontend.c	2006-05-07 22:50:55.000000000 +0400
@@ -93,7 +93,11 @@ struct dvb_frontend_private {
 
 	/* thread/frontend values */
 	struct dvb_device *dvbdev;
+	/*	Legacy datatype, superseded by params		*/
 	struct dvb_frontend_parameters parameters;
+	/*	params supersedes parameters			*/
+	struct dvb_frontend_params params;
+	struct dvb_frontend_cap caps;
 	struct dvb_fe_events events;
 	struct semaphore sem;
 	struct list_head list_head;
@@ -124,6 +128,61 @@ struct dvb_frontend_private {
 	unsigned int check_wrapped;
 };
 
+struct modcod_table {
+	u32 modcod;
+	u32 modulation;
+	u32 fecrate;
+};
+
+static struct modcod_table dvbs2_modcod_lookup[] = {
+	{ FE_MODCOD_DUMMY_PLFRAME, FE_MOD_NONE,	    FE_CODERATE_NONE	 },
+	{ FE_MODCOD_QPSK_1_4,	   FE_MOD_QPSK,	    FE_CODERATE_1_4	 },
+	{ FE_MODCOD_QPSK_1_3,	   FE_MOD_QPSK,	    FE_CODERATE_1_3	 },
+	{ FE_MODCOD_QPSK_2_5,	   FE_MOD_QPSK,	    FE_CODERATE_2_5	 },
+	{ FE_MODCOD_QPSK_1_2,	   FE_MOD_QPSK,	    FE_CODERATE_1_2	 },
+	{ FE_MODCOD_QPSK_3_5,	   FE_MOD_QPSK,	    FE_CODERATE_3_5	 },
+	{ FE_MODCOD_QPSK_2_3,	   FE_MOD_QPSK,	    FE_CODERATE_2_3	 },
+	{ FE_MODCOD_QPSK_3_4,	   FE_MOD_QPSK,	    FE_CODERATE_3_4	 },
+	{ FE_MODCOD_QPSK_4_5,	   FE_MOD_QPSK,	    FE_CODERATE_4_5	 },
+	{ FE_MODCOD_QPSK_5_6,	   FE_MOD_QPSK,	    FE_CODERATE_5_6	 },
+	{ FE_MODCOD_QPSK_8_9,	   FE_MOD_QPSK,	    FE_CODERATE_8_9	 },
+	{ FE_MODCOD_QPSK_9_10,	   FE_MOD_QPSK,	    FE_CODERATE_9_10	 },
+	{ FE_MODCOD_8PSK_3_5,	   FE_MOD_8PSK,	    FE_CODERATE_3_5	 },
+	{ FE_MODCOD_8PSK_2_3,	   FE_MOD_8PSK,	    FE_CODERATE_2_3	 },
+	{ FE_MODCOD_8PSK_3_4,	   FE_MOD_8PSK,	    FE_CODERATE_3_4	 },
+	{ FE_MODCOD_8PSK_5_6,	   FE_MOD_8PSK,	    FE_CODERATE_5_6	 },
+	{ FE_MODCOD_8PSK_8_9,	   FE_MOD_8PSK,	    FE_CODERATE_8_9	 },
+	{ FE_MODCOD_8PSK_9_10,	   FE_MOD_8PSK,	    FE_CODERATE_9_10	 },
+	{ FE_MODCOD_16APSK_2_3,	   FE_MOD_16APSK,   FE_CODERATE_2_3	 },
+	{ FE_MODCOD_16APSK_3_4,	   FE_MOD_16APSK,   FE_CODERATE_3_4	 },
+	{ FE_MODCOD_16APSK_4_5,	   FE_MOD_16APSK,   FE_CODERATE_4_5	 },
+	{ FE_MODCOD_16APSK_5_6,	   FE_MOD_16APSK,   FE_CODERATE_5_6	 },
+	{ FE_MODCOD_16APSK_8_9,	   FE_MOD_16APSK,   FE_CODERATE_8_9	 },
+	{ FE_MODCOD_16APSK_9_10,   FE_MOD_16APSK,   FE_CODERATE_9_10	 },
+	{ FE_MODCOD_32APSK_3_4,	   FE_MOD_32APSK,   FE_CODERATE_3_4	 },
+	{ FE_MODCOD_32APSK_4_5,	   FE_MOD_32APSK,   FE_CODERATE_4_5	 },
+	{ FE_MODCOD_32APSK_5_6,	   FE_MOD_32APSK,   FE_CODERATE_5_6	 },
+	{ FE_MODCOD_32APSK_8_9,	   FE_MOD_32APSK,   FE_CODERATE_8_9	 },
+	{ FE_MODCOD_32APSK_9_10,   FE_MOD_32APSK,   FE_CODERATE_9_10	 },
+	{ FE_MODCOD_RESERVED_1,	   FE_MOD_RESERVED, FE_CODERATE_RESERVED },
+	{ FE_MODCOD_BPSK_1_3,	   FE_MOD_BPSK,	    FE_CODERATE_1_3	 },
+	{ FE_MODCOD_BPSK_1_4,	   FE_MOD_BPSK,	    FE_CODERATE_1_4	 },
+	{ FE_MODCOD_RESERVED_2,	   FE_MOD_RESERVED, FE_CODERATE_RESERVED }
+};
+
+/**
+ *	Decode DVB-S2 MODCOD field as defined in EN 302 307
+ *	Section 5.5.2
+ */
+void decode_dvbs2_modcod(u32 modcod, u32 *modulation, u32 *fec)
+{
+	BUG_ON(modcod >= ARRAY_SIZE(dvbs2_modcod_lookup));
+	*modulation = dvbs2_modcod_lookup[modcod].modulation;
+	*fec = dvbs2_modcod_lookup[modcod].fecrate;
+
+}
+EXPORT_SYMBOL(decode_dvbs2_modcod);
+
 static void dvb_frontend_wakeup(struct dvb_frontend *fe);
 
 static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
@@ -508,7 +567,7 @@ static int dvb_frontend_thread(void *dat
 	unsigned long timeout;
 	char name [15];
 	fe_status_t s;
-	struct dvb_frontend_parameters *params;
+	struct dvb_frontend_params *params;
 
 	dprintk("%s\n", __FUNCTION__);
 
@@ -564,7 +623,7 @@ static int dvb_frontend_thread(void *dat
 			/* have we been asked to retune? */
 			params = NULL;
 			if (fepriv->state & FESTATE_RETUNE) {
-				params = &fepriv->parameters;
+				params = &fepriv->params;
 				fepriv->state = FESTATE_TUNED;
 			}
 
@@ -977,6 +1036,20 @@ static int dvb_frontend_ioctl(struct ino
 	case FE_SET_FRONTEND_TUNE_MODE:
 		fepriv->tune_mode_flags = (unsigned long) parg;
 		break;
+
+	case FE_GET_CAPS:
+		if (fe->ops->get_caps)
+			err = fe->ops->get_caps(fe, (struct dvb_frontend_cap*) parg);
+		break;
+
+	case FE_SET_PARAMS:
+		if (fe->ops->set_params)
+			err = fe->ops->set_params(fe, (struct dvb_frontend_params*) parg);
+		break;
+
+	case FE_GET_PARAMS:
+		if (fe->ops->get_params)
+			err = fe->ops->get_params(fe, (struct dvb_frontend_params*) parg);
 	};
 
 	up (&fepriv->sem);
diff -Naurp multiproto4.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.h multiproto4/linux/drivers/media/dvb/dvb-core/dvb_frontend.h
--- multiproto4.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.h	2006-04-29 03:22:23.000000000 +0400
+++ multiproto4/linux/drivers/media/dvb/dvb-core/dvb_frontend.h	2006-05-07 22:51:06.000000000 +0400
@@ -98,7 +98,7 @@ struct dvb_frontend_ops {
 
 	/* if this is set, it overrides the default swzigzag */
 	int (*tune)(struct dvb_frontend* fe,
-		    struct dvb_frontend_parameters* params,
+		    struct dvb_frontend_params* params,
 		    unsigned int mode_flags,
 		    int *delay,
 		    fe_status_t *status);
@@ -125,6 +125,11 @@ struct dvb_frontend_ops {
 	int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd);
 	int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable);
 
+	/*	These callbacks are based on the superseded IOCTL's		*/
+	int (*get_caps)(struct dvb_frontend* fe, struct dvb_frontend_cap* caps);
+	int (*set_params)(struct dvb_frontend* fe, struct dvb_frontend_params* params);
+	int (*get_params)(struct dvb_frontend* fe, struct dvb_frontend_params* params);
+
 	struct dvb_tuner_ops tuner_ops;
 };
 
@@ -158,4 +163,6 @@ extern void dvb_frontend_reinitialise(st
 extern void dvb_frontend_sleep_until(struct timeval *waketime, u32 add_usec);
 extern s32 timeval_usec_diff(struct timeval lasttime, struct timeval curtime);
 
+extern void decode_dvbs2_modcod(u32 modcod, u32 *modulation, u32 *fec);
+
 #endif
diff -Naurp multiproto4.orig/linux/include/linux/dvb/frontend.h multiproto4/linux/include/linux/dvb/frontend.h
--- multiproto4.orig/linux/include/linux/dvb/frontend.h	2006-04-29 03:22:23.000000000 +0400
+++ multiproto4/linux/include/linux/dvb/frontend.h	2006-05-07 22:50:20.000000000 +0400
@@ -249,7 +249,9 @@ struct dvb_frontend_event {
  */
 #define FE_TUNE_MODE_ONESHOT 0x01
 
-
+/**
+ *	FE_GET_INFO, is now Superseded by FE_GET_CAPS
+ */
 #define FE_GET_INFO		   _IOR('o', 61, struct dvb_frontend_info)
 
 #define FE_DISEQC_RESET_OVERLOAD   _IO('o', 62)
@@ -267,6 +269,9 @@ struct dvb_frontend_event {
 #define FE_READ_SNR		   _IOR('o', 72, __u16)
 #define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
 
+/**
+ *	Legacy IOCTL's
+ */
 #define FE_SET_FRONTEND		   _IOW('o', 76, struct dvb_frontend_parameters)
 #define FE_GET_FRONTEND		   _IOR('o', 77, struct dvb_frontend_parameters)
 #define FE_SET_FRONTEND_TUNE_MODE  _IO('o', 81) /* unsigned int */
@@ -274,4 +279,501 @@ struct dvb_frontend_event {
 
 #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
 
+/**
+ *	New operations for new and multiple delivery systems.
+ *
+ *	References:
+ *	DVB-S:  EN 300 421
+ *	DVB-S2: EN 301 210, TR 102 376, EN 302 307
+ *	DVB-C:	EN 300 429
+ *	DVB-T:	EN 300 744
+ *	DVB-H:	EN 302 304
+ *	ATSC:   A/53A
+ */
+
+/**
+ *	Delivery systems, some devices
+ *	are capable of supporting multiple delivery systems.
+ *
+ *	FE_DELSYS_IGNORE, causes the delivery system
+ *	not to be queried.
+ *
+ *	FE_DELSYS_AUTO, Some devices/drivers, might in
+ *	future be capable of detectinng the delivery system.
+ */
+enum fe_delsys {
+	FE_DELSYS_IGNORE		= (0 <<  0),
+	FE_DELSYS_DVBS			= (1 <<  0),
+	FE_DELSYS_DVBS2			= (1 <<  1),
+	FE_DELSYS_DVBC			= (1 <<  2),
+	FE_DELSYS_DVBT			= (1 <<  3),
+	FE_DELSYS_DVBH			= (1 <<  4),
+	FE_DELSYS_ATSC			= (1 <<  5),
+	FE_DELSYS_DSS			= (1 <<  6),
+	FE_DELSYS_AUTO			= (1 << 31)
+};
+
+/**
+ *	Nyquist RollOff rates
+ *	NOTE: This is specified by the DVB-S2 specifications
+ */
+enum fe_rolloff {
+	FE_ROLLOFF_35			= (0 <<  0),
+	FE_ROLLOFF_25			= (1 <<  0),
+	FE_ROLLOFF_20			= (1 <<  1),
+	FE_ROLLOFF_RESERVED		= (3 <<  0)
+};
+
+
+/**
+ *	Stream Priorities
+ *
+ *	Select High or Low Priority stream when
+ *	Hierarchial Modulation is used.
+ *
+ *	NOTE: The default should be the High priority stream.
+ */
+enum fe_stream_priority {
+	FE_STREAM_PRIORITY_HP		= (1 <<  0),
+	FE_STREAM_PRIORITY_LP		= (1 <<  1)
+};
+
+/**
+ *	Modulations.
+ *	Some devices support multiple modulation types
+ *
+ *	FE_MOD_IGNORE, causes the modulation type not
+ *	to be queried.
+ *
+ *	FE_MOD_AUTO, Some devices/drivers, might support
+ *	auto detecting the modulation type, depending on
+ *	some other settings and or hardware features.
+ */
+enum fe_modulation_type {
+	FE_MOD_IGNORE			= (0 <<  0),
+	FE_MOD_NONE			= (1 <<  0),
+	FE_MOD_BPSK			= (1 <<  1),
+	FE_MOD_QPSK			= (1 <<  2),
+	FE_MOD_OQPSK			= (1 <<  3),
+	FE_MOD_8PSK			= (1 <<  4),
+	FE_MOD_16APSK			= (1 <<  5),
+	FE_MOD_32APSK			= (1 <<  6),
+	FE_MOD_QAM16			= (1 <<  7),
+	FE_MOD_QAM32			= (1 <<  8),
+	FE_MOD_QAM64			= (1 <<  9),
+	FE_MOD_QAM128			= (1 << 10),
+	FE_MOD_QAM256			= (1 << 11),
+	FE_MOD_QAM512			= (1 << 12),
+	FE_MOD_QAM1024			= (1 << 13),
+	FE_MOD_QAMAUTO			= (1 << 14),
+	FE_MOD_OFDM			= (1 << 15),
+	FE_MOD_COFDM			= (1 << 16),
+	FE_MOD_VSB8			= (1 << 17),
+	FE_MOD_VSB16			= (1 << 18),
+	FE_MOD_RESERVED			= (1 << 19),
+	FE_MOD_AUTO			= (1 << 31)
+};
+
+/**
+ *	FEC (Forward Error Correction) Code rates
+ *
+ *	FE_FECRATE_IGNORE, causes the FECRATE type not
+ *	to be queried.
+ *
+ *	FE_FECRATE_AUTO, Some devices/drivers, might
+ *	support auto detecting the FEC code rate type, depending
+ *	on some other hardware settings and or hardware features.
+ */
+enum fe_coderate {
+	FE_CODERATE_IGNORE		= (0 <<  0),
+	FE_CODERATE_NONE		= (1 <<  0),
+	FE_CODERATE_1_4			= (1 <<  1),
+	FE_CODERATE_1_3			= (1 <<  2),
+	FE_CODERATE_2_5			= (1 <<  3),
+	FE_CODERATE_1_2			= (1 <<  4),
+	FE_CODERATE_3_5			= (1 <<  5),
+	FE_CODERATE_2_3			= (1 <<  6),
+	FE_CODERATE_3_4			= (1 <<  7),
+	FE_CODERATE_4_5			= (1 <<  8),
+	FE_CODERATE_5_6			= (1 <<  9),
+	FE_CODERATE_6_7			= (1 << 10),
+	FE_CODERATE_7_8			= (1 << 11),
+	FE_CODERATE_8_9			= (1 << 12),
+	FE_CODERATE_9_10		= (1 << 13),
+	FE_CODERATE_RESERVED		= (1 << 14),
+	FE_CODERATE_AUTO		= (1 << 31)
+};
+
+/**
+ *	MODCOD types
+ *
+ *	The MODCOD types are specific to the DVB-S2 specification
+ *	Some devices directly take the MODCOD values as an input
+ *	or just output the same.
+ *
+ *	In any case a single frontend will not be able to do
+ *	multiple modulations/code rates at any given point of time.
+ */
+enum fe_modcod {
+	FE_MODCOD_DUMMY_PLFRAME		= 0,
+	FE_MODCOD_QPSK_1_4,
+	FE_MODCOD_QPSK_1_3,
+	FE_MODCOD_QPSK_2_5,
+	FE_MODCOD_QPSK_1_2,
+	FE_MODCOD_QPSK_3_5,
+	FE_MODCOD_QPSK_2_3,
+	FE_MODCOD_QPSK_3_4,
+	FE_MODCOD_QPSK_4_5,
+	FE_MODCOD_QPSK_5_6,
+	FE_MODCOD_QPSK_8_9,
+	FE_MODCOD_QPSK_9_10,
+	FE_MODCOD_8PSK_3_5,
+	FE_MODCOD_8PSK_2_3,
+	FE_MODCOD_8PSK_3_4,
+	FE_MODCOD_8PSK_5_6,
+	FE_MODCOD_8PSK_8_9,
+	FE_MODCOD_8PSK_9_10,
+	FE_MODCOD_16APSK_2_3,
+	FE_MODCOD_16APSK_3_4,
+	FE_MODCOD_16APSK_4_5,
+	FE_MODCOD_16APSK_5_6,
+	FE_MODCOD_16APSK_8_9,
+	FE_MODCOD_16APSK_9_10,
+	FE_MODCOD_32APSK_3_4,
+	FE_MODCOD_32APSK_4_5,
+	FE_MODCOD_32APSK_5_6,
+	FE_MODCOD_32APSK_8_9,
+	FE_MODCOD_32APSK_9_10,
+	FE_MODCOD_RESERVED_1,
+	FE_MODCOD_BPSK_1_3,
+	FE_MODCOD_BPSK_1_4,
+	FE_MODCOD_RESERVED_2
+};
+
+/**
+ *	Bandwidth types
+ *
+ *	FE_BANDWIDTH_IGNORE, causes the bandwidth not
+ *	to be queried.
+ *
+ *	FE_BANDWIDTH_AUTO, Some devices/drivers, might
+ *	support auto detecting the Bandwidth, depending
+ *	on some other hardware settings and or hardware features.
+ */
+enum fe_bandwidths {
+	FE_BANDWIDTH_IGNORE		= (0 <<  0),
+	FE_BANDWIDTH_8_MHZ		= (1 <<  1),
+	FE_BANDWIDTH_7_MHZ		= (1 <<  2),
+	FE_BANDWIDTH_6_MHZ		= (1 <<  3),
+	FE_BANDWIDTH_5_MHZ		= (1 <<  4),
+	FE_BANDWIDTH_RESERVED		= (1 <<  5),
+	FE_BANDWIDTH_AUTO		= (1 << 31)
+};
+
+/**
+ *	Inversion modes
+ *
+ *	FE_INVERSION_IGNORE, causes the inversion not
+ *	to be queried.
+ *
+ *	FE_INVERSION_AUTO, Some devices/drivers, might
+ *	support auto detecting the Inversion, depending
+ *	on some other hardware settings and or hardware features.
+ *
+ *	NOTE: All current delivery systems need inversion in some
+ *	way or the other, due to hardware implementation specifics.
+ *	and/or others.
+ */
+enum fe_inversion {
+	FE_INVERSION_IGNORE		= (0 <<  0),
+	FE_INVERSION_OFF		= (1 <<  0),
+	FE_INVERSION_ON			= (1 <<  1),
+	FE_INVERSION_AUTO		= (1 << 31)
+};
+
+/**
+ *	Transmission modes
+ *
+ *	FE_TRANSMISSION_MODE_IGNORE, causes the transmission mode
+ *	not to be queried.
+ *
+ *	FE_TRANSMISSION_MODE_AUTO, Some devices/drivers, might
+ *	support auto detecting the Transmission Mode, depending
+ *	on some other hardware settings and or hardware features.
+ *
+ *	NOTE: Currently applies to DVB-T and DVB-H only.
+ */
+enum fe_transmit_modes {
+	FE_TRANSMISSION_MODE_IGNORE	= (0 <<  0),
+	FE_TRANSMISSION_MODE_2K		= (1 <<  1),
+	FE_TRANSMISSION_MODE_4K		= (1 <<  2),
+	FE_TRANSMISSION_MODE_8K		= (1 <<  3),
+	FE_TRANSMISSION_MODE_RESERVED	= (1 <<  4),
+	FE_TRANSMISSION_MODE_AUTO	= (1 << 31)
+};
+
+/**
+ *	Guard Intervals
+ *
+ *	FE_GUARD_INTERVAL_IGNORE, causes the guard interval
+ *	not to be queried.
+ *
+ *	FE_GUARD_INTERVAL_AUTO, Some devices/drivers, might
+ *	support auto detecting the Transmission Mode, depending
+ *	on some other hardware settings and or hardware features.
+ *
+ *	NOTE: Currently applies to DVB-T and DVB-H only.
+ */
+enum fe_guard_intervals {
+	FE_GUARD_INTERVAL_IGNORE	= (0 <<  0),
+	FE_GUARD_INTERVAL_1_32		= (1 <<  1),
+	FE_GUARD_INTERVAL_1_16		= (1 <<  2),
+	FE_GUARD_INTERVAL_1_8		= (1 <<  3),
+	FE_GUARD_INTERVAL_1_4		= (1 <<  4),
+	FE_GUARD_INTERVAL_AUTO		= (1 << 31)
+};
+
+/**
+ *	Hierarchial Modulations
+ *
+ *	FE_HIERARCHY_IGNORE, causes the hierarchy
+ *	not to be queried.
+ *
+ *	FE_HIERARCHY_AUTO, Some devices/drivers, might
+ *	support auto detecting the hierarchial modulation, depending
+ *	on some other hardware settings and or hardware features.
+ *
+ *	NOTE: Currently applies to DVB-T and DVB-H only.
+ */
+enum fe_hierarchy_info {
+	FE_HIERARCHY_IGNORE		= (0 <<  0),
+	FE_HIERARCHY_OFF		= (1 <<  1),
+	FE_HIERARCHY_ON			= (1 <<  2),
+	FE_HIERARCHY_AUTO		= (1 << 31)
+};
+
+/**
+ *	Interleaver types
+ *
+ *	FE_INTERLEAVER_IGNORE, causes the hierarchy
+ *	not to be queried.
+ *
+ *	FE_INTERLEAVER_AUTO, Some devices/drivers, might
+ *	support auto detecting the hierarchial modulation, depending
+ *	on some other hardware settings and or hardware features.
+ *
+ *	NOTE: Currently applies only to DVB-H.
+ */
+enum fe_interleaver {
+	FE_INTERLEAVER_IGNORE		= (0 <<  0),
+	FE_INTERLEAVER_NATIVE		= (1 <<  1),
+	FE_INTERLEAVER_INDEPTH		= (1 <<  2),
+	FE_INTERLEAVER_AUTO		= (1 << 31)
+};
+
+
+/**
+ *	MPE-FEC modes
+ *
+ *	FE_MPEFEC_IGNORE, causes the mpefec indicator
+ *	not to be queried.
+ *
+ *	NOTE: MPE-FEC is an indicator according to EN 300 468
+ *	Currently applies only to DVB-H.
+ */
+enum fe_mpefec {
+	FE_MPEFEC_IGNORE		= (0 <<  0),
+	FE_MPEFEC_ON			= (1 <<  1),
+	FE_MPEFEC_OFF			= (1 <<  2)
+};
+
+/**
+ *	Timeslicing mode
+ *
+ *	FE_TIMESLICING_IGNORE, causes the timeslicing indicator
+ *	not to be queried.
+ *
+ *	NOTE: Timeslicing is an indicator according to EN 300 468
+ *	Currently applies only to DVB-H.
+ */
+enum fe_timeslicing {
+	FE_TIMESLICING_IGNORE		= (0 <<  0),
+	FE_TIMESLICING_ON		= (1 <<  1),
+	FE_TIMESLICING_OFF		= (1 <<  2)
+};
+
+/**
+ *	DVB-S parameters
+ */
+struct dvbs_params {
+	__u32				symbol_rate;
+
+	enum fe_modulation_type		modulation;
+	enum fe_coderate		coderate;
+};
+
+/**
+ *	DVB-S2 parameters
+ */
+struct dvbs2_params {
+	__u32				symbol_rate;
+
+	enum fe_modulation_type		modulation;
+	enum fe_stream_priority		priority;
+	enum fe_coderate		coderate_HP;
+	enum fe_coderate		coderate_LP;
+	enum fe_rolloff			rolloff;
+	enum fe_modcod			modcod;
+};
+
+/**
+ *	DSS parameters
+ */
+struct dss_params {
+	__u32				symbol_rate;
+
+	enum fe_modulation_type		modulation;
+	enum fe_coderate		coderate;
+};
+
+/**
+ *	DVB-C parameters
+ */
+struct dvbc_params {
+	__u32				symbol_rate;
+
+	enum fe_modulation_type		modulation;
+	enum fe_coderate		coderate;
+};
+
+/**
+ *	DVB-T parameters
+ */
+struct dvbt_params {
+	enum fe_modulation_type		constellation;
+	enum fe_bandwidths		bandwidth;
+	enum fe_coderate		code_rate_HP;
+	enum fe_coderate		code_rate_LP;
+	enum fe_transmit_modes		transmission_mode;
+	enum fe_guard_intervals		guard_interval;
+	enum fe_hierarchy_info		hierarchy;
+	enum fe_rolloff			alpha;
+	enum fe_stream_priority		priority;
+};
+
+/**
+ *	DVB-H parameters
+ */
+struct dvbh_params {
+	enum fe_modulation_type		constellation;
+	enum fe_coderate		code_rate_HP;
+	enum fe_coderate		code_rate_LP;
+	enum fe_transmit_modes		transmission_mode;
+	enum fe_guard_intervals		guard_interval;
+	enum fe_hierarchy_info		hierarchy;
+	enum fe_rolloff			alpha;
+	enum fe_interleaver		interleaver;
+	enum fe_mpefec			mpefec;
+	enum fe_timeslicing		timeslicing;
+	enum fe_stream_priority		priority;
+	__u32				bandwidth;
+};
+
+/**
+ *	ATSC parameters
+ */
+struct atsc_params {
+	enum fe_modulation_type		modulation;
+};
+
+/**
+ *	Padding to handle future binary compatibility issues.
+ *
+ *	NOTE: The padding is a dummy parameter !
+ */
+struct pad128_params {
+	__u8 pad[128];
+};
+
+/**
+ *	Frontend capability information
+ */
+struct dvb_frontend_cap {
+	char				name[128];
+
+	__u32				frequency_min;
+	__u32				frequency_max;
+	__u32				frequency_stepsize;
+	__u32				frequency_tolerance;
+	__u32				symbol_rate_min;
+	__u32				symbol_rate_max;
+	__u32				symbol_rate_tolerance;
+
+	__u8				pad[32];
+
+	enum fe_delsys			delivery;
+	enum fe_inversion		inversion;
+
+	union {
+		struct dvbs_params	dvbs;
+		struct dvbs2_params	dvbs2;
+		struct dss_params	dss;
+		struct dvbc_params	dvbc;
+		struct dvbt_params	dvbt;
+		struct dvbh_params	dvbh;
+		struct atsc_params	atsc;
+		struct pad128_params	pad;
+	} delsys;
+};
+
+/**
+ *	We have the NEW IOCTL's defined now. This IOCTL
+ *	is supposed to handle all the new delivery systems
+ *	FE_GET_CAPS, gets all the capabilities in one go.
+ *
+ *	For the GET IOCTL's ie FE_GET_PARAMS and FE_GET_CAPS
+ *	some of the parameters maybe selectively queried by
+ *	setting that relevant parameter to IGNORE.
+ */
+#define FE_GET_CAPS		   _IOR('o', 84, struct dvb_frontend_cap)
+
+/**
+ *	Frontend parameters
+ */
+struct dvb_frontend_params {
+	__u32				frequency;
+
+	enum fe_delsys			delivery;
+	enum fe_inversion		inversion;
+	__u8				pad[32];
+	union {
+		struct dvbs_params	dvbs;
+		struct dvbs2_params	dvbs2;
+		struct dss_params	dss;
+		struct dvbc_params	dvbc;
+		struct dvbt_params	dvbt;
+		struct dvbh_params	dvbh;
+		struct atsc_params	atsc;
+		struct pad128_params	pad;
+	} delsys;
+};
+
+/**
+ *	We have the NEW IOCTL's defined now. These IOCTL's
+ *	are supposed to handle all the new delivery systems.
+ *
+ *	FE_SET_PARAMS, sets all the parameters in one go.
+ *	FE_GET_PARAMS, gets all the parameters in one go.
+ *	FE_GET_DELSYS, gets the supported Delivery Systems from
+ *		a multistandard device
+ *
+ *	For the GET IOCTL's ie FE_GET_PARAMS and FE_GET_CAPS
+ *	some of the parameters maybe selectively queried by
+ *	setting that relevant parameter to IGNORE.
+ *
+ */
+#define FE_SET_PARAMS		   _IOW('o', 82, struct dvb_frontend_params)
+#define FE_GET_PARAMS		   _IOR('o', 83, struct dvb_frontend_params)
+#define FE_GET_DELSYS		   _IOR('o', 85, enum fe_delsys)
+
 #endif /*_DVBFRONTEND_H_*/
diff -Naurp multiproto4.orig/linux/include/linux/dvb/version.h multiproto4/linux/include/linux/dvb/version.h
--- multiproto4.orig/linux/include/linux/dvb/version.h	2006-04-29 03:22:23.000000000 +0400
+++ multiproto4/linux/include/linux/dvb/version.h	2006-05-07 19:16:46.000000000 +0400
@@ -24,6 +24,6 @@
 #define _DVBVERSION_H_
 
 #define DVB_API_VERSION 3
-#define DVB_API_VERSION_MINOR 1
+#define DVB_API_VERSION_MINOR 2
 
 #endif /*_DVBVERSION_H_*/
_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux