Skip to content

audio: volume: use unsigned int for channel count and iterators - #11248

Open
softwarecki wants to merge 1 commit into
thesofproject:mainfrom
softwarecki:volume-unsigned
Open

softwarecki wants to merge 1 commit into
thesofproject:mainfrom
softwarecki:volume-unsigned

Conversation

@softwarecki

Copy link
Copy Markdown
Collaborator

Convert the local channel-count variables and the loops iterating over channels to unsigned int to match channels type in vol_data structure.

Convert the local channel-count variables and the loops iterating over
channels to unsigned int to match channels type in vol_data structure.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>

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.

Copilot review overview

🟢 Approval recommended

The mechanical type changes consistently match vol_data.channels without altering processing behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Aligns volume channel-count variables and iterators with the unsigned vol_data.channels type.

Changes:

  • Converts local channel counts to unsigned int.
  • Converts channel-specific loop iterators while preserving signed sample iterators.
  • Applies the update across generic and HiFi optimized implementations.
File Description
src/​audio/​volume/​volume_hifi5.c Updates HiFi5 channel types.
src/​audio/​volume/​volume_hifi5_with_peakvol.c Updates HiFi5 peak-volume channel iterators.
src/​audio/​volume/​volume_hifi4.c Updates HiFi4 channel types.
src/​audio/​volume/​volume_hifi4_with_peakvol.c Updates HiFi4 peak-volume channel iterators.
src/​audio/​volume/​volume_hifi3.c Updates HiFi3 channel types.
src/​audio/​volume/​volume_hifi3_with_peakvol.c Updates HiFi3 peak-volume channel iterators.
src/​audio/​volume/​volume_generic.c Updates generic channel types.
src/​audio/​volume/​volume_generic_with_peakvol.c Updates generic peak-volume channel types.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants