Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion audiodecoder/current/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ set(SRC
${SRC_DIR}/State.aidl
${COMMON_SRC_DIR}/PropertyValue.aidl
${COMMON_SRC_DIR}/AVSource.aidl
${COMMON_SRC_DIR}/HALError.aidl
)

set(INCLUDE_DIRECTORY
Expand Down
1 change: 1 addition & 0 deletions audiosink/current/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ set(SRC
${SRC_DIR}/IAudioSinkManager.aidl
${SRC_DIR}/PlatformCapabilities.aidl
${SRC_DIR}/Property.aidl
${SRC_DIR}/State.aidl
${SRC_DIR}/Volume.aidl
${SRC_DIR}/VolumeRamp.aidl
${AUDIO_DECODER_SRC_DIR}/FrameMetadata.aidl
Expand Down
2 changes: 1 addition & 1 deletion audiosink/current/com/rdk/hal/audiosink/IAudioSink.aidl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import com.rdk.hal.audiosink.IAudioSinkEventListener;
import com.rdk.hal.audiosink.Capabilities;
import com.rdk.hal.audiosink.ContentType;
import com.rdk.hal.audiosink.Property;
import com.rdk.hal.audiosink.State;
import com.rdk.hal.PropertyValue;
import com.rdk.hal.State;

/**
* @brief Audio Sink HAL interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package com.rdk.hal.audiosink;
import com.rdk.hal.audiosink.ErrorCode;
import com.rdk.hal.State;
import com.rdk.hal.audiosink.State;

/**
* @brief Controller callbacks listener interface from audio sink.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package com.rdk.hal.audiosink;
import com.rdk.hal.audiosink.ErrorCode;
import com.rdk.hal.State;
import com.rdk.hal.audiosink.State;

/**
* @brief Callbacks listener interface from audio sink.
Expand Down
66 changes: 66 additions & 0 deletions audiosink/current/com/rdk/hal/audiosink/State.aidl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2024 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.rdk.hal.audiosink;

/**
* @brief Audio Sink component states.
* @author Luc Kennedy-Lamb
* @author Peter Stieglitz
* @author Douglas Adler
*/

@VintfStability
@Backing(type="int")
enum State {
/**
* Initial state entered when the service connection is established.
*/
CLOSED = 1,
Comment on lines +30 to +34
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


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

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

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

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

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

/**
* The Audio Sink is transitioning from ready to closed state.
*/
CLOSING = 8
Comment on lines +60 to +65
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 +34 to +65
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,
/**
* The Audio Sink is transitioning from closed to ready state.
*/
OPENING = 2,
/**
* The Audio Sink is open and ready to start, but in a stopped state.
*/
READY = 3,
/**
* The Audio Sink is transitioning from ready to started state.
*/
STARTING = 4,
/**
* The opened Audio Sink has been started.
*/
STARTED = 5,
/**
* The started Audio Sink is stopping and flushing its internal state.
* Once flushed, the Audio Sink enters the ready state.
*/
STOPPING = 7,
/**
* The Audio Sink is transitioning from ready to closed state.
*/
CLOSING = 8
CLOSED = 0,
/**
* The Audio Sink is transitioning from closed to ready state.
*/
OPENING = 1,
/**
* The Audio Sink is open and ready to start, but in a stopped state.
*/
READY = 2,
/**
* The Audio Sink is transitioning from ready to started state.
*/
STARTING = 3,
/**
* The opened Audio Sink has been started.
*/
STARTED = 4,
/**
* The started Audio Sink is stopping and flushing its internal state.
* Once flushed, the Audio Sink enters the ready state.
*/
STOPPING = 5,
/**
* The Audio Sink is transitioning from ready to closed state.
*/
CLOSING = 6

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +65
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.
}
1 change: 1 addition & 0 deletions avbuffer/current/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ set(SRC
${SRC_DIR}/IAVBufferSpaceListener.aidl
${SRC_DIR}/Pool.aidl
${SRC_DIR}/PoolMetrics.aidl
${SRC_DIR}/Status.aidl
)

set(INCLUDE_DIRECTORY
Expand Down
17 changes: 9 additions & 8 deletions avbuffer/current/com/rdk/hal/avbuffer/IAVBuffer.aidl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.rdk.hal.avbuffer.IAVBufferSpaceListener;
import com.rdk.hal.avbuffer.HeapMetrics;
import com.rdk.hal.avbuffer.Pool;
import com.rdk.hal.avbuffer.PoolMetrics;
import com.rdk.hal.avbuffer.Status;
import com.rdk.hal.videodecoder.IVideoDecoder;
import com.rdk.hal.audiodecoder.IAudioDecoder;

Expand Down Expand Up @@ -59,7 +60,7 @@ interface IAVBuffer
* If the `videoDecoderId` is invalid then the `binder::Status EX_ILLEGAL_ARGUMENT` exception status is returned.
*
* It the platform has exhausted all available memory from the requested heap then the exception status
* `binder::Status::Exception::EX_SERVICE_SPECIFIC` with `HALError::OUT_OF_MEMORY` is returned.
* `binder::Status::Exception::EX_SERVICE_SPECIFIC` with `Status::OUT_OF_MEMORY` is returned.
*
* @param[in] secureHeap Indicates if the pool is secure.
* @param[in] videoDecoderIndex The index of the video decoder resource.
Expand All @@ -70,7 +71,7 @@ interface IAVBuffer
*
* @exception binder::Status::Exception::EX_NONE for success
* @exception binder::Status::Exception::EX_ILLEGAL_ARGUMENT
* @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, HALError::OUT_OF_MEMORY
* @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, Status::OUT_OF_MEMORY
*
* @pre The IVideoDecoder.Id must have been obtained from IVideoDecoderManager.getVideoDecoderIds()
*
Expand All @@ -85,7 +86,7 @@ interface IAVBuffer
* (e.g. system audio PCM) then the ID must be IAudioDecoder.Id.UNDEFINED.
*
* It the platform has exhausted all available memory from the requested heap then the exception status
* `binder::Status::Exception::EX_SERVICE_SPECIFIC` with `HALError::OUT_OF_MEMORY` is returned.
* `binder::Status::Exception::EX_SERVICE_SPECIFIC` with `Status::OUT_OF_MEMORY` is returned.
*
* If the `audioDecoderId` is invalid then the `binder::Status EX_ILLEGAL_ARGUMENT` exception status is returned.
*
Expand All @@ -98,7 +99,7 @@ interface IAVBuffer
*
* @exception binder::Status::Exception::EX_NONE for success
* @exception binder::Status::Exception::EX_ILLEGAL_ARGUMENT
* @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, HALError::OUT_OF_MEMORY
* @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, Status::OUT_OF_MEMORY
*
* @pre The IAudioDecoder.Id must have been obtained from IAudioDecoderManager.getAudioDecoderIds()
* or IAudioDecoder.Id.UNDEFINED must be used.
Expand All @@ -111,7 +112,7 @@ interface IAVBuffer
* Destroys a memory buffer pool previously created with createVideoPool() or createAudioPool().
*
* The AV buffer pool must be empty, with all previously allocated buffers from the pool freed.
* If any buffer allocations are outstanding then the exception status `binder::Status EX_SERVICE_SPECIFIC` with `HALError::NOT_EMPTY`
* If any buffer allocations are outstanding then the exception status `binder::Status EX_SERVICE_SPECIFIC` with `Status::NOT_EMPTY`
* is returned.
*
* @param[in] poolHandle Pool handle.
Expand All @@ -121,7 +122,7 @@ interface IAVBuffer
* @retval false The pool handle is invalid.
*
* @exception binder::Status::Exception::EX_NONE for success
* @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, HALError::NOT_EMPTY
* @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, Status::NOT_EMPTY
*
* @pre A pool handle must have been obtained from `createVideoPool()` or `createAudioPool()`.
* @pre The pool must have all allocations freed.
Expand Down Expand Up @@ -168,7 +169,7 @@ interface IAVBuffer
* The output handle is valid when the returned result is >= 0.
* The handle must eventually be used in a call to `free()` to release the memory block.
*
* If the allocation fails due to an out of memory condition then `binder::Status EX_SERVICE_SPECIFIC` with `HALError::OUT_OF_MEMORY`
* If the allocation fails due to an out of memory condition then `binder::Status EX_SERVICE_SPECIFIC` with `Status::OUT_OF_MEMORY`
* is returned and the client can call `notifyWhenSpaceAvailable()` to be notified when space becomes available.
*
* @param[in] poolHandle Pool handle.
Expand All @@ -178,7 +179,7 @@ interface IAVBuffer
* @retval INVALID_HANDLE The pool handle is invalid or the size is > the pool size.
*
* @exception binder::Status::Exception::EX_NONE for success
* @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, HALError::OUT_OF_MEMORY
* @exception binder::Status::Exception::EX_SERVICE_SPECIFIC, Status::OUT_OF_MEMORY
*
* @pre A pool handle must have been obtained from `createVideoPool()` or `createAudioPool()`.
*
Expand Down
62 changes: 62 additions & 0 deletions avbuffer/current/com/rdk/hal/avbuffer/Status.aidl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2025 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.rdk.hal.avbuffer;

/**
* @brief AVBuffer operation status codes.
*
* Status codes returned by AVBuffer HAL interface operations to indicate
* success or specific failure conditions.
*
* @author Luc Kennedy-Lamb
* @author Peter Stieglitz
* @author Douglas Adler
* @author Gerald Weatherup
*/

@VintfStability
@Backing(type="int")
enum Status {
/** @brief Operation completed successfully. */
SUCCESS = 0,

/** @brief Buffer pool is full, cannot allocate more buffers. */
BUFFER_FULL = 1,

/** @brief Invalid resource identifier provided. */
INVALID_RESOURCE = 2,

/** @brief Invalid codec specified. */
INVALID_CODEC = 3,

/** @brief Operation deferred for asynchronous completion. */
DEFERRED = 4,

/** @brief Insufficient memory available to complete operation. */
OUT_OF_MEMORY = 5,

/** @brief Request exceeds valid bounds or limits. */
OUT_OF_BOUNDS = 6,

/** @brief Pool or buffer is not empty when expected to be. */
NOT_EMPTY = 7,

/** @brief Invalid argument provided to operation. */
INVALID_ARGUMENT = 8,
}
2 changes: 1 addition & 1 deletion avclock/current/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ set(SRC
${SRC_DIR}/IAVClockEventListener.aidl
${SRC_DIR}/IAVClockManager.aidl
${SRC_DIR}/Property.aidl
${COMMON_SRC_DIR}/HALError.aidl
${SRC_DIR}/State.aidl
${AUDIO_SINK_SRC_DIR}/IAudioSink.aidl
${VIDEO_SINK_SRC_DIR}/IVideoSink.aidl
)
Expand Down
2 changes: 1 addition & 1 deletion avclock/current/com/rdk/hal/avclock/IAVClock.aidl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import com.rdk.hal.avclock.IAVClockController;
import com.rdk.hal.avclock.IAVClockControllerListener;
import com.rdk.hal.avclock.IAVClockEventListener;
import com.rdk.hal.avclock.Property;
import com.rdk.hal.avclock.State;
import com.rdk.hal.PropertyValue;
import com.rdk.hal.State;

/**
* @brief AV Clock HAL interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
package com.rdk.hal.avclock;
import com.rdk.hal.State;
import com.rdk.hal.avclock.State;

/**
* @brief Controller callbacks listener interface from AV Clock.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
package com.rdk.hal.avclock;
import com.rdk.hal.State;
import com.rdk.hal.avclock.State;

/**
* @brief Event callbacks listener interface from AV Clock.
Expand Down
66 changes: 66 additions & 0 deletions avclock/current/com/rdk/hal/avclock/State.aidl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2024 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.rdk.hal.avclock;

/**
* @brief AV Clock component states.
* @author Luc Kennedy-Lamb
* @author Peter Stieglitz
* @author Douglas Adler
*/

@VintfStability
@Backing(type="int")
enum State {
/**
* Initial state entered when the service connection is established.
*/
CLOSED = 1,
Comment on lines +30 to +34
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

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.

/**
* The AV Clock is transitioning from closed to ready state.
*/
OPENING = 2,

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

/**
* The AV Clock is transitioning from ready to started state.
*/
STARTING = 4,

/**
* The opened AV Clock has been started.
*/
STARTED = 5,

/**
* 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.
*/
STOPPING = 7,

/**
* The AV Clock is transitioning from ready to closed state.
*/
CLOSING = 8
Comment on lines +60 to +65
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.
}
1 change: 1 addition & 0 deletions broadcast/current/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ set(SRC
${SRC_DIR}/frontend/Modulation.aidl
${SRC_DIR}/frontend/SignalInfoProperty.aidl
${SRC_DIR}/frontend/SignalInfoValue.aidl
${SRC_DIR}/frontend/State.aidl
${SRC_DIR}/frontend/TransmissionMode.aidl
${SRC_DIR}/frontend/TuneParameters.aidl
${SRC_DIR}/frontend/TuneStatus.aidl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.rdk.hal.broadcast.frontend.FrontendType;
import com.rdk.hal.broadcast.frontend.IFrontendListener;
import com.rdk.hal.broadcast.frontend.IFrontendController;
import com.rdk.hal.broadcast.frontend.IFrontendControllerListener;
import com.rdk.hal.State;
import com.rdk.hal.broadcast.frontend.State;

/**
* @brief FrontEnd HAL interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.rdk.hal.broadcast.frontend.SignalInfoProperty;
import com.rdk.hal.broadcast.frontend.SignalInfoValue;
import com.rdk.hal.broadcast.frontend.TuneStatus;
import com.rdk.hal.broadcast.frontend.TuneParameters;
import com.rdk.hal.State;
import com.rdk.hal.broadcast.frontend.State;

/**
* @brief FrontendController HAL interface.
Expand Down
Loading
Loading