STRUCT DMXDEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct dmxdev(9) πŸ’…

okay so bestie, gather round, because we're diving into the Kernel API Manual and this one is literally the blueprint for a digital TV demux device, no cap. it's giving "backstage pass to the whole demux operation" and i am obsessed. πŸŽ€


✨ NAME ✨

struct dmxdev β€” describes a digital TV demux device. that's it, that's the vibe. it's the main character struct that holds the entire demux life together. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

struct dmxdev {
    struct dvb_device *dvbdev;
    struct dvb_device *dvr_dvbdev;
    struct dmxdev_filter *filter;
    struct dmx_demux *demux;
    int filternum;
    int capabilities;
    unsigned int may_do_mmap:1;
    unsigned int exit:1;
  #define DMXDEV_CAP_DUPLEX 1;
    struct dmx_frontend *dvr_orig_fe;
    struct dvb_ringbuffer dvr_buffer;
  #define DVR_BUFFER_SIZE (10*188*1024);
    struct dvb_vb2_ctx dvr_vb2_ctx;
    struct mutex mutex;
    spinlock_t lock;
 };

look at her. every field is doing its job. iconic behavior honestly. 🫢


🌸 Members 🌸

these are the squad members, and yes, each one has a role and each one ate:

  • dvbdev β€” pointer to struct dvb_device associated with the demux device node. basically the demux node's official rep. πŸ’–
  • dvr_dvbdev β€” pointer to struct dvb_device associated with the dvr device node. same energy, but for the dvr side of things.
  • filter β€” pointer to struct dmxdev_filter. the filter crew, linked up.
  • demux β€” pointer to struct dmx_demux. the actual demux brain trust.
  • filternum β€” number of filters. a count. a lil number. lowkey important.
  • capabilities β€” demux capabilities as defined by enum dmx_demux_caps. this is where the flex-worthy features get declared. ✨
  • may_do_mmap β€” flag used to indicate if the device may do mmap. permission slip energy, fr fr.
  • exit β€” flag to indicate that the demux is being released. the goodbye flag. 😭
  • dvr_orig_fe β€” pointer to struct dmx_frontend.
  • dvr_buffer β€” embedded struct dvb_ringbuffer for DVB output. the ring buffer stays embedded, we love a self-contained queen.
  • dvr_vb2_ctx β€” control struct for VB2 handler.
  • mutex β€” protects the usage of this structure. do not skip the mutex, i'm begging. πŸ”₯
  • lock β€” protects access to dmxdev->filter->data. different lock, different job, same "respect it or regret it" energy.
bestie pls note: mutex and lock are two separate things guarding two separate things β€” don't be out here mixing them up πŸ’€

🧚 SEE ALSO 🧚

go read these next, they're all part of the same lore drop:


and that's the whole page bestie, you understood it perfectly, i'm so proud πŸ₯Ή

sign-off time: this masterpiece lives in ./include/media, dated October 2026, and it's brought to you as struct dmxdev(9). slay, periodt, go read the kernel. πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from