STRUCT DVB_ADAPTER(9)
π struct dvb_adapter(9)
okay so bestie, buckle up β this is from the Kernel API Manual, and we're about to get deep into struct dvb_adapter, which is literally the main-character struct for a Digital TV adapter using the Linux DVB API. iykyk π¦
β¨ NAME β¨
struct dvb_adapter β the struct that represents a Digital TV adapter using the Linux DVB API π
π SYNOPSIS π
struct dvb_adapter {
int num;
struct list_head list_head;
struct list_head device_list;
const char *name;
u8 proposed_mac [6];
void* priv;
struct device *device;
struct module *module;
int mfe_shared;
struct dvb_device *mfe_dvbdev;
struct mutex mfe_lock;
#if defined(CONFIG_MEDIA_CONTROLLER_DVB);
struct mutex mdev_lock;
struct media_device *mdev;
struct media_entity *conn;
struct media_pad *conn_pads;
#endif;
};
no cap, that's the whole layout β now let's meet everybody in the group chat πΈ
π« Members
numβ the adapter's number. that's it, that's the whole vibe π’list_headβ a list holding the DVB adapters β¨device_listβ a list holding the DVB devices πnameβ the adapter's name, so it can be addressed properly πproposed_macβ the proposed MAC address for the adapter. six bytes ofu8doing their little thing π¦privβ private data. mind your business, it's private πdeviceβ a pointer tostruct deviceπ₯moduleβ a pointer tostruct moduleβmfe_sharedβ indicates mutually exclusive frontends, and the value matters, so pay attention:1= legacy exclusion behavior: blocking any open call2= enhanced exclusion behavior, emulating the standard behavior of busy frontends: allowing read-only sharing and otherwise returning immediately with-EBUSYwhen any of the frontends is already opened with write access
literally pick the right one, bestie π
mfe_dvbdevβ the frontend device in use, in the case of MFE π«Άmfe_lockβ the lock that prevents using the other frontends when MFE is used. keep them separated, periodt πmdev_lockβ protects access to themdevpointer. yes queen, guard it πmdevβ a pointer tostruct media_device, used when the media controller is used β¨connβ RF connector. used only if the device has no separate tuner π§conn_padsβ a pointer tostruct media_padassociated withconn(note the semicolon on the end of that one in the docs, we don't question it) π
okay themdev_lock,mdev,conn, andconn_padscrew only show up whenCONFIG_MEDIA_CONTROLLER_DVBis defined β it's giving conditional guest list ποΈ
π SEE ALSO π
the whole extended fam, in Kernel file ./include/media/dvbdev.h:
enum dvb_device_type(9)struct dvb_device(9)struct dvbdevfops_node(9)dvb_device_get(9)dvb_device_put(9)dvb_register_adapter(9)dvb_unregister_adapter(9)dvb_register_device(9)dvb_remove_device(9)dvb_unregister_device(9)dvb_create_media_graph(9)dvb_register_media_controller(9)dvb_get_media_controller(9)dvb_generic_open(9)dvb_generic_release(9)dvb_generic_ioctl(9)dvb_usercopy(9)dvb_module_probe(9)dvb_module_release(9)dvb_attach(9)dvb_detach(9)
like, the whole friend group, obsessed ππ
and that's the page, bestie β straight outta ./include/media, dated October 2026, slaying in the Kernel API Manual forever πβ¨π
π¦ 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