STRUCT DVB_USB_DEVICE(9)
๐ struct dvb_usb_device(9) โ Kernel API Manual realness โจ
okay so bestie, this is the manual page for struct dvb_usb_device (that'd be the object of a DVB USB device, iykyk) โ straight outta the Kernel API Manual. buckle up, it's giving data-structure lore ๐
๐ธ NAME ๐ธ
struct dvb_usb_device โ the object of a DVB USB device. literally the main character of every dvb-usb driver ๐
โจ SYNOPSIS โจ
struct dvb_usb_device {
struct dvb_usb_device_properties props;
const struct dvb_usb_device_description *desc;
struct usb_device *udev;
#define DVB_USB_STATE_INIT 0x000;
#define DVB_USB_STATE_I2C 0x001;
#define DVB_USB_STATE_DVB 0x002;
#define DVB_USB_STATE_REMOTE 0x004;
int state;
int powered;
struct mutex data_mutex;
struct mutex usb_mutex;
struct mutex i2c_mutex;
struct i2c_adapter i2c_adap;
int num_adapters_initialized;
struct dvb_usb_adapter adapter[MAX_NO_OF_ADAPTER_PER_DEVICE];
struct rc_dev *rc_dev;
struct input_dev *input_dev;
char rc_phys[64];
struct delayed_work rc_query_work;
u32 last_event;
int last_state;
struct module *owner;
void *priv;
};
she's long, she's detailed, she's iconic ๐
๐ฆ Members ๐ฆ
propsโ a copy of thestruct dvb_usb_propertiesthat this device belongs to. like, which family she's from ๐descโ pointer to the device'sstruct dvb_usb_device_description.udevโ pointer to the device'sstruct usb_device.stateโ the initialization and runtime state of the device. the vibe check variable, fr fr ๐ซpoweredโ says whether the device is powered or not. no cap:poweredgets in/decremented on each call to modify the state. it's a lil counter, okay ๐data_mutexโ mutex that protects the data structure used to store URB data ๐usb_mutexโ mutex of USB control messages (reading needs two messages, don't ask ๐ญ). โ ๏ธ please notice: this mutex is used internally at the generic URB control functions. so if your driver usesdvb_usb_generic_rwand derived functions, do not lock it internally โ that's a one-way ticket to deadlock city ๐i2c_mutexโ mutex for i2c-transfers ๐i2c_adapโ the device'si2c_adapter, if it uses I2CoverUSB โจnum_adapters_initializedโ number of initialized adapters. a headcount, basically ๐งฎadapterโ the adapters themselves ๐ซถrc_devโ rc device for the remote control (rc-core mode) ๐บinput_devโ input device for the remote control (legacy mode) โ yes both modes exist, she's versatile ๐โโ๏ธrc_physโ the rc device path ๐rc_query_workโ astruct work_structfor frequent rc queries. she works hard โญlast_eventโ the last triggered event ๐ฅlast_stateโ the last state (no,pressed,repeat) โ pick a lane bestie ๐ownerโ owner of thedvb_adapter๐privโ private data of the actual driver. it's allocated by dvb-usb, and the size is defined insize_of_privofdvb_usb_properties๐
๐ SEE ALSO ๐
the whole friend group ๐ซถ โ the kernel file ./drivers/media/usb/dvb-usb/dvb-usb.h, plus:
struct dvb_usb_device_description(9)struct dvb_usb_adapter_fe_properties(9)struct dvb_rc_legacy(9)struct dvb_rc(9)enum dvb_usb_mode(9)struct dvb_usb_device_properties(9)struct usb_data_stream(9)struct dvb_usb_fe_adapter(9)struct dvb_usb_adapter(9)
reminder bestie: this is kernel API, so treat the mutexes with the respect they deserve or the kernel will humble you ๐ญ๐
and that's the page!! sourced from ./drivers/media/usb/dvb-usb, dated October 2026, from the Kernel API Manual โ struct dvb_usb_device(9) slayed, no notes, periodt ๐๐ฆ๐
๐ฆ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms