Commit Graph

8642 Commits

Author SHA1 Message Date
Krzysztof Frydryk d25b64950e ipc4: set pipeline components dir based on source component
Prefer to use source components direction, rather than dai direction when
setting pipeline components direction. Accept first direction set in
pipeline. This properly handles
host_copier -> module -> host_copier pipelines.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2022-07-27 23:04:54 +01:00
Balakishorepati 8ec680cf2e platform: amd: renoir: Configure dma descriptor
configure dma descriptor base and count during firmware bootup.

Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
2022-07-27 22:24:09 +01:00
Balakishorepati 8cf0bea7a3 drivers: amd: Bug fixes and optimizations
1. Fix avail and free bytes for BT and SP modes.
2. Code cleanup and code optimizations.

Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
2022-07-27 22:24:09 +01:00
Balakishorepati a2f5b86882 drivers: amd: renoir: Fix no audio issue.
while simultaneous playback and internal mic capture usecases
are running, there is a case where dmic driver was clearing the
playback interrupt.This might cause noise in playback or no audio
in speaker.Done changes to clear only dmic interrupt status only
in dmic irq handler.

Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
2022-07-27 22:24:09 +01:00
Paul Olaru e4c2872b60 audio: module_adapter: Visual fixes to kconfig
Group together the Cadence main Kconfig option with the options related
to various Cadence based codecs.

This is only a visual fix.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2022-07-25 21:35:44 +01:00
Paul Olaru 88325b9560 audio: kconfig: Group module adapter configs with the main module adapter config option
When module adapter is enabled, it is best to keep the new related
options next to it, rather than one option after that.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2022-07-25 21:35:44 +01:00
Andrula Song bd205292a3 Audio: Pcm_converter: Optimize the signed type converter functions
Deprecate the usage of circular buffer check while doing convert, and
use 2-way and 4-way xtensa instructions first to optimize the converter
functions, and process the left samples one by one to avoid potential
risk of memory access overrun. Here are the results:
Optimize pcm_convert_s16_to_s24 and save about 38% cycles;
Optimize pcm_convert_s24_to_s16 and save about 25% cycles;
Optimize pcm_convert_s16_to_s32 and save about 39% cycles;
Optimize pcm_convert_s32_to_s16 and save about 40% cycles;
Optimize pcm_convert_s32_to_s24 and save about 38% cycles;
Optimize pcm_convert_s24_to_s32 and save about 47% cycles;

Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
2022-07-25 21:20:14 +01:00
Krzysztof Frydryk 95e7d9605a dai-zephyr: Set dai rate in config
Fill in cfg.rate to be used by zephyr native drivers as rate is not
always present in ipc config.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2022-07-25 21:18:19 +01:00
Andrula Song 54ab3c3e86 Audio: copier: Fix the potential risk of memory overrun
Fix the memory overrun risk of odd samples to be processed.
Since the 2-way xtensa instruction would always process 2
samples and there would be risk of memory overrun at the
boundary of buffer.

Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
2022-07-25 21:17:34 +01:00
Jaroslaw Stelter f9741cb0ce Connect intel_module_adapter with generic module adapter.
Added glue logic to integrate with module adapter
the loadable modules developed under Intel
IADK Framework.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-07-25 21:10:22 +01:00
Jaroslaw Stelter 4b8c8f040c Add module_adapter component for intel modules.
Add files with definition of module_adapter component
for intel IADK modules.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-07-25 21:10:22 +01:00
Jaroslaw Stelter a53d9c0fa0 Add 3rd party Intel IADK Framework modules adapter code.
IADK based modules uses two interfaces to communicate with
base firmware:
- ProcessingModuleInterface;
- SystemServices.
Implementation of both with C++->C wrappers are added in
these files. Additionally system_agent component is
responsible for integration of both communications path
after module loading.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-07-25 21:10:22 +01:00
Jaroslaw Stelter 6f366e2eef Add definition of interfaces of Intel IADK modules.
Add header files with definitions needed to build wrappers
for run time integration of 3rd party modules developed
with Intel IADK framework.
Note: file naming and localization is kept from IADK Framework
to be able to integrate or also rebuild and integrate original
3rd party modules without their code modifications.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-07-25 21:10:22 +01:00
Jaroslaw Stelter f179e4740e Move processing module interface specific defines to separate file.
These defines need to be included in C++ wrappers for
ProcesingModuleInterface defined in Intel IADK based
3rd party modules. Move it to separate file to not include
whole sof stuff there.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-07-25 21:10:22 +01:00
Ranjani Sridharan 2845fc8cde ipc4: helper: Use get_attribute instead of ipc4_comp_get_base_module_cfg
Add a new component attribute COMP_ATTR_BASE_CONFIG to retrieve the base
config from the modules instead of using  ipc4_comp_get_base_module_cfg().
Also, implement the get_attribute API for all the components that support
IPC4.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-22 21:02:31 +01:00
Ranjani Sridharan def800e421 module_adapter: No need to calculate buffer sizes with simple_copy
When using simple_copy for components like volume, there is no need to
allocate intermediate sink buffers. So, move the check before the
calculation for sink buffers size.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-22 21:02:31 +01:00
Ranjani Sridharan 419ee3e9ec volume: fix get_processing_function for IPC4
Since volume component uses the module interface, vol_data should be
accessed module_get_private_data() instead of comp_get_drvdata().

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-22 21:02:31 +01:00
Ranjani Sridharan 68345fb168 module_adapter: Add support for IPC4 in module_adapter_new
Since we do not know the size of the IPC payload, just pass the pointer
to the mailbox data and let me module handle it during it's init. No
need to copy the data into the module config.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-22 21:02:31 +01:00
Guennadi Liakhovetski 104c63547f waves: always acquire buffers for access
Buffers must always be acquired before access.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-21 15:25:58 +01:00
Guennadi Liakhovetski a25f18a030 dts: fix buffer acquisition
Instead of acquiring and releasing buffers locally multiple times,
do that once for the .prepare() method.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-21 15:25:58 +01:00
Guennadi Liakhovetski 5a0484dc72 google_hotword_detect: fix buffer acquisition
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .params() methods.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-21 15:25:58 +01:00
Guennadi Liakhovetski b78effe9cd tdfb: 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-21 15:25:58 +01:00
Guennadi Liakhovetski 75acf8c965 up_down_mixer: 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-21 15:25:58 +01:00
Guennadi Liakhovetski b832e96b66 rtnr: 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-21 15:25:58 +01:00
Guennadi Liakhovetski 01c2196ec2 igo_nr: fix buffer acquisition
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .params() methods.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-07-21 15:25:58 +01:00
Guennadi Liakhovetski e7f8676497 google-rtc: 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-21 15:25:58 +01:00
Anas Nashif d10efee363 zephyr: rename timer kconfig
The config name was changed in zephyr to INTEL_ADSP_TIMER to accommodate
non-cavs platforms. Align with upstream zephyr so we can deprecate it in
zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-20 13:02:21 +01:00
Ranjani Sridharan 4af7082ad0 Revert "eq_iir: Use the new module interface"
This reverts commit 9d9ba739b3.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-19 15:33:29 -05:00
Ranjani Sridharan 084776011a Revert "audio_format: Add macro for converting bytes <-> samples"
This reverts commit 2583398d45.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-19 15:33:29 -05:00
Ranjani Sridharan e28c429bc6 Revert "module_adapter: Add a new helper to update input/output stream buffers"
This reverts commit ea72e3e97e.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-19 15:33:29 -05:00
Andrey Borisovich ef028f634a Removed obsolete xtensa-build-zephyr.sh
This script had been rewritten to python xtensa-build-zephyr.py
script and is no longer used in CI.
Due to changes to sof processes related to Zephyr integration
this script will no longer be maintained.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-07-19 09:51:29 +01:00
Pierre-Louis Bossart d87adcd2dc topology1: CMakeLists: add missing APL/GLK support for ES8336 with DMIC.
For some reason we added DMIC-based topologies for all platforms
except GLK and APL.

This should be back-ported to 2.2 stable.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-19 09:40:28 +01:00
Libin Yang cf903a87b1 ipc4: Fix wrong condition statement in set_pipeline_state
The condition statement is wrong in set_pipeline_state() when handling
SOF_IPC4_PIPELINE_STATE_RESET cmd.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-07-19 09:39:08 +01:00
Marc Herbert a64436c1e7 doc/CMakeLists.txt: build by default
Add missing `ALL` keyword so a bare `make` or `ninja` without any
argument runs doxygen by default instead of doing nothing at all. There
is a single target so really no reason not to build it. It's not
required anymore to know the secret word `make doc`.

Note this CMakeLists.txt is not included by any other CMakeLists.txt

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-19 09:38:30 +01:00
Marc Herbert a7c2f75b63 .gitignore: stop ignoring CMake files for in-source doxygen builds
sof-docs/Makefile used to require building doxygen inside the `sof/doc/`
sources. This was a very bad idea, in-source builds have been
discouraged by CMake since forever. It made it very hard to clean CMake
files in `sof/doc/` (`make clean` does obviously NOT deletes CMake
files)

gitignore was being enrolled to cover up this CMake crime. This was
de-hardcoded 2 years ago in sof-docs commit 2d664c658c14 and much more
recently sof-docs stopped recommending in-source builds in sof-docs
commit 9788c4be32cf. So there's no need to ignore in-source CMake files
any more. If someone still makes the mistake of building sof/doc/
(or anything else) in-source, the lack of .gitignore will now help them
clean up.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-19 09:38:30 +01:00
Ranjani Sridharan ea72e3e97e module_adapter: Add a new helper to update input/output stream buffers
Add a new helper to update the consumed bytes in the input stream
buffer and the produces bytes in the output stream buffer.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-18 16:56:40 +01:00
Ranjani Sridharan 2583398d45 audio_format: Add macro for converting bytes <-> samples
And macros for converting bytes to samples and samples to bytes and use
it in all components to avoid duplication.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-18 16:56:40 +01:00
Ranjani Sridharan 9d9ba739b3 eq_iir: Use the new module interface
Use the module interface instead of the comp drv interface for the
EQ IIR component.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-18 16:56:40 +01:00
Ranjani Sridharan b80fc03c4c tplg_parser: Add support for parsing process components by UUID
Add support for loading the process components by UUID. This needs a
modification in the IPC3 helper to modify the ipc data pointer to
address followed by the UUID in the component extended data.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-18 16:56:40 +01:00
Ranjani Sridharan 9966556105 data_blob: Introduce a new helper for setting the blob
Introduce a new helper function to set the blob to be used with the
module adapter set_configuration op. When all modules are converted to
use the new op, the comp_data_blob_set_cmd() can be removed.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-18 16:56:40 +01:00
Ranjani Sridharan e0935332f2 module_adapter: No need to include data_blob.h
It is not needed.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-18 16:56:40 +01:00
Anas Nashif afd28fb087 app: zephyr: remove overlays and adapt script
Remove overlays as they are the same board configurations available in
app/.
Keep common overlays and change script to reflect those changes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-18 14:22:01 +01:00
Anas Nashif a0c9907dbd zephyr: module: point to where the app is
This allows building SOF from zephyr for CI and testing purposes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-18 14:22:01 +01:00
Anas Nashif 00c407f8c9 zephyr: app: move main SOF app from zephyr samples
Make the main SOF app part of SOF, where it belongs. No need for any
overlays (which just duplicated the sample .conf anyways) and one place
to build everything.

This now does not depend on zephyr samples, which have a different
purpose completely.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-18 14:22:01 +01:00
Anas Nashif 33112b74e8 zephyr: use zephyr prefix for includes
Zephyr includes are now under a zephyr namespace, so use this.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-18 14:22:01 +01:00
Brent Lu 41e56b336d topology: sof-jsl-rt5682: enable mclk always-on feature
Enable the always-on feature for pop.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-07-18 14:20:09 +01:00
Brent Lu 8dfc008b8b intel: ssp: implement mclk always-on feature
In the earliest design, mclk is turned on in set_config() and never
turned off. The behavior is modified in this commit:

d5840a9200 ("ssp: move mclk request/release to pre_start and post_stop")

Now the mclk is enabled only during audio streaming so some codec may
pop. This commit adds the always-on behavior back as an new feature.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-07-18 14:20:09 +01:00
Adrian Bonislawski fdb644317d trace: fix build with zephyr logging
Add several missing LOG_MODULE_DECLARE()
Fix volume

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-07-15 16:52:52 +01:00
Fred Oh 23e81f7c20 topology2: cavs: add mixer-based hda pipelines to passthrough hdmi tplg for mtl
First two pipelines are mixer-based HDA playback and capture pipelines.
Tested with ALC256 HDA codec.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-07-15 09:08:12 +01:00
Fred Oh fcca1c3b7c topology2: cavs: re-order cavs hda toplogies
Re-ordering CNL TGL to MTL and DMIC 2ch to 4ch.
No functionality change.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-07-15 09:08:12 +01:00