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>