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

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

 



Hi All,

Updated the patch again, keeping in mind all the comments. Thanks to all who provided feedback to improve it further.
Attached is the latest changes.


Thanks,
Manu

diff -Naurp multiproto3.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.c multiproto3/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
--- multiproto3.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.c    2006-04-29 03:22:23.000000000 +0400
+++ multiproto3/linux/drivers/media/dvb/dvb-core/dvb_frontend.c 2006-04-29 21:39:59.000000000 +0400
@@ -94,6 +94,8 @@ struct dvb_frontend_private {
        /* thread/frontend values */
        struct dvb_device *dvbdev;
        struct dvb_frontend_parameters 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 +126,62 @@ struct dvb_frontend_private {
        unsigned int check_wrapped;
};

+struct modcod_table {
+       __u32 modcod;
+       __u32 modulation;
+       __u32 fecrate;
+};
+
+struct modcod_table dvbs2_modcod_lookup[] = {
+       { FE_MODCOD_DUMMY_PLFRAME,      FE_MOD_NONE,    FE_FECRATE_NONE },
+       { FE_MODCOD_QPSK_1_4,           FE_MOD_QPSK,    FE_FECRATE_1_4  },
+       { FE_MODCOD_QPSK_1_3,           FE_MOD_QPSK,    FE_FECRATE_1_3  },
+       { FE_MODCOD_QPSK_2_5,           FE_MOD_QPSK,    FE_FECRATE_2_5  },
+       { FE_MODCOD_QPSK_1_2,           FE_MOD_QPSK,    FE_FECRATE_1_2  },
+       { FE_MODCOD_QPSK_3_5,           FE_MOD_QPSK,    FE_FECRATE_3_5  },
+       { FE_MODCOD_QPSK_2_3,           FE_MOD_QPSK,    FE_FECRATE_2_3  },
+       { FE_MODCOD_QPSK_3_4,           FE_MOD_QPSK,    FE_FECRATE_3_4  },
+       { FE_MODCOD_QPSK_4_5,           FE_MOD_QPSK,    FE_FECRATE_4_5  },
+       { FE_MODCOD_QPSK_5_6,           FE_MOD_QPSK,    FE_FECRATE_5_6  },
+       { FE_MODCOD_QPSK_8_9,           FE_MOD_QPSK,    FE_FECRATE_8_9  },
+       { FE_MODCOD_QPSK_9_10,          FE_MOD_QPSK,    FE_FECRATE_9_10 },
+       { FE_MODCOD_8PSK_3_5,           FE_MOD_8PSK,    FE_FECRATE_3_5  },
+       { FE_MODCOD_8PSK_2_3,           FE_MOD_8PSK,    FE_FECRATE_2_3  },
+       { FE_MODCOD_8PSK_3_4,           FE_MOD_8PSK,    FE_FECRATE_3_4  },
+       { FE_MODCOD_8PSK_5_6,           FE_MOD_8PSK,    FE_FECRATE_5_6  },
+       { FE_MODCOD_8PSK_8_9,           FE_MOD_8PSK,    FE_FECRATE_8_9  },
+       { FE_MODCOD_8PSK_9_10,          FE_MOD_8PSK,    FE_FECRATE_9_10 },
+       { FE_MODCOD_16APSK_2_3,         FE_MOD_16APSK,  FE_FECRATE_2_3  },
+       { FE_MODCOD_16APSK_3_4,         FE_MOD_16APSK,  FE_FECRATE_3_4  },
+       { FE_MODCOD_16APSK_4_5,         FE_MOD_16APSK,  FE_FECRATE_4_5  },
+       { FE_MODCOD_16APSK_5_6,         FE_MOD_16APSK,  FE_FECRATE_5_6  },
+       { FE_MODCOD_16APSK_8_9,         FE_MOD_16APSK,  FE_FECRATE_8_9  },
+       { FE_MODCOD_16APSK_9_10,        FE_MOD_16APSK,  FE_FECRATE_9_10 },
+       { FE_MODCOD_32APSK_3_4,         FE_MOD_32APSK,  FE_FECRATE_3_4  },
+       { FE_MODCOD_32APSK_4_5,         FE_MOD_32APSK,  FE_FECRATE_4_5  },
+       { FE_MODCOD_32APSK_5_6,         FE_MOD_32APSK,  FE_FECRATE_5_6  },
+       { FE_MODCOD_32APSK_8_9,         FE_MOD_32APSK,  FE_FECRATE_8_9  },
+       { FE_MODCOD_32APSK_9_10,        FE_MOD_32APSK,  FE_FECRATE_9_10 },
+       { FE_MODCOD_RESERVED_1,         FE_MOD_RSVD,    FE_FECRATE_RSVD },
+       { FE_MODCOD_BPSK_1_3,           FE_MOD_BPSK,    FE_FECRATE_1_3  },
+       { FE_MODCOD_BPSK_1_4,           FE_MOD_BPSK,    FE_FECRATE_1_4  },
+       { FE_MODCOD_RESERVED_2,         FE_MOD_RSVD,    FE_FECRATE_RSVD }
+};
+
+int decode_dvbs2_modcod(struct dvb_frontend *fe, enum fe_modcod modcod)
+{
+       struct modcod_table *table = dvbs2_modcod_lookup;
+       struct dvb_frontend_private *fepriv = fe->frontend_priv;
+       struct dvb_frontend_params *params = &fepriv->params;
+
+       table += modcod;
+       params->delsys.dvbs2.modulation = table->modulation;
+       params->delsys.dvbs2.fecrate = table->fecrate;
+
+       return 0;
+}
+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 +566,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 +622,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 +1035,24 @@ 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) {
+                       memcpy(parg, &fepriv->caps, sizeof (struct dvb_frontend_cap));
+                       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){
+                       memcpy(parg, &fepriv->params, sizeof (struct dvb_frontend_params));
+                       err = fe->ops->get_params(fe, (struct dvb_frontend_params*) parg);
+               }
};

        up (&fepriv->sem);
diff -Naurp multiproto3.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.h multiproto3/linux/drivers/media/dvb/dvb-core/dvb_frontend.h
--- multiproto3.orig/linux/drivers/media/dvb/dvb-core/dvb_frontend.h    2006-04-29 03:22:23.000000000 +0400
+++ multiproto3/linux/drivers/media/dvb/dvb-core/dvb_frontend.h 2006-04-29 21:39:56.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);

+       /*      New callbacks based on the new 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 int decode_dvbs2_modcod(struct dvb_frontend *fe, enum fe_modcod modcod);
+
#endif
diff -Naurp multiproto3.orig/linux/include/linux/dvb/frontend.h multiproto3/linux/include/linux/dvb/frontend.h
--- multiproto3.orig/linux/include/linux/dvb/frontend.h 2006-04-29 03:22:23.000000000 +0400
+++ multiproto3/linux/include/linux/dvb/frontend.h      2006-04-30 01:23:26.000000000 +0400
@@ -249,7 +249,9 @@ struct dvb_frontend_event {
	*/
#define FE_TUNE_MODE_ONESHOT 0x01

-
+/**
+ *     FE_GET_INFO, is now a legacy IOCTL as well
+ */
#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,477 @@ 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:  ISO 13818-1/ITU H.222, EN 300 468
+ *     DVB-S2: EN 300 468, EN 301 210, TR 102 376
+ *     DVB-C:  ISO 13818-1/ITU H.222, EN 300 468, EN 300 429
+ *     DVB-T:  ISO 13818-1/ITU H.222, EN 300 468, EN 300 744
+ *     DVB-H:  EN 300 468, EN 302 304
+ */
+
+/**
+ *     Supported 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_DSS                   = (1 <<  2),
+       FE_DELSYS_DVBC                  = (1 <<  3),
+       FE_DELSYS_DVBT                  = (1 <<  4),
+       FE_DELSYS_DVBH                  = (1 <<  5),
+       FE_DELSYS_ATSC                  = (1 <<  6),
+       FE_DELSYS_AUTO                  = (1 << 31)
+};
+
+/**
+ *     Supported Transport types, some delivery systems
+ *     support multiple transports too.
+ *
+ *     FE_MATYPE_IGNORE, causes the transport type not
+ *     to be queried.
+ *
+ *     FE_MATYPE_AUTO, Some devices/drivers, might
+ *     support auto detecting the transport type, depending
+ *     on some other settings and or hardware features.
+ *
+ *     NOTE: This is specified by the DVB-S2 specifications
+ *     This change of transport type might require an additional
+ *     change at the PCI bridge level, for some implementations.
+ */
+enum fe_matype {
+       FE_MATYPE_IGNORE                = (0 <<  0),
+       FE_MATYPE_TRANSPORT             = (1 <<  0),
+       FE_MATYPE_GENERIC_PACKET        = (1 <<  1),
+       FE_MATYPE_GENERIC_CONTINUOUS    = (1 <<  2),
+       FE_MATYPE_RESERVED              = (1 <<  3),
+       FE_MATYPE_AUTO                  = (1 << 31)
+};
+
+/**
+ *     Supported Stream Priorities
+ *
+ *     Some delivery systems do have streams having
+ *     different priorities. ie, High priority/Low priority.
+ *
+ *     NOTE: The default should be the High priority stream.
+ */
+enum fe_stream {
+       FE_STREAM_HP                    = (1 <<  0),
+       FE_STREAM_LP                    = (1 <<  1)
+};
+
+/**
+ *     Supported 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_modulations {
+       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_OFDM                     = (1 << 12),
+       FE_MOD_COFDM                    = (1 << 13),
+       FE_MOD_VSB8                     = (1 << 14),
+       FE_MOD_RSVD                     = (1 << 15),
+       FE_MOD_AUTO                     = (1 << 31)
+};
+
+/**
+ *     Supported 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_fecrates {
+       FE_FECRATE_IGNORE               = (0 <<  0),
+       FE_FECRATE_NONE                 = (1 <<  0),
+       FE_FECRATE_1_4                  = (1 <<  1),
+       FE_FECRATE_1_3                  = (1 <<  2),
+       FE_FECRATE_2_5                  = (1 <<  3),
+       FE_FECRATE_1_2                  = (1 <<  4),
+       FE_FECRATE_3_5                  = (1 <<  5),
+       FE_FECRATE_2_3                  = (1 <<  6),
+       FE_FECRATE_3_4                  = (1 <<  7),
+       FE_FECRATE_4_5                  = (1 <<  8),
+       FE_FECRATE_5_6                  = (1 <<  9),
+       FE_FECRATE_6_7                  = (1 << 10),
+       FE_FECRATE_7_8                  = (1 << 11),
+       FE_FECRATE_8_9                  = (1 << 12),
+       FE_FECRATE_9_10                 = (1 << 13),
+       FE_FECRATE_RSVD                 = (1 << 14),
+       FE_FECRATE_AUTO                 = (1 << 31)
+};
+
+/**
+ *     Supported 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
+};
+
+/**
+ *     Supported Bandwidth modes
+ *
+ *     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)
+};
+
+/**
+ *     Supported 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)
+};
+
+/**
+ *     Supported 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)
+};
+
+/**
+ *     Supported 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)
+};
+
+/**
+ *     Supported 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_NONE               = (1 <<  1),
+       FE_HIERARCHY_1                  = (1 <<  2),
+       FE_HIERARCHY_2                  = (1 <<  3),
+       FE_HIERARCHY_AUTO               = (1 << 31)
+};
+
+/**
+ *     Supported 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)
+};
+
+/**
+ *     Supported 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_modulations             modulation;
+       enum fe_fecrates                fecrate;
+};
+
+/**
+ *     DVB-S2 parameters
+ */
+struct dvbs2_params {
+       __u32                           symbol_rate;
+
+       enum fe_modulations             modulation;
+       enum fe_fecrates                fecrate;
+       enum fe_stream                  streamtype;
+       enum fe_fecrates                coderate_HP;
+       enum fe_fecrates                coderate_LP;
+};
+
+/**
+ *     DSS parameters
+ */
+struct dss_params {
+       __u32                           symbol_rate;
+
+       enum fe_modulations             modulation;
+       enum fe_fecrates                fecrate;
+};
+
+/**
+ *     DVB-C parameters
+ */
+struct dvbc_params {
+       __u32                           symbol_rate;
+
+       enum fe_modulations             modulation;
+       enum fe_fecrates                fecrate;
+};
+
+/**
+ *     DVB-T parameters
+ */
+struct dvbt_params {
+       enum fe_modulations             constellation;
+       enum fe_bandwidths              bandwidth;
+       enum fe_fecrates                code_rate_HP;
+       enum fe_fecrates                code_rate_LP;
+       enum fe_transmit_modes          transmission_mode;
+       enum fe_guard_intervals         guard_interval;
+       enum fe_hierarchy_info          hierarchy;
+};
+
+/**
+ *     DVB-H parameters
+ */
+struct dvbh_params {
+       enum fe_modulations             constellation;
+       enum fe_bandwidths              bandwidth;
+       enum fe_fecrates                code_rate_HP;
+       enum fe_fecrates                code_rate_LP;
+       enum fe_transmit_modes          transmission_mode;
+       enum fe_guard_intervals         guard_interval;
+       enum fe_hierarchy_info          hierarchy;
+       enum fe_mpefec                  mpefec;
+       enum fe_timeslicing             timeslicing;
+};
+
+/**
+ *     ATSC parameters
+ */
+struct atsc_params {
+       enum fe_modulations             modulation;
+       enum fe_fecrates                fecrate;
+};
+
+/**
+ *     Padding to handle future binary compatibility issues.
+ *
+ *     NOTE: The padding is a dummy parameter !
+ */
+struct pad_params {
+       __u8 pad[512];
+};
+
+/**
+ *     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;
+
+       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 pad_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;
+
+       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 pad_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.
+ *
+ *     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)
+
#endif /*_DVBFRONTEND_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