Remove all support for cAVS 1.5 platformsm including Apollo Lake,
Sky Lake, Kaby Lake, Broxton and Gemini Lake, they aren't supported
any more.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The previous value 10 is only 0.1 us that disables the gain
ramp totally and causes harsh sounding volume transitions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
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>
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>
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>
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>
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>
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>
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>
Remove all support for Broadwell and Haswell platforms, they
aren't supported any more.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
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>
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>
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>
This patch adds the widget class for smart_amp module
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The micsel will need to use the base config extension and the init
config type will need to be set in the manifest.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
No more need for hard-coded blob header, sof-ctl provides
an up-to-date header so better to use it.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
For MTL chromebook, SSP 1 is used for BT offload with
cavs-rt5682 configuration
Co-developed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Co-developed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Add pipelines for iir and fir eq as EFX (endpoint effect) component in
hda. Add HDA_CONFIG "efx" to compile efx versions of hda_generic
pipelines.
Add define EFX_IIR_PARAMS and EFX_FIR_PARAMS to define different iir and
fir parameters from separate conf files during compile time (default
"passthrough").
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Adds new topology build based on sof-adl-max98360a-rt5682-2way
with appending arg `-DDMIC_DAI_LINK_16k_PDM=STEREO_PDM1` for existing
ADL-P projects.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
As WoV may be used on HDA platforms, SDW platforms, as well as
nocodec platforms. Let's use a more safe pipeline ID for WoV.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Now the abi header is changed and the config data is send through
large_config ipc message instead of init_instance ipc message.
Update the config data accordingly.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Changes all routes of form:
Object.Base {
route.1 {
source copier.host..1
sink gain..1
}
route.2 {
source gain..1
sink mixin..1
}
}
to
Object.Base {
route.1 {
source copier.host.$index.1
sink gain.$index.1
}
route.2 {
source gain.$index.1
sink mixin.$index.1
}
}
E.g. change ".." notation where the route index is expanded in between
the dots to explicit reference to the route index.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
For IPC4 we are re-using the sof_abi_hdr to encapsulate the blob from/to
user space with minor deviation from IPC3:
- ABI magic is different
- the type is used as param_id in IPC4 (it carries the same functionality)
The IPC type can be specified with -i and defaults to 3 (IPC3).
-p is added as a new option for param_id, but -t and -p will do the same
thing.
After reading a blob, print a message for unexpected ABI magic number, but
do not block the execution.
To generate a header for 100 bytes payload:
For IPC3:
sof-ctl -g 100 -t 2
sof-ctl -i 3 -g 100 -t 2
For IPC4:
sof-ctl -i 4 -g 100 -p 2
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Remove all support for Baytrail and Cherrytrail platforms, they
aren't supported on the "main" branch any more. To build SOF for them
use the "table-v2.2" branch.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Now deep buffer uses S24_LE but other pipelines use S32_LE internal format
. Chrome team found a bug that deep buffer can't work well with I2S codec
since fw only support S32_LE for I2S now.
This patch will use S32_LE to align with current requirement
Signed-off-by: Rander Wang <rander.wang@intel.com>
This patch adds a number of generic or effect type of blobs
to enable use of equalizers in topology2.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Use of isempty() instead of length() to the check for non-empty
variable can avoid warnings in executing code in Matlab.
The unnecessary print of variable to console is removed. E.g.
struct bs, or biquad transfer function zeros vector a.
In system() command no need to store the console output, just
check the return status.
In switch-case statements no need for comma after case and
otherwise.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch contains the changes to export EQ blobs in both tplg1
IPC3 and tplg2 IPC4 formats.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch moves the existing .txt blobs for sof-ctl to directory
ipc3. There will be a similar new ipc4 directory.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Use the input/output pin terminology consistently to align with the
kernel driver and avoid any confusion.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add bluetooth pipeline to rt5682 topologies.
Co-developed-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
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>
Fixes for adding bluetooth pipeline to real codec topologies:
- change bt pipe copier indexes from 5-6 to 7-8 for not to collide with
main level topologies. This indexing is now aligned with nocodec and
rt5682 topologies.
- add big route indexes (50x) for not to collide with main level
topologies.
- introduce BT_ID to separate from BT_INDEX to match machine driver.
- align bt-ssp-config-lbm.conf and bt-ssp-config.conf hw_config names.
- switch BT_PB_HOST_PIPELINE_SINK and BT_PB_DAI_PIPELINE_SRC as the route
was defined wrong way around. This was compensated by route definition
in cavs-nocodec-bt.
Co-developed-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
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>
Use sof-imx8ulp-btsco.m4 to generate two tplg file for imx8ulp-9x9:
the one supports sample rate 8k, the other supports sample rate 16k.
Then sof can support two sample rate: 8k, 16k by instead tplg file
on imx8ulp-9x9.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Use sof-imx8ulp-btsco.m4 to generate two tplg file for imx8ulp:
the one supports sample rate 8k, the other supports sample rate 16k.
Then sof can support two sample rate: 8k, 16k by instead tplg file
on imx8ulp.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Insert a second copier into the DMIC0 stream to generate a total of
three PCMs from it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use the simplified pipeline with just one module-type copier
connecting two pipelines.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Currently copier components of the module type are used in pairs -
one on each pipeline, connecting to each other. This isn't necessary.
It's enough to have one such copier component on the side, that does
forking. Add a single-copier capture pipeline variane and switch
DMIC over to it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch will support multiple capture streams with DMIC. The pcm stream
is composed of two pipelines: (1) copier host <- gain <- copier module
(2) copier module <-gain <- copier DMIC. We need to use copier module
to connect two pipelines because of the restriction with the ref FW that
the gain module can only be connected to modules that are in the same
pipeline
Signed-off-by: Rander Wang <rander.wang@intel.com>
Allow multichannel audio support for HDMI 1, 2, 3 and optional 4. This
change allows maximum of 8 (7+1) channels, provided the connected
displays EDID allows it.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Use the new feature to conditionally includes conf nodes to add the DAI,
pieplines, PCM and route for HDMI4 in hdmi-generic.conf.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Use the new feature to be able to include conf nodes directly to add the
second speaker conditionally and remove alh-2nd-spk.conf.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Different platforms are using the same dmic-generic.conf.
But the DMIC0 PCM ID are different for different platforms. So
let's use parameter DMIC0_PCM_ID for the DMIC0 pcm id setting.
Signed-off-by: Libin Yang <libin.yang@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
In preparation for making it easier to write topology conf files that
can be conditionally included without having to worry about conflicting
node ID's for objects between the included file and the top-level conf
file, modify all classes to include an instance attribute. This means
that irrespective of the object type, all objects will be instantiated
as follows:
Object.Widget.gain.1 {} or Object.Base.pdm_config.2 {} etc
The instance ID's are typically only meant for the alsatplg compiler to
differentiate the nodes in the conf file and are not relevant for the
kernel or the firmware. This change will allow the alsatplg compiler to
be modified to automatically make the node ID's unique before
conditionally including conf files.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Build the topology for the MTL chromebook with Headset on SSP 2 and
speakers on SSP 0.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Add variable definitions for all HS and Speaker settings such as codec
name, SSP DAI index, PCM caps names etc in preparation to make this file
reusable for variations in the SSP ports in different machines.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
This commit fixes Speakers audio issue by aligning bitwidth format
of DAI config to 24-bit as SSP config, which has been modified by
commit c8fe1927c <topology1: change audio format to 24 bit for rt1019>
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Add an instance attribute and make the name attribute mandatory for the
hw_config objects. This is required because the topology2 compiler allows
for expansion of string values with variable definitions. So, if we
wanted to expand the name from a variable definition(as shown below), it
is only possible if it were a normal attribute instead of the node ID as
it is currently.
Define {
SSP0_HW_CONFIG_NAME "SSP0"
}
Object.DAI.SSP.1 {
dai_index 0
Object.Base.hw_config.1 {
name $SSP0_HW_CONFIG_NAME
}
}
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add an instance attribute that will be used to instantiate DAI objects
and make dai_index a mandatory attribute for all DAI objects types. This
is in preparation to make the instance attribute default for all objects
with topology2. This is required because the topology2 compiler allows
for expansion of string values with variable definitions. So, if we
wanted to expand the value of dai_index from a variable definition(shown
as below), it is only possible if it were a normal attribute instead of
the node ID as it is currently.
Define {
SSP_DAI_INDEX 3
}
Object.Dai.SSP.1 {
dai_index $SSP_DAI_INDEX
}
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The pipeline-free chain DMA implementation has multiple
issues, so disable it by default in Intel cAVS topologies.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
It worked because we defined DMIC_DRIVER_VERSION 3 as the default value.
We have to specify PLATFORM=mtl when the default value was removed.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
DMIC_DRIVER_VERSION=3 is already set in mtl.conf. Other platforms
should use the default value in dmic-default.conf
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Somehow some SoundWire topologies don't have PREPROCESS_PLUGINS=nhlt
definition. It leads to nhlt is not included in those topologies.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Define HDMI_PCM_ID macro so that we can have different pcm id for
different topology. And change the hdmi pcm id of sof-hda-generic.tplg
to align with UCM.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
cavs-sdw.conf uses grouped route and pipeline id. And index 20 based is
for Speaker pcm. That will conflict with the existing hdmi1 pipeline id.
Update hdmi route and pipeline ids with the same formula to avoid the
conflict.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The undefined function may cause the debugger not able to run
properly. Print a "set confirm off" instruction to the beginning of
output file to solve this problem.
(xt-gdb) break _MemErrorVector
Breakpoint 1 at 0x9f180400
(xt-gdb) break _MemoryExceptionVector_text_start
Function "_MemoryExceptionVector_text_start" not defined.
Make breakpoint pending on future shared library load? (y or [n]) run
Please answer y or [n].
...
Signed-off-by: Brent Lu <brent.lu@intel.com>
The ADL integration was botched with missing topologies and errors in
topology names in the kernel.
Link: https://github.com/thesofproject/linux/issues/4111
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Auxiliary data can be added at the end of ssp data blob to enable for
example early clocks for certain platform. Add intel_ssp_aux_config.conf
that includes all possible aux data classes. These can be used inside
ssp hw_configs and will be embedded as tlv data after basic data blob.
Example of using mn_config class inside hw_config:
Object.Base.hw_config."SSP0_0" {
id 0
mclk_freq 38400000
bclk_freq 256000
tdm_slot_width 16
format "DSP_A"
bclk "codec_provider"
fsync "codec_provider"
fsync_freq 16000
Object.Base.mn_config."MN_0" {
m_div 100
n_div 200
}
}
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
The dmic-wov.conf file implements the WOV feature. The connection is
DMIC ------> KPB ------------------------------> host_copier
| ^
| |
|----> micsel ----> wov ------> virtual_widget
The DMIC and KPB is on DAI ppl.
The host_copier is on Host ppl.
The micsel, wov and virtual is on wov ppl.
The connection between host_copier and virtual_widget is a
virtual connection. The virtual_widget doesn't exist in the FW.
Signed-off-by: Libin Yang <libin.yang@intel.com>
wov-detect pipeline contains a micsel component, a wov component
and a virtual component. micsel component accepts 2 channels audio data and
output 1 channel audio data to the wov component. wov's keyword is a clap.
The virtual component is only used by the driver, and the FW will not
know that there is a virtual component in the pipeline. The virtual
component is used to connect the pipeline to a host copier pipeline
as per drivers requirement.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Add the kpb component support. kpb component is used to transfer
the data to the proper pipeline based on the WOV component events.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Add the audio channel selection component support.
In case 1 output channel is selected, the component provides
the selected channel on output. In case 2 or 4 channels are selected on
output, the component works in a passthrough mode.
Signed-off-by: Libin Yang <libin.yang@intel.com>
The token payload_with_output_fmt is process module specific,
so set it as a process module token.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
In DTS module m4 file, the default control bytes used to have a
12-byte redundant param {0x0000, 0x000c, 0x0000}, the param id is
0 (the first 4-byte).
For DTS SDK version >= 1.0.8, error is reported while getting the
param with id=0.
This commit removes the redundant param from default control bytes.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Due to allocation failures, or invalid content in dictionary,
"params" entries in "struct proc_ldc_entry" may be NULL.
In print_entry_params(), the NULL entries may be passed
as arguments to fprintf(). While e.g. glibc handles these without
error, this is not guaranteed behaviour and may result in segfault
on some platforms.
Fix the issue by aborting program if allocation fails and
explicitly handling the cases when asprintf_entry_text returns
NULL.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
localtime() can return NULL in error cases. Check the return value
before dereferencing it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Finish the job that commit 5b29dae9c8 ("logger: Create global
convert_config variable to avoid spaghetti code.") started but did not
complete, leaving a confusing mix of globals and locals.
This confuses some static analyzer complaining that stack values are
being returned, see #6858 and #6738. This is a false positive because
convert's() stack lifespan is practically the same as a global but let's
simplify things anyway.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Finish the job that commit 5b29dae9c8 ("logger: Create global
convert_config variable to avoid spaghetti code.") started but did not
finish, leaving behind a supposedly "global" variable that is actually a
confusing global pointer to a struct local to the main() function.
This confuses some static analyzer complaining that stack values are
being returned, see #6858 and #6738. This is a false positive
because the main()'s stack lifespan is the same as a global but let's
simplify things anyway.
Also stop using 'extern' in .c files, use a proper .h file instead.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
sof-logger -u 115200 -d /lib/firmware/sof-foo.ldc
Leads to silent failure as a NULL is passed to open(). Add
explicit error handling for this case.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This patch adds to development topologies build of minimal topologies
sof-apl-pcm512x-drc.tplg and sof-apl-pcm512x-mdrc.tplg for testing.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In user-space tools, memory allocations can reasonably be expected to
always succeed. Make this assumption explicit by adding error handling
after calloc.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
In user-space tools, memory allocations can reasonably be expected to
always succeed. Make this assumption explicit by adding error handling
after malloc.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
mixout-gain-dai-copier-playback.2 pipeline id has been changed to 1.
Need to change mixout.2.1 to mixout.1.1 as well.
Fixes: f0a010052b ("topology2: cavs-sdw: group route and pipeline index")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Add Speaker PCM to cavs-sdw topology. We need to set NUM_SDW_AMPS=1 in
CMakeLists.txt if there is only one amplifier in the device and set
NUM_SDW_AMPS=2 if there are two amplifiers.
Set SDW_DMIC=1 if there is a SDW DMIC, like rt714 in the device.
The 2nd ALH copier stream name should be the same as the 1st ALH
copier, and no need to connect to the route.
The 2nd ALH copier data will be set to the 1st ALH copier's gateway config
in the aggregated mode.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
A topology may be constructed by some .conf files. We may use a
duplicated route index or pipeline index by accident. This commit
suggests a rule to assign route and pipeline index.
We have a consistent pcm id. For example,
Jack out: 0
Jack in: 1
Speaker: 2
Microphone: 4
We can use a simple formula to assign the route and pipeline index
for each pcm.
The formula this commit suppests is pcm id * 10 ~ pcm id * 10 + 9.
That is 0 ~ 9 for pcm 0, 10 ~ 19 for pcm 1, and so on.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
If the rates are an empty vector [] the default rates are used. This
allows test command "src_test(32, 32, [], [], 0, 0);" to do a quick
test without plots with default 8 - 192 kHz in/out matrix.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Octave errors if plot handle is empty, Matlab doesn't. This can
happen if frequency response test data read fails. In that case
an empty plot window is stored as indication of error.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This speeds up src_test.m with no plot window opening for rate
that is not supported in the conversions matrix. No output file
returns failure -1.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
These prints are normally not useful and slow down test with a
lot of scrolled text output.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This prevents testbench run freeze from src_test.m. Function
test_run_src() passes to testbench option -C that limits the number
iterations to 300k that corresponds to 5 min of audio.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to sof-hda-generic.m4 macros HSSFX, HSSFX_FILTER1,
and HSSFX_FILTER2 those can be used to customize stream effect
for PCM 30. The macro defaults to volume so the default topology
build is not impacted.
The CMakeLists.txt in development is updated to build topologies
sof-hda-generic-src.tplg, sof-hda-generic-2ch-src.tplg, and
sof-hda-generic-4ch-src.tplg. The stream effect is set with HSSFX
to src-volume.
The pipeline pipe-host-src-volume-playback.m4 is added. It is similar
as pipe-host-volume-playback.m4 but a sample rate converter (SRC)
is added after PCM, before volume. The PCM capability is changed to
min 8000, max 192000 Hz.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This folder contains definitions for both CAVS and ACE. So remove the
incorrect folder naming and move everything one level up.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The CAVS topologies need to be in the avs-tplg folder and the MTL
topologies need to be in sof-ace-tplg folder. Also, change the output
file names to the names expected by the kernel and the NHLT binary files
to match the topology file names.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Adds fatal assertion in intel-generic-dmic.m4 for DMICPROC is not
defined in upper m4, and fixes a potential risk of assertion by
sof-tgl-max98357a-rt5682.m4.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
with 10ms period size we have seen power improvements.
We are working to move all topologies of Chrome to 10 ms.
Starting with current RPL and ADL-N topologies.
With many topologies already using GOOGLE_RTC_PROCESSING
flag to set 10ms, making a simpler flag to be used across
to set required SPEAKER PERIOD. This helps to scale later
to all designs.
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
This fprintf() with missing %d causes in Matlab and octave
messed up console output. This fix prints filter order
if this issue happens. This could be caused by too high
filter specification request that was not possible to reach.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to chirp test (executed first usually) plot of
audio waveform to help understand why the audio markers were not
found. The reasons like very low level or corruption or large
time shift can be seen from the plot easily.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch helps to avoid editing the script to change the test
behavior. The full_test set to 0 performs a quick test with chirp
(default 1). The option show_plots set to 1 (default 0) shows
the plot graps from each test step those help to understand the
test verdict.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The gaussian (or other normal distribution shape) dither impacts
too much 16 bit signals. The triangular probability density
function (TDPF) is a sufficient compromise between added noise energy
and de-correlation of PCM samples.
This change improves for 48 kHz 16 bit audio measurement the THD+N
from -62.6 dB to -73.6 dB.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch applies for conversions where Nyquist rate allows
a 20 kHz low-pass filter as specified in AES17 standard (test.fu).
The sweep test is set no higher than 20 kHz (test.f_end).
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This change aligns the gains in all other conversions sets
with IPC4 that already has the same setting. The max gain of a
converter is 0 dB. It also avoids the issue of 1 dB lower gain
in 2-stage vs. 1-stage conversions.
This changes only the generate scripts. The coefficients need a
separate patch.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the SRC coefficients generator scripts with
add of parameter cfg.thdn that is the min. THD+N performance. The
target gain is set to 0 dB for all conversions to be generated.
in src_param.m the default stop-band is relaxed from 70 dB to 63 dB.
It can be done because the THD+N performance check will step up the
attenuation. The default lower attenuation saves RAM in easy
simple fractions conversions.
The main change is in src_generate.m. The conversions matrix is
two pass. In the first pass the converters are designed and the
converter for same fraction and other bandwidth parameters with
highest performance is preserved. In the second pass the table
of converters is constructed and the size of filters and buffers
and other information like MCPS estimate are collected.
Other changes include reduction of plots made during batch design
and remove of some commented out code.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
pipe-rtnr-google-rtc-audio-processing-capture.m4 and
pipe-google-rtc-audio-processing-rtnr-capture.m4 are actually the same
graph. The filename differs because they are originated from different
branch.
This commit unifies them to avoid confusion.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
For nau8825 codec devices e.g. Kano/Volmar/Zavala, it had been observed
that when Hotword module is enabled, noticeable pop noises appear in the
playback audio. While disabled, the playback audio becomes clear.
Because Hotword module is optional, remove it for now as WA fix for noise
issue.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Add topologies for RTNR and GOOGLE AEC integration
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Pin-chih <johnylin@google.com>
New target device, also move the path over to core 1 when running in
no_hotword mode
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Gain module cannot be bound to a module from another pipeline. So,
add a module copier in the gain-capture pipeline.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Audio hardware configuration of SKU 0C11 product is rt711 on link0,
two rt1318s on link1 and link2, rt714 on link3
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
This reverts commit 0857ed68b9.
The "topology2: add ssp multi stream capture" impacted PR test.
Will resubmit once we fixed the issue.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
payload_with_output_fmt token is used to tell sof driver whether
there is output audio format in the init instance ipc4 message
payload. payload_with_output_fmt = 1 mean there is audio output
format in the ipc4 message payload.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Add support for chained DMA pipelines in the HDMI passthrough topology.
Since the HDA hardware does not support S24_LE, remove the format from
the PCM capabilities for all the HDMI PCM's as well.
This version should work even if the kernel does not support chained DMA
as yet.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Audio hardware configuration of SKU 0C40 product is rt711 on link2,
two rt1316s on link0 and link1 and rt714 on link3
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Audio hardware configuration of SKU 0C10 product is rt714 on link0,
two rt1316s on link1 and link2
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Add a new pipeline chain-dma-playback.conf for chained DMA playback
and use it for HDMI depending on the HDMI_CONFIG.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This test uses module interface for eq_fir.
The use of decoded 16 bit FIR blob coefficients decreases a lot
the mismatch between float reference FIR vs. SOF fixed point
implementation.
This patch adds the script tools/tune/eq/cmocka_data_eq_fir.m that
generates the files cmocka_fir_coef_2ch.h and cmocka_fir_ref.h.
The script debug_files_plot.m can be used to visualize the unit
test result and error for data that is generated if macro
DEBUG_FILES is defined.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
module_config contains a .data pointer that is used both for initial
and run-time configuration. The initial configuration should be
const. We add a new .init_data pointer for it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Fix a confusing mistake high-pass -> low_pass and typo. It's
only a user help text change for "help stdlpf".
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
With the release of RTNR version 20220728,
period for capturing pipeline requires at least 5ms.
This commit set 5ms period for RTNR in
MT8195 topology.
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
log and linear are not supported with IPC4. Use no_fade and fade
instead and set the default to fade.
This should fix the following error seen with volume prepare():
volume: comp:9 0x60003 volume_prepare(): invalid cd->ramp_func
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This patch fixes the upper frequency for distortion plus noise
measurement. The min(fs1, fs2) leaves part of upper band unmeasured
and gives a too good looking THD+N performance figure when output
rate is higher than input rate. The proper way is to measure the
(near) full output rate bandwidth.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The test is treated passed if there were no failed cases. The fix in
this patch is to force one failed case if both failed and passed counts
are zeros. Then the upper level test scripts/host-testbench.sh reports
correctly the test fail.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fixes this error:
```
No platform found in name "sof-rpl.ri"; unknown memory layout.
```
... and shows the Memory Layout.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Duplicated dai index results to module initialization
faiure in multi-stream test. Dai 2 should be used by
stream nocodec-2.
Signed-off-by: Rander Wang <rander.wang@intel.com>
2 small changes required:
- Stop calling sys.exit(1) in case of error not to exit the importer
- Change EraseVars() to return the checksum value instead of printing
it. Move the print() to the main() function
This is required by the new sof-bin tests that compare signed with
unsigned binaries; submitted in
https://github.com/thesofproject/sof-bin/pull/105
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
It's now possible to rebuild just only one modified topology without
rebuilding all of them from scratch.
Building topologies v2 has two steps:
1. concatenation of abi.conf with topo.conf
2. run alsatplg on the concatenation
Concatenation step 1. was wrongly implemented at configuration time, not
at build time. So when the topology source of step 1 (topo.conf) was
modified, the dependency of step 2 (= the concatenation) was not
affected and the topology was not rebuilt.
Fix this by moving the concatenation to build time.
Fixes commit 308a24a92b ("topology2: Add build support")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This makes it possible to find stuff in the output of `ninja help`.
Zero effect on the build artefacts.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit lets user to set data blob from host.
For example:
$ amixer -Dhw:0 controls | grep RTNR
numid=47,iface=MIXER,name='RTNR10.0 rtnr_bytes_10'
numid=48,iface=MIXER,name='RTNR10.0 rtnr_data_10'
numid=49,iface=MIXER,name='RTNR10.0 rtnr_enable_10'
$ sof-ctl -Dhw:0 -n 48 -b -s ./preset.bin
A new empty data control added to the topology will be used to send the
blob.
Model handler is now used for transferring the blob data.
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
Code Refine
The increase of non-32bit aligned blob sizes needs to be removed
because it can cause mismatch of blob binary header vs. actual
size. Instead error if blob size is not multiple of four bytes.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds initial version of MFCC setup tool setup_mfcc.m. It
outputs a configuration topology macro file that matches the current
Matlab concept code. The configuration can be tested in testbench
with the supplied scripts run_mfcc.sh and decode_ceps.m.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds basic macros needed for MFCC in testbench and in
developmemnt topologies for hda-generic-2ch and up2. The
configuration blob in this matches the reference Matlab code
as configured to match Pytorch default MFCC.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This topology is used for i.MX8QXP/i.MX8QM with baseboard
to enable both cs42888 and wm8960 codecs.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This reverts commit e31c7abeeb.
This caused most tests to fail on sh-tglu-rvp-nocodec-ci-02
in daily run 15919, see some more errors in logs shared in
initial PR #6318 and new issue #6367
FW reported error: 113 - Invalid destination queue (pin) ID provided
ipc error for msg 0x45000004|0x6
sof_ipc4_route_setup: failed to bind modules copier.SSP.8.1 -> gain.7.1
I don't know why this failed and I did NOT test this revert, however:
- This topology change is apparently the only thing that changed
compared to the day before.
- The error message seems very much related.
- Other people seem to agree.
- According to Ranjani, this feature is not urgent.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This time the target is to make the demuxer more modular so that it is
not coupled with file reading operations and it is easy to use
alsa-lib directly.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
This updates documentation to reflect that now param id is only 2 bytes
followed by 2 bytes codec id.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The allocated packet should accommodate the header, the data, and the
checksum. The header size was missing from the condition from the
beginning, even if its there in realloc parameter. The bug should be
harmless waste of cycles thou.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
The sync_word_at() only checks for two things, if the len parameter is
greater than sizeof(uint32_t) and if the memory pointed p parameter
holds PROBE_EXTRACT_SYNC_WORD value. Now that the available bytes is
checked just before sync_word_at() call, the whole function starts to
look a bit pointless.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Drop IPC3 probe DMA framing and use IPC4 framing for IPC3 mode
too. This change simplifies the code quite a bit. After this change
both the SOF firmware and sof-probe demux tool should be updated at
the same time.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
The MTL support added conditional build for topology2 based on CONFIG_CAVS
or CONFIG_ACE.
This is wrong for several reasons:
There is not ace directory present
The Kconfig system is not used when building topologies, so we are ending
up not building topology2 files at all.
There is no reason why CAVS and ACE topologies should be exclusive.
Fixes: 784bce763c ("mtl: Added meteorlake platform to the build system")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Added new mtl platform to xtensa-build-zephyr.py.
Added ace directories to cmake files.
Added ACE to kconfig.
Add Meteorlake platform to be built with Zephyr under
CONFIG_ACE_VERSION_1_5 flag.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Currently lp_mode setting is not included by topology binary
since lp_mode is not defined as a attribute. This patch adds
it in pipeline.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Code can now include <rtos/alloc.h> and uses thinly wrapped Zephyr
native for most uses. Wrapping can be removed over time.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
When series of tests are run, only last result with same component is
saved. Make unique output filename. For now adding bits per sample
at the end of file, all the logs can be saved.
Ideally datetime string would be good. I keep it as FIXME.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
fulltest param to control quick chirp test only or full test
including all quality tests.
As minor clean up, unused parameter in thdnf_mask() and test_run_process()
is removed.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
No functional change. Set common function indentation and add comment
sections for better readability.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Code can now include <rtos/wait.h> and uses native Zephyr 64
cycle API instead of SOF version.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The xargs option `-I/--replace` hardcodes max lines `-L 1`. In other
words, it always splits the input line by line and ignores whitespace
delimiters inside each line. Initial xargs commit
d0f4aba934 ("topology: speed up topology build") used `--replace`
after `-n/--max-args=1` which was silently ignored by xargs version
4.7.0. Now xargs 4.8.0 prints the following warning:
xargs: warning: options --max-args and --replace/-I/-i are mutually
exclusive, ignoring previous --max-args value
Remove the ignored `-n 1` to remove the warning.
I compared the outputs before and after this commit and they're exactly
the same.
There's an extra twist. The same xargs command also uses the
`-d/--delimiter=,` option which makes xargs ignore newlines and
"translates" any max-line `-L` option to `--max-args`; including the `-L
1` max implied by `--replace`. This twist does not make a difference:
any max-line or max-args is always overridden by `--replace` whether
`--delimiter` is used or not.
Of course this entire xargs script is re-inventing (C)Make/ninja that
provide build parallelism for free and much more... I digress.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
No runtime semantic change. Use C library when RTOS uses
C library otherwise use own C library calls.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
No functional runtime change, but changes to rtos partitioning and the
layout of headers .
This patch creates RTOS specifc header paths and updates spinlock.h
and kernel.h to show the new usage. Other headers will incrementally follow.
It reuses the current zephyr topleve directory and creates a new
toplevel xtos directory for xtos specific files.
Due to the mixing of RTOS, driver and library headers at the top level include
directory it was necessary to create rtos specific header directories i.e.
src/include/rtos-xtos
src/include/rtos-zephyr
These RTOS include directories will eventually contain RTOS specific headers
whilst common logic and structures will be placed in non RTOS directories.
This will also mean
"#include <sof/spinlock.h>"
will become
"#include <rtos/spinlock.h>"
and will allow easier visualisation of where and why RTOS headers are being used.
This will help to eliminate cross usage of headers between RTOSes.
Subsequqnt patches will move more headers and rtos specific wrppaer
source files into rtos specific locations.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
With the release of RTNR version 20220728, period for capturing pipeline requires at least 5ms.
Periods setting for 16KHz capturing pipeline is also removed since RTNR is currently running in 48KHz capturing pipeline only.
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>