Skip to content

RDKDEV-1424 Add HDMICEC Documentation - #60

Merged
apatel859 merged 3 commits into
rdkcentral:developfrom
gourivarma3:feature/RDKDEV-1424
Jul 26, 2026
Merged

RDKDEV-1424 Add HDMICEC Documentation#60
apatel859 merged 3 commits into
rdkcentral:developfrom
gourivarma3:feature/RDKDEV-1424

Conversation

@gourivarma3

@gourivarma3 gourivarma3 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

RDKDEV-1424
Added documentation for HDMI CEC library including features, design, and configuration.
I have read the CLA Document and I hereby sign the CLA

Add detailed documentation for HDMI CEC library including features, design, and configuration.
Copilot AI review requested due to automatic review settings June 8, 2026 12:49
@gourivarma3
gourivarma3 requested a review from a team as a code owner June 8, 2026 12:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a comprehensive top-level README documenting the HDMI CEC middleware library in the RDK stack, covering architecture, threading model, initialization/state flows, HAL integration, and runtime configuration.

Changes:

  • Introduces new README.md with detailed component overview, design notes, and module breakdown.
  • Adds multiple Mermaid diagrams for system positioning, internal architecture, and call flows.
  • Documents build/runtime dependencies and configuration (e.g., log level via /tmp/cec_log_enabled).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 20, 2026 11:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 20, 2026 12:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (8)

README.md:61

  • The Design section says the reader thread "continuously polls" the driver, but in the implementation DriverImpl::read() blocks on rQueue.poll() (condition variable wait) until a frame is available. Rewording avoids implying a CPU-intensive polling loop.
The HDMI CEC component implements a layered architecture that separates bus management, protocol handling, and hardware abstraction. At the core is the Bus singleton which manages the CEC communication channel through dedicated reader and writer threads. The reader thread continuously polls the driver for incoming frames and dispatches them to registered listeners, while the writer thread processes an event queue of outgoing frames. This design ensures non-blocking operations and meets CEC protocol timing requirements.

README.md:199

  • In this state-flow sequence diagram, init() is shown as setting the initialized flag before the driver/bus start. In code (ccec/src/LibCCEC.cpp), initialized = true is set only after Driver::open() and Bus::start() succeed. Adjust the diagram text to match the actual ordering.
    LibCEC->>LibCEC: Set initialized flag / set log prefix / read /tmp/cec_log_enabled

README.md:224

  • This runtime loop note says the reader "polls" the driver, but the receive path blocks (EventQueue::poll waits on a condition variable). Wording it as "waits" avoids implying busy polling.
        Note over Reader: Poll driver for frames

README.md:382

  • The message-reception sequence describes the reader as "polling" and the driver as "Poll rQueue", but EventQueue::poll() blocks; it’s not a busy poll. Reword these steps to reflect the blocking wait semantics.
    Note over Reader: Reader thread polling
    Reader->>Driver: read(frame)
    Driver->>Driver: Poll rQueue

README.md:407

  • This note says the reader will "Continue polling" for frames, but the implementation waits (blocks) for the next frame. Reword to avoid implying CPU polling.
    Note over Reader: Continue polling for next frame

README.md:499

  • In the event-notification flow, "Reader thread polls" is misleading because the reader blocks waiting for frames (via Driver::read() and EventQueue::poll()). Reword to match the blocking behavior.
    Lib->>Lib: Queue frame, Reader thread polls

README.md:534

  • This implementation detail says the reader thread "polls" Driver::read(), but Driver::read() blocks on the receive queue. Updating the wording will make it consistent with the actual blocking implementation and earlier explanations.
- **Event Processing**: Reader thread polls Driver::read() in a continuous loop. Driver::read() blocks on rQueue.poll() until a frame is available. When a frame arrives via DriverReceiveCallback, it's offered to the queue. Reader locks rMutex and iterates through all FrameListener instances calling notify() synchronously. No explicit event queue for received messages - dispatch happens immediately in reader thread context. Writer thread blocks on wQueue.poll() waiting for frames to transmit.

README.md:282

  • In this initialization call-flow diagram, the initialized = true assignment is shown inside the early "Not yet initialized" block, but in code (LibCCEC.cpp) initialized is set only at the end of init() after the driver is opened and the bus is started. Update the diagram step to avoid implying the flag is set before startup completes.
    alt Not yet initialized
        LibCEC->>LibCEC: Set initialized = true
        LibCEC->>LibCEC: Set log prefix
    end

@apatel859
apatel859 merged commit 3861ce3 into rdkcentral:develop Jul 26, 2026
6 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants