Skip to content

Feature/24 task common hal review#315

Open
Ulrond wants to merge 8 commits intodevelopfrom
feature/24-task-common-hal---review
Open

Feature/24 task common hal review#315
Ulrond wants to merge 8 commits intodevelopfrom
feature/24-task-common-hal---review

Conversation

@Ulrond
Copy link
Collaborator

@Ulrond Ulrond commented Jan 2, 2026

Review all usage of state.aidl across the interface

@Ulrond Ulrond added this to the 0.13.0 milestone Jan 2, 2026
@Ulrond Ulrond requested a review from a team January 2, 2026 18:46
@Ulrond Ulrond self-assigned this Jan 2, 2026
@Ulrond Ulrond added this to halif_aidl Jan 2, 2026
Copilot AI review requested due to automatic review settings January 2, 2026 18:46
@Ulrond Ulrond added the enhancement New feature or request label Jan 2, 2026
@Ulrond Ulrond linked an issue Jan 2, 2026 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this to Architecture Review Required in halif_aidl Jan 2, 2026
@github-actions
Copy link

github-actions bot commented Jan 2, 2026


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the CLA.
✅ (Ulrond)[https://github.com/Ulrond]
❌ @Copilot
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copilot AI and others added 5 commits January 2, 2026 18:48
Co-authored-by: Ulrond <131959864+Ulrond@users.noreply.github.com>
Co-authored-by: Ulrond <131959864+Ulrond@users.noreply.github.com>
Co-authored-by: Ulrond <131959864+Ulrond@users.noreply.github.com>
…ibility)

Co-authored-by: Ulrond <131959864+Ulrond@users.noreply.github.com>
Co-authored-by: Ulrond <131959864+Ulrond@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates from a shared common State.aidl to module-specific State.aidl enums, addressing the deprecation of the common State type and implementing the project's guideline for each module to define its own state management.

Key changes:

  • Added new module-specific State.aidl files for videosink, videodecoder, hdmioutput, broadcast/frontend, avclock, and audiosink
  • Updated import statements across all affected interfaces to reference module-specific State enums instead of the common one
  • Added deprecation notice to the common State.aidl file
  • Updated CMakeLists.txt files to include the new State.aidl files in builds

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
videosink/current/com/rdk/hal/videosink/State.aidl New module-specific State enum for video sink component
videosink/current/com/rdk/hal/videosink/IVideoSinkEventListener.aidl Updated import to use videosink-specific State
videosink/current/com/rdk/hal/videosink/IVideoSinkControllerListener.aidl Updated import to use videosink-specific State
videosink/current/com/rdk/hal/videosink/IVideoSink.aidl Updated import to use videosink-specific State
videosink/current/CMakeLists.txt Added State.aidl to build sources
videodecoder/current/com/rdk/hal/videodecoder/State.aidl New module-specific State enum for video decoder component
videodecoder/current/com/rdk/hal/videodecoder/IVideoDecoderEventListener.aidl Updated import to use videodecoder-specific State
videodecoder/current/com/rdk/hal/videodecoder/IVideoDecoder.aidl Updated import to use videodecoder-specific State
videodecoder/current/CMakeLists.txt Added State.aidl to build sources and removed common State.aidl reference
hdmioutput/current/com/rdk/hal/hdmioutput/State.aidl New module-specific State enum for HDMI output component
hdmioutput/current/com/rdk/hal/hdmioutput/IHDMIOutputEventListener.aidl Updated import to use hdmioutput-specific State
hdmioutput/current/com/rdk/hal/hdmioutput/IHDMIOutput.aidl Updated import to use hdmioutput-specific State
hdmioutput/current/CMakeLists.txt Added State.aidl to build sources
hdmiinput/current/com/rdk/hal/hdmiinput/State.aidl Updated package name from com.rdk.hal to com.rdk.hal.hdmiinput
common/current/com/rdk/hal/State.aidl Added deprecation notice indicating modules should use their own State enums
broadcast/current/com/rdk/hal/broadcast/frontend/State.aidl New module-specific State enum for broadcast frontend component
broadcast/current/com/rdk/hal/broadcast/frontend/IFrontendListener.aidl Updated import to use frontend-specific State
broadcast/current/com/rdk/hal/broadcast/frontend/IFrontendController.aidl Updated import to use frontend-specific State
broadcast/current/com/rdk/hal/broadcast/frontend/IFrontend.aidl Updated import to use frontend-specific State
broadcast/current/CMakeLists.txt Added State.aidl to build sources
avclock/current/com/rdk/hal/avclock/State.aidl New module-specific State enum for AV clock component
avclock/current/com/rdk/hal/avclock/IAVClockEventListener.aidl Updated import to use avclock-specific State
avclock/current/com/rdk/hal/avclock/IAVClockControllerListener.aidl Updated import to use avclock-specific State
avclock/current/com/rdk/hal/avclock/IAVClock.aidl Updated import to use avclock-specific State
avclock/current/CMakeLists.txt Added State.aidl to build sources
audiosink/current/com/rdk/hal/audiosink/State.aidl New module-specific State enum for audio sink component
audiosink/current/com/rdk/hal/audiosink/IAudioSinkEventListener.aidl Updated import to use audiosink-specific State
audiosink/current/com/rdk/hal/audiosink/IAudioSinkControllerListener.aidl Updated import to use audiosink-specific State
audiosink/current/com/rdk/hal/audiosink/IAudioSink.aidl Updated import to use audiosink-specific State
audiosink/current/CMakeLists.txt Added State.aidl to build sources

Comment on lines +60 to +65
STOPPING = 7,

/**
* The AV Clock is transitioning from ready to closed state.
*/
CLOSING = 8
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

This State enum is missing the FLUSHING state that exists in the deprecated common State.aidl (value 6). The common State.aidl includes: CLOSED = 1, OPENING = 2, READY = 3, STARTING = 4, STARTED = 5, FLUSHING = 6, STOPPING = 7, CLOSING = 8. This State enum jumps from STARTED = 5 directly to STOPPING = 7, omitting FLUSHING. If the FLUSHING state is intentionally removed for this module, the enum values after STARTED should be renumbered (STOPPING = 6, CLOSING = 7) to avoid gaps in the sequence.

Suggested change
STOPPING = 7,
/**
* The AV Clock is transitioning from ready to closed state.
*/
CLOSING = 8
STOPPING = 6,
/**
* The AV Clock is transitioning from ready to closed state.
*/
CLOSING = 7

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +65
STOPPING = 7,

/**
* The Audio Sink is transitioning from ready to closed state.
*/
CLOSING = 8
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

This State enum is missing the FLUSHING state that exists in the deprecated common State.aidl (value 6). The common State.aidl includes: CLOSED = 1, OPENING = 2, READY = 3, STARTING = 4, STARTED = 5, FLUSHING = 6, STOPPING = 7, CLOSING = 8. This State enum jumps from STARTED = 5 directly to STOPPING = 7, omitting FLUSHING. If the FLUSHING state is intentionally removed for this module, the enum values after STARTED should be renumbered (STOPPING = 6, CLOSING = 7) to avoid gaps in the sequence.

Suggested change
STOPPING = 7,
/**
* The Audio Sink is transitioning from ready to closed state.
*/
CLOSING = 8
STOPPING = 6,
/**
* The Audio Sink is transitioning from ready to closed state.
*/
CLOSING = 7

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +34
enum State {
/**
* Initial state entered when the service connection is established.
*/
CLOSED = 1,
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

This State enum is missing the UNKNOWN state that exists in the deprecated common State.aidl (value 0). The common State.aidl includes UNKNOWN = 0 as the first state for uninitialized or unknown component states. All newly added State.aidl files start with CLOSED = 1, omitting UNKNOWN. This should be consistent across all modules - either all State enums should include UNKNOWN or none should. The audiodecoder State.aidl includes UNKNOWN = 0, suggesting it may be needed for proper state management.

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +34
enum State {
/**
* Initial state entered when the service connection is established.
*/
CLOSED = 1,
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

This State enum is missing the UNKNOWN state that exists in the deprecated common State.aidl (value 0). The common State.aidl includes UNKNOWN = 0 as the first state for uninitialized or unknown component states. All newly added State.aidl files start with CLOSED = 1, omitting UNKNOWN. This should be consistent across all modules - either all State enums should include UNKNOWN or none should. The audiodecoder State.aidl includes UNKNOWN = 0, suggesting it may be needed for proper state management.

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +34
enum State {
/**
* Initial state entered when the service connection is established.
*/
CLOSED = 1,
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

This State enum is missing the UNKNOWN state that exists in the deprecated common State.aidl (value 0). The common State.aidl includes UNKNOWN = 0 as the first state for uninitialized or unknown component states. All newly added State.aidl files start with CLOSED = 1, omitting UNKNOWN. This should be consistent across all modules - either all State enums should include UNKNOWN or none should. The audiodecoder State.aidl includes UNKNOWN = 0, suggesting it may be needed for proper state management.

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +65
CLOSED = 1,

/**
* The Video Sink is transitioning from closed to ready state.
*/
OPENING = 2,

/**
* The Video Sink is open and ready to start, but in a stopped state.
*/
READY = 3,

/**
* The Video Sink is transitioning from ready to started state.
*/
STARTING = 4,

/**
* The opened Video Sink has been started.
*/
STARTED = 5,

/**
* The started Video Sink is stopping and flushing its internal state.
* Once flushed, the Video Sink enters the ready state.
*/
STOPPING = 7,

/**
* The Video Sink is transitioning from ready to closed state.
*/
CLOSING = 8
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The enum values in this new State.aidl are inconsistent with the existing hdmiinput State.aidl. The hdmiinput State.aidl starts with CLOSED = 0, while all the newly added State.aidl files start with CLOSED = 1. This inconsistency needs to be resolved to maintain a uniform state machine model across all modules. Either update hdmiinput to align with the new pattern (CLOSED = 1, OPENING = 2, etc.) or update all new State.aidl files to match hdmiinput's pattern (CLOSED = 0, OPENING = 1, etc.).

Suggested change
CLOSED = 1,
/**
* The Video Sink is transitioning from closed to ready state.
*/
OPENING = 2,
/**
* The Video Sink is open and ready to start, but in a stopped state.
*/
READY = 3,
/**
* The Video Sink is transitioning from ready to started state.
*/
STARTING = 4,
/**
* The opened Video Sink has been started.
*/
STARTED = 5,
/**
* The started Video Sink is stopping and flushing its internal state.
* Once flushed, the Video Sink enters the ready state.
*/
STOPPING = 7,
/**
* The Video Sink is transitioning from ready to closed state.
*/
CLOSING = 8
CLOSED = 0,
/**
* The Video Sink is transitioning from closed to ready state.
*/
OPENING = 1,
/**
* The Video Sink is open and ready to start, but in a stopped state.
*/
READY = 2,
/**
* The Video Sink is transitioning from ready to started state.
*/
STARTING = 3,
/**
* The opened Video Sink has been started.
*/
STARTED = 4,
/**
* The started Video Sink is stopping and flushing its internal state.
* Once flushed, the Video Sink enters the ready state.
*/
STOPPING = 5,
/**
* The Video Sink is transitioning from ready to closed state.
*/
CLOSING = 6

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +65
STOPPING = 7,

/**
* The Video Sink is transitioning from ready to closed state.
*/
CLOSING = 8
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

This State enum is missing the FLUSHING state that exists in the deprecated common State.aidl (value 6). The common State.aidl includes: CLOSED = 1, OPENING = 2, READY = 3, STARTING = 4, STARTED = 5, FLUSHING = 6, STOPPING = 7, CLOSING = 8. This State enum jumps from STARTED = 5 directly to STOPPING = 7, omitting FLUSHING. If the FLUSHING state is intentionally removed for this module, the enum values after STARTED should be renumbered (STOPPING = 6, CLOSING = 7) to avoid gaps in the sequence.

Suggested change
STOPPING = 7,
/**
* The Video Sink is transitioning from ready to closed state.
*/
CLOSING = 8
STOPPING = 6,
/**
* The Video Sink is transitioning from ready to closed state.
*/
CLOSING = 7

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +65
STOPPING = 7,

/**
* The Frontend is transitioning from ready to closed state.
*/
CLOSING = 8
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

This State enum is missing the FLUSHING state that exists in the deprecated common State.aidl (value 6). The common State.aidl includes: CLOSED = 1, OPENING = 2, READY = 3, STARTING = 4, STARTED = 5, FLUSHING = 6, STOPPING = 7, CLOSING = 8. This State enum jumps from STARTED = 5 directly to STOPPING = 7, omitting FLUSHING. If the FLUSHING state is intentionally removed for this module, the enum values after STARTED should be renumbered (STOPPING = 6, CLOSING = 7) to avoid gaps in the sequence.

Suggested change
STOPPING = 7,
/**
* The Frontend is transitioning from ready to closed state.
*/
CLOSING = 8
STOPPING = 6,
/**
* The Frontend is transitioning from ready to closed state.
*/
CLOSING = 7

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +34
enum State {
/**
* Initial state entered when the service connection is established.
*/
CLOSED = 1,
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

This State enum is missing the UNKNOWN state that exists in the deprecated common State.aidl (value 0). The common State.aidl includes UNKNOWN = 0 as the first state for uninitialized or unknown component states. All newly added State.aidl files start with CLOSED = 1, omitting UNKNOWN. This should be consistent across all modules - either all State enums should include UNKNOWN or none should. The audiodecoder State.aidl includes UNKNOWN = 0, suggesting it may be needed for proper state management.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Move CLOSED to = 0

/**
* Initial state entered when the service connection is established.
*/
CLOSED = 1,
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The enum values in this new State.aidl are inconsistent with the existing hdmiinput State.aidl. The hdmiinput State.aidl starts with CLOSED = 0, while this file starts with CLOSED = 1. This inconsistency needs to be resolved to maintain a uniform state machine model across all modules. Either update hdmiinput to align with this pattern or update this file to match hdmiinput's pattern.

Suggested change
CLOSED = 1,
CLOSED = 0,

Copilot uses AI. Check for mistakes.
@Ulrond Ulrond force-pushed the feature/24-task-common-hal---review branch from 2f0cef7 to e1b2abf Compare January 2, 2026 21:12
@Ulrond Ulrond moved this from Architecture Review Required to Review Requested in halif_aidl Jan 2, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 2, 2026 21:24
Copy link
Contributor

Copilot AI left a comment

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 31 out of 31 changed files in this pull request and generated 5 comments.


/**
* The started AV Clock is stopping and flushing its internal state.
* Once flushed, the AV Clock enters the ready state.
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The STOPPING state is assigned value 7, but the previous state STARTED has value 5. This creates a gap where value 6 is unused. Consider either using consecutive values (6 for STOPPING) or documenting why value 6 is intentionally skipped.

Suggested change
* Once flushed, the AV Clock enters the ready state.
* Once flushed, the AV Clock enters the ready state.
*
* NOTE: Numeric value 6 is intentionally left unused to preserve
* backwards compatibility with legacy implementations that defined
* an intermediate state between STARTED and STOPPING.

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +65
STOPPING = 7,

/**
* The Audio Sink is transitioning from ready to closed state.
*/
CLOSING = 8
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The STOPPING state is assigned value 7, but the previous state STARTED has value 5. This creates a gap where value 6 is unused. Consider either using consecutive values (6 for STOPPING) or documenting why value 6 is intentionally skipped.

Suggested change
STOPPING = 7,
/**
* The Audio Sink is transitioning from ready to closed state.
*/
CLOSING = 8
STOPPING = 6,
/**
* The Audio Sink is transitioning from ready to closed state.
*/
CLOSING = 7

Copilot uses AI. Check for mistakes.
* The started Video Sink is stopping and flushing its internal state.
* Once flushed, the Video Sink enters the ready state.
*/
STOPPING = 7,
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The STOPPING state is assigned value 7, but the previous state STARTED has value 5. This creates a gap where value 6 is unused. Consider either using consecutive values (6 for STOPPING) or documenting why value 6 is intentionally skipped.

Copilot uses AI. Check for mistakes.
* The started Video Decoder is stopping and flushing its internal state.
* Once flushed, the Video Decoder enters the ready state.
*/
STOPPING = 7,
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The STOPPING state is assigned value 7, but the previous state STARTED has value 5. This creates a gap where value 6 is unused. Consider either using consecutive values (6 for STOPPING) or documenting why value 6 is intentionally skipped.

Suggested change
STOPPING = 7,
STOPPING = 6,

Copilot uses AI. Check for mistakes.

/**
* The started Frontend is stopping and flushing its internal state.
* Once flushed, the Frontend enters the ready state.
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The STOPPING state is assigned value 7, but the previous state STARTED has value 5. This creates a gap where value 6 is unused. Consider either using consecutive values (6 for STOPPING) or documenting why value 6 is intentionally skipped.

Suggested change
* Once flushed, the Frontend enters the ready state.
* Once flushed, the Frontend enters the ready state.
*
* Note: Integer value 6 is intentionally reserved (unused) to maintain
* compatibility with existing implementations, so STOPPING uses value 7.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@kanjoe24 kanjoe24 left a comment

Choose a reason for hiding this comment

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

LGTM. Approved.

@github-project-automation github-project-automation bot moved this from Review Requested to Approved For Merge in halif_aidl Jan 5, 2026
@Ulrond Ulrond modified the milestones: 0.13.0, 0.14.0 Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Approved For Merge

Development

Successfully merging this pull request may close these issues.

Task: Common HAL - Review

3 participants