In preparation for changing the name of the DAI copier which will make
them a bit longer, reduce the token name lengths by removing the
sof_tkn_ prefix. This is required because the header names in topology
have a 44 character limit and with a long name like:
dai-copier.SSP.NoCodec-0.playback.sof_tkn_comp.uuid, the limit will be
hit. Removing the sof_tkn_ prefix will reduce the number of characters
in the tuple name headers.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename generic DMIC mixer name. Define the associated PCM name in a
common place and refer to that name on the mixer name.
On cavs-tgl-nocodec.tplg is seen a following mixer name change:
'gain.13.1 DMIC0 Capture Volume 1' > 'gain.13.1 DMIC Capture Volume'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Rename SSP0 Aux Playback stream volume before mixing. Use the
associated PCM name in the mixer name. This change affects nocodec
topologies and appears on sof-tgl-nocodec.tplg as a following change:
'gain.21.1 Playback Volume 8' -> 'gain.21.1 Pre Mixer Port0 Aux Playback Volu'
Unfortunately the new mixer name does fit into the space reserved for
it, but it should get fixed once we get rid of the "gain 21.1"-prefix.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Rename cavs-nocodec.conf DMIC0 volumes. Define variables for the
associated PCM names and refer to them in the mixer names. The changes
shown in sof-tgl-nocodec.tplg are:
'gain.18.1 Capture Raw Volume 1' > 'gain.18.1 Post Demux DMIC0 Raw Capture Volu'
'gain.19.1 Main Capture Volume 3' > 'gain.19.1 Pre Demux DMIC0 Raw Capture Volum'
'gain.20.1 Capture Raw Volume 2' > 'gain.20.1 Post Demux DMIC0 Raw 2 Capture Vo'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Rename SSP0 capture related volumes. Define a variable for PCM name
and refer to it in the mixer names.
Using sof-tgl-nocodec.tplg the changes are:
'gain.8.1 Host Capture Volume' > 'gain.8.1 Pre Demux Port0 Capture Volume'
'gain.7.1 Main Capture Volume 1' > 'gain.7.1 Post Demux Port0 Capture Volume'
'gain.17.1 Main Capture Volume 2' > 'gain.17.1 Post Demux ssp-capture Capture Vo'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Rename SSP0, SSP1, and SSP2 playback volumes according to PCM names
they are connected to. Define the PCM names as variables so the name
can be changed in a single place.
This is how the change will look like in sof-tgl-nocodec.tplg:
'gain.1.1 Playback Volume 1' > 'gain.1.1 Pre Mixer Port0 Playback Volume'
'gain.2.1 Main Playback Volume 2' > 'gain.2.1 Post Mixer Port0 Playback Volume'
'gain.3.1 Playback Volume 3' > 'gain.3.1 Pre Mixer Port1 Playback Volume'
'gain.5.1 Playback Volume 5' > 'gain.5.1 Pre Mixer Port2 Playback Volume'
'gain.6.1 Main Playback Volume 6' > 'gain.6.1 Post Mixer Port2 Playback Volume'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Yet another missing topology
This needs to be back-ported to the 2.2 stable branch for releases
Closes: https://github.com/thesofproject/linux/issues/4380
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Stop invoking west sign manually. Configure rimage using `west config`
and a platform-specific WEST_CONFIG_LOCAL file instead, then rely on
west build to invoke rimage.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Do not make the switch yet. Make the switch in a smaller commit that can
more easily be reverted in case of a bug or some missed dependency
somewhere.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Due to both legacy and zephyr function are changed, name with
zephyr prefix is not suitable, change zephyr to common to better
reflect the function status.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
This has bitrotten vs. the newer code upstream at oss-fuzz, involves
an expensive docker container build, and provides little value vs. the
newer fuzz.sh script that runs in the regular CI containers.
Let oss-fuzz handle the deep validation. We should be using fuzzing
as a smoke test via the existing scripts.
Signed-off-by: Andy Ross <andyross@google.com>
This patch changes for IPC4 configuration the DSP internal gain
format from Q1.23 to Q8.23. Minimum needed would be Q2.23 but
the integer part 8 bits is same as in IPC3 and would allow
signal amplification in volume component in some later phase. The
code is prepared for amplification due to IPC3.
The change allows the Q1.31 max gain (0x7fffffff) to round to
exactly one in Q8.23 notation (0x800000). The gain value one passes
effectively the input to output unmodified. The change prevents lose
about 1 dB of signal-to-noise ratio from peak quality of PCM formats.
The comment from convert_volume_ipc4_to_ipc3() is removed because it
is unrelated and some remain from old code version.
The hard coded 23 for conversion to/from Qx.23 is changed to
macro VOL_QXY_Y because it's used elsewhere in the component. The
saturation (to 32 bit signed) with 64 bit intermediate is kept in
the function convert_volume_ipc4_to_ipc3() in case of VOL_QXY_Y
would be 31. The code requires int32_t or ae_f32 compatible signed
32 bit compatible gain value instead of full uint32_t range.
The gain range for Q8.23 format is min. -138.47 dB and max. +42.14 dB.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The DSP cannot enter the power gating state if it has not yet received
an ack from host after sending an ipc message.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Zepych update: total of 228 commits.
Changes include:
- build LNL with Zephyr SDK,
- MMU initial implementation,
- check for pending ack in intel_adsp_ipc_is_complete.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The bootloader was only used by Intel platforms when building SOF
with XTOS. Now that that possibility has been removed, bootloader
support can be removed too to eliminate dead code.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds to process_test.m test with amplitude sweep
to determine level dependent logarithmic gain.
Currently there is no test pass/fail criteria. But the test result
plot can be examined from directory plots. E.g. first full test
for DRC with "process_test('drc', 32, 32, 48000, 1);".
The view the plots from shell with "eog plots/ldlg_drc_*.png". Or
examine the plots directory with a file maneger GUI.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Thanks to PR [1], Zephyr cache management API can now be
used on xtensa-based SoCs. As a consequence to this, there's
no longer a need to use SOF's arch/ layer for cache management.
This commit forces all SoCs which support Zephyr to use
its native cache management API.
[1]: https://github.com/zephyrproject-rtos/zephyr/pull/50136
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Widget type snd_soc_dapm_out_drv and snd_soc_dapm_output will be treat
as virtual widget and be ignored in sof topology in kernel.
We need to set type = output or out_drv in topology when it is a virtual
widget.
Fixes: 3835846836 ("topology2: sdw-amp-generic: Show all aggregated DAIs on the graph")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
In IPC4 mode, the DAI supports writing data to multiple sinks.
It is possible one of the sinks to be on a different pipeline,
which can be disconnected while the DAI is still running.
Depending on the order of pipeline setup, the disconnected sink
might have been chosen as the local_buffer.
Handle this case by reconfiguring the local buffer after
disconnect in the copy function.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The dd->local_buffer may be freed between calls to copy if
the peer module is unbound. This can only happen if the peer
module is on a different pipeline as runtime changes to
pipeline connections are not allowed while pipeline is active.
It is however allowed to connect the DAI to sink/sources
on another pipeline, so this scenario is still possible. This
issue only affects IPC4 builds using copier.
In current code, disconnection of local_buffer will lead
to heap corruption as dd->local_buffer is freed but DAI keeps
accessing the buffer in its copy calls.
Fix the issue by implementing an explicit DAI unbind and
setting dd->local_buffer to NULL in case the peer module is
disconnected.
This patch does not add support for dynamic reconfiguration
of the DAI to adjust converters and local_buffer to the new
connections. If capture DAI is set up with multiple sinks and
one of them is stopped, the DAI will stop processing data.
Link: https://github.com/thesofproject/sof/issues/7191
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
If the product of sampling rate and period size (in microseconds)
exceeds INT_MAX (signed 32bit), an invalid component->frame is
set. This happens for example with sampling rate of 48000Hz and
period size of 50000usec.
While the 'rate' and 'period' fields are uint32_t values, ceil_divide()
in math/numbers.h does calculation with signed 32bit values, leading to
invalid results with smaller input values.
Fix the issue by doing the frame size calculation with 64bit
arithmetic.
Link: https://github.com/thesofproject/sof/issues/7652
Reported-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
In LNL the GPDMA engine was removed. Instead HD Audio
Link DMA is used to transport data over audio interfaces.
Since HD Audio is a Host managed engine, the link configuration
is passed through IPCv4.
The configuration must be forwarded to appropriate interface driver
to configure HW.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
We used to use `-- -c rimage/config/platf.toml` for the IPC4 overlay and
the older `--tool-data rimage/config/` for the rest. This was confusing,
inconsistent and used to print this warning:
```
WARNING: --tool-data /var/home/mherber2/SOF/sof/rimage/config ignored,
overridden by: -- -c ...
```
`--tool-data` was always a bad idea. It looks generic but it's not; it
allows changing only a config directory that is always in the same
location.
Copy what `west sign` does with `--tool-data`, drop it and use `-- -c`
always.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This makes no difference now because it has no side-effect yet but it
will make a difference once it starts using `west config`.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In some cases it was difficult to separate the command's output from the
extra environment it ran in.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
For rimage parameters, parse new, static versions.json file instead of
generated sof_versions.h file. This will make possible to configure
rimage before west build.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Every module which needs AMS for notifications uses the same flow when
configuring itself as a consumer or producer for such notifications.
Add AMS helper functions to avoid code repetition.
Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
This got merged too fast. Turns out it broke the newer fuzz
integration that was in the same YAML file. Also there are some
evolving review comments. Will resubmit.
This reverts commit 11e57f5030.
Signed-off-by: Andy Ross <andyross@google.com>
Fuzzing via the new framework is now integrated at oss-fuzz upstream,
so there's no point to keep this in SOF anymore. The github workflow
has bitrot vs. the newer build.sh, and that docker build is very
heavyweight vs. the newer fuzz.sh smoke test that runs in the regular
build container anyway.
Signed-off-by: Andy Ross <andyross@google.com>
Send panic notification message to host when panic happens. The panic
detail is built by Zephyr framework and included in debug memory window.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Co-developed-by: Rander Wang <rander.wang@intel.com>
For emergency like FW panic event, we need to send notification IPC
message to host directly without inserting this message in msg_list
since at this time the system is not stable now and it is very possible
that the normal message processing logic can't work.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Co-developed-by: Rander Wang <rander.wang@intel.com>