Commit Graph

9590 Commits

Author SHA1 Message Date
Michal Wasko e40cf6d7d1 CODEOWNERS: more intel code owners added
Intel code owners added based on latest contribution
and expertise.

Signed-off-by: Michal Wasko <michal.wasko@intel.com>
2023-02-24 16:08:39 +00:00
Laurentiu Mihalcea cb72ee08a5 sof: lib: Remove unused #include from cpu.h
All arch/ files should be only used by XTOS. Since the
include statement from cpu.h is not used at all we can safely
remove it. With this, we can make the split between Zephyr
and XTOS more clean.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-24 14:28:49 +02:00
Laurentiu Mihalcea 7ed1159e48 Switch to using rtos/idc.h instead of sof/drivers/idc.h
The purpose of this commit is to separate the XTOS-specifc
code from the Zephyr-specifc code found in sof/drivers/idc.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-24 14:28:49 +02:00
Laurentiu Mihalcea 0a5c049ac0 Switch to using rtos/task.h instead of sof/schedule/task.h
The purpose of this commit is to separate XTOS-specific code
from the Zephyr-specific code found in sof/schedule/task.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-24 14:28:49 +02:00
Jaska Uimonen 1e21a5d2fc zephyr: lib: move cpu.c from lib-zephyr
Move zephyr cpu.c from "unnecessary" lib-zephyr to lib/zephyr.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-23 22:17:07 +00:00
Kai Vehmanen a74ad93270 audio: chain_dma: do not hold spinlock when calling schedule_task_free
schedule_task_free() might be a blocking call. E.g. the Zephyr
LL-scheduler implementation can call k_sem_take(). Do not call
this function with a spinlock held.

Link: https://github.com/thesofproject/sof/issues/7156
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-22 16:42:18 +02:00
Andrula Song 8bc97c1e13 Audio: Fix the volume change doesn't take effect issue
If the initial_ramp is zero, the ramp_finished would always be true,
that means we will never copy gain to circular buffer except we reset
state.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-02-22 15:27:07 +02:00
Marc Herbert 7975c266a4 CODEOWNERS: restore dropped comment
Fix minor misunderstanding in review of git commit 430893f18a
("CODEOWNERS: refer to github documentation on file syntax")

Signed-off-by: Marc Herbert <marc.herbert@gmail.com>
2023-02-22 15:19:29 +02:00
Laurentiu Mihalcea 2115a7bfea Switch to using rtos/sof.h instead of sof/sof.h
The purpose of this commit is to separate the XTOS-specifc
code from the Zephyr-specifc code found in sof/sof.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-22 13:15:06 +00:00
Bard Liao 0235673845 topology2: add sof-adl-rt711-l0-rt1316-l12-rt714-l3 support
sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg is the same as
sof-tgl-rt711-rt1316-rt714.tplg

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-02-21 23:30:06 +00:00
Bard Liao 0f6cf837c7 topology2: use a macro to config if a sdw amplifier support feedback
Not all amplifiers support feedback. We should not add feedback support
on topology to shch amplifiers.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-02-21 23:30:06 +00:00
Bard Liao b407a1aab9 topology2: follow the same rule as pipeline and route id to assign ALH
index

We use the "pcm id * 10 + N" formula where N is from 0 to 9 to assign
pipeline and route id in f0a010052b ("topology2: cavs-sdw: group route
and pipeline index"). Now apply to ALH dai index.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-02-21 23:30:06 +00:00
Jyri Sarha d08b894945 Revert "topology2: avs-tplg: disable USE_CHAIN_DMA"
The known issues with the pipeline-free chain DMA implementation has
now been solved, so we can re-enable chain DMA usage.

This reverts commit c3807ae4a7.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2023-02-21 23:23:59 +00:00
Jyri Sarha 60e9e97e0d hda: chain dma: cancel task before freeing it
When schedule_task_free() is called to a scheduled zephyr_ll task it
sometimes causes a crash. Canceling the task before freeing appears to
fix the problem.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2023-02-21 23:23:59 +00:00
Kai Vehmanen 4d67d2f416 app: zephyr: enable CONFIG_ASSERT in debug overlay
Enable CONFIG_ASSERT=y in SOF debug overlay.

Also add a commented out list of additional useful Zephyr debugging
tools to the overlay. These incur a higher runtime cost, so are left
disabled by default. These are all debug tools that have been tested to
work with SOF and found useful.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 23:17:49 +00:00
Andrula Song 6b91a55328 Audio: Fix the peak volume calculation error in volume component
Fix the peak volume calculation error in volume component, calculate
the maximum absolute value of input as peak volume as close source
firmware did.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-02-21 15:51:33 +00:00
Jaska Uimonen 5efc08d5aa dai: change to use new version of dai_config_get
Start using new version of dai_config_get where config struct is given
as pointer argument.

Update west.yaml to point to correct zephyr version for this change.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-21 15:45:17 +00:00
Guennadi Liakhovetski 84e9791142 mixin-mixout: (cosmetic) use function arguments
.process() callback receives input and output buffer arrays as
function arguments, no need to fetch them from the module object
again.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-21 15:43:15 +00:00
Guennadi Liakhovetski d3c7458b07 mixin-mixout: fix an error case
If audio_stream_set_zero() fails in mixout_process(), the output data
size should be set to 0.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-21 15:43:15 +00:00
Guennadi Liakhovetski 2417f0bc6d mixin-mixout: fix frames-to-produce calculation
When calculating the number of frames to produce, ignore inactive and
empty inputs. On the one hand an inactive empty input shouldn't block
producing data from active or non-empty inputs. OTOH if an inactive
input has pending data, it should be used instead of letting the data
stall.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-21 15:43:15 +00:00
Guennadi Liakhovetski f141b6017e module-adapter: simplify buffer counting
num_input_buffers in module_single_sink_setup() and
num_output_buffers in module_single_source_setup() don't have to be
incremented inside the loop together with the loop counter i. Just
assign them after the loops.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-21 15:43:15 +00:00
Laurentiu Mihalcea c3695ded43 arch: debug: Allow panic.h to be included from XTOS's rtos/panic.h
Since sof/debug/panic.h has been removed, the only file which should
be including arch/debug/panic.h is XTOS's rtos/panic.h. This commit
removes the forced "#define __SOF_DEBUG_PANIC_H__" from rtos/panic.h
and makes all arch/debug/panic.h files include-able from rtos/panic.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-21 15:34:47 +00:00
Laurentiu Mihalcea d3c7c08d7e Replace sof/debug/panic.h with rtos/panic.h
Since all sof/debug/panic.h does is it includes rtos/panic.h
why not just simply replace sof/debug/panic.h with rtos/panic.h?

This commit does exactly that.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-21 15:34:47 +00:00
Laurentiu Mihalcea b91e253f65 include: sof: debug: Split panic.h into Zephyr and XTOS-specific headers
The purpose of this commit is to separate Zephyr-specific definitions
from XTOS-specific definitions. Based on the build, <rtos/panic.h>
will contain the required definitions.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-21 15:34:47 +00:00
Piotr Makaruk a9b9d85b7a ipc4: add resource event notification structures
Provide unified structure for events that may be raised by identifiable
entity from inside the FW(like a module instance identifiable by module
instance ID or a pipeline identifiable by pipeline ID). All enums are
aligned with ipc4 protocol. Receiver of such notification is host.

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-02-21 16:17:41 +01:00
Guennadi Liakhovetski d2df791681 pipeline: (cosmetic) remove unreachable code
Remove left-over unreachable code in pipeline_comp_trigger(): tje
err == PPL_STATUS_PATH_STOP case is already processed and leads to a
return from the function, therefore the same condition cannot be met
a second time immediately after the return.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-21 10:30:18 +00:00
Kai Vehmanen 430893f18a CODEOWNERS: refer to github documentation on file syntax
Add a link to online github documentation with regard to
file syntax and how it can be tested.

Suggested-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 10:20:28 +00:00
Kai Vehmanen 94a128d516 CODEOWNERS: add owner for installer/ subfolder
Add Marc Herbert as code owner for installer subfolder.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 10:20:28 +00:00
Kai Vehmanen 441bd03544 CODEOWNERS: add owners for zephyr/ subfolders
Add Kai Vehmanen, Guennadi Liakhovetski, Iulia Prodan and Daniel
Baluta as owners for the 'zephyr/' subfolder.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 10:20:28 +00:00
Kai Vehmanen 9353c2d5f1 CODEOWNERS: add new owner for topology and topology2
Mark Ranjani Sridharan for full topology folder. Add Jyri
Sarha for topology2 folders.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 10:20:28 +00:00
Kai Vehmanen a942f10731 west.yml: upgrade Zephyr to 0c0d73721ed
Includes patches to dai-zephyr.c to adapt to DMA interface
change for DW/HDDMA drivers.

Total of 1168 commits, including following related to
intel_adsp/sparse/dmic/xtensa:

8f5bcb2e76c3 intel_adsp: ace: fix linker script for xcc-clang compiler
18ce85c20130 tests: intel_adsp: ssp: fix dma data sizes
60a20471b561 intel_adsp: ace: enable interrupts for secondary core
6045eed2f361 intel_adsp: ace: enable core power gating
e1dbc2efef50 intel_adsp: ace: add core power off step
a99b073392fc intel_adsp: ace: d3 exit update
156c7cd21759 intel_adsp: bbzero/bmemcpy with picolibc fix
60196ca1126a cmake: sparse: deprecate old sparse support
91902c5fd4db cmake: add sparse support to the new SCA infrastructure
a684714d5c82 soc: intel_adsp: Correct HDA parameter docstrings
db495a5ebee3 xtensa: stop execution under simulator for double exception
8ff88346955b xtensa: sparse: fix address space mismatch
7965fd2b4a8a samples/boards/intel_adsp: Make sample work with twister
422250d3b183 mm: intel_adsp_mtl_tlb: suppress sparse address space warnings
618a478ded70 xtensa: fix sparse warning when converting to uncache pointer
8b391dc43841 drivers: audio: dmic_nrfx_pdm: Fix a race condition in the driver
8794de2934f7 intel_adsp: soc: ace: Add communication widget driver
a9b3d935500c intel_adsp: dai: Add support for ALH up to 16 nodes
837432506269 drivers: dai: intel: dmic: don't use assert for error handling

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-21 10:14:17 +00:00
Yong Zhi 7fdc62375a topology2: cavs-rt5682: override BT playback pipeline id
Override the default PIPELINE_ID for BT_PB.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-02-20 16:16:43 +00:00
Guennadi Liakhovetski 17fbf7de22 platform: remove support for Sue Creek
Remove all support for Sue Creek platforms, it isn't supported any
more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-20 15:46:16 +00:00
Paul Olaru 465e6d0ecc sof: audio: eq_fir: Fix GCC-specific check
Currently, the check to prevent too large filters from being loaded on
GCC builds of SOF does not work correctly. This commit changes where the
lengths that are being checked are read from, so that the check works
correctly.

Fixes: c0b9b4057e ("EQ FIR: Add support for runtime reconfiguration")

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2023-02-20 11:19:31 +00:00
ShriramShastry e6baebd54b Math: library: Add an exponential function
The 32-bit exponential library function has an accuracy
of 1e-4 and a unit in last place error of 4.5878 for
inputs from -5 to +5 (Q4.28) and outputs from 0.0067379470
to 148.4131591026 (Q9.23).

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2023-02-20 11:17:37 +00:00
jairaj-arava d85d853c6c topology2: add second capture stream for DMIC0 for MTL topology
This patch adds second capture stream by means of copier module

Signed-off-by: jairaj-arava <jairaj.arava@intel.com>
2023-02-20 12:54:57 +02:00
Rander Wang 5fdd09ef2a ipc4: copier: set sink buffer format when sink format is set
The original code only set sink format in copier but forget to set format
of sink buffer. This will result to error when sink components use it.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-02-20 10:46:58 +00:00
Rander Wang e9baf1e607 ipc4: copier: use a helper function to update format
Use helper function to update buffer format and avoid code duplication

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-02-20 10:46:58 +00:00
Ranjani Sridharan 74bad5f9cb copier: remove redundant check
The loop should already handle the check for endpoint_num.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-20 12:39:02 +02:00
Andrey Borisovich 9453183cbe Fixed warnings issued by new xt-clang compiler
New Xtensa xt-clang driver issues new warnings that were not
present before when using xt-xcc driver.

Fixed warnings related to enum cast to other enum by removing
"frame_fmt" local variable assignment in the selector.c file.
Assignment was not needed in the build_config function body, as the
variable "frame_fmt" is passed in the next line to
audio_stream_fmt_conversion function, that writes to this variable as
output.

Silenced warnings related to C/C++ interoperability.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-02-17 12:51:01 +02:00
Ranjani Sridharan b70ae5f6af topology2: Remove duplicate conf files
These are already in the common includes.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-17 09:16:34 +02:00
Ranjani Sridharan 45e4cc484d topology2: Move to using arrays for defining objects
Where there more than 1 object of the same type defined at the same node
level, use arrays to define the object. For example, we can define 2
routes as follows:
Object.Base.route [
	{
		source	"smart_amp.2.1"
		sink	"copier.SSP.2.1"
	}
	{
		source	"mixin.1.1"
		sink	"mixout.2.1"
	}
]

This allows us to merge 2 arrays from different conf files without
needing to make their instance ID's unique.

Assume we add another route in a separate conf file like below:
Object.Base.route [
        {
                source  "gain.5.1"
                sink    "copier.5.1"
        }
]

The alsatplg compiler will merge them as follows resulting in 3 route
objects.

Object.Base.route [
        {
                source  "smart_amp.2.1"
                sink    "copier.SSP.2.1"
        }
        {
                source  "mixin.1.1"
                sink    "mixout.2.1"
        }
	{
                source  "gain.5.1"
                sink    "copier.5.1"
        }
]

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-17 09:16:34 +02:00
Curtis Malainey ad3ae32850 lib: fix compiler macro for vec_mem*
using incorrect names for compiler, missing ISA header for HiFi check,
also should add inlines if we don't have the HiFi implementations

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-02-17 09:07:42 +02:00
Curtis Malainey 4269b7226a arch: xtensa: add core-isa to compiler_info
We need this as part of a generic compiler_info so we can handle HiFi
flags in a generic arch include

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-02-17 09:07:42 +02:00
Seppo Ingalsuo 64fe2ea7d2 Tools: Topology2: Add topology to test playback SRC conversions
This patch adds to development topologies a topology
sof-hda-src-generic.tplg. It is similar to sof-hda-generic but adds
to first playback PCM pipeline a SRC component after gain. The
pipeline supports playback of S32_LE with 8 - 192 kHz rates.

The cavs/src.conf is merged to src.conf, and the SRC format
include files are brought up from cavs directory. The topology
cavs-sdw-src-gain-mixin.tplg related .conf files are updated
for common location. The missing rate_out attribute is added.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-16 16:21:30 +00:00
Guennadi Liakhovetski d80635054f platform: remove support for Broadwell and Haswell
Remove all support for Broadwell and Haswell platforms, they
aren't supported any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-16 16:19:36 +00:00
Peter Ujfalusi 70f9faf870 detect_test: Split the module config and blob receiving for IPC4
During the component create (module init) we are not receiving the blob
containing the sof_detect_test_config, only the base_cfg is received.
The sof_detect_test_config content will be sent via large_config_set at a
later time.

The blob received via large_config_set must be the same format as the blob
with IPC3 but in runtime the sample_width from the blob is ignored and the
audio_fmt.depth is used from the base_cfg.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-02-15 17:39:40 +00:00
Kai Vehmanen cfeaceb394 topology2: use passthrough-capture-be instead of passthrough-be
As the copier can do format conversions, and many pipeline components
can do conversions as well, it is important for the topology to define a
single format to use in the "dai_out" copier. This ensures deterministic
behaviour with the driver.

Implement this behaviour by switching topologies to use the
passthrough-capture-be pipeline as template for the backend capture
pipelines.

The previously used passthrough-be template is problematic as
the base class already defines multiple audio formats, with multiple
different sample formats. The new passthrough-capture-be only defines
one sample format by default and is a better starting point as a base
class.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-15 19:18:16 +02:00
Kai Vehmanen a62fa8e418 topology2: cavs: add passthrough-capture-be pipeline
Add a separate template for capture backend pipelines. The
passthrough-be pipeline has been used as template for both playback and
capture, but we want to provide different defaults especially for the
audio formats in capture case.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-15 19:18:16 +02:00
Chao Song 2f29bc31fc Topology2: add smart amp pipeline in nocodec topology
Use mixout-gain-smart-amp-dai-copier-playback pipeline
for SSP0 DAI playback.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-15 18:47:30 +02:00