Skip to content

Commit

Permalink
Merge remote-tracking branch 'sof/main' into zephyr
Browse files Browse the repository at this point in the history
  • Loading branch information
nashif committed Oct 17, 2023
2 parents c0f20b6 + d3b7e54 commit 22571f7
Show file tree
Hide file tree
Showing 840 changed files with 53,247 additions and 26,088 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/sparse-zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@ jobs:
# --pristine is important to reproduce _warnings_. It makes no
# difference for github but it's useful for anyone trying to
# reproduce and copying the command from the logs.
# "sparse" is currently incompatible with PICOLIBC (the new Zephyr default),
# see https://github.com/zephyrproject-rtos/zephyr/issues/63003
- name: analyze zephyr
working-directory: ./workspace
run: |
./sof/zephyr/docker-run.sh \
./sof/zephyr/docker-build.sh ${{ matrix.platform }} \
--cmake-args=-DZEPHYR_SCA_VARIANT=sparse --cmake-args=-DCONFIG_LOG_USE_VLA=n \
--cmake-args=-DCONFIG_MINIMAL_LIBC=y \
--pristine 2>&1 | tee _.log
printf '\n\n\t\t\t ---- Messages below are treated as sparse errors --- \n\n\n'
Expand Down
65 changes: 47 additions & 18 deletions .github/workflows/zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,10 @@ jobs:
IPC_platforms: [
# - IPC3 default
imx8 imx8x imx8m,
tgl tgl-h, # UNSUPPORTED! Will be removed
# - IPC4 default
mtl, lnl,
# Temporary testbed for Zephyr development.
-i IPC4 tgl tgl-h,
tgl tgl-h,
]
build_opts: [""]
# Sparse matrices are complicated, you must read this page slowly:
Expand All @@ -133,14 +132,15 @@ jobs:

- name: west clones

# Get some git tags in Zephyr. keep in sync with build-windows below
run: pip3 install west && cd workspace/sof/ && west init -l &&
west update --narrow --fetch-opt=--filter=tree:0

- name: select zephyr revision
run: |
cd workspace
if [ 'mnfst' != '${{ matrix.zephyr_revision }}' ]; then
if [ 'mnfst' = '${{ matrix.zephyr_revision }}' ]; then
rem_rev=$(git -C zephyr rev-parse HEAD)
else
case '${{ matrix.zephyr_revision }}' in
'zmain') rem_rev='main' ;;
*) echo 'Unknown matrix.zephyr_revision'; exit 1 ;;
Expand All @@ -150,17 +150,30 @@ jobs:
sof-ci-jenkins/zephyr-override-template.yml > test-zephyr-main.yml
)
west update --narrow --fetch-opt=--filter=tree:0
# For some unknown reason `west` fetches using the literal remote URL
# which breaks --decorate. Maybe zephyrproject-rtos/west/pull/346 has
# some relevant background? For now `west` uses the remote name
# `zephyrproject`, use that knowledge to fix --decorate but ignore any
# failure in case the name changes or some other issue.
git -C zephyr/ fetch '--filter=tree:0' zephyrproject "${rem_rev}" || true
fi
# Because we used git tricks to speed things up, we now have two git
# problems:
#
# 1. git fetch without a refspec fetches zero tag. So `git describe` is
# different from everyone else. west normally adds `--tags` as a workaround
# but this is inefficient because it fetches ALL tags; so `west --narrow`
# does not use --tags.
#
# 2. west fetches using the remote URL, not the remote name. So remote
# branches (if any) are missing from --decorate below
#
# => an "empty" and quick fetch _with_ a refspec and the remote name fixes
# both issues in no time.
cd zephyr
git fetch --filter=tree:0 zephyrproject "$rem_rev":_branch_placeholder
git branch -D _branch_placeholder
set -x
west list
west status
git -C zephyr/ log --oneline -n 5 --decorate --graph --no-abbrev-commit
git log --oneline -n 5 --decorate --graph --no-abbrev-commit
# Not strictly necessary but saves a lot of scrolling in the next step
# Caching a 12G image is unfortunately not possible:
Expand Down Expand Up @@ -199,17 +212,14 @@ jobs:
platforms: [
# - IPC3 default
imx8 imx8x imx8m,
tgl tgl-h, # UNSUPPORTED! Will be removed
# - IPC4 default
mtl,
# Very few IPC3 platforms support IPC4 too.
-i IPC4 tgl tgl-h,
tgl tgl-h,
]
build_opts: [""]
# Sparse matrices are complicated, see comments on Linux matrix above.
include:
- build_opts: -d
zephyr_revsion: mnfst
platforms: mtl


Expand Down Expand Up @@ -291,8 +301,16 @@ jobs:
- name: West clone
working-directory: ${{ github.workspace }}/workspace
# Keep in sync with build-linux above
run: west init -l sof &&
west update --narrow --fetch-opt=--filter=tree:0
run: |
west init -l sof
west update --narrow --fetch-opt=--filter=tree:0
# Get some tags to fix `git describe`, see build-linux comments above.
cd zephyr
$_rev = "$(git rev-parse HEAD)"
git fetch --filter=tree:0 zephyrproject "${_rev}:_branch_placeholder"
git branch -D _branch_placeholder
# Call Setup Python again to save the PIP packages in cache
- name: Setup Python
Expand All @@ -308,7 +326,18 @@ jobs:
working-directory: ${{ github.workspace }}/workspace
run: pip install -r zephyr/scripts/requirements.txt

# Ninja has been coming and going, see #8250
- name: choco install ninja
run: |
choco install ninja
ninja.exe --version
# MSYS2 provides gcc x64_86 toolchain & openssl
# Installs in D:/a/_temp/msys64
#
# Note there is already C:/msys64/ provided by
# https://github.com/actions/runner-images/blob/win22/20230918.1/images/win/Windows2022-Readme.md
# Is it not good enough? Maybe it could save 20-30s.
- name: Initialize MSYS2
uses: msys2/setup-msys2@v2
with:
Expand Down Expand Up @@ -376,7 +405,7 @@ jobs:
# http://mywiki.wooledge.org/ParsingLs
for regdir in 'linux-build *mtl' \
'windows-build *mtl' \
'windows-build *-i IPC4 tgl tgl-h'; do
'windows-build *tgl tgl-h'; do
find . -maxdepth 1 | grep -q "\./${regdir}\$" ||
{ >&2 printf 'Missing %s\n' "${regdir}"; exit 1; }
done
Expand Down
36 changes: 17 additions & 19 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
[submodule "rimage"]
path = rimage
# This is a _relative_ submodule URL. In some use cases it's better than
# an _absolute_ submodule URL, in other cases it's not. One size does
# unfortunately not fit all.
#
# Among other pages, http://blog.tremily.us/posts/Relative_submodules/
# has a good comparison
#
# If you use Zephyr you must also look at the comments in sof/west.yml.
#
# If you want to fork or mirror sof.git _without_ doing the same for
# rimage.git then your automation may want you to change and git commit
# an absolute URL in your branch. No need to git commit for interactive
# use; a local and temporary edit of this file is enough for interactive
# use because .gitmodules is used only once to --init[ialize]
# .git/config the first time. Then .gitmodules is never used again after
# cloning.
url = ../rimage
# This is required for non-Zephyr ("XTOS") configurations. Zephyr
# configs also get it from sof/west.yml which adds the burden of keeping
# both tomlc99 SHA1s synchronized but in practice this barely ever moves.
[submodule "tomlc99"]
path = tools/rimage/tomlc99
# This is a _absolute_ submodule URL. In some use cases it's
# better than an _relative_ submodule URL, in other cases it's
# not. One size does unfortunately not fit all. Among other
# pages, http://blog.tremily.us/posts/Relative_submodules/ has a
# good comparison.
#
# A local and temporary edit of this url can be enough because
# .gitmodules is used _only once_ to submodule --init[ialize]
# .git/config the first time. Then .gitmodules is never used
# again after cloning tomlc99 the first time.
url = https://github.com/thesofproject/tomlc99.git
branch = master
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ project(SOF C ASM)
set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}")
set(SOF_ROOT_BINARY_DIRECTORY "${PROJECT_BINARY_DIR}")

set(RIMAGE_TOP "${PROJECT_SOURCE_DIR}/tools/rimage")

# check git hooks
include(scripts/cmake/git-hooks.cmake)

Expand Down Expand Up @@ -159,8 +161,8 @@ install(
${PROJECT_SOURCE_DIR}/src/include/ipc
${PROJECT_SOURCE_DIR}/src/include/kernel
${PROJECT_SOURCE_DIR}/src/include/user
${PROJECT_SOURCE_DIR}/rimage/src/include/sof/kernel
${PROJECT_SOURCE_DIR}/rimage/src/include/sof/user
${RIMAGE_TOP}/src/include/sof/kernel
${RIMAGE_TOP}/src/include/sof/user
DESTINATION include/sof
PATTERN "*.h"
)
Expand Down
18 changes: 9 additions & 9 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in the repo.
* @lgirdwood @plbossart @mmaka1 @lbetlej @dbaluta
* @lgirdwood @plbossart @mmaka1 @lbetlej @dbaluta @kv2019i

# Order is important. The last matching pattern has the most precedence.
# File patterns work mostly like .gitignore. Try to keep this file
Expand All @@ -13,7 +13,7 @@
src/include/sof/drivers/dmic.h @singalsu
src/include/ipc/** @thesofproject/steering-committee
src/include/ipc/** @randerwang @marcinszkudlinski @pblaszko
src/include/ipc4/** @randerwang @marcinszkudlinski @pblaszko @aborisovich
src/include/ipc4/** @randerwang @marcinszkudlinski @pblaszko
src/include/kernel/** @thesofproject/steering-committee
src/include/user/** @thesofproject/steering-committee
src/include/sof/debug/gdb/* @abonislawski
Expand Down Expand Up @@ -62,7 +62,7 @@ src/drivers/mediatek/mt8195/* @yaochunhung @kuanhsuncheng

# other libs
src/math/* @singalsu
src/ipc/* @bardliao @marcinszkudlinski @pblaszko @aborisovich
src/ipc/* @bardliao @marcinszkudlinski @pblaszko
src/lib/* @libinyang
src/debug/gdb/* @abonislawski
src/schedule @pblaszko @marcinszkudlinski @dbaluta @LaurentiuM1234
Expand All @@ -72,7 +72,7 @@ samples/audio/detect_test.c @iganakov

# other helpers
# Many files overridden by *.(ba)sh pattern below
scripts/* @marc-hb @aborisovich
scripts/* @marc-hb

# tools(old 'soft' repo)
tools/logger/* @bkokoszx @akloniex
Expand All @@ -99,21 +99,21 @@ installer/** @marc-hb

# Include only "top-level" CMakeLists.txt files; the other ones are just
# dumb list of source files and generate too much noise.
/CMakeLists.txt @marc-hb @aborisovich
/*/CMakeLists.txt @marc-hb @aborisovich
/test/cmocka/CMakeLists.txt @marc-hb @aborisovich
/CMakeLists.txt @marc-hb
/*/CMakeLists.txt @marc-hb
/test/cmocka/CMakeLists.txt @marc-hb

# There's a small enough number of files in tools/ and little
# churn: keep it simple and take them all.
# FIXME: some topology CMakeLists.txt files are configuration files
# in disguise. Move them to actual configuration files.
/tools/**/CMakeLists.txt @marc-hb @aborisovich
/tools/**/CMakeLists.txt @marc-hb

*.sh @marc-hb
*.bash @marc-hb
*trace.* @akloniex

/.github/ @dbaluta @cujomalainey @lgirdwood @marc-hb @aborisovich
/.github/ @dbaluta @cujomalainey @lgirdwood @marc-hb

# You can also use email addresses if you prefer.
#docs/* [email protected]
7 changes: 7 additions & 0 deletions Kconfig.sof
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ config COMPILER_WORKAROUND_CACHE_ATTR
There is a weird optimization bug with gcc10x and gcc8.1
(with -O2 flags) on IMX platforms. See PR #4605.

config COMPILER_INLINE_FUNCTION_OPTION
bool
default y if CAVS_VERSION_2_5 || ACE
default n
help
When enabled, -fno-inline-function option is not passed to compiler

rsource "src/Kconfig"

# See zephyr/modules/Kconfig
Expand Down
10 changes: 10 additions & 0 deletions Kconfig.zephyr-log
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,14 @@ config SOF_LOG_LEVEL
default 3 if SOF_LOG_LEVEL_INF
default 4 if SOF_LOG_LEVEL_DBG

config SOF_LOG_DBG_BUFFER
bool "Log buffer state on each consume/produce call"
default n
help
Dumps buffer struct audio_stream values on each call to comp_update_buffer_consume()
and comp_update_buffer_produce().
WARNING: Produces too much log output which usually results in many log messaged been
dropped! Also, if selected log backend formats log messages at runtime, enabling this
option results in significant CPU load!

endmenu
11 changes: 6 additions & 5 deletions app/boards/intel_adsp_ace15_mtpm.conf
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
CONFIG_METEORLAKE=y
CONFIG_IPC_MAJOR_4=y

# turn off SOF drivers
CONFIG_INTEL_DMIC=n
CONFIG_INTEL_DMIC_NHLT=n
CONFIG_INTEL_SSP=n
CONFIG_INTEL_ALH=n
CONFIG_COMP_SRC=y
CONFIG_COMP_SRC_IPC4_FULL_MATRIX=y
CONFIG_COMP_DRC=y
CONFIG_COMP_CROSSOVER=y
CONFIG_COMP_MULTIBAND_DRC=y

# power settings
CONFIG_PM=y
Expand Down Expand Up @@ -70,6 +67,7 @@ CONFIG_SYS_CLOCK_TICKS_PER_SEC=12000
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=38400000

CONFIG_LOG_BACKEND_ADSP_MTRACE=y
CONFIG_LOG_BACKEND_SOF_PROBE=n
CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_ZEPHYR_LOG=y
CONFIG_LOG_OUTPUT_FORMAT_LINUX_TIMESTAMP=y
Expand All @@ -88,3 +86,6 @@ CONFIG_CLOCK_CONTROL=y
CONFIG_DEBUG_COREDUMP=y
CONFIG_DEBUG_COREDUMP_BACKEND_INTEL_ADSP_MEM_WINDOW=y
CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y

CONFIG_PROBE=y
CONFIG_PROBE_DMA_MAX=2
5 changes: 0 additions & 5 deletions app/boards/intel_adsp_ace20_lnl.conf
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
CONFIG_LUNARLAKE=y
CONFIG_IPC_MAJOR_4=y

# turn off SOF drivers
CONFIG_INTEL_DMIC=n
CONFIG_INTEL_DMIC_NHLT=n
CONFIG_INTEL_SSP=n
CONFIG_INTEL_ALH=n
CONFIG_COMP_SRC=y

CONFIG_COMP_SRC_IPC4_FULL_MATRIX=y
Expand Down
Loading

0 comments on commit 22571f7

Please sign in to comment.