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/input.h>
#include <linux/usb.h>
#include <linux/firmware.h>
#include <linux/mutex.h>
#include <media/rc-core.h>
#include "dvb_frontend.h"
#include "dvb_demux.h"
#include "dvb_net.h"
#include "dmxdev.h"
#include "dvb-pll.h"
#include "dvb-usb-ids.h"

Go to the source code of this file.

Data Structures

struct  dvb_usb_device_description
struct  usb_data_stream_properties
struct  dvb_usb_adapter_fe_properties
struct  dvb_usb_adapter_properties
struct  dvb_rc_legacy
struct  dvb_rc
struct  dvb_usb_device_properties
struct  usb_data_stream
struct  dvb_usb_fe_adapter
struct  dvb_usb_adapter
struct  dvb_usb_device
struct  hexline


#define dprintk(args...)
#define debug_dump(b, l, func)
#define DVB_USB_DEBUG_STATUS   " (debugging is not enabled)"
#define DVB_USB_LOG_PREFIX   "dvb-usb (please define a log prefix)"
#define err(format, arg...)   printk(KERN_ERR DVB_USB_LOG_PREFIX ": " format "\n" , ## arg)
#define info(format, arg...)   printk(KERN_INFO DVB_USB_LOG_PREFIX ": " format "\n" , ## arg)
#define warn(format, arg...)   printk(KERN_WARNING DVB_USB_LOG_PREFIX ": " format "\n" , ## arg)
#define DVB_USB_ID_MAX_NUM   15
#define USB_BULK   1
#define USB_ISOC   2
#define DVB_USB_ADAP_RECEIVES_204_BYTE_TS   0x08
#define REMOTE_NO_KEY_PRESSED   0x00
#define REMOTE_KEY_PRESSED   0x01
#define REMOTE_KEY_REPEAT   0x02
#define DVB_USB_IS_AN_I2C_ADAPTER   0x01
#define CYPRESS_AN2135   1
#define CYPRESS_AN2235   2
#define CYPRESS_FX2   3
#define USB_STATE_INIT   0x00
#define USB_STATE_URB_BUF   0x01
#define DVB_USB_ADAP_STATE_INIT   0x000
#define DVB_USB_ADAP_STATE_DVB   0x001
#define DVB_USB_STATE_INIT   0x000
#define DVB_USB_STATE_I2C   0x001
#define DVB_USB_STATE_DVB   0x002
#define DVB_USB_STATE_REMOTE   0x004

: real name of the box, regardless which DVB USB device class is in use

struct dvb_usb_device_description - name and its according USB IDs

: array of struct usb_device_id which describe the device in pre-firmware state : array of struct usb_device_id which describe the device in post-firmware state

Each DVB USB device class can have one or more actual devices, this struct assigns a name to it.

#define MAX_NO_OF_FE_PER_ADAP   3
enum  dvb_usb_mode { DVB_RC_LEGACY, DVB_RC_CORE }
int dvb_usb_device_init (struct usb_interface *, struct dvb_usb_device_properties *, struct module *, struct dvb_usb_device **, short *adapter_nums)
void dvb_usb_device_exit (struct usb_interface *)
int dvb_usb_generic_rw (struct dvb_usb_device *, u8 *, u16, u8 *, u16, int)
int dvb_usb_generic_write (struct dvb_usb_device *, u8 *, u16)
int dvb_usb_nec_rc_key_to_event (struct dvb_usb_device *, u8[], u32 *, int *)
int usb_cypress_load_firmware (struct usb_device *udev, const struct firmware *fw, int type)
int dvb_usb_get_hexline (const struct firmware *fw, struct hexline *hx, int *pos)

Macro Definition Documentation

#define CYPRESS_AN2135   1

Definition at line 267 of file dvb-usb.h.

#define CYPRESS_AN2235   2

Definition at line 268 of file dvb-usb.h.

#define CYPRESS_FX2   3

Definition at line 269 of file dvb-usb.h.

#define debug_dump (   b,

Definition at line 41 of file dvb-usb.h.


Definition at line 266 of file dvb-usb.h.

#define dprintk (   args...)

Definition at line 40 of file dvb-usb.h.


Definition at line 140 of file dvb-usb.h.


Definition at line 142 of file dvb-usb.h.


Definition at line 141 of file dvb-usb.h.

#define DVB_USB_ADAP_RECEIVES_204_BYTE_TS   0x08

Definition at line 143 of file dvb-usb.h.


Definition at line 144 of file dvb-usb.h.

#define DVB_USB_ADAP_STATE_DVB   0x001

Definition at line 377 of file dvb-usb.h.

#define DVB_USB_ADAP_STATE_INIT   0x000

Definition at line 376 of file dvb-usb.h.

#define DVB_USB_DEBUG_STATUS   " (debugging is not enabled)"

Definition at line 43 of file dvb-usb.h.

#define DVB_USB_ID_MAX_NUM   15

Definition at line 73 of file dvb-usb.h.

#define DVB_USB_IS_AN_I2C_ADAPTER   0x01

Definition at line 263 of file dvb-usb.h.

#define DVB_USB_LOG_PREFIX   "dvb-usb (please define a log prefix)"

Definition at line 49 of file dvb-usb.h.

#define DVB_USB_STATE_DVB   0x002

Definition at line 429 of file dvb-usb.h.

#define DVB_USB_STATE_I2C   0x001

Definition at line 428 of file dvb-usb.h.

#define DVB_USB_STATE_INIT   0x000

Definition at line 427 of file dvb-usb.h.

#define DVB_USB_STATE_REMOTE   0x004

Definition at line 430 of file dvb-usb.h.

#define err (   format,
)    printk(KERN_ERR DVB_USB_LOG_PREFIX ": " format "\n" , ## arg)

Definition at line 53 of file dvb-usb.h.

#define info (   format,
)    printk(KERN_INFO DVB_USB_LOG_PREFIX ": " format "\n" , ## arg)

Definition at line 55 of file dvb-usb.h.


struct dvb_usb_device_properties - properties of a dvb-usb-device : which USB device-side controller is in use. Needed for firmware download. : name of the firmware file. : called to download the firmware when the usb_ctrl is DEVICE_SPECIFIC. : device doesn't do a reconnect after downloading the firmware, so do the warm initialization right after it

: how many bytes shall be allocated for the private field of struct dvb_usb_device.

: called to enable/disable power of the device. : called to read the MAC address of the device. : called to determine the state (cold or warm), when it is not distinguishable by the USB IDs.

: remote controller properties

: i2c_algorithm if the device has I2CoverUSB.

: most of the DVB USB devices have a generic endpoint which received control messages with bulk transfers. When this is non-zero, one can use dvb_usb_generic_rw and dvb_usb_generic_write- helper functions.

: some DVB USB devices use a separate endpoint for responses to control messages sent with bulk transfers via the generic_bulk_ctrl_endpoint. When this is non-zero, this will be used instead of the generic_bulk_ctrl_endpoint when reading usb responses in the dvb_usb_generic_rw helper function.

: number of struct dvb_usb_device_description in : array of struct dvb_usb_device_description compatibles with these properties.

Definition at line 260 of file dvb-usb.h.

#define MAX_NO_OF_FE_PER_ADAP   3

Definition at line 160 of file dvb-usb.h.


struct usb_data_stream - 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 310 of file dvb-usb.h.

#define REMOTE_KEY_PRESSED   0x01

Definition at line 181 of file dvb-usb.h.

#define REMOTE_KEY_REPEAT   0x02

Definition at line 182 of file dvb-usb.h.

#define REMOTE_NO_KEY_PRESSED   0x00

Definition at line 180 of file dvb-usb.h.

#define USB_BULK   1

Definition at line 103 of file dvb-usb.h.

#define USB_ISOC   2

Definition at line 104 of file dvb-usb.h.

#define USB_STATE_INIT   0x00

Definition at line 315 of file dvb-usb.h.

#define USB_STATE_URB_BUF   0x01

Definition at line 316 of file dvb-usb.h.

#define warn (   format,
)    printk(KERN_WARNING DVB_USB_LOG_PREFIX ": " format "\n" , ## arg)

Definition at line 57 of file dvb-usb.h.

Enumeration Type Documentation

enum dvb_usb_mode - Specifies if it is using a legacy driver or a new one based on rc-core This is initialized/used only inside dvb-usb-remote.c. It shouldn't be set by the drivers.


Definition at line 218 of file dvb-usb.h.

Function Documentation

void dvb_usb_device_exit ( struct usb_interface )

Definition at line 286 of file dvb-usb-init.c.

int dvb_usb_device_init ( struct usb_interface ,
struct dvb_usb_device_properties ,
struct module ,
struct dvb_usb_device **  ,
short adapter_nums 

Definition at line 233 of file dvb-usb-init.c.

int dvb_usb_generic_rw ( struct dvb_usb_device ,
u8 ,
u16  ,
u8 ,
u16  ,

Definition at line 11 of file dvb-usb-urb.c.

int dvb_usb_generic_write ( struct dvb_usb_device ,
u8 ,

Definition at line 63 of file dvb-usb-urb.c.

int dvb_usb_get_hexline ( const struct firmware fw,
struct hexline hx,
int pos 

Definition at line 115 of file dvb-usb-firmware.c.

int dvb_usb_nec_rc_key_to_event ( struct dvb_usb_device ,
u8  [],
u32 ,
int usb_cypress_load_firmware ( struct usb_device *  udev,
const struct firmware fw,
int  type 

Definition at line 36 of file dvb-usb-firmware.c.