Commit Graph

8418 Commits

Author SHA1 Message Date
Marc Herbert 33f27d3477 xtensa-build-zephyr.py: speed up thanks to an _actually_ shallow clone
This will significantly speed up CI in some cases.

Fixes commit ffdf001eee ("xtensa-build-zephyr.py: clone zephyr with
--depth 5")

When I added --depth 5 to git clone in that commit I naively assumed git
fetch would "inherit" that. I think it does but only when fetching an
_existing_ (and shallow) branch, not when fetching something new.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-11 09:22:32 +01:00
Lionel Koenig 912cf91ca6 google_rtc: Do not rely on component type.
Remove the assumption that the AEC reference was coming from a DEMUX.
It now uses the fact that the AEC reference comes from another pipeline
in order to detect it is the reference signal.

Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-07-08 21:28:26 +01:00
Fred Oh 9fc3833a5d docker: dump git log to a file before deleting projects
To track the docker images, need to keep all the hashes of the projects
builts in the image. Log git tree information to
/home/sof/work/sof_git_hash.txt in the docker image.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-07-08 21:27:27 +01:00
Fred Oh 85d68d0921 docker: change indentation and add HOME variable
No functionality change. Add some logs and minor clean up.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-07-08 21:27:27 +01:00
Bard Liao 606857bca5 topology2: cavs-passthrough-hdmi: use hdmi-generic.conf
hdmi-generic.conf can be used for all topologies with HDMI
support.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao 96ac486b58 topology2: add HDMI support on SDW
Create a hdmi-generic.conf and use it in cavs-sdw.conf to add
HDMI support

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao c97fb30f97 topology2: sdw-cavs: add dmic support
Add PCH DMIC support for MTL RVP with dmic01 id = 2 and dmic16k id = 3.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao 73f4f86d73 topology2: remove pipeline format parameter
The "format" parameter is never used by IPC4. And it should not be
mandatory.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Marc Herbert 5dfaf0bf80 sof_ri_info: memory layout: find 'tgl' in ___/build_tgl_xcc/sof.ri
Extend the search for the platform code in directory names when there is
no sof-tgl.ri match.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-07 11:53:11 +01:00
Marc Herbert 0f365400eb sof_ri_info: explain why memory layout is empty
It was not obvious at all that the expected memory layout is inferred
from the filename.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-07 11:53:11 +01:00
Marc Herbert 7eb5ffcc4b Exclude dai-legacy.h from doxygen to avoid clashes with dai-zephyr.h
This fixes the sof-docs build and stops producing a dai-drivers-api.html
garbage that randomly mixed the two .h files.

```
Warning: Duplicate target detected:
    group__sof__dai__drivers_1ga8c720c310f408b2f97ce014562d6a910
sof-docs/api/dai-drivers-api.rst:4: WARNING: Duplicate ID:
   "group__sof__dai__drivers_1ga8c720c310f408b2f97ce014562d6a910".
sof-docs/api/dai-drivers-api.rst:4: WARNING: Duplicate explicit target name:
   "group__sof__dai__drivers_1ga8c720c310f408b2f97ce014562d6a910".

sof/sof-docs/api/dai-drivers-api.rst:6: WARNING:
  Duplicate declaration, const struct device* dai::drv
```

(Temporarily?) fixes commit 015ec63c4d ("zephyr: add glue code to
use zephyr dai drivers") that introduced a lot of duplication with
dai-zephyr.h. See more details at
https://github.com/thesofproject/sof/pull/5731#issuecomment-1175630147

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-07 10:52:45 +01:00
Marc Herbert 31b14782d2 Exclude audio/coefficients/src/src_ipc4_*.h from doxygen
Fixes doxygen warning:

warning: Included by graph for 'src.h' not generated, too many
nodes (111), threshold is 50. Consider increasing DOT_GRAPH_MAX_NODES.

This code is generated and pollutes doxygen output anyway.

Temporary, manual solution until the `\cond` directive is also generated
by the sof/tools/tune/src/*export*.m script(s)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-07 10:49:04 +01:00
Marc Herbert 1be730182d Exclude audio/coefficients/src/src_ipc4_int32_table.h from doxygen
Fixes doxygen warning:

warning: Include graph for 'src_ipc4_int32_table.h' not generated, too
many nodes (89), threshold is 50. Consider increasing
DOT_GRAPH_MAX_NODES.

This code is generated and pollutes doxygen output anyway.

Temporary, manual solution until the `\cond` directive is also generated
by the sof/tools/tune/src/*export*.m script(s)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-07 10:49:04 +01:00
Marc Herbert 4c3ea714fa .github: doxygen: use the newer and better FAIL_ON_WARNINGS
Unlike the older 'YES', FAIL_ON_WARNINGS reports all warnings.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-07 10:49:04 +01:00
Marc Herbert ceacbefd03 .github: doxygen: upgrade to Ubuntu 22.04
This should upgrade doxygen from version 1.8.17 to 1.9.1

This will hopefully provide FAIL_ON_WARNINGS and fix issues like
https://github.com/doxygen/doxygen/issues/7970

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-07 10:49:04 +01:00
Xiaoyun Wu(Iris) 1e467a106f xtensa-build-zephyr: Auto pamam completion for --fw-naming
There are some restrictions when --fw-naming is set to 'AVS' for the
sake of providing reasonable FW outputs that make sense.

Restriction 1: When argument fw_naming is set as AVS, IPC4 ipc version
will be automatically chosen.

This is because --fw-naming 'AVS' is added for supporting IPC4 SOF build by
nature.

Restriction 2: When argument fw_naming is set as AVS, using platform
subdirectories will be automatically chosen.

The reason is that the platform subdirectories actually belong to the
"AVS" naming scheme, we must enable using platform subdirectories when
building FW in AVS naming convention.

This also ensure that we can tell firmwares of different platforms apart
by organizing them in different subdirectories.

Signed-off-by: Xiaoyun Wu(Iris) <xiaoyun.wu@intel.com>
2022-07-06 22:05:02 +01:00
Iris Wu 762f63bf8b xtensa-build-zephyr: add option to build FW in cavs naming style
Add argument option --fw-naming for specifying FW output with its
filename set with AVS style(filename as dsp_basefw.bin specifically)
OR SOF style(filename as sof-{platform}.ri). SOF style is by default.

This will be useful when building SOF+Zephyr IPC4 FW, because
dsp_basefw.bin will be loaded by default when snd_sof_pci parameter
ipc_type is set to 1 (which indicates running IPC4 mode).

Signed-off-by: Iris Wu <xiaoyun.wu@intel.com>
2022-07-06 22:05:02 +01:00
Marc Herbert 4d03c269c2 .github: add sof-docs build to Github Actions
From time to time sof-docs regressions are introduced in sof.git. This
introduces a random and sometimes long delay between when the regression
is introduced and when it is found. A recent example is
https://github.com/thesofproject/sof/pull/5731#issuecomment-1175630147
where the doxygen comments were duplicated. Doxygen alone did not mind,
then the sof-docs build failed much later which took multiple people a
lot of time to understand and bisect.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-06 22:02:21 +01:00
Andrula Song 4b4b752a14 Audio: Copier: optimize the usage of read frag
Optimize the read frags of copier module in function
apply_attenuation. By using the optimized function
audio_stream_samples_without_wrap_s32, we can reduce
the address judgment and save about 60% MCPS.

Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
2022-07-04 16:26:58 +01:00
Marc Herbert 7c5bf651f8 xtensa-build-zephyr: copy ALL cavstool*.py scripts
Quoting https://github.com/zephyrproject-rtos/zephyr/pull/46880#pullrequestreview-1020096140

> No complaints about the code here. Just a general comment:

> I do worry that as cavstool grows features (first to add the test
> integration support, now the new client/server architecture) that
> we're obscuring the core code that does the loading behind a big
> facade of other stuff that also has to be run In Just The Right Way to
> make things work. That impedes development flow. It might be time to
> split the code up so that a minimal "just run this file please" tool
> can continue to be maintained.`

Long story short: `cavstool.py` is likely to be split in the future.

To be readi-er, copy the entire `zephyr/soc/xtensa/intel_adsp/tools/`
directory.

Copying the entire directory also copies scripts that will never be used
on a test device like `cavstool_client.py`. They're small Python script
sso we don't care: keep it simple.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-04 15:56:34 +01:00
Ranjani Sridharan e5b29d1a9d pipeline: Add a pending flag to the pipeline trigger
When the host pipeline and DAI pipelines have the same scheduling
period, the host pipeline will be prioritized over the DAI pipeline when
the scheduler picks a task to execute after receiving a pipeline trigger
IPC.

But in the case that the host pipeline's scheduling period is larger
than that of DAI pipeline, the DAI pipeline task will likely get
executed before the host pipeline gets the chance to execute the trigger
command. And when this happens, the state of the aborted flag is
insufficient to determine if the pipeline task should be kept running or
completed. For example, consider the mixer based pipelines in the
nocodec topology:

 PCM0 (pipeline 11, 1ms period) ---> Volume -----|
                                     V
                                   Mixer (Pipeline 1, 1ms)----> SSP0
                                    ^
 PCM3 (pipeline 7, 10ms period ) ---> Volume -----|

When PCM 3 is started and the START trigger completes, the aborted flag
for pipelines 7 iand pipeline 1 will be reset. And when PCM 3 is paused,
the PAUSE trigger is scheduled for both the pipelines 7 and 1. But since
pipeline 1 has a lower latency requirement than pipeline 7, it gets
scheduled first and because it is not the host pipeline, the trigger is
not executed and the aborted flag is not set, the task gets completed and
a subsequent release for PCM 3 ends up in an IPC timeout.

To fix this, add a new flag called pending to the pipeline trigger that
can be set when a pipeline trigger is scheduled for a pipeline. This flag
must be cleared when the first component in the pipeline executes it's
trigger op. This flag combined with the aborted flag are sufficient to
prevent the IPC timeouts for the cases where the DAI pipeline task executes
ahead of the host pipeline when the trigger has not been executed yet.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-04 15:55:56 +01:00
Ranjani Sridharan f8bbef3357 pipeline-schedule: clear aborted flag for non-host connected pipelines
Consider the mixer-based pipeline in the nocodec topologies:
  PCM0 (pipeline 11) ---> Volume -----|
				      V
                                    Mixer (Pipeline 1)----> SSP0
				     ^
  PCM3 (pipeline 7) ---> Volume -----|

When PCM0 is started it triggers pipelines 7 and 1. When PCM3 is
started followed by PCM0, it will trigger pipelines 11 and 1. But since
pipeline 1 is already is started, it's aborted flag will be set.
But the aborted flag is never cleared for pipeline 1 because it is
not the host pipeline.

Fix this, by clearing the aborted flag for non-host pipelines in
pipeline_task_cmd()

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-04 15:55:56 +01:00
Bard Liao 67daf2ecf5 topology2: add num_audio_formats for gain
We should set num_audio_formats in pipelines when we remove the
default value from gain.conf.
Otherwise, we will see below error with cavs-mixin-mixout-hda-2ch-tgl.tplg
tplg: ready widget id 2 pipe 1 type 6 name : gain.1.1 stream none

Fixes: 773a05a3 ('topology2: add S24LE support')
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-04 15:53:06 +01:00
Yong Zhi 45f6d6fa59 topology2: cavs: hda: add tplg build for mtl
Add the topology for skl_hda_dsp_generic machine.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2022-07-04 15:28:47 +01:00
Guennadi Liakhovetski 7a2e0e1e17 multiband-drc: fix buffer acquisition
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .prepare() methods.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-01 11:11:23 +01:00
Guennadi Liakhovetski c323efee44 drc: fix buffer acquisition
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .prepare() methods.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-01 11:11:23 +01:00
Guennadi Liakhovetski f8315621cd crossover: fix buffer acquisition
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .prepare() methods.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-01 11:11:23 +01:00
Guennadi Liakhovetski 81c1590ef1 aria: fix buffer acquisition
Instead of acquiring and releasing buffers locally multiple times,
do that once for the .copy() method.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-01 11:11:23 +01:00
Guennadi Liakhovetski 4ec777de52 tone: fix buffer acquisition
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy(), .params() and .prepare() methods.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-01 11:11:23 +01:00
Guennadi Liakhovetski 6c94904f3d smart_amp: fix buffer acquisition
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy(), .trigger() and .prepare() methods.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-01 11:11:23 +01:00
Guennadi Liakhovetski cae027edbe samples: use __sparse_cache sparse annotation
Add the __sparse_cache sparse annotation to sample audio tests.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-01 11:11:23 +01:00
Guennadi Liakhovetski 162dafc288 zephyr: add third-party components
Add multiple third-party and optional audio processing components to
the Zephyr cmake and initialisation lists.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-01 11:11:23 +01:00
YC Hung 7e4452dfbb platform: mtk: add clib memory layout for mt8195
Support clib data and rodata for mt8195.

Signed-off-by: YC Hung <yc.hung@mediatek.com>
2022-06-29 16:57:28 +01:00
Adrian Warecki bfa4af45ab ipc4: Aligned names of fields in ipc4_peak_volume_regs structure
Changed names of peak_meter_, current_volume_ and target_volume_
fields in the ipc4_peak_volume_regs structure to comply with the
convention used in the project - deleted postfix _.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2022-06-29 16:04:07 +01:00
Adrian Warecki 75f6912b3d ipc4: Updated ipc4_fw_registers structure
Updated the ipc4_fw_registers structure to be compatible with ipc4.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2022-06-29 16:04:07 +01:00
Adrian Warecki e716675736 dai: Don't reference to a dma channel after put
In the dai_free function, dma channel device data was cleared after calling
to dma_channel_put. This patch changes the order of the instructions so,
we don't reference a released channel.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2022-06-29 16:04:07 +01:00
Adrian Warecki 2fb2d8cb5b ipc4: dai: host: Add support for setting DMA buffer size
The gateway configuration structure in ipc4 can specify the size of a dma
buffer, what a interface should use. This patch adds support for it in dai
and host interfaces.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2022-06-29 16:04:07 +01:00
Laurentiu Mihalcea 62cbc027c7 Audio: Google RTC Audio Proc: fixed repeated word
This makes code easier to read and fixes checkpatch.pl warning:
WARNING: Possible repeated word: 'on'

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-06-29 17:13:50 +03:00
Joe.Cheng d5f8cb9eab module_adapter:dts:return zero when param is invalid
Avoid DTS loads fail if param is invalid.

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-06-29 13:10:33 +01:00
Joe.Cheng 52699ec667 module_adapter:dts:build error fix from migrating module_adapter
Using processing_module instead of comp_dev to fix build error from
migrating module_adapter

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-06-29 13:10:33 +01:00
Joe.Cheng ece102b948 config:renoir:add DTS config
Enable DTS SDK

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-06-29 13:10:33 +01:00
Joe.Cheng 2cad1764e4 topology1:renoir:add DTS topology
Add topology pipe-dts-codec-playback to support Renoir platform

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-06-29 13:10:33 +01:00
honglin leng 43a8a187d4 zephyr_ll: add task_cancel function state judgement
when call pause and then call stop, it will cause next triger start failed

The reason:

for PAUSE, the state machine:SOF_TASK_STATE_CANCEL—>SOF_TASK_STATE_FREE
call STOP, the state machine:SOF_TASK_STATE_FREE—>SOF_TASK_STATE_CANCEL

Signed-off-by: honglin leng <a909204013@gmail.com>
2022-06-29 13:05:13 +01:00
balapati 5c4ca781ec tools:topology: Add HS topology
Add HS I2S instance topolgy for Rembrandt target.

Signed-off-by: balapati <balakishore.pati@amd.com>
2022-06-29 13:00:26 +01:00
Pierre-Louis Bossart c8551e3563 topology1: sof-tgl-rt711-rt1308: add missing switch
For some reason we never added the switch in this topology, with leads
to a missing control when parsing UCM files

BugLink: https://github.com/thesofproject/sof/issues/5950
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/179
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-29 12:29:45 +01:00
Rander Wang 773a05a32e topology2: add S24LE support
S24LE is the major format used by SOF IPC4 FW and windows platform
and has better perfomance than S32.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang bf65c0783d topology2: add src support on sdw platform
Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang 715233aac9 topology2: add pipeline for src
This pipeline supports conversion from 8k ~ 192k to 48k.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang 7b6d395aca topology2: add cavs src support
Cavs src is different with sof src. It has different uuid
and param which are composed of base module definition and
output rate.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang 3f12097f36 topology2: add support for sampling rate
The original calculation will generate 44 sample size for
44.1khz, actually it at least needs 45 sample size.
This patch uses ceil value for such rate, also inlcude
11.025kh, 22.05kh, 88.2khz, 176.4khz.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00