Skip to content

Conversation

Copy link

Copilot AI commented Aug 6, 2025

Remove function names from the beginning of all logging calls in the src/audio directory to improve code readability and reduce redundancy.

Changes Made

This PR systematically removes function name prefixes (e.g., function_name():) from logging macro calls throughout the audio subsystem. The changes affect:

  • 30+ subdirectories in src/audio/ including eq_fir, asrc, google, eq_iir, volume, pipeline, module_adapter, and others
  • 70+ source files (.c and .h files)
  • All logging macros: comp_info, comp_dbg, comp_err, comp_warn, tr_info, tr_dbg, tr_err, tr_warn, LOG_INF, LOG_DBG, LOG_ERR, LOG_WRN, pipe_, dai_cl_, comp_cl_* variants

Example Changes

Before:

comp_info(dev, "eq_fir_init(): coefficients blob size = %zu", bs);
comp_err(dev, "asrc_verify_params(): runtime stream pcm rate %u does not match", params->rate);
comp_dbg(dev, "set_fir_func(): valid_bit_depth %d", valid_bit_depth);

After:

comp_info(dev, "coefficients blob size = %zu", bs);
comp_err(dev, "runtime stream pcm rate %u does not match", params->rate);
comp_dbg(dev, "valid_bit_depth %d", valid_bit_depth);

Special Cases

When removing the function name would result in an empty string, it's replaced with "entry":

// Before: comp_info(dev, "function_name():");
// After:  comp_info(dev, "entry");

Commit Structure

Changes are organized into separate commits by subdirectory for easier review:

  • Individual commits for each subdirectory group
  • Final commit for main src/audio/*.c and *.h files
  • No functional changes to logging behavior, levels, or logic

This cleanup improves code consistency and reduces visual noise in log messages while preserving all debugging information and context.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 8 commits August 6, 2025 07:45
Co-authored-by: lyakh <1363683+lyakh@users.noreply.github.com>
Co-authored-by: lyakh <1363683+lyakh@users.noreply.github.com>
…alls

Co-authored-by: lyakh <1363683+lyakh@users.noreply.github.com>
…from logging calls

Co-authored-by: lyakh <1363683+lyakh@users.noreply.github.com>
…mes from logging calls

Co-authored-by: lyakh <1363683+lyakh@users.noreply.github.com>
…ogging calls

Co-authored-by: lyakh <1363683+lyakh@users.noreply.github.com>
…function names from logging calls

Co-authored-by: lyakh <1363683+lyakh@users.noreply.github.com>
Co-authored-by: lyakh <1363683+lyakh@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove function names from logging calls in src/audio (multi-commit) audio: remove function names from logging calls across src/audio Aug 6, 2025
Copilot AI requested a review from lyakh August 6, 2025 07:54
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