Commit Graph

9515 Commits

Author SHA1 Message Date
Ranjani Sridharan b9c075a9ad eq_iir: Use the new module interface
Use the module interface instead of the comp drv interface for the
EQ IIR component.

In processing functions the dev structure is changed to the new mod
structure.

In filter initialize functions the mod structure provides the
configuration.

The eq_iir_init() function is converted to follow the module init
conventions.

The params() and cmd() functions are removed since they are done
in module adapter. The set/get config functions are added to handle
the binary blob set/get.

The copy() function is changed to module adapter eq_iir_process()
form. Data is processed from input_buffers[0] to output_buffers[0].

The eq_iir_prepare() is changed to set the frame and byte alignment
for module adapter. The sink streams size check is removed since
it is done in module adapter.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-02 21:37:46 +00:00
Ranjani Sridharan 6a00221722 topology2: common: Add new class definitions for input/output audio formats
The existing class definition for audio_format works only for widgets
with exactly 1 input pin (Pin index 0) and 1 output pin (Pin index 0).

Add two new classes that can be used to define the audio formats for any
pin. These classes use the same tokens are the existing audio_format
class and therefore can be used alongside the existing audio_format
instances with non-zero pin indices.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-02 17:12:18 +02:00
Ranjani Sridharan 08eb8ff630 topology2: widget-common: Add 2 new tokens for input/output audio format counts
And set them to be the same number as the num_audio_formats in all the
current widget objects. This is in preparation to remove
num_audio_formats as there will be widgets with different number of
supported formats for each sink/source pin.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-02 17:12:18 +02:00
Piotr Makaruk d8c935885b hda: enable chain dma with ipc4 only
Hda chain work only with IPC4 compatible boards, therefore additional
compilation dependency in Kconfig has to be added.

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-02-02 16:11:01 +02:00
Jaska Uimonen 0d2ab551f5 coherent: set CONFIG_INCOHERENT as default in mtl
Config INCOHERENT for cache is not set by default for mtl platform, thus
set it.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-02 13:23:28 +02:00
Pin-chih Lin 7f80908f28 topology1: set Speakers PPL running on C1 by default
For Intel platforms, C0 is on by default for processes necessary to
run in low power cases, while C1..3 for processes with higher loads.
This commit moves the default core to C1 for Speakers pipeline.

At the same time, we found this commit can resolve the DSP panic
issue on builds with 3P post-processing solutions running on Speakers
pipeline.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-02-01 16:56:49 +00:00
Pin-chih Lin cc0d9f09e4 topology1: define SPK_PLAYBACK_CORE for Speakers running core
Defines the target core ID for Speakers and Echo Reference pipelines
explicitly. When GOOGLE_RTC_PROCESSING is defined, it will be set to
the same ID as DMIC48K pipeline.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-02-01 16:56:49 +00:00
Seppo Ingalsuo d472a2e73d Tools: Test: Audio: Fix BITS_OUT in test run configuration
This patch fixes a mistake with test run configuration for
testbech tests where input and output word lengths are not
the same.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-01 16:39:20 +00:00
Yong Zhi 594e3f7da9 topology2: cavs-rt5682: add reference capture for MAX98357A speaker amp
Use lbm_mode to loopback playback data for PCM27.
Add copier module in DAI BE for demux function.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-02-01 14:49:05 +00:00
Kai Vehmanen f5b7dea110 topology2: bt-generic: allow override PCM name
Do not hardcode PCM name to "Port2".

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-01 14:22:50 +02:00
Kai Vehmanen 39a7be72e5 topology2: bt-generic: fix PCM stream name definitions
Fix the mechanism to override the stream name in PCM caps.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-01 14:22:50 +02:00
Marcin Szkudlinski 1f9005bf5e IPC: modify comp_new to accept IPC4 structures at entry
There's no need to translate ipc4_module_init_instance struct
to leagacy sof_ipc_comp before calling comp_new
More important - IPC4 contains different set of information,
like proc_domain (LL/DP), not included in IPC3

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-02-01 14:17:13 +02:00
Adrian Warecki d33af9ffbd platform: ace: watchdog: Add ll watchdog support
This commit adds watchdog support in zephyrs ll domain for ace platform.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-01 12:43:29 +02:00
Adrian Warecki 21f1aec447 idc: Add secondary core crashed notification
Added a new notification about the crash of the secondary core. It is
directed to the primary core. Only failure detected by watchdog is
supported at this moment.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-01 12:43:29 +02:00
Adrian Warecki dbeb0b9fdd ipc4: notification: Add watchdog timeout notification structure
Added notification structure for a watchdog timeout.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-01 12:43:29 +02:00
Adrian Warecki d1acc3d69e ipc4: notification: Code formatting
Fixed indentation in define and line break in comment.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-01 12:43:29 +02:00
Adrian Warecki c14a052534 zephyr: ll: watchdog: Add watchdog support in ll domain
Added a new LL_WATCHDOG option to the platform Kconfig. Created library
header for watchdog in ll. Added watchdog support to zephyrs ll scheduler
domain.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-01 12:43:29 +02:00
Adrian Warecki 52e378c3fb samples: detect_test: Don't include ipc4 structures when using ipc3
Despite using ipc3 some ipc4 header files were still included. Added #if to
solve this problem.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-01 12:43:29 +02:00
Ranjani Sridharan 543cf93eb2 topology2: copier: Add a new attribute
The dma_buffer_size is only applicable from the host/dai copiers and
can be calculated using the ibs/obs in the base_cfg in the kernel.

So in preparation for removing the dma_buffer_size token from the audio
format objects, add a new attribute, deep_buffer_dma_ms, in the copier
that will be used to the send the deep buffer DMA size to the kernel.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-01 11:19:10 +02:00
Chao Song 47947fe64d MTL: enable smart_amp_test module
Enable building smart_amp_test module for MTL.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-01-31 11:39:29 +00:00
Chao Song f36acfcc09 smart_amp_test: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register smart_amp_test module
with the Zephyr initialisation framework.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-01-30 09:04:45 -08:00
Piotr Makaruk 7383cbec13 hda: chain transition states fix
Require maintenance in logic to handle multiple start/pause requests by
one chain instance.

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-30 15:02:54 +00:00
Piotr Makaruk fc501b1cb0 hda: chain transition states fix prepare
Rearrange functions order.

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-30 15:02:54 +00:00
Kwasowiec, Fabiola d72d43a344 kpb: add functions supporting 24-bit format
FW infrastructure shall support buffering of
historic data 24bit samples in 24bit container.
with modules configuration 24/32bit

Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
2023-01-30 12:33:49 +01:00
Kwasowiec, Fabiola f5f40be12d kpb: add support for 1-6 channels
FW infrastructure shall support buffering
of historic data from 1ch up to 6 channels

Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
2023-01-30 12:33:49 +01:00
Kwasowiec, Fabiola 87020dad3a kpb: set sync_draining_mode to true
set sync_draining_mode to true otherwise we get
glitches on the output signal because the offsets
are set to 0

Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
2023-01-30 12:33:49 +01:00
Kwasowiec, Fabiola 8c20c39ca2 memory: expand HEAPMEM_SIZE
FW infrastructure shall support buffering of historic data
from 1ch up to 6 channels 24bit samples in 24bit container.
For this reason, the heap should be extended.Increase HEAPMEM_SIZE
by 0x90000 because for audio format 16000Hz/6ch/24bit
history_buffer_size = 16 * 6 * 3 * 2100s = 604800 bytes (0x93A80)

Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
2023-01-30 12:33:49 +01:00
Ranjani Sridharan 077828a109 topology2: control: bytes: Use instance ID to instantiate ops and extops
Use instance IDs as the class definitions have changed.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-27 17:17:05 +02:00
Jaska Uimonen e4dc655f74 topology2: fix bt offload pipeline build
Fix bt offload pipeline with instance ids. This was an unfortunate merge
error with recent instance id topology2 commit.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-01-27 16:35:31 +02:00
Kai Vehmanen 654bde83eb cavs: dma: increase HDA DMA period count to 4
Align HDA DMA platform period count with value used on Intel ACE
platforms. This only affects operation with native Zephyr DMA
drivers.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-27 12:58:24 +00:00
CoolStar 459b1f519e Apollo Lake needs MCLK 1 for working da7219
Headphone output requires MCLK_ID to be set to 1

Signed-off-by: CoolStar <coolstarorganization@gmail.com>
2023-01-27 11:37:41 +00:00
Seppo Ingalsuo 84f10e5597 Audio: EQ FIR: Fixes for IPC4 processing function select and params
This patch contains the main changes for IPC4. The FIR function
need to be selected in prepare() with mod->priv.cfg.base_cfg.audio_fmt
information.

The eq_fir_prepare() function must call in IPC4 the params()
function to get stream parameters from same struct to set the
sink buffer parameters.

Some comp_info() traces are changed to comp_dbg() to reduce
trace verbosity.

This patch also includes an optimization to select the
eq_fir_passtrough() function when all of the channel filters
in blob are set to bypass. The block copy function is more
efficient than per channel FIR bypass.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-01-27 11:08:32 +00:00
Seppo Ingalsuo 1dc316226d Audio: EQ FIR: Improve info trace message
Add determined stream channels count to info trace to better
understand possible error in coefficients blob initialization.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-01-27 11:08:32 +00:00
Seppo Ingalsuo e2265794f6 Audio: EQ FIR: Change frame align to 2
The FIR processing cores are computing multiple of two frames
sizes so the align constraint can be set to prevent EQ process
to be called with odd frame counts.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-01-27 11:08:32 +00:00
Seppo Ingalsuo 031fecb3f1 Audio: EQ FIR: Remove duplicates of module_update_buffer_position()
This can be done once at eq_fir_process() to save code size.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-01-27 11:08:32 +00:00
Seppo Ingalsuo 58692116a5 Audio: EQ FIR: Drop parameter nch from filter processing cores
The channels count need to be retrieved from source buffer. The
mod->stream_params->channels is not available in IPC4. Frame_count
calculation is also simplified.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-01-27 11:08:32 +00:00
Seppo Ingalsuo 32fa4ed037 Audio: EQ FIR: Remove unused FIR processing functions
The unused single frame processing functions can be removed
to save code size.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-01-27 11:08:32 +00:00
Jaska Uimonen 4476171620 topology2: add generic Bluetooth offload pipeline
Add generic Bluetooth offload pipeline and two example
topologies based on cavs-nocodec that are using the new
Bluetooth pipelines.

1) cavs-nocodec-bt.conf

Example topology that matches configuration used on may
Intel SOF boards (SSP2, Bluetooth SCO and A2DP configurations).

2) cavs-nocodec-bt-lbm.conf

Variant of first topology that configures all mode with
SSP loopback mode, allowing to verify the pipeline operation
by capturing the audio back from the same PCM.

Requires alsa-utils patch "topology: nhlt: intel: ssp: fix obvious typo
for 'codec_provider'" to correctly generate the NHLT blobs for 8/16khz
modes.

Link: https://github.com/alsa-project/alsa-utils/pull/174
Co-developed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-01-27 13:05:31 +02:00
Marc Herbert 1db950e078 .github/SPDX-README.md: clarify .c/.h difference and applicability
Explain when this file applies and why there is a .c/.h difference.

I still don't understand why .c file don't use /* SPDX */ but I think
it's still worth quoting a tiny bit from the official documentation
anyway.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-27 10:59:24 +00:00
Marc Herbert a5dfa5669e xtensa-build-zephyr.py: checksum dsp_basefw.bin
When using --fw-naming AVS the .ri file is renamed to `dsp_basefw.bin`.

Also explain why it's still useful to identify non-deterministic images.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-26 20:24:14 +02:00
Marc Herbert f85320ba8d scripts/xtensa-build-zephyr.py: checksum [sof_]version.h files
`git describe` differences happen, especially when trying to optimize
cloning and this is for instance what happened in
https://github.com/thesofproject/sof/pull/6950#issuecomment-1396150533
where zephyr tags were fetched on Linux but not on Windows

This also makes plain git version differences more obvious; no need to
scroll all the way up and scan the build logs.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-26 20:24:14 +02:00
Kai Vehmanen 48afcefc75 topology2: cavs: fix num_audio_formats to match the actual number
Multiple pipelines had incorrect num_audio_formats leading to invalid
format structures ending up to topology.

Example FW trace:

[ 1601.624195] sof-audio-pci-intel-tgl 0000:00:1f.3: Get input audio formats for copier.module.8.2
[ 1601.624197] sof-audio-pci-intel-tgl 0000:00:1f.3:  #0: 48000KHz, 32bit (ch_map 0xffffff10 ch_cfg 1 interleaving_style 0 fmt_cfg 0x2002)
[ 1601.624201] sof-audio-pci-intel-tgl 0000:00:1f.3:  #1: 0KHz, 0bit (ch_map 0x0 ch_cfg 0 interleaving_style 0 fmt_cfg 0x0)

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-26 19:10:08 +02:00
Guennadi Liakhovetski 6b9c3caac8 zephyr: remove unused module initialisation
All SOF modules are now initialised using native Zephyr APIs, no need
any more in a dedicated ELF section. TODO: remove from linker scripts
once this is merged.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 6b3050918a probe: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register probe with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski a6d6ed7632 waves: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register waves with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski e7a21904ac dts: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register dts with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski cfeb248275 google-hotword: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register google-hotword with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 8bb6321c6e tdfb: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register tdfb with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski d34fe6f1d4 up-down-mixer: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register up-down-mixer with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 12f647b753 rtnr: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register rtnr with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00