STRUCT CEC_ADAPTER(9)
π 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/cecXdevice.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βtrueif a transmit is in progress.transmit_in_progress_abortedβtrueif 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. If0, then timeout after2100ms.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β iftrue, 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βtrueifcec_claim_log_addrsis 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β iftruethen the CEC pin is high. Only used with the CEC pin framework.adap_controls_phys_addrβ iftrue, 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 totrueafter thecec_allocate_adaptercall.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β iftrue, 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 to0when this is reported incec_adap_status.tx_low_drive_cntβ count the number of Low Drive transmits. Reset to0when this is reported incec_adap_status.tx_error_cntβ count the number of Error transmits. Reset to0when this is reported incec_adap_status.tx_arb_lost_cntβ count the number of Arb Lost transmits. Reset to0when this is reported incec_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 nexterror_inj_tx_timeoutstransmits will time out. πnotifierβ CEC notifier.pinβ CEC pin status struct.cec_dirβ debugfs cec directory.sequenceβ transmit sequence counter.input_physβ remote controlinput_physname.
β¨ 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:
- Kernel file
./include/media/cec.hstruct cec_devnode(9),cec_is_registered(9),cec_queue_pin_cec_event(9),cec_queue_pin_hpd_event(9),cec_queue_pin_5v_event(9),cec_get_edid_phys_addr(9),cec_phys_addr_invalidate(9),cec_get_edid_spa_location(9)
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
- 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