Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
aa86f07
checkpatch: remove and use clang-format instead
lrgirdwo Mar 6, 2026
c92873d
ipc: ipc4: Centralize component list and perf data initialization
lrgirdwo Mar 6, 2026
ee8e833
test: audio: add unit test for aria
lrgirdwo Mar 12, 2026
b468cb6
test: audio: add unit test for asrc
lrgirdwo Mar 12, 2026
253ed05
test: audio: add unit test for codec
lrgirdwo Mar 12, 2026
116ef28
test: audio: add unit test for copier
lrgirdwo Mar 12, 2026
419b792
test: audio: add unit test for crossover
lrgirdwo Mar 12, 2026
8d609e2
test: audio: add unit test for dcblock
lrgirdwo Mar 12, 2026
330772f
test: audio: add unit test for google
lrgirdwo Mar 12, 2026
eb4a145
test: audio: add unit test for igo_nr
lrgirdwo Mar 12, 2026
3ad6075
test: audio: add unit test for level_multiplier
lrgirdwo Mar 12, 2026
4579ee9
test: audio: add unit test for mfcc
lrgirdwo Mar 12, 2026
825784a
test: audio: add unit test for mic_privacy_manager
lrgirdwo Mar 12, 2026
5d7811c
test: audio: add unit test for mixin_mixout
lrgirdwo Mar 12, 2026
4ab7671
test: audio: add unit test for multiband_drc
lrgirdwo Mar 12, 2026
394fd98
test: audio: add unit test for nxp
lrgirdwo Mar 12, 2026
146ac0a
test: audio: add unit test for rtnr
lrgirdwo Mar 12, 2026
73bae69
test: audio: add unit test for smart_amp
lrgirdwo Mar 12, 2026
e4869a9
test: audio: add unit test for sound_dose
lrgirdwo Mar 12, 2026
8dbca7b
test: audio: add unit test for src
lrgirdwo Mar 12, 2026
954b8d0
test: audio: add unit test for stft_process
lrgirdwo Mar 12, 2026
805c188
test: audio: add unit test for tdfb
lrgirdwo Mar 12, 2026
b5ff195
test: audio: add unit test for tensorflow
lrgirdwo Mar 12, 2026
d021565
test: audio: add unit test for tone
lrgirdwo Mar 12, 2026
8910e29
test: audio: add unit test for up_down_mixer
lrgirdwo Mar 12, 2026
0c45d72
ipc4: add qemu gateway types and expose pipeline creation
lrgirdwo Mar 12, 2026
1ccdf07
copier: implement qemu gateway type for userspace testing
lrgirdwo Mar 12, 2026
e7c0877
tests: userspace: add null checks for dma and dai devices
lrgirdwo Mar 12, 2026
77fa25d
tests: userspace: split ipc4 pipeline test into util, native, user
lrgirdwo Mar 12, 2026
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
181 changes: 181 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# SPDX-License-Identifier: GPL-2.0
#
# clang-format configuration file. Intended for clang-format >= 11.
#
# For more information, see:
#
# Documentation/dev-tools/clang-format.rst
# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false

# Taken from:
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
# | LC_ALL=C sort -u
ForEachMacros:
- 'ARRAY_FOR_EACH'
- 'ARRAY_FOR_EACH_PTR'
- 'FOR_EACH'
- 'FOR_EACH_FIXED_ARG'
- 'FOR_EACH_IDX'
- 'FOR_EACH_IDX_FIXED_ARG'
- 'FOR_EACH_NONEMPTY_TERM'
- 'FOR_EACH_FIXED_ARG_NONEMPTY_TERM'
- 'RB_FOR_EACH'
- 'RB_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_DLIST_FOR_EACH_NODE'
- 'SYS_DLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SEM_LOCK'
- 'SYS_SFLIST_FOR_EACH_CONTAINER'
- 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SFLIST_FOR_EACH_NODE'
- 'SYS_SFLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SLIST_FOR_EACH_CONTAINER'
- 'SYS_SLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SLIST_FOR_EACH_NODE'
- 'SYS_SLIST_FOR_EACH_NODE_SAFE'
- '_WAIT_Q_FOR_EACH'
- '_WAIT_Q_FOR_EACH_SAFE'
- 'Z_FOR_EACH'
- 'Z_FOR_EACH_ENGINE'
- 'Z_FOR_EACH_EXEC'
- 'Z_FOR_EACH_FIXED_ARG'
- 'Z_FOR_EACH_FIXED_ARG_EXEC'
- 'Z_FOR_EACH_IDX'
- 'Z_FOR_EACH_IDX_EXEC'
- 'Z_FOR_EACH_IDX_FIXED_ARG'
- 'Z_FOR_EACH_IDX_FIXED_ARG_EXEC'
- 'Z_GENLIST_FOR_EACH_CONTAINER'
- 'Z_GENLIST_FOR_EACH_CONTAINER_SAFE'
- 'Z_GENLIST_FOR_EACH_NODE'
- 'Z_GENLIST_FOR_EACH_NODE_SAFE'
- 'STRUCT_SECTION_FOREACH'
- 'STRUCT_SECTION_FOREACH_ALTERNATE'
- 'TYPE_SECTION_FOREACH'
- 'K_SPINLOCK'
- 'COAP_RESOURCE_FOREACH'
- 'COAP_SERVICE_FOREACH'
- 'COAP_SERVICE_FOREACH_RESOURCE'
- 'HTTP_RESOURCE_FOREACH'
- 'HTTP_SERVER_CONTENT_TYPE_FOREACH'
- 'HTTP_SERVICE_FOREACH'
- 'HTTP_SERVICE_FOREACH_RESOURCE'
- 'I3C_BUS_FOR_EACH_I3CDEV'
- 'I3C_BUS_FOR_EACH_I2CDEV'
- 'MIN_HEAP_FOREACH'
- 'comp_dev_for_each_consumer'
- 'comp_dev_for_each_consumer_safe'
- 'comp_dev_for_each_producer'
- 'comp_dev_for_each_producer_safe'

IncludeBlocks: Preserve
IncludeCategories:
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentGotoLabels: false
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 8
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true

# Taken from git's rules
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60

PointerAlignment: Right
ReflowComments: false
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatementsExceptForEachMacros
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 4
UseTab: Never
...
4 changes: 2 additions & 2 deletions .github/workflows/SPDX-README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Read this section if there are some SPDX warnings above.
Pleasing checkpatch is hard when adding new files because:
Adding correct SPDX headers to new files can be tricky because:

- checkpatch requests a different SPDX style for .c versus .h files.
- a different SPDX style is expected for .c versus .h files.
This is because some .h files are included in linker scripts or
assembly code.
- Some SOF reviewers reject C99 comments starting with //
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/checkpatch_list.sh

This file was deleted.

38 changes: 1 addition & 37 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,9 @@ name: codestyle
# yamllint disable-line rule:truthy
on: [pull_request, workflow_call, workflow_dispatch]

jobs:
checkpatch:
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
strictness: [null, --subjective]

env:
PR_NUM: ${{github.event.number}}
# TODO: reduce duplication with scripts/sof-*-commit-hook.sh
# thanks to either some .conf file or some wrapper script
CHK_CMD_OPTS: --ignore UNKNOWN_COMMIT_ID --codespell

steps:
# depth 2 so:
# ^1. we can show the Subject of the current target branch tip
# ^2. we reconnect/graft to the later fetch pull/1234/head,
- uses: actions/checkout@v4
with: {fetch-depth: 2}

- name: install codespell
run: sudo apt-get -y install codespell && dpkg -L codespell | grep dict

# See shallowness issue https://github.com/thesofproject/linux/issues/2556
- name: fetch PR commits
run: |
.github/workflows/shallowfetchPRcommits.sh \
${GITHUB_REPOSITORY} "$PR_NUM"
# show what we got
git --no-pager log --oneline --graph --decorate --max-count=50

- name: checkpatch
env:
STRICTNESS: ${{ matrix.strictness }}
run: .github/workflows/checkpatch_list.sh ${CHK_CMD_OPTS}
${STRICTNESS} < PR_SHAs.txt

jobs:
yamllint:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ tools/test/audio/reports/*
tools/test/audio/zeros_in.raw

__pycache__
.checkpatch-camelcase.git.*

build*/

Expand Down
30 changes: 30 additions & 0 deletions app/boards/qemu_xtensa_dc233c_mmu.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,36 @@ CONFIG_ZTEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_MM_DRV=y
CONFIG_ZEPHYR_NATIVE_DRIVERS=y
CONFIG_SOF_USERSPACE_LL=y
CONFIG_SOF_BOOT_TEST_STANDALONE=y

# Ensure the kernel can exit QEMU on shutdown/panic
CONFIG_REBOOT=y
CONFIG_ZTEST_STACK_SIZE=4096
CONFIG_COMP_UP_DOWN_MIXER=y
CONFIG_COMP_MODULE_ADAPTER=y
CONFIG_PASSTHROUGH_CODEC=y
CONFIG_COMP_ARIA=y
CONFIG_COMP_MFCC=y
CONFIG_COMP_CROSSOVER=y
CONFIG_COMP_DCBLOCK=y
CONFIG_COMP_IIR=y
CONFIG_COMP_DRC=y
CONFIG_COMP_MULTIBAND_DRC=y
CONFIG_COMP_LEVEL_MULTIPLIER=y
CONFIG_COMP_RTNR=y
CONFIG_COMP_RTNR_STUB=y
CONFIG_COMP_SMART_AMP=y
CONFIG_COMP_TDFB=y
CONFIG_COMP_STFT_PROCESS=y
CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=y
CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK=y
CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING=y
CONFIG_GOOGLE_CTC_AUDIO_PROCESSING_MOCK=y
CONFIG_COMP_IGO_NR=y
CONFIG_COMP_IGO_NR_STUB=y
CONFIG_COMP_NXP_EAP=y
CONFIG_COMP_NXP_EAP_STUB=y
CONFIG_CPP=y
CONFIG_STD_CPP17=y
CONFIG_COMP_SOUND_DOSE=y
1 change: 1 addition & 0 deletions app/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ CONFIG_SCHED_CPU_MASK=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=15000
CONFIG_DAI=y
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_SPIN_VALIDATE=n
Loading
Loading