[PATCH] frontend.h add dvb-s2 support including backwards compability

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

 



hi,

after having our discussion within last november,
i decided to bring it up again as usable hardware is nearly reaching
the market.

i read the discussions again, that we held and suggested to prepare a 
patch that is having both - dvb-s2 capabilities and backwards compatibility.

also - beside this patch - we should discuss another topic:
what about the fe_caps enum values?
if we apply this patch, we only will have 1 value left.

i would like to prepare another patchset that are a bit ported back
from the dvb-api v4 where each captype has its enumeration style.

the last value could be used to reflect that the - of course to add -
new ioctl's are handled to gather more specific information and
it won't break backwards compatibility then.

comments?

regards
marcel



# HG changeset patch
# User Marcel Siegert <mws@xxxxxxxxxxx>
# Date Wed Feb 22 20:08:42 2006 +0200
# Node ID 70b9171e6464417f61844d0f1c7835cb2663d1cf
# parent: f13939e6120ba64013534c5f3c37700db2354026
frontend.h add dvb-s2 support including backwards compability

From: Marcel Siegert <mws@xxxxxxxxxxx>

renamed the fe_type enums to report system instead of used modulation type
added new fe_caps enumerations to report new caps for dvb-s2 - fec_rates / modulation types 
added new fe_code_rates introduced for dvb-s2 by ETSI 300468 V1.7.1
added new modulation types from ETSI 300468 V1.7.1
added new rolloff_factor enums - also defined in ETSI 300468 V1.7.1
renamed dvb_XXXX_parameters to their corresponding fe_type values
added new dvb_dvbs2_parameters struct
added new dvb_frontend_parameters_ex struct that keeps OLD and the new dvb_dvbs2_parameters struct
added new dvb_frontend_event_ex struct that can carry new dvb_frontend_parameters_ex struct
for all renamed flags/enums added backwards compatibility defines
add 3 IOCTL's to handle 
FE_SET_FRONTEND_EX
FE_GET_FRONTEND_EX
FE_GET_EVENT_EX

Signed-off-by: Marcel Siegert <mws@xxxxxxxxxxx>


--- a/linux/include/linux/dvb/frontend.h	Sun Feb 19 11:07:47 2006 -0300
+++ b/linux/include/linux/dvb/frontend.h	Wed Feb 22 20:08:42 2006 +0200
@@ -30,12 +30,16 @@
 
 
 typedef enum fe_type {
-	FE_QPSK,
-	FE_QAM,
-	FE_OFDM,
-	FE_ATSC
+	FE_DVB_S,
+	FE_DVB_C,
+	FE_DVB_T,
+	FE_ATSC,
+	FE_DVB_S2
 } fe_type_t;
 
+#define FE_QPSK	FE_DVB_S
+#define FE_QAM	FE_DVB_C
+#define FE_OFDM	FE_DVB_T
 
 typedef enum fe_caps {
 	FE_IS_STUPID			= 0,
@@ -62,6 +66,11 @@ typedef enum fe_caps {
 	FE_CAN_HIERARCHY_AUTO		= 0x100000,
 	FE_CAN_8VSB			= 0x200000,
 	FE_CAN_16VSB			= 0x400000,
+	FE_CAN_QPSK8			= 0x800000,
+	FE_CAN_FEC_3_5			= 0x1000000,
+	FE_CAN_FEC_4_5			= 0x2000000,
+	FE_CAN_FEC_9_10			= 0x4000000,
+	FE_CAN_QPSKB			= 0x8000000,
 	FE_NEEDS_BENDING		= 0x20000000, // not supported anymore, don't use (frontend requires frequency bending)
 	FE_CAN_RECOVER			= 0x40000000, // frontend can recover from a cable unplug automatically
 	FE_CAN_MUTE_TS			= 0x80000000  // frontend can stop spurious TS data output
@@ -147,7 +156,10 @@ typedef enum fe_code_rate {
 	FEC_6_7,
 	FEC_7_8,
 	FEC_8_9,
-	FEC_AUTO
+	FEC_AUTO,
+	FEC_3_5,
+	FEC_4_5,
+	FEC_9_10
 } fe_code_rate_t;
 
 
@@ -160,8 +172,16 @@ typedef enum fe_modulation {
 	QAM_256,
 	QAM_AUTO,
 	VSB_8,
-	VSB_16
+	VSB_16,
+	QPSK_8,
+	QPSK_B
 } fe_modulation_t;
+
+typedef enum fe_rolloff_factor {
+	ROLLOFF_ALPHA_0_35,
+	ROLLOFF_ALPHA_0_25,
+	ROLLOFF_ALPHA_0_20
+} fe_rolloff_factor_t;
 
 typedef enum fe_transmit_mode {
 	TRANSMISSION_MODE_2K,
@@ -195,12 +215,12 @@ typedef enum fe_hierarchy {
 } fe_hierarchy_t;
 
 
-struct dvb_qpsk_parameters {
+struct dvb_dvbs_parameters {
 	__u32		symbol_rate;  /* symbol rate in Symbols per second */
 	fe_code_rate_t	fec_inner;    /* forward error correction (see above) */
 };
 
-struct dvb_qam_parameters {
+struct dvb_dvbc_parameters {
 	__u32		symbol_rate; /* symbol rate in Symbols per second */
 	fe_code_rate_t	fec_inner;   /* forward error correction (see above) */
 	fe_modulation_t	modulation;  /* modulation type (see above) */
@@ -210,7 +230,7 @@ struct dvb_vsb_parameters {
 	fe_modulation_t	modulation;  /* modulation type (see above) */
 };
 
-struct dvb_ofdm_parameters {
+struct dvb_dvbt_parameters {
 	fe_bandwidth_t      bandwidth;
 	fe_code_rate_t      code_rate_HP;  /* high priority stream code rate */
 	fe_code_rate_t      code_rate_LP;  /* low priority stream code rate */
@@ -220,6 +240,16 @@ struct dvb_ofdm_parameters {
 	fe_hierarchy_t      hierarchy_information;
 };
 
+struct dvb_dvbs2_parameters {
+	__u32			symbol_rate;    /* symbol rate in Symbols per second */
+	fe_code_rate_t		fec_inner;      /* forward error correction (see above) */
+	fe_rolloff_factor_t	rolloff_factor; /* rolloff factor needed for dvb-s2 */
+	fe_modulation_t		modulation; /* modulation type (see above) */
+};
+
+#define dvb_qpsk_parameters dvb_dvbs_parameters
+#define dvb_qam_parameters dvb_dvbc_parameters
+#define dvb_ofdm_parameters dvb_dvbt_parameters
 
 struct dvb_frontend_parameters {
 	__u32 frequency;     /* (absolute) frequency in Hz for QAM/OFDM/ATSC */
@@ -233,10 +263,27 @@ struct dvb_frontend_parameters {
 	} u;
 };
 
+struct dvb_frontend_parameters_ex {
+	__u32 frequency;     /* (absolute) frequency in Hz for QAM/OFDM/ATSC */
+			     /* intermediate frequency in kHz for QPSK */
+	fe_spectral_inversion_t inversion;
+	union {
+		struct dvb_dvbs_parameters qpsk;
+		struct dvb_dvbc_parameters  qam;
+		struct dvb_dvbt_parameters ofdm;
+		struct dvb_vsb_parameters vsb;
+		struct dvb_dvbs2_parameters qpsk2;
+	} u;
+};
 
 struct dvb_frontend_event {
 	fe_status_t status;
 	struct dvb_frontend_parameters parameters;
+};
+
+struct dvb_frontend_event_ex {
+	fe_status_t status;
+	struct dvb_frontend_parameters_ex parameters;
 };
 
 
@@ -270,7 +317,11 @@ struct dvb_frontend_event {
 #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 */
+#define FE_SET_FRONTEND_EX	   _IOW('o', 82, struct dvb_frontend_parameters_ex)
+#define FE_GET_FRONTEND_EX	   _IOR('o', 83, struct dvb_frontend_parameters_ex)
+
 #define FE_GET_EVENT		   _IOR('o', 78, struct dvb_frontend_event)
+#define FE_GET_EVENT_EX		   _IOR('o', 84, struct dvb_frontend_event_ex)
 
 #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
 

Attachment: pgpmTeYeRqqkK.pgp
Description: PGP signature

_______________________________________________

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