drivers/media/usb/dvb-usb-v2/dvb_usb.h
Source file repositories/reference/linux-study-clean/drivers/media/usb/dvb-usb-v2/dvb_usb.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/dvb-usb-v2/dvb_usb.h- Extension
.h- Size
- 13378 bytes
- Lines
- 418
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/usb/input.hlinux/firmware.hmedia/rc-core.hmedia/media-device.hmedia/dvb_frontend.hmedia/dvb_demux.hmedia/dvb_net.hmedia/dmxdev.hmedia/dvb-usb-ids.h
Detected Declarations
struct dvb_usb_devicestruct dvb_usb_adapterstruct dvb_usb_driver_infostruct dvb_usb_rcstruct usb_data_stream_propertiesstruct dvb_usb_adapter_propertiesstruct dvb_usb_device_propertiesstruct usb_data_streamstruct dvb_usb_adapterstruct dvb_usb_devicefunction Copyright
Annotated Snippet
struct dvb_usb_driver_info {
const char *name;
const char *rc_map;
const struct dvb_usb_device_properties *props;
};
/**
* struct dvb_usb_rc - structure for remote controller configuration
* @map_name: name of rc codes table
* @allowed_protos: protocol(s) supported by the driver
* @change_protocol: callback to change protocol
* @query: called to query an event from the device
* @interval: time in ms between two queries
* @driver_type: used to point if a device supports raw mode
* @bulk_mode: device supports bulk mode for rc (disable polling mode)
* @timeout: set to length of last space before raw IR goes idle
*/
struct dvb_usb_rc {
const char *map_name;
u64 allowed_protos;
int (*change_protocol)(struct rc_dev *dev, u64 *rc_proto);
int (*query) (struct dvb_usb_device *d);
unsigned int interval;
enum rc_driver_type driver_type;
bool bulk_mode;
int timeout;
};
/**
* struct usb_data_stream_properties - usb streaming configuration for adapter
* @type: urb type
* @count: count of used urbs
* @endpoint: stream usb endpoint number
* @u: union for @bulk and @isoc
*/
struct usb_data_stream_properties {
#define USB_BULK 1
#define USB_ISOC 2
u8 type;
u8 count;
u8 endpoint;
union {
struct {
unsigned int buffersize; /* per URB */
} bulk;
struct {
int framesperurb;
int framesize;
int interval;
} isoc;
} u;
};
/**
* struct dvb_usb_adapter_properties - properties of dvb usb device adapter
* @caps: adapter capabilities
* @pid_filter_count: pid count of adapter pid-filter
* @pid_filter_ctrl: called to enable/disable pid-filter
* @pid_filter: called to set/unset pid for filtering
* @stream: adapter usb stream configuration
*/
struct dvb_usb_adapter_properties {
#define MAX_NO_OF_FE_PER_ADAP 3
#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
u8 caps;
u8 pid_filter_count;
int (*pid_filter_ctrl) (struct dvb_usb_adapter *, int);
int (*pid_filter) (struct dvb_usb_adapter *, int, u16, int);
struct usb_data_stream_properties stream;
};
/**
* struct dvb_usb_device_properties - properties of a dvb-usb-device
* @driver_name: name of the owning driver module
* @owner: owner of the dvb_adapter
* @adapter_nr: values from the DVB_DEFINE_MOD_OPT_ADAPTER_NR() macro
* @bInterfaceNumber: usb interface number driver binds
* @size_of_priv: bytes allocated for the driver private data
* @generic_bulk_ctrl_endpoint: bulk control endpoint number for sent
* @generic_bulk_ctrl_endpoint_response: bulk control endpoint number for
* receive
* @generic_bulk_ctrl_delay: delay between bulk control sent and receive message
* @probe: like probe on driver model
* @disconnect: like disconnect on driver model
* @identify_state: called to determine the firmware state (cold or warm) and
Annotation
- Immediate include surface: `linux/usb/input.h`, `linux/firmware.h`, `media/rc-core.h`, `media/media-device.h`, `media/dvb_frontend.h`, `media/dvb_demux.h`, `media/dvb_net.h`, `media/dmxdev.h`.
- Detected declarations: `struct dvb_usb_device`, `struct dvb_usb_adapter`, `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`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.