Commit Graph

10476 Commits

Author SHA1 Message Date
Kai Vehmanen 8f6018057b app: enable OUTPUT_DISASSEMBLY for Zephyr builds
With Zephyr commit cc5763344709 ("Build system: disable
`OUTPUT_DISASSEMBLY` by default"), generation of zephyr.lst
is disabled by default.

Enable disassembly generation in SOF configuration as it is expected by
SOF builds rules for reproducible builds.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-15 10:48:38 +03:00
Chao Song d484b76ffb topology2: add SDW topology for Dell SKU0C87 devices
Dell SKU0C87 devices have below config:

SDW0: RT714 DMIC
SDW1: RT1318 Speaker
SDW2: RT1318 Speaker

Add topology support in this patch for Dell SKU0C87 devices.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-08-14 15:29:08 +03:00
Tomasz Leman 49199a6aed ipc4: set_dx: ignoring logger status notifications
Before HOST can request FW to enter D3 state, has to stop all pipelines.
If it's done properly all possible source of IPC messages from FW to
HOST are disabled.

The only exception from this is logger. If logs are enabled FW will
continue to produce new traces and eventually trigger threshold
notification.

This notification is not critical so we can skip it during D3 entry. The
message will remain in the internal list and will be sent when the DSP
wakes up.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-08-14 10:07:39 +03:00
Seppo Ingalsuo fb6c3b7e9d Tools: Topology: Add test topologies for crossover component
This patch adds build of tplg1 development topologies
sof-tgl-nocodec-crossover-2way.tplg
sof-tgl-nocodec-crossover-4way.tplg

The tplg2 development topology version is
sof-tgl-nocodec-crossover-2way.tplg

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-10 12:16:53 +01:00
Ranjani Sridharan 528a973fe6 tplg_parser: process: Update the ipc4 builder
Add support for parsing the effect type widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 662c04b694 tplg_parser: pipeline: Update the ipc4 builder
Add support for parsing the scheduler widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 90c929d522 tplg_parser: mixer: Update the ipc4 builder
Add support for parsing the mixer widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan d79ef35e70 tplg_parser: buffer: Update the ipc4 builder
Add support for parsing the module-copier(buffer) in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 8661fd445c tplg_parser: pga: Update the ipc4 builder
Add support for parsing the pga widget in IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 1ba3124e5f tplg_parser: Extend the tplg_context and comp_info for IPC4
Extend the definitions for struct tplg_context and struct tplg_comp_info
to include the fields to parse the ipc_payload and audio format
information from topology.
Also, add the logic for parsing the input/output audio formats from the
topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 0a248c87c9 tplg_parser: tokens: Add support for parsing multiple sets of the same tokens
Add support for parsing multiple token sets belonging to the same group.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Ranjani Sridharan 4b58987825 kernel: tokens: Update tokens for IPC4
Update the tokens needed for IPC4 topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-09 16:14:06 +01:00
Baofeng Tian b9967598e2 perf-cnt: add peak mcps count
add peak mcps counter to indicate which period have max mcps.
Also changed sample_cnt to period_cnt to make name more sense.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-09 16:13:35 +01:00
Seppo Ingalsuo 39edc7a844 Tools: Tune: Update crossover configurations export for tplg2
The script example_crossover.m is converted to export 2, 3, and 4
way crossover configurations for tplg1 and tplg2.

The crossover parameters like number of sinks, pipeline ids of
sinks, sample rate, and band limits are added to generate blob
filenames.

The changes include fixes for running the script with Matlab in
addition to Octave.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-09 16:49:35 +03:00
Jyri Sarha 681135cda9 Audio: SRC: Add safeguard against missing, wrong size or type init data
In some error situations the configuration init_data may be NULL, and
in such a situations we should fail gracefully and not crash. Also adds
check that the IPC message is of correct type and for IPC3 only that it
is of correct type.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-08-09 12:44:56 +03:00
Tomasz Leman 17cb6d9e3a mtl: copier-host: fix build issue
After commit f639fc8e88 ("copier: rename parent_dev to dev") FW for MTL
platform is not building. This should be detected as merge conflict but it
went unnoticed.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-08-09 09:58:46 +03:00
Baofeng Tian 2d1f53aaeb copier: remove redundant parameters when create endpoint buffer
Remove no use or redundant parameters in create endpoint buffer
function.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 84c52b4e41 copier:simplify ipcgtw create parameters
remove duplicate parameters and make function parameters
looks more simple.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 4735864abe smart_amp: simplify smart amp parameters
use helper function to update stream parameters.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 2130f8654b selector: simplify selector parameters
use helper function to update stream parameters selector buffers.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 1ce4a401b0 mux: simplify set mux parameters
use helper function to update stream parameters for mux buffers.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 5a38cb5dff google-rtc: simplify google-rtc parameters
use helper function to update stream parameters for sink buffers.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 39805a9fcc aria: simplify aria parameter update
Use function to simplify buffer parameter update instead of
update one by one.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 8515f772e1 copier-dai: remove duplicated frame format assignment
After dai device was removed, there is no parent device
and dai device classification, only one device left for copier.
The input ipc config is exactly copier device config, no
need extra assignment.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian a4af68a8df copier: refine dai init code
refine dai init code with reduce one more parameter.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian 6cda26cb2d copier-host: remove duplicated frame format assignment
since there is only one dev, there is no need to do
duplicated frame format assignment.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian f639fc8e88 copier: rename parent_dev to dev
parent_dev previously used as copier device, and corresponding
child_dev is host and dai, after host and dai device remove,
there is no concept for parent_dev, rename it to dev.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Baofeng Tian aa858dff6b copier: refine host creation
refine host creation to remove redundant parameters and code.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:43:37 +03:00
Anas Nashif 998f824826 platform: kconfig: remove undefined CAVS_LPRO_ONLY
This kconfig was removed in 2d02dd0ed5, do
not depend on it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-08 15:39:28 +03:00
Baofeng Tian e847c8b270 module_adapter: avoid module init crash in case of ipc data invalid
In ipc3 module creation, it is possible that ipc data
is invalid or corrupted, in this case, module init may crash.
This patch is adding error handling to avoid crash.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-08 15:23:09 +03:00
Tomasz Leman f222070b6c copier: synchronized fpi updates of hd-a gateways
This patch add synchronized FPI updates of HD-A gateways. Driver can
define group of such gateways via module init IPC. The driver may also
specify an update period for each group, different than the default one
determined by the system tick frequency.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-08-07 13:06:50 +01:00
Tomasz Leman ce78753e8a component: comment code style fix
Comment style correction after adding a new field in the structure.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-08-07 13:06:50 +01:00
Tomasz Leman b933e8c2fe ipc4: helper: storing size of received configuration
This patch temporary extends comp_ipc_config struct by the value of
input configuration size. Each module receive its own configuration at
creation (MODULE_INIT IPC). In case of a gateway those configuration can
contain additional value (aux_conf). The only way to check if such
config was received is to compare size of the data received via ipc and
standard configuration size.

This solution is temporary because ultimately it would be necessary to
transfer to each module the size of the received configuration along
with a pointer to the configuration itself. Just like the test is in the
case of a module adapter.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-08-07 13:06:50 +01:00
Marcin Szkudlinski e651c70531 dp: introduce per-core DP scheduler
This commit changes implementation of DP scheduler
At start point an incorrect assumption has been taken
that it is enough to have one single instance of
DP scheduler located on a primary core
This commit introduces one DP instance per core

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-08-07 09:25:35 +02:00
Alexander Boehm a1d321734f SAI: fix DSP_A/B frame sync pulse
SAI can be configured for a one bclk wide frame sync pulse
by setting CR4 SYWD to 0. The REG_SAI_CR4_SYWD()
macro subtracts 1 from its argument which resulted in
bad things happening. So use 1 as correct macro argument.

Signed-off-by: Alexander Boehm <aboehm@eurofunk.com>
2023-08-04 12:10:42 +01:00
Alexander Boehm 0ba64e98ec SAI: use topology params
The imx SAI driver used hardcoded clock dividers, word lengths
and #ifdefs to deal with differences between SOCs. Changed it
to respect all the SAI_CONFIG parameters.

Signed-off-by: Alexander Boehm <aboehm@eurofunk.com>
2023-08-04 12:10:42 +01:00
Alexander Boehm e9a4102f99 imx8m: increase max channels/streams
Increase PLATFORM_MAX_CHANNELS and PLATFORM_MAX_STREAMS
to 8 in order to enable the use of certain
components (e.g. 'volume') with 8 channels.
This necessitates an increased HEAP_RUNTIME_SIZE.

Signed-off-by: Alexander Boehm <aboehm@eurofunk.com>
2023-08-04 12:10:42 +01:00
Alexander Boehm edda342d6a topology1: fix sai.m4 clock inversion
A misplaced ) prevented the optional 'inverted'
flag from working as intended.

Signed-off-by: Alexander Boehm <aboehm@eurofunk.com>
2023-08-04 12:10:42 +01:00
Alexander Boehm e70175eb89 imx8m: add SAI2,5,6,7
Made the remaining imx8mp SAI peripherals available for use.
SAI4 does not exist.

Signed-off-by: Alexander Boehm <aboehm@eurofunk.com>
2023-08-04 12:10:42 +01:00
Alexander Boehm d176d09529 topology1: add imx8mp dual SAI topology, 8ch each
Use btsco driver to output and capture 8ch on SAI2 and 8ch on SAI3

Signed-off-by: Alexander Boehm <aboehm@eurofunk.com>
2023-08-04 12:10:42 +01:00
Liam Girdwood 767702f320 ipc4: ipc atomic state should be reset after timeout.
reset the atomic ipc4 message delay state after any timeout error.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2023-08-03 09:36:58 +01:00
Liam Girdwood 909a3277f1 ipc4: relax the IPC timeout checks and be nicer to other threads
No need to check every 250uS for ipc completion, relax this to avoid
any busy scheduling.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2023-08-03 09:36:58 +01:00
Liam Girdwood 916e31f3da ipc4: more dbg context for pipeline state changes
Give more context for pipeline context changes.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2023-08-03 09:36:58 +01:00
Andrula Song 658cb65bb5 Audio: Aria: Convert aria to module adapter interface
Convert the component aria to use module adapter interface.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-08-02 10:28:54 +01:00
Andrula Song abcd44feb5 Audio: Aria: Fix the mistake of cache invalidation
Fix the mistake of cache invalidation, since it is already
done in comp_new_ipc4().

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-08-02 10:28:54 +01:00
Jakub Dabek 4ac2ed4b3b vmh: fix build errors
Last commit created build errors in some configurations. Add fixes
to those issues.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2023-08-02 08:45:18 +02:00
Baofeng Tian 983b262512 mixer: correct data type for frame_fmt
use formal enum to replace uint16.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-01 22:10:32 +01:00
Baofeng Tian c9cec67d95 mixin_out: remove ipc config frame format assignment
there is no usage for mixin and mixout ipc_config frame
format, remove it in its init function, frame_fmt will be
calculated and assigned in params accordingly, also most of other
modules init funciton does not have this conversion.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-01 22:10:32 +01:00
Jakub Dabek 45d56931ef memory management: Add virtual heap memory allocators
Add virtual heap allocators that allocate on proper heaps and
map physical memory where nesscessary.
Add free function that frees up the virtual heap memory and
unmaps physical memory when possible.
Virtual heap allocator allows using virtual memory as a base
for allocation and booking memory. Physical memory banks
will be mapped when needed allowing for greater flexibility
with mapping.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2023-08-01 08:55:50 +02:00
Laurentiu Mihalcea cfd786110a schedule: zephyr_dma_domain: Add support for shared IRQs
In the case of DMA channels using the same IRQ line
the same interrupt handler with different data is
registered multiple times for the same interrupt.

This approach works perfectly fine when using the IRQ_STEER
IP since the way its driver works is it allows registering
multiple handlers+data for the same INTID.

When switching to ARM64, this approach no longer works since
the last irq_handler/irq_data pair will overwrite the previous
one for the same INTID. Because of this, the IRQ bit from the
DMA channel may not get cleared when multiple pipeline tasks
are scheduled. This reasoning applies to the ARM64 architecture
with GICv3 interrupt controller.

To overcome this, the Zephyr DMA domain now holds a list
of channels using the same IRQ. When the DMA IRQ gets triggered,
the handler will iterate through the list of channels using the
same IRQ and clear the interrupt.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-07-31 16:10:21 +01:00