STRUCT CEC_ADAPTER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

struct cec_adapter β€” it's the cec adapter structure, bestie. That's the whole vibe. ✨

This one lives in the Kernel API Manual, so like… yeah, it's kernel-doc territory, put your seatbelt on. πŸŽ€


🌸 SYNOPSIS

struct cec_adapter {
    struct module *owner;
    char name[32];
    struct cec_devnode devnode;
    struct mutex lock;
    struct rc_dev *rc;
    struct list_head transmit_queue;
    unsigned int transmit_queue_sz;
    struct list_head wait_queue;
    struct cec_data *transmitting;
    bool transmit_in_progress;
    bool transmit_in_progress_aborted;
    unsigned int xfer_timeout_ms;
    struct task_struct *kthread_config;
    struct completion config_completion;
    struct task_struct *kthread;
    wait_queue_head_t kthread_waitq;
    const struct cec_adap_ops *ops;
    void *priv;
    u32 capabilities;
    u8 available_log_addrs;
    u16 phys_addr;
    bool needs_hpd;
    bool is_enabled;
    bool is_claiming_log_addrs;
    bool is_configuring;
    bool must_reconfigure;
    bool is_configured;
    bool cec_pin_is_high;
    bool adap_controls_phys_addr;
    u8 last_initiator;
    u32 monitor_all_cnt;
    u32 monitor_pin_cnt;
    u32 follower_cnt;
    struct cec_fh *cec_follower;
    struct cec_fh *cec_initiator;
    bool passthrough;
    struct cec_log_addrs log_addrs;
    struct cec_connector_info conn_info;
    u32 tx_timeout_cnt;
    u32 tx_low_drive_cnt;
    u32 tx_error_cnt;
    u32 tx_arb_lost_cnt;
    u32 tx_low_drive_log_cnt;
    u32 tx_error_log_cnt;
    u32 error_inj_tx_timeouts;
  #ifdef CONFIG_CEC_NOTIFIER;
    struct cec_notifier *notifier;
  #endif;
  #ifdef CONFIG_CEC_PIN;
    struct cec_pin *pin;
  #endif;
    struct dentry *cec_dir;
    u32 sequence;
    char input_phys[40];
 };

Like, look at her. Iconic struct energy. πŸ‘‘


πŸ¦‹ Members

Okay so here's the full tour, member by member, no skips, no cap:

  • owner β€” the module owner. Somebody's gotta own it πŸ’…
  • name β€” the name of the CEC adapter.
  • devnode β€” device node for the /dev/cecX device.
  • lock β€” mutex controlling access to this structure. Respect the lock or it's over for you 😭
  • rc β€” remote control device.
  • transmit_queue β€” queue of pending transmits.
  • transmit_queue_sz β€” number of pending transmits.
  • wait_queue β€” queue of transmits waiting for a reply.
  • transmitting β€” CEC messages currently being transmitted.
  • transmit_in_progress β€” true if a transmit is in progress.
  • transmit_in_progress_aborted β€” true if a transmit is in progress is to be aborted. This happens if the logical address is invalidated while the transmit is ongoing. In that case the transmit will finish, but will not retransmit and be marked as ABORTED.
  • xfer_timeout_ms β€” the transfer timeout in ms. If 0, then timeout after 2100 ms.
  • kthread_config β€” kthread used to configure a CEC adapter.
  • config_completion β€” used to signal completion of the config kthread.
  • kthread β€” main CEC processing thread. The main character, honestly 🫢
  • kthread_waitq β€” main CEC processing wait_queue.
  • ops β€” cec adapter ops.
  • priv β€” cec driver's private data.
  • capabilities β€” cec adapter capabilities.
  • available_log_addrs β€” maximum number of available logical addresses.
  • phys_addr β€” the current physical address.
  • needs_hpd β€” if true, then the HDMI HotPlug Detect pin must be high in order to transmit or receive CEC messages. This is usually a HW limitation.
  • is_enabled β€” the CEC adapter is enabled.
  • is_claiming_log_addrs β€” true if cec_claim_log_addrs is running.
  • is_configuring β€” the CEC adapter is configuring (i.e. claiming LAs).
  • must_reconfigure β€” while configuring, the PA changed, so reclaim LAs.
  • is_configured β€” the CEC adapter is configured (i.e. has claimed LAs).
  • cec_pin_is_high β€” if true then the CEC pin is high. Only used with the CEC pin framework.
  • adap_controls_phys_addr β€” if true, then the CEC adapter controls the physical address, i.e. the CEC hardware can detect HPD changes and read the EDID and is not dependent on an external HDMI driver. Drivers that need this can set this field to true after the cec_allocate_adapter call.
  • last_initiator β€” the initiator of the last transmitted message.
  • monitor_all_cnt β€” number of filehandles monitoring all msgs.
  • monitor_pin_cnt β€” number of filehandles monitoring pin changes.
  • follower_cnt β€” number of filehandles in follower mode.
  • cec_follower β€” filehandle of the exclusive follower.
  • cec_initiator β€” filehandle of the exclusive initiator.
  • passthrough β€” if true, then the exclusive follower is in passthrough mode.
  • log_addrs β€” current logical addresses.
  • conn_info β€” current connector info.
  • tx_timeout_cnt β€” count the number of Timed Out transmits. Reset to 0 when this is reported in cec_adap_status.
  • tx_low_drive_cnt β€” count the number of Low Drive transmits. Reset to 0 when this is reported in cec_adap_status.
  • tx_error_cnt β€” count the number of Error transmits. Reset to 0 when this is reported in cec_adap_status.
  • tx_arb_lost_cnt β€” count the number of Arb Lost transmits. Reset to 0 when this is reported in cec_adap_status.
  • tx_low_drive_log_cnt β€” number of logged Low Drive transmits since the adapter was enabled. Used to avoid flooding the kernel log if this happens a lot. (ngl, very considerate of her 🌸)
  • tx_error_log_cnt β€” number of logged Error transmits since the adapter was enabled. Used to avoid flooding the kernel log if this happens a lot.
  • error_inj_tx_timeouts β€” error injection: the next error_inj_tx_timeouts transmits will time out. 😈
  • notifier β€” CEC notifier.
  • pin β€” CEC pin status struct.
  • cec_dir β€” debugfs cec directory.
  • sequence β€” transmit sequence counter.
  • input_phys β€” remote control input_phys name.

✨ Description ✨

This structure represents a cec adapter. That's it, that's the sentence β€” she said what she said πŸ’–


πŸ”₯ SEE ALSO

Go read these next, iykyk:


okay that's the whole page, you ate that 🫢 this one's hanging out at ./include/media, dated October 2026, and it's from the Kernel API Manual β€” mwah, go touch some registers bestie πŸ’œ

πŸ“¦ where this page comes from