Smart amp test chooses a process function based on the sink only. Because
of this, there's a possibility that one of the sources has a 16bit format,
which can't be safely processed by the 32bit process function. The crash
only happened when dai_copier sent one less sample than usual to the
smart_amp. This makes total sample count an odd number, making the data in
the audio_stream buffer misaligned.
This patch changes the prepare function of smart_amp_test to consider all
the sources and sinks while deciding which process function to use.
Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
The development topologies are with -/2ch/4ch DMIC for cavs25
and ace1 platforms for testing HDA with 96 kHz rate.
The build topologies names are:
- sof-hda-generic-cavs25-4ch-48k-96k
- sof-hda-generic-cavs25-2ch-48k-96k
- sof-hda-generic-cavs25-4ch-96k
- sof-hda-generic-cavs25-2ch-96k
- sof-hda-generic-ace1-4ch-48k-96k
- sof-hda-generic-ace1-2ch-48k-96k
- sof-hda-generic-ace1-4ch-96k
- sof-hda-generic-ace1-2ch-96k
- sof-hda-generic-96k
The DMIC1 PCM ID with 96 kHz is set to 22 (capture ultrasonic).
PCM IDs definition is in:
https://github.com/thesofproject/sof/files/14021187/PCMDeviceList.txt
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch modifies cavs-mixin-mixout-hda.conf with added input
and output format attributes for in_rate and out_rate. The bit_depth
attributes need to be added to as well to avoid corrupt audio.
The HDA_ANALOG_CAPTURE_RATE and HDA_ANALOG_PLAYBACK_RATE are by default
set to 48000. The topologies' characteristics are not changed with
this patch.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Topologies with DMIC1 passthrough capture are added to development
directory with 16 and 96 kHz rates. Also a topology with DMIC0
changed to 96 kHz is added as example to test DMIC0 with other
than default rate.
The new topologies are:
- sof-hda-generic-cavs25-4ch-48k-16k
- sof-hda-generic-ace1-4ch-48k-16k
- sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-48k-16k
- sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-48k-96k
- sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-96k
- sof-mtl-max98360a-rt5682-4ch-48k-16k
- sof-mtl-max98360a-rt5682-4ch-48k-96k
The DMIC1 PCM ID with 96 kHz is set to 22 (capture ultrasonic).
PCM IDs definition is in:
https://github.com/thesofproject/sof/files/14021187/PCMDeviceList.txt
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch optionally includes dmic1-passthrough.conf if
DMIC1_ENABLE is set in topologies build to passthrough.
The sample rate of DMIC1 DAI can be set to 8 - 96 kHz with
macro DMIC1_RATE.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The added DMIC0_RATE allows to use the DAI, pipelines, and PCM with
any supported rate for DMIC in range 8 - 96 kHz. E.g. configure
DMIC0 to 96 kHz.
There is no change to existing functionality with default 48 kHz rate.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The input audio format and output audio format definitions are
missing for the copiers and IIR. The formats are added in
preparation to be able to set non-default sample rate for all
widgets.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The needed defaults for DMIC1 for PCM ID and sample rate are added
similarly as for DMIC0 for later use. DMIC1 related pipelines are
not used by default so DMIC1_ENABLE is set to false.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
For Zephyr builds, only definition needed from platform/drivers/idc.h
was prototype for idc_send_msg(). There's no need to keep the platform
layer just for this, so add the definition to rtos/idc.h for Zephyr
builds, and remove the platform/drivers/idc.h for all Intel platforms.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Ensure idc_send_msg() is implemented for all platforms linking
zephyr_idc. For non-multicore, idc_send_msg() will return -ENOTSUP
error.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Definitions of XTOS ALH driver interface are no longer used in
SOF tree. Remove the unnecessary inclusion in ipc4 dai.c, and all
instances of the platform alh.h header.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The interrupt.h interface is no longer used by any Intel platform
as all drivers have been replaced with native Zephyr drivers, so these
definitions are no longer needed.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Assuming the following pipeline:
HOST ---> MA (CADENCE [MP3 DECODER]) ---> DAI
for native Zephyr SOF, data is first copied from the host
component to MA and then from Linux to the host component.
This means that the first chunk of data will be 0s (since
the host DMA buffer is zero'd via host_prepare()) instead
of useful data. Because of this, the `XA_CMD_TYPE_INIT_PROCESS`
command will return a non-fatal error (i.e:
`XA_MP3DEC_EXECUTE_NONFATAL_NEXT_SYNC_NOT_FOUND`). This
is not the case for non-native SOF since data is first copied
from Linux to host and then from host to MA so the aforementioned
command will get actual data instead of 0s.
Instead of having to alter the flow of data for native Zephyr
SOF (i.e: change the order in which data is copied), which
could impact other components and bits of the firmware, the
fix is to not return if the command returns a non-fatal error.
This way, the first chunk (i.e: the 0s) will be consumed and
the processing can start with the next chunk.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Update the logging statements in pipeline-graph.c to display component IDs
in hexadecimal format. This change ensures consistency with other logging
within the system and improves the clarity of the logs when tracking
component IDs during debugging sessions.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Switch component ID logging to hexadecimal in ipc4/helper.c to align with
the rest of the system's logging conventions. This enhances consistency
and aids in debugging by matching the component ID format used in other
diagnostic tools.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Standardize component ID logging by displaying them in hexadecimal
format across all pipeline logs. This change aligns the component ID
representation with other parts of the firmware logs where hexadecimal
is used, facilitating quicker cross-referencing and searchability for
specific components during debugging.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Unify the logging format for component IDs by converting them to
hexadecimal in ipc-helper.c. This change ensures consistency with other
log entries and improves the ease of identifying components when
cross-referencing with other debugging outputs that use hex notation for
component IDs.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This quick fix avoids build of NHLT blob for the default (TGL)
for LNL HDA generic platform.
The DMIC part of NHLT from TGL is not suitable for LNL, while a
blob for MTL can be used. A proper lnl.conf will be added later.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
On init, register consumption of 10MCPS for base fw
if CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL enabled
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
Register and unregister pipelines CPS consumption on run/pause
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
+Squashed commits:
924f0d26db pipeline: print warning if 0 KCPS received
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
7bb6e7ef3b pipeline: register CPS consumption for a proper core
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
5f0c4e4c31 pipeline: make CPC data "opt-in" with fallback
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Such notification currently is used only in non-zephyr code (ll sched)
so it is safe to remove for MTL because of some idc issues
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Introduces telemetry structure into debug memory window. Adds
systick_info which counts execution time of LL tasks. DP tasks are not
supported yet.
Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
Increase Debug Window (Memory window 2) size by one slot (4096 bytes).
The reason for this change is making space for telemetry functionality.
Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
Add Vendor Config Get, a special case of Large Config Get. Large Config Get
handling now checks for this case and extracts extended param_id from ipc
payload as param_id and handles the rest of the payload as usual. Base_fw
now uses extended param_id.
Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
allocated memory in waves.c
Enhance payload corruption handling by verifying size
and make sure to have clean buffer before using it.
Signed-off-by: barry.jan <barry.jan@waves.com>
The lib_manager_get_library_module_desc function was renamed to
lib_manager_get_library_manifest, which better describes what it do.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Added the lib_manager_get_module_manifest function that returns manifest
of selected module based on its id. It was performed in many places and
moving it into function simplified the code and increased its readability.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
All calls to the ipc4_get_comp_drv function pass the uint32_t value as a
parameter, so the type of functions parameter was changed.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Update to a Zephyr version, containing
2ccf775396c2 ("llext: add support for relocatable objects on Xtensa")
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The volume process function for pass-through can be changed
when all ramps are completed. This change that avoids processing
function lookup in worst case every 128 us is measured to
save in TGL platform about 1 MCPS from CPU_PEAK(MAX).
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This ensures that volume for a channel changes immediately
after receiving the control if ramp duration is zero or if
type is no fade.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The "is_same_volume=true" was returned if target volumes for
all channels are the same. The check omitted the fact that
start volumes for ramp can be different, e.g. one channel is
attenuated while others are 0 dB.
This change fixes the random ignore of volume ramp and smooth
transition when a volume control is changed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The linear slope coefficient calculation is moved to a separate
function. Two functional changes are done.
- The ramp_coef for channel is set to zero if there is no
transition for the channel. The ensure of non-zero coefficient
is only needed if there is a transition that is so slow that
the slope coefficient would round to zero. If this function is
called for equal volume and tvolume for channel, the ramp_coef
remains zero, and not smallest non-zero value.
- The handling of ramp disable with zero initial_ramp is changed
to similar as for windows fade. The set of coefficient to
volume delta (a large value for large volume jump) is not correct
even if it appeared to work. It is a remain from old code where
ramp was not a function of time but a constant step added.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In IPC4 the individual channel gains are passed in separate
messages. One channel may have started to ramp to a new gain
while a new channel gain arrives for other channel. If the
gain is same as the previous control value, the ongoing ramp
is stopped and the gain remains at a transition value.
The incorrect code is not fixed but instead the volume_set_volume()
function is simplified. When a volume control is received, it is
assumed that pass-through mode is disabled and ramp is prepared. If
the control is received but gains are not changed, the ramp mode
is finished and pass-through is restored in ramp function.
The volume_set_switch() function is updated similarly to ensure
similar operation.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch refines the initialization process for secondary cores in a
multicore environment when using Zephyr as the RTOS. The patch
introduces a `check_restore` function specifically for Zephyr, which
checks if basic core structures (IDC, notifier, schedulers) have been
previously allocated and are still present in memory, indicating that
the system is not undergoing a cold boot.
By adding this check, the system avoids unnecessary re-allocation of
these structures during the power-up sequence of secondary cores,
effectively preventing the memory leak observed during repeated power
cycle tests.
fix#9005
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch refactors the `check_restore` function to return a `bool`
instead of an `int`. This change enhances code readability and clarifies
the intent of the function, which is to return a true or false value
based on the presence of core structures in memory.
No functional changes are introduced by this patch; it is purely a code
quality improvement.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This commit adds an overlay enabling kernel traces from
Zephyr.
Those traces may be read on the host side from memory window
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
The widget name size will exceed the character limit and lead to below
error
failed to find module info for widget
alh-copier.SDW0-Playback-SimpleJack.0 with UUID
00000000-0000-0000-0000-000000000000
Shorten the stream name to fix it.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Add constraints on valid pipeline priority values and document
the semantics so that 0 is considered the highest priority and such
pipeline should be run first.
The range matches definitions in include/ipc4/pipeline.h and
SOF_IPC4_MAX_PIPELINE_PRIORITY.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Use ibs/obs size from ipc4_base_module_cfg to properly calculate
period_count. It is especially important when FW aggregation mode
is enabled and there are multiple DMAs allocated under one copier
instance. That way period count for every DMA will be correctly
evaluated and used for DMA buffer size calculation.
Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>