]> Pileus Git - ~andy/linux/blobdiff - drivers/media/dvb/dvb-usb/dvb-usb.h
[media] af9015: limit I2C access to keep FW happy
[~andy/linux] / drivers / media / dvb / dvb-usb / dvb-usb.h
index 7d35d078342b41522443868a2436fadc550ad92c..6d7d13f9ce68236579a77777169a888783b04d2f 100644 (file)
@@ -124,6 +124,8 @@ struct usb_data_stream_properties {
  * @caps: capabilities of the DVB USB device.
  * @pid_filter_count: number of PID filter position in the optional hardware
  *  PID-filter.
+ * @num_frontends: number of frontends of the DVB USB adapter.
+ * @frontend_ctrl: called to power on/off active frontend.
  * @streaming_ctrl: called to start and stop the MPEG2-TS streaming of the
  *  device (not URB submitting/killing).
  * @pid_filter_ctrl: called to en/disable the PID filter, if any.
@@ -134,7 +136,7 @@ struct usb_data_stream_properties {
  *  pll_desc and pll_init_buf of struct dvb_usb_device).
  * @stream: configuration of the USB streaming
  */
-struct dvb_usb_adapter_properties {
+struct dvb_usb_adapter_fe_properties {
 #define DVB_USB_ADAP_HAS_PID_FILTER               0x01
 #define DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF 0x02
 #define DVB_USB_ADAP_NEED_PID_FILTERING           0x04
@@ -152,9 +154,18 @@ struct dvb_usb_adapter_properties {
        struct usb_data_stream_properties stream;
 
        int size_of_priv;
+};
+
+#define MAX_NO_OF_FE_PER_ADAP 2
+struct dvb_usb_adapter_properties {
+       int size_of_priv;
 
+       int (*frontend_ctrl)   (struct dvb_frontend *, int);
        int (*fe_ioctl_override) (struct dvb_frontend *,
                                  unsigned int, void *, unsigned int);
+
+       int num_frontends;
+       struct dvb_usb_adapter_fe_properties fe[MAX_NO_OF_FE_PER_ADAP];
 };
 
 /**
@@ -345,6 +356,20 @@ struct usb_data_stream {
  *
  * @stream: the usb data stream.
  */
+struct dvb_usb_fe_adapter {
+       struct dvb_frontend *fe;
+
+       int (*fe_init)  (struct dvb_frontend *);
+       int (*fe_sleep) (struct dvb_frontend *);
+
+       struct usb_data_stream stream;
+
+       int pid_filtering;
+       int max_feed_count;
+
+       void *priv;
+};
+
 struct dvb_usb_adapter {
        struct dvb_usb_device *dev;
        struct dvb_usb_adapter_properties props;
@@ -356,20 +381,16 @@ struct dvb_usb_adapter {
        u8  id;
 
        int feedcount;
-       int pid_filtering;
 
        /* dvb */
        struct dvb_adapter   dvb_adap;
        struct dmxdev        dmxdev;
        struct dvb_demux     demux;
        struct dvb_net       dvb_net;
-       struct dvb_frontend *fe;
-       int                  max_feed_count;
-
-       int (*fe_init)  (struct dvb_frontend *);
-       int (*fe_sleep) (struct dvb_frontend *);
 
-       struct usb_data_stream stream;
+       struct dvb_usb_fe_adapter fe_adap[MAX_NO_OF_FE_PER_ADAP];
+       int active_fe;
+       int num_frontends_initialized;
 
        void *priv;
 };