Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
dvb_usb.h File Reference
#include <linux/usb/input.h>
#include <linux/firmware.h>
#include <media/rc-core.h>
#include "dvb_frontend.h"
#include "dvb_demux.h"
#include "dvb_net.h"
#include "dmxdev.h"
#include "dvb-usb-ids.h"

Go to the source code of this file.

Data Structures

struct  dvb_usb_driver_info
 
struct  dvb_usb_rc
 
struct  usb_data_stream_properties
 
struct  dvb_usb_adapter_properties
 
struct  dvb_usb_device_properties
 
struct  usb_data_stream
 
struct  dvb_usb_adapter
 
struct  dvb_usb_device
 

Macros

#define adap_to_d(adap)
 
#define adap_to_priv(adap)   (adap_to_d(adap)->priv)
 
#define fe_to_adap(fe)   ((struct dvb_usb_adapter *) ((fe)->dvb->priv))
 
#define fe_to_d(fe)   (adap_to_d(fe_to_adap(fe)))
 
#define fe_to_priv(fe)   (fe_to_d(fe)->priv)
 
#define d_to_priv(d)   (d->priv)
 
#define dvb_usb_dbg_usb_control_msg(udev, r, t, v, i, b, l)
 
#define DVB_USB_STREAM_BULK(endpoint_, count_, size_)
 
#define DVB_USB_STREAM_ISOC(endpoint_, count_, frames_, size_, interval_)
 
#define DVB_USB_DEVICE(vend, prod, props_, name_, rc)
 
#define USB_BULK   1
 
#define USB_ISOC   2
 
#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
 
#define WARM   0
 
#define COLD   1
 
#define RECONNECTS_USB   1
 
#define DVB_USB_FE_TS_TYPE_188   0
 
#define DVB_USB_FE_TS_TYPE_204   1
 
#define DVB_USB_FE_TS_TYPE_RAW   2
 
#define USB_STATE_INIT   0x00
 
#define USB_STATE_URB_BUF   0x01
 

: device name

dvb usb device object : device properties

: name of rc codes table : pointer to the device's struct usb_device : pointer to the device's usb interface : remote controller configuration : work to defer .probe() : indicated whether the device is power or not : mutex for usb control messages : mutex for i2c-transfers : device's i2c-adapter : rc device for the remote control : work for polling remote : private data of the actual driver (allocate by dvb usb, size defined in size_of_priv of dvb_usb_properties).

#define MAX_NO_OF_FE_PER_ADAP   3
 
#define MAX_NO_OF_ADAPTER_PER_DEVICE   2
 
#define MAX_NO_URBS_FOR_DATA_STREAM   10
 
int dvb_usbv2_probe (struct usb_interface *, const struct usb_device_id *)
 
void dvb_usbv2_disconnect (struct usb_interface *)
 
int dvb_usbv2_suspend (struct usb_interface *, pm_message_t)
 
int dvb_usbv2_resume (struct usb_interface *)
 
int dvb_usbv2_reset_resume (struct usb_interface *)
 
int dvb_usbv2_generic_rw (struct dvb_usb_device *, u8 *, u16, u8 *, u16)
 
int dvb_usbv2_generic_write (struct dvb_usb_device *, u8 *, u16)
 

Macro Definition Documentation

#define adap_to_d (   adap)
Value:
(container_of(adap, struct dvb_usb_device, \
adapter[adap->id]))

Definition at line 58 of file dvb_usb.h.

#define adap_to_priv (   adap)    (adap_to_d(adap)->priv)

Definition at line 60 of file dvb_usb.h.

#define COLD   1

Definition at line 241 of file dvb_usb.h.

#define d_to_priv (   d)    (d->priv)

Definition at line 64 of file dvb_usb.h.

#define DVB_USB_ADAP_HAS_PID_FILTER   0x01

Definition at line 182 of file dvb_usb.h.

#define DVB_USB_ADAP_NEED_PID_FILTERING   0x04

Definition at line 184 of file dvb_usb.h.

#define DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF   0x02

Definition at line 183 of file dvb_usb.h.

#define dvb_usb_dbg_usb_control_msg (   udev,
  r,
  t,
  v,
  i,
  b,
  l 
)
Value:
{ \
char *direction; \
direction = ">>>"; \
else \
direction = "<<<"; \
dev_dbg(&udev->dev, "%s: %02x %02x %02x %02x %02x %02x %02x %02x " \
"%s %*ph\n", __func__, t, r, v & 0xff, v >> 8, \
i & 0xff, i >> 8, l & 0xff, l >> 8, direction, l, b); \
}

Definition at line 66 of file dvb_usb.h.

#define DVB_USB_DEVICE (   vend,
  prod,
  props_,
  name_,
  rc 
)
Value:
.match_flags = USB_DEVICE_ID_MATCH_DEVICE, \
.idVendor = (vend), \
.idProduct = (prod), \
.driver_info = (kernel_ulong_t) &((const struct dvb_usb_driver_info) { \
.props = (props_), \
.name = (name_), \
.rc_map = (rc), \
})

Definition at line 101 of file dvb_usb.h.

#define DVB_USB_FE_TS_TYPE_188   0

Definition at line 263 of file dvb_usb.h.

#define DVB_USB_FE_TS_TYPE_204   1

Definition at line 264 of file dvb_usb.h.

#define DVB_USB_FE_TS_TYPE_RAW   2

Definition at line 265 of file dvb_usb.h.

#define DVB_USB_STREAM_BULK (   endpoint_,
  count_,
  size_ 
)
Value:
{ \
.type = USB_BULK, \
.count = count_, \
.endpoint = endpoint_, \
.u = { \
.bulk = { \
.buffersize = size_, \
} \
} \
}

Definition at line 77 of file dvb_usb.h.

#define DVB_USB_STREAM_ISOC (   endpoint_,
  count_,
  frames_,
  size_,
  interval_ 
)
Value:
{ \
.type = USB_ISOC, \
.count = count_, \
.endpoint = endpoint_, \
.u = { \
.isoc = { \
.framesperurb = frames_, \
.framesize = size_,\
.interval = interval_, \
} \
} \
}

Definition at line 88 of file dvb_usb.h.

#define fe_to_adap (   fe)    ((struct dvb_usb_adapter *) ((fe)->dvb->priv))

Definition at line 61 of file dvb_usb.h.

#define fe_to_d (   fe)    (adap_to_d(fe_to_adap(fe)))

Definition at line 62 of file dvb_usb.h.

#define fe_to_priv (   fe)    (fe_to_d(fe)->priv)

Definition at line 63 of file dvb_usb.h.

#define MAX_NO_OF_ADAPTER_PER_DEVICE   2

struct dvb_usb_device_properties - properties of a dvb-usb-device : name of the owning driver module : owner of the dvb_adapter : values from the DVB_DEFINE_MOD_OPT_ADAPTER_NR() macro : usb interface number driver binds : bytes allocated for the driver private data : bulk control endpoint number for sent : bulk control endpoint number for receive : delay between bulk control sent and receive message : called to determine the firmware state (cold or warm) and return possible firmware file name to be loaded : name of the firmware file to be loaded : called to download the firmware : i2c_algorithm if the device has i2c-adapter : dvb usb device adapter count : called to resolve adapter count : array of all adapter properties of device : called to enable/disable power of the device : called to resolve device configuration : called to resolve adapter mac-address : called to attach the possible frontends : called to attach the possible tuners : called to power on/off active frontend : called to start/stop the usb streaming of adapter : called after adapters are created in order to finalize device configuration : called when driver is unloaded : called to resolve used remote controller configuration : called to resolve input and output stream configuration of the adapter just before streaming is started. input stream is transport stream from the demodulator and output stream is usb stream to host.

Definition at line 228 of file dvb_usb.h.

#define MAX_NO_OF_FE_PER_ADAP   3

properties of dvb usb device adapter : adapter capabilities : pid count of adapter pid-filter : called to enable/disable pid-filter : called to set/unset pid for filtering : adapter usb stream configuration

Definition at line 180 of file dvb_usb.h.

#define MAX_NO_URBS_FOR_DATA_STREAM   10

generic object of an usb stream : number of buffer allocated : size of each buffer in buf_list : array containing all allocate buffers for streaming : list of dma_addr_t for each buffer in buf_list

: number of URBs initialized : number of URBs submitted

Definition at line 280 of file dvb_usb.h.

#define RECONNECTS_USB   1

Definition at line 244 of file dvb_usb.h.

#define USB_BULK   1

Definition at line 154 of file dvb_usb.h.

#define USB_ISOC   2

Definition at line 155 of file dvb_usb.h.

#define USB_STATE_INIT   0x00

Definition at line 285 of file dvb_usb.h.

#define USB_STATE_URB_BUF   0x01

Definition at line 286 of file dvb_usb.h.

#define WARM   0

Definition at line 240 of file dvb_usb.h.

Function Documentation

void dvb_usbv2_disconnect ( struct usb_interface )

Definition at line 932 of file dvb_usb_core.c.

int dvb_usbv2_generic_rw ( struct dvb_usb_device ,
u8 ,
u16  ,
u8 ,
u16   
)

Definition at line 24 of file dvb_usb_urb.c.

int dvb_usbv2_generic_write ( struct dvb_usb_device ,
u8 ,
u16   
)

Definition at line 71 of file dvb_usb_urb.c.

int dvb_usbv2_probe ( struct usb_interface ,
const struct usb_device_id  
)

Definition at line 875 of file dvb_usb_core.c.

int dvb_usbv2_reset_resume ( struct usb_interface )

Definition at line 1025 of file dvb_usb_core.c.

int dvb_usbv2_resume ( struct usb_interface )

Definition at line 1016 of file dvb_usb_core.c.

int dvb_usbv2_suspend ( struct usb_interface ,
pm_message_t   
)

Definition at line 954 of file dvb_usb_core.c.