This patch modifies the number of reference feedback channels from the
Demux component to the host capture stream in sof-tgl-max98373-rt5682.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
This patch creates macros for the channel map of Feedback
and reference streams. Also, modifies the feedback channels and channel map
of the Demux configuration to send voltage and current data to the
smart amplifier component and only voltage data to the host as Feedback
stream.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Changed the tplg file name in kernel driver according to Maintainers
feedback. So, topology file name here needs the corresponding change.
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
For first run, allocated memory pointer has been written twice to
config->filter_config but freed only once - memory leak.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Reported by VERBOSE=1 CMAKE_BUILD_TYPE=Release ./scripts/build-tools.sh -l
and gcc version 9.3.0-10ubuntu2:
tools/logger/convert.c:630:5: error: ignoring return value of ‘freopen’,
declared with attribute warn_unused_result [-Werror=unused-result]
Tested with sof-test/test-case/check-suspend-resume-with-audio.sh
Fixes commit 6a84b4e945 ("sof: logger: reopen trace file upon EOF")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Reported by VERBOSE=1 CMAKE_BUILD_TYPE=Release ./scripts/build-tools.sh -l
and gcc version 9.3.0-10ubuntu2.
out_fd is not initialized on the first "goto err:" and this can result in
trying to close a random file descriptor.
Fixes commit 126060ae63 ("logger: Send parsed runtime log levels to FW
via debugFS")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As reported by gcc 9.3.0-10ubuntu2 and
VERBOSE=1 CMAKE_BUILD_TYPE=Release ./scripts/build-tools.sh -l
‘__builtin___snprintf_chk’ output between 23 and 57 bytes
into a time_fmt destination of size 32
Fixes commit d7b535e282 ("logger: Add option to set timestamp
precision")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
UUID objects are represented by struct sof_uuid_entry instances in SOF.
Instead of casting pointers to them to integers for passing around,
carry them as pointers until they have to be cast to integers for
packing into data structures. This also fixes printing UUID, using a
"%pU" format.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch modifies the number of feedback channels from the
smart amplifier on max98373 codec in sof-tgl-max98373-rt5682.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
This patch modifies the feedback channels and channel map
of the smart_amp configuration based on the number of feedback
channels from the codec.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Failing silently is not nice. Now prints instead:
TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT
error: in logger_read(), fread(..., /sys/kernel/debug/sof/etrace) \
failed: Invalid argument(22)
Also make logger_read() and the process return [-]errno which can have
different values and some information instead of -ferror() which has
only one value (non-zero in theory, 1 in practice) hence no information.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
To produce the exact same binaries than before this commit:
CMAKE_BUILD_TYPE=' ' ./scripts/build-tools.sh
To observe which CFLAGS are being used:
CMAKE_BUILD_TYPE=Release VERBOSE=1 ./scripts/build-tools.sh
Off topic: the logger fails to build with: -O3 -DNDEBUG -Wall -Werror
(all other tools build fine with these flags)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The if test needs to be done for comp_type. The index does not refer
to comp types but items in lib_table that is not correct. As result
testbench loads crossover for all UUID based components. The load of
beamformer works correctly with this change.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The script adds tdfb_test.m to check the TDFB beam pattern
versus theoretical. It also measures the noise suppression
capability of the test beamformer in simulated diffuse and
random noise field.
As simple quick test this patch adds TDFB to cell array of
accepted components for process test.
Note: There tests can't be used until load of UUID based non-legacy
components is added to testbench. The scripts were used with earlier
legacy mode version of the component.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The patch adds the playback and capture test pipelines. The
configuration is set to `tdfb_coef_line2_50mm_pm90deg_16khz.m4'.
A mistake in PIPELINE_FILTERx macro defining is fixed for IIR and
FIR. The pipeline macros expect it to contain an include file or
no macro defined at all. Defining it for empty string caused fail
in topologies build when PIPELINE_FILTER1 is used for TDFB.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the playback (for test only) and capture pipelines
with Time Domain Fixed Beamformer (TDFB) component.
Topologies variants to test capture with beamformer are built for
sof-hda-generic and sof-apl-pcm512x platforms. The beam direction
is +/- 10 degrees as compromise between notebook camera and stereo
capture. The dual beams preserve the stereo characteristic. The
beamformers are added to both 48 kHz and 16 kHz DMIC capture
pipelines.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
These are data files created by the example scripts in
tools/tune/tdfb. The generation is time consuming and requires
Octave or Matlab.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds support to define from CMakeLists.txt or a
higher level platform topology file the definition of DMICPROC and
DMIC16KPROC to select desired capture processing algorithms pipeline
from pipe-x-capture.m4 and pipe-x-capture-16khz.m4 macros instead
of hard coded processing eq-iir-volume. It is preparation to add
support for beamformer processing for microphones.
The impacted platforms are sof-hda-generic, sof-cml-rt5682, and
sof-apl-pcm512x. This patch does not change built topologies.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the tool for creating beamformer configurations. The
microphone array geometry and beam angle (azimuth, elevation) need
to be specified. See the example scripts and sample array helper
functions.
The FIR blob quantize function needed a minor change to prevent strip
of trailing zero coefficients. The beamformer filter bank needs to use
equal length filters.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the uuid argument to smart_amp widget, uuid
parameter can be configured by the topology files while
integrating any new component. If not configured, uuid will
be assigned with the UUID of the smart_amp_test component as
default value.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
In case we ever needed to load the entry from ldc file, without params
processing and printing.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Add methods to load process libraries based on uuid. Testbench will
first search the old process enums and if match isn't found the same
search is done with uuid. Hence old process components should get loaded
with enums and new uuid based components should get loaded with uuids if
the uuid definition is declared and added to the library table.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
It may be needed for situation when user have firmware after
small fixes without updated ldc file or fw_ready file is not
accessible. Option dedicated for advanced users.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This commit adds the tools to generate the control bytes for the
crossover component. To generate the control bytes, run the
example_crossover.m script.
The parameters of the crossover components are:
- number of outputs
- sink assignments (routing crossover output to different pipelines)
- frequency cutoffs
To tweak the parameters modify the values in example_crossover.m and run
it.
Refer to sof/src/include/user/crossover.h for more information on how
the crossover config is structured and how sink assignments are done.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
This commit adds the topology files for the crossover component.
The control bytes are generated by the tools in tune/crossover.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
Most functions in logger depend on values stored in conver_config struct
which are passed to almost all function calls. This patch moves pointer
to the config to global context and allows each function to derive
necessary values from there. This reduces needless parameters passed
to function calls and allows for more flexible access to data in nested
functions.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Add development folder for topologies that not for production.
First add sof-tgl-nocodec-ci as a validation topology.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add KPB pipeline into the sof-tgl-nocodec-ci topology.
This topology will be a reference test topology for all features used
on TGL.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add default dai name for dmic dai, we can override them in
if dai name in machine driver is different.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add FW echo reference to nocodec TPLG on SSP0.
Add internal loopback on SSP0. We can compare echo reference and
loopback capture stream.
Add smart amplifier for nocodec on SSP2
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
To make multiple DEMUX comp can work in same topology. Add pipeline
ID into the DEMUX control name.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This patch removes the incorrect usage of BUILD_COMMAND. Having it set
to "cmake" caused the cmake usage help text output to be shown only and
caused the ExternalProject_Add command to believe the
libsof_tplg_parser.so was built. The build for the library happened only
because the next install step performed the compilation. With this fix
the default build command is used instead. There's no need to define
it here.
Fixes#2656
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This fix compensates host wakeup time.
Here we limit max draining request to 2 seconds.
History buffer size if one second bigger than max draining
request allowed.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Text saved to FILTER_KERNEL_PATH should be terminated with
new line, to indicate end of input and mark it redy to send
to FW in IPC message.
Fixes: 126060ae (logger: Send parsed runtime log levels to FW via debugFS)
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Usage of strstr for short version of logs level definitions
(for example 'e') leads to invalid level parsing, because first
log level with defined string (or letter) will be returned
(in this example 'verbose').
After change, log level will be returned only when name is
exactly as given one.
Fixes: b1fc9220 (logger: Parse runtime filter levels)
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This patch fixes a segfault with null sof->sa pointer in
pipeline_schedule_copy() function. The bug has not been observed
with test topologies for processing pipelines but with other
topologies with fuzzer varied parameters.
The sa_init() is added to tb_pipeline_setup(). The scheduler_init_edf()
is a dependency. The two dummy functions platform_timer_get() and
clock_ms_to_ticks() are also added as dependency. The CMakelist for
library is edited to include agent.c build for testbench.
Fixes#3247
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Some platforms, e.g. UP2 (APL+PCM512x) use non-standard DAI link
IDs. Let those platforms specify their IDs and still use the
generic DMIC topology template.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch checks for the access type of kcontrol and returns error
only when the access type is not read or write.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
This patch adds the smart amplifier get parameter byte kcontrol
to read the actual algorithm parameters from DSP during runtime.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
This patch adds the support for read-only volatile byte kcontrol with
access type as read and volatile to read the actual values from DSP,
write-only byte kcontrol with access type as just write and read-write
volatile byte control with access type as read, write and volatile.
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Modified initial configuration param for the smart amp.
Total number of feedback channels was changed from 8 to 4.
Assigned 4ch feedback to 0 ~ 3 slots.
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
The mixer doesn't seem to work with these two formats, limit support
to S16_LE until the mixed is fixed.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Switch to use CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT) for all pipelines,
no matter there is PGA in it or not, the dai format is not important
here, as the pcm_converter will help.
This will help fix issue where we are claiming the wrong supported
formats in the PCM capability, e.g. our host buffer is allocated as
S16_LE so we can support S16_LE only, but with today's code it is
`S32_LE,S24_LE,S16_LE' in the pcm capability, so end user can run with
S24_LE or S32_LE and eventually end up to FW internal errors.
BugLink: https://github.com/thesofproject/sof/issues/3318
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add a helper to generate supported formats of the PCM capability, it is
up to the pipeline format:
for s16_le pipeline, only S16_LE is supported.
for s24_le pipeline, both S16_LE and S24_LE are supported.
for s32_le pipeline, all S16_LE, S24_LE and S32_LE are supported.
For each pipeline, we should use CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT)
in the PCM_CAPABILITIES definition.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
If user fails to provide a topology file, the tplg_file member
of structure tp is left uninitialized. This member is used to
check again if the file was provided, which won't be possible
unless this has been initialized to NULL and checked for NULL
after parsing arguments.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
"/sys/kernel/debug/sof/filter" file is responsible for updating
trace log levels. IPC message contain list of new trace threshold,
it is represented as single line in file where entries are separated
with ";". Single entry has form of:
"<uuid_id> <pipe_id> <comp_id> <log_level>"
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Parse arguments given in -F flag, in form where each -F argument
is given as separate line. Format of single -F entry is
`<log_level>=<component_list>`. <log_level> must corresponds with
.name field from log_level_dict. List of component are build from
elements separated with `,` and single element may have one of the
following forms:
"<name> <pipe_id>.<comp_id>" - single component instance
"<name> <pipe_id>.*" - components with given name on piepeline with pipe_id
"<name>*" - each component instance with given name or global component
"<name>" - as above
"* <pipe_id>.<comp_id>" - component on selected pipe_id with given comp_id
"* <pipe_id>.*" - each component on pipeline with pipe_id
"*" - each component in firmware
<name> must correspond values of uuid entries from ldc file.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
They will be needed during trace filering command parsing,
to skip whitespaces. As generic functions, their are placed
in misc file instead of any feature-related file.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
To parse filter configuration given by user, uuid dictionary
must be readed first from ldc file. Otherwise it's impossible
to validate given components names. This is reason why filter
configuration must be buffered and parsed in later steps.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
A few, general usage functions where implemented in converter file.
They should be moved to separate file, to make it easily accessible
form any source file. Moreover removing it from converter file, is a
part of this file cleanup.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This conversion should be done in function, because of future usage
in different places, outside converter.c file.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
free() system call frees the memory space pointed to by
ptr, which must have been returned by previous call to
malloc(), calloc() or realloc().
Now, when incrementing the array pointer, we may have
exceeded the actual allocated size. If we do pointer arithmetic
and subtract size from the array pointer, we may not point to
the actual location returned by malloc().
This patch makes sure that when we do pointer arithmetic on array,
the array's value at the end would be same as the one returned
by malloc.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
This patch uses the functionality added by the c9e090ccf3 commit
to check for array size mismatch in various components.
Not doing so may result in cases, where we try to write into the
space not allocated leading to segmentation fault.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
This patch uses the functionality added by the c9e090c commit
to check for array size mismatch while loading topology
buffer.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
This patch uses the functionality added by the c9e090ccf3 commit
to check for array size mismatch in components.
Since, the components are in places other than tplg_parser, the
function which checks for the mismatch has been made an external
function from a static one. The function declaration has been
added to the tplg_parser header files, so that the function can
be used by any code which needs array size checks in components.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
ABI version saved in fw_ready doesn't match with DBG_ABI version
saved in ldc file even for proper pair of fw and ldc file.
Moreover ldc file content changes at any log modyfication, what
is not related with DBG_ABI change, so this way of solving this
problem is incorrect.
Introduced src_hash value change solves both problems.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
There may be a situation where size of all elements of the
snd_tplg_vendor_array is greater than the private data size.
If we take a look at array structure
struct snd_soc_tplg_vendor_array {
__le32 size; /* size in bytes of the array, including all elements */
__le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */
__le32 num_elems; /* number of elements in array */
union {
struct snd_soc_tplg_vendor_uuid_elem uuid[0];
struct snd_soc_tplg_vendor_value_elem value[0];
struct snd_soc_tplg_vendor_string_elem string[0];
};
} __attribute__((packed));
and assume of private data size is size.
If num_elems * sizeof(..._elem) > size occurs, this is bad
because, we first try to allocate _size_ bytes via malloc to array
pointer. Since the num_elems * sizeof(..._elem) is greater than
size, we get a segmentation fault when we try to memcpy the
remaining size in the subsequent functions (read tplg_read_array()).
We fix this problem by checking for whether array size falls
within the bounds of private data size.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
Add a helper DECLARE_SOF_RT_UUID() to generate the 16 Bytes UUID string.
The input string in this format (copied from the FW source directly):
DECLARE_SOF_RT_UUID(name, uuid_macro, a, b, c,
d0, d1, d2, d3, d4, d5, d6, d7);
The output string should be in this format:
a6a7:a4a5:a2a3:a0a1:b2b3:b0b1:c2c3:c0c1:d00d01:d10d11:d20d21:d30d31:
d40d41:d50d51:d60d61:d70d71
e.g. for demux component, the macro usage is:
DECLARE_SOF_RT_UUID("demux", demux_uuid, 0xc4b26868, 0x1430, 0x470e,
0xa0, 0x89, 0x15, 0xd1, 0xc7, 0x7f, 0x85, 0x1a);
while the output will be:
68:68:b2:c4:30:14:0e:47:a0:89:15:d1:c7:7f:85:1a
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add the definition SOF_TKN_COMP_UUID for the component UUID token, this
could be used for process components as subtype/flavor soon.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This patch adds to CMakeLists.txt build of duplicate one and three
channels dmic capture topologies. They are needed to match the driver
that loads a topology that matches the number of microphones based on
configured microphones count in device BIOS.
This is an intermediate solution to enable microphones on such
devices. The mono audio will appear as double mono for user space. A
true mono topology and firmware will be created later.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The conditional definition in sof-apl-pcm512x.m4 is supposed to
select the DMA scheduler if the codec is the bclk source and the
timer scheduler otherwise, but the conditional definition is
broken which leads to the DMA scheduler being selected always.
Fix the definition.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When the realloc() function fails, a NULL pointer is returned. But,
if the size argument is zero, then also NULL is returned. So, to
differentiate that, we also check if size is non zero. Only if
pointer is NULL and size is non-zero, we come to the conclusion that
realloc() failed and the allocated memory till now is freed and
appropriate error is returned.
If realloc is called on a pointer and fails, the memory pointed by
the pointer isn't freed. When realloc() fails, even this memory
is freed.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
Implement the fuzzer API for the i.MX8 platform. The difference
between other platforms and i.MX8 is the Messaging Unit(MU). We have
emulated the hardware functionality of MU by using SHMs to represent
Side A and Side B of the MU and the registers they each have. Both
qemu(VM) and fuzzer's write functions write to both sides of the MU to
successfully emulate it's functionality.
Signed-off-by: Diana Cretu <diana.cretu@nxp.com>
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
In order to run multi-output component playback by testbench, this patch
supports multiple output file mode on running testbench. Argument "-o" is
modified to accept specifying up to 4 filenames delimited by comma,
e.g. "-o output1,output2,..."
Moreover, debug messages in tplg_parser/tplg_parser.c is refined for
demonstrating multiple pipelines better.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Support up to 4 output pipelines for test/topology/test-playback.m4, where
argument TEST_PIPE_AMOUNT is added for identifying the number of pipelines
while generating test topologies.
Multi-output component should be added in ALG_MULTI_MODE_TESTS and
ALG_MULTI_SIMPLE_TESTS to generate test topologies with multiple output
pipelines in the future.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Before accessing the contents of the parameter pointer of the
function, check if the pointer is NULL. Else, it may lead to
segmentation fault.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
Somehow a 10ms buffer for the deep-buffer pipe generates write errors
on the kernel side with S24 and S32_LE.
Reducing the memory footprint seems to fix the problem.
This may hide a more fundamental problem with either scheduling or
memory allocation, but for now let's solve CI and daily tests.
BugLink: https://github.com/thesofproject/sof/issues/3171
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Help message, near -g flags looks like:
sof-logger: -f precision Set timestamp precision
sof-logger: -g Hide timestamp
sof-logger: -d *.ldc_file Dump ldc_file information
before changes, and after apply this patch, descriptions are aligned.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This patch adds check for sane num_elems value. If the calculated
array size exceeds the value size an error is returned and topology
parsing is aborted.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
When an error is occurred when loading the widget, the memory
allocated is not freed properly. This results in memory leaks.
Avoid these memory leaks by freeing the allocated memory before
exiting the function by returning error value.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
When we try to free a pointer which is not initialized, we are
using a value in the program which is undefined. So, initialize
the pointer variable, so that in future, when we free the pointer
it won't cause a problem.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
This patch fixes several pipelines which are DMA driven by default
but should be driven in timer domain.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
All audio_stream clients should use provided audio_stream_get_avail*/free*
API, instead of directly accessing .avail and .free member fields.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
tgl-rt711-rt1316-rt714 is almost the same as tgl-rt711-rt1308-rt715 and
can use the same topology file.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Update sof-tgl-max98373-rt5682 to take speaker amp's SSP ID as input.
This is to accommodate DUT's which has amp connected on SSP2.
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
tb_pipeline_params() function takes an argument called ipc_pipe,
which is a pointer and is derefernced in the function to access
a member of structure that pointer is pointing to.
If this pointer is NULL, this leads to Segmentation fault. A
null pointer check is added before the argument is dereferenced.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
This commit changes SSP bclk rate from 9600000 to
12288000 ind ssp container to 32 bits order to fix
glitch issue.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Some TGL devices use the same devices and hardware layout and on CML,
reuse. Also remove cml-mono.m4 definition and directly add the define
in the CMakeLists.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This file is no longer maintained and does not work with the SoundWire
drivers, remove.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Additional work needed to make the BE name and index configuration, as
well as LBM quirk.
We should be using a single topology here.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
remove the low-latency pipeline and pcm-media.
Instead, we use 2 two pipe-host-volume-playback with different periods
connected to the same mixer-dai.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add a new pipeline definition to avoid mucking with either
pipe-low-latency or pipe-media.
The code is 90% similar to pipeline-volume-playback but includes a
scheduling component.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add separate pipeline starting with a mixer (similar to Baytrail
switch matrix and SKL closed-source firmware)
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
For original DMIC16k only S16_LE is supported in pcm capability.
Now this patch enables S24_LE and S32_LE for applications like
DMIC01.
Signed-off-by: Rander Wang <rander.wang@intel.com>
This patch shortens the ramp duration to 20 ms from 250 ms in all
topologies with volume playback. In addition the zero crossings detector
mode is enabled to mitigate zipper noise.
The change includes for the not yet updated pipeline macros a rename
of macro for tokens data with pipeline number suffix to ensure no
undesired volume instances are impacted by this change.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Since we are sharing the same mclk_id among SSP interfaces, we should
use the fixed frequency for the mclk. Here add a macro for it to make
sure it is aligned with the SSP configure in the upper layer.
Change to use 19.2MHz as the default mclk for smart_amp SSP.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We should make sure SMART_SSP_QUIRK is set, if it is not defined from
the upper layer, let's set it to explicit 0.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
For original design, there are 4 channels 24bit stream for playback
and 8 channels 24bit IV feedback for capture stream. This requirement
exhausts all resource on single link. Now adjust it to a 2 channels stream
for playback and a 4 channels stream for capture
Signed-off-by: Rander Wang <rander.wang@intel.com>
This is not needed yet as we use only one -imacros at a time but could
save someone a lot of time in the future; including the author of this
patch who will have forgotten about it in a few weeks.
For more details see
https://github.com/zephyrproject-rtos/zephyr/commit/e53c0d0ec7640b
and links from there.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
After removing timestamps it is possible to compare output logs
with tools like diff or similar. Moreover then output logs are
in more compact form.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
We broke the upstream UCM configs by introducing pipeline id's to dmic
names. This differentiation is mandatory for reasons in alsaconf parsing
and ASoC layer combining the control names to pga's. However, the
differentiator can't be pipeline id as it can change depending on the
topology. So let Dmic0 have the old "Capture Volume" control name and
prefix Dmic1 control name with "2nd". This should not break the UCM's as
Dmic1 is not currently referenced.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Using -imacros on the compiler command line instead of explicitly
including config.h is not just less tedious in the future:
- it also makes sure configuration always comes first and is never
accidentally missed by an earlier #include
- it makes sure all translation units get the (same) configuration
- it lets parent projects like Zephyr override the config.h name
To test this I ran ./scripts/xtensa-build-all.sh -a -r, compared
binaries before and after this change and found no output difference.
Full disclosure: this required a few unrelated tricks not submitted here
like a .tarball-version file, commenting out __DATE__ and __TIME__ in a
few places, running strip-determinism on the .a files because our
crosstool-ng reference is not cutting-edge, etc.
As Tigerlake is not built by default it required a couple more hacks to
compile.
Blank lines are left instead of the former #include lines so even debug
objects are the same.
Only defconfigs were tested. On the other hand, this commit was _not_
performed by a script but by changing the name of the generated file and
clicking on and fixing every build failure. This proves that every
removed #include was actually required by one or more tested defconfigs
and that the added -imacros flag does affect the compilation of all the
modified files.
There is no #include config.h left: they were all in use in at least
one _defconfig.
I think comparing all binaries produced by ./scripts/xtensa-build-all.sh
-r -a provides extensive enough coverage but note this was tested only
with the crosstool-ng toolchain described in the SOF documentation.
The obsolete[*] xt-xcc front-end is gcc-based and the newer xt-clang
front-end is (surprise) clang-based. clang (copies many gcc options and)
does support -imacros so I don't expect any issue with either xt-xcc or
xt-clang. In the worst case, I do not expect any compiler front end to
_silently_ discard any unknown command line flag nor to ignore a missing
or misnamed config.h file.
[*] https://github.com/zephyrproject-rtos/zephyr/issues/3165
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit rewrites functions responsible for large config configuration
from detect_test component and puts them in component.c file as
generic ones - as a result they can be used by other components.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Topology is modified to include another JSL+ product variant with
MX98360a AMP + ALC5682 Headset codec. Created a platform specific
for RT1015, included this and already existing MX98360a in
sof-jsl-rt5682.m4
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
The topology is cloned from sof-tgl-max98357a-rt5682.m4 with
changes on ssp config, iDisp and DMIC pipeline pcm number etc.
The dai_index matches the order defined in sof-rt5682.c machine driver.
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
This patch adds capture PCM with ASRC for capturing from SPDIF
input of WM8804 codec. This topology is used mainly for testing
of a bi-directional ASRC connected slave-DAI.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Each component driver should have assigned UUID value and trace
contecxt, to allow generic component creation routine usage.
It's espiecially important for trace context, because it's
accessed by pointer so dereferencing NULL pointer will lead to
segmentation fault.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
The stream parameters set in the pipeline were mismatched with
the DMIC hardware configuration, which resulted in failures.
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
Port commit a716056c4b ("tgl: use additional CHANNEL
define in rt711 + rts1308 tplg") to all tgl sdw platforms
Signed-off-by: Rander Wang <rander.wang@intel.com>
Frequency response measure script mls_freq_resp.m could fail due to
network or ssh execution delays. This patch increases the recording
time by 3 seconds to ensure that remote device playback via ssh for
the relevant parts is within the local capture window.
Also the start marker search is done for first 5 seconds of captured
test signal. The script exits cleanly if the start and end markers
were not found and the captured waveform is shown to help understand
the possible network delays caused issue.
The BSD-3-Clause text is updated to short version.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In new version of rimage software, headers are located in
rimage/src/include/rimage directory to make it easily accessible
from another source code without include path collision.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
It is a special --no_cse mode useful in case the cse part is
unparsable for any reason. Cse manifest parsing is skipped and
Adsp part is parsed only.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Running with -v option now gives more information about
the parsing progress which makes debug easier.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
CSS Manifest header must be created with file offset adjusted
by extended manifest size to loop through extensions correctly.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Strings are padded with zeroes in the binary input file,
so rstrip used after decode removes them, otherwise such
a string cuts the output if inserted as argument in the
middle.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Information about modules memory occupation is displayed
when memory layout of the target platform is known
(determined by the fw binary name).
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Additional parameters added:
no_modules - works like previous 'headers' option where
modules are excluded from output
no_headers - excludes cse manifest headers from output
and dumps info about the adsp modules only
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
There might be binaries where cse mft is not included.
And adsp mft begins at std offset 0x2000 from the optional
extended manifest.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Such an approach is more logical, user add flag to dump information
and specify what to dump just after it. Using separate argument
with file path and flag to dump is less natural. So after change
`./sof-logger -l file.ldc -d`
will be replaced with
`./sof-logger -d file.ldc`
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Before this patch output message was misaligned and one flag
description start from small letter:
sof-logger: -L Hide log location in source code
sof-logger: -f precision set timestamp precision
sof-logger: -d Dump ldc information
After change, it's fixed:
sof-logger: -L Hide log location in source code
sof-logger: -f precision Set timestamp precision
sof-logger: -d Dump ldc information
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Such a change is provoked by getting close to maximal line length
in line with getopt line call. Moving format string to separate
variable is more logical solution than splitting function arguments
on separate lines.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Name and UUID value of component should be aligned with their address.
Output before change:
ADDRESS UUID NAME
0x1FFFA000 <8b9d100c-6d78-418f-90a3-e0e805d0852b> host
0x1FFFA01C <8b9d100c-6d78-418f-90a3-e0e805d0852b> host
0x1FFFA03C <8b9d100c-6d78-418f-90a3-e0e805d0852b> host
and after:
ADDRESS UUID NAME
0x1FFFA000 <8b9d100c-6d78-418f-90a3-e0e805d0852b> host
0x1FFFA01C <f11818eb-e92e-4082-82a3-dc54c604ebb3> pipe-task
0x1FFFA03C <34dc0385-fc2f-4f7f-82d2-6cee444533e0> volume-task
0x1FFFA05C <b77e677e-5ff4-4188-af14-fba8bdbf8682> volume
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This patch replaces the default 0 dB gain with +20 dB gain in 16 kHz
DMIC pipelines in hda-generic based topologies. It is done to have
same capture sensitivity in both 16 kHz and 48 kHz capture pipelines.
The impacted topologies are:
sof-hda-generic-2ch.tplg
sof-hda-generic-4ch.tplg
sof-hda-generic-eq-2ch.tplg
sof-hda-generic-eq-4ch.tplg
sof-hda-generic-idisp-2ch.tplg
sof-hda-generic-idisp-4ch.tplg
Note: The 0 dB high-pass version is preferred after all the needed
development is available.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds script src_small_int32.m to generate the intermediate
size SRC coefficients set. The export functions are updated for
short BSD copyright and to output licence text and needed header
files inclusions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Zero functional change and 100% identical outputs.
Also add some comments.
Interestingly, -P$(nproc) is a tiny bit faster than -P0 on my
system. Thrashing?
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As seen in PR #2954, no one ever notices m4 warnings. As PR #2954 will
remove sof-tgl-rt711-i2s-rt1308-nohdmi.conf and the only m4 warning
currently, this is a great opportunity to upgrade m4 warnings to
errors.
Note neither Travis nor github have the concept of a "warning", they can
only report success or failure.
This fix can be considered part of the "green failures" family.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
No one seems to be using this topology or they would have seen the
error below that DMICs are required on this platform.
[ 8%] Generating sof-tgl-rt711-i2s-rt1308-nohdmi.conf
m4:tools/topology/sof/pipe-volume-capture-16khz.m4:54: bad expression
in eval (bad input): 2 * 2 * CHANNELS * 16
m4:tools/topology/sof/pipe-volume-capture-16khz.m4:57: bad expression
in eval (bad input): 2 * 2 * CHANNELS * 16
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This patch replaces the default EQ 0 dB gain with +20 dB gain in
DMIC pipelines in hda-generic based topologies. It fixes the issues with
too silent capture level.
The gain was changed to 0 dB in a recent change to let UCM set it.
However this change remains needed for a while since the UCM initial gain
patch and remaining development of ALSA/ASoC 4ch capture for devices with
more than two microphones will take longer time to become available.
The impacted topologies are:
sof-hda-generic-2ch.tplg
sof-hda-generic-4ch.tplg
sof-hda-generic-eq-2ch.tplg
sof-hda-generic-eq-4ch.tplg
sof-hda-generic-idisp-2ch.tplg
sof-hda-generic-idisp-4ch.tplg
Note: The 0 dB high-pass version is preferred after all the needed
development is available.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The UpExtreme provides access to link2 in 2 of the 3 modes. This is
useful to test rt5682 configurations.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This patch adds for EQ tests and presets switch development a
bundle with five presets: flat, loudness, bass-boost, band-pass,
and high-pass. The m4 file is used by including to topologies. The
text format file is for sof-ctl.
The added code to script example_iir_eq.m is included. The blob is
also useful for testing multi-part IPC for EQ component. The existing
examples were not large enough to exercise the feature.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Tool build will fail without git submodule init and update.
Add the submodlue support also in tool CMake file.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This patch is based on smart amplifier support on I2S platform and the
differences are pipeline layout and DAI config. On sdw platforms, the
pipeline layout is:
PCMX ----> smart_amp ----> ALH0xX02 (Speaker -max98373)
^
|
|
PCM(X+1) <---- demux <----- ALH0xX03 (Speaker -max98373)
Signed-off-by: randerwang <rander.wang@linux.intel.com>
Let's stop ignoring build and test failures. Start gradually with the
scripts involved in testbench, more files later.
Follow-up to to bug #2752 "host-testbench.sh ignores errors" and commit
ab421466af ("CI: Travis: enable host testbnech again") and
ab421466aff826~1
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This pipeline macro defined macros for IIR so the clear of
FIR related macros is not correct.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The FIR bytes control size is 4096 bytes. This topology contained the
old 304 bytes size that was the limit for single IPC configuration.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Some of the pipelines but not all contained for IIR the old 304
bytes (single IPC max size) control size. It can be set to 1024
bytes for all IIR instances.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
It make code dealing with entries simpler, and allow to create
UUID entries dictionary with constant access time to any entry.
As long as struct definition is fixed, then can passed as pointer
with correct type to function call, instead of void pointer.
UUID entries aren't storred in flash memory, so entry size is not
important.
Explicit add zero at the end of entity_name to trigger string overflow
warning for shortest incorrect string length.
Resolve problem with cutted UUID info in logger output.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Since both fw.h and manifest.h are being used in the main SOF
repo, and also the standalone rimage repo, to prevent them
getting out of sync, use the ones coming from the rimage repo
instead.
Also, git submodule update is being executed when cmake is
run so there is no need to update when building rimage.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Since rimage is now a standalone tool in a separate repo,
remove the rimage directory in preparation to import it
back as a submodule.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Looks the usuage of M/N divider with 12.288MHz bclk leading to noise,
change to use s24_le and 9.6MHz bclk, playback works fine on max98373
with it.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add 2 tlv kontrols to smart_amp playback pipeline, the one matched with
struct sof_smart_amp_config is for the component configuration, the
other one is for algorithm blob configuration.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add initial smart amplifier support to tgl + maxim98373 amplifier.
Todo: to refine the demux channel map to get the correct feedback and
capture them to user space.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This allows PCM card to support compressed data API. In order
to do this we need to set "compress" property to true. Thus,
the .conf topology file should look like this:
SectionPCM {
/* ... */
compress "true"
}
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This patch adds the missing error codes check to avoid the parsing
to continue after a possible file I/O fail.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch replaces the manually set error codes with errno that
is set to exact fail reason like ENOMEM etc. by these functions. The
missing return code checks for fseek() calls are added.
Include of header errno.h is added to topology.c. The order of
include statements is fixed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In some topologies there is a component tokens array after buffer
tokens array for buffer widget. Since the earlier code version was
able to handle only single array and did not skip the remaining it
caused the remaining topology parsing to go out of sync and fail.
This patch changes the vendor array parsing to be similar as for PCM
widget that already had capability to handle several arrays. The core
id is retrieved if present in topology and passed via IPC.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The main change in this patch is to allow process_test to use
frequency dependent masks for frequency response and THD+N. It
allows tests with pass/fail criteria for components like EQs
and DCblock. SRC test not really changed but the small changes
in passing test controls are updated there as well.
In EQs tests the process test can decode the theoretical response
from setup blob. The measured frequency response is compared to
that.
The test print and plot output look is improved for nicer reports.
The runtime plots opening is disabled for batch mode operation
but the plots now appear to test output directory in png format.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The criteria of overall -3 dB RMS attenuation was too tight
for sample EQ responses to pass. With new -6 dB criteria the
used EQ loudness responses do not trigger error.
The chirp test is only a quick generic component health check so this
is not critical. The other AES17 tests will catch minor characteristic
changes.
The other changes are cosmetic and improve result print and plot
output look.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The function getpid() is only available in Octave. Instead use
a random integer number as identification to avoid conflict with
possible several simultaneous simulations with temporary files.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The case where blob decoding is requested for single frequency,
e.g. 1 kHz the magnitude and group delay vectors did not have
size of one frequency. This patch fixes the issue.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch changes the response for both EQ types into loudness
shape (bass boost, mid attenuate, high boost) that is a useful
in validating EQs functionality. The previous flat response does
not exercise thoroughly the processing functions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
All trace entries are identified by uuids only now.
Previous TRACE_CLASS_ identification removed completely.
UUIDs are passed to the tracing subsystem inside a trace
context. Each trace context defines run-time log level.
The level is initialized to LOG_LEVEL_INFO (this may be
change per instance is needed) and may be re-configured
at run-time.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
With define for W_PCM_CAPTURE only need 5 arguments
W_PCM_CAPTURE(pcm, stream, periods_sink, periods_source, core)
Fix the wrong parameter in pipe-kfbm-capture.m4
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This tool must be able to read extended manifest content
and move to next manifest in proper way.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
in bxt.m4 and sof-hda-generic.m4, they both define the
PIPE_VOLUME_PLAYBACK, this will cause wrong tplg result.
Refine the them in sof-hda-generic.m4 to PIPE_HEADSET_PLAYBACK
to fix the issue.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add an example platform usage for smart amplifier feature, where it will
use nocodec SSP LBM(Looback Mode) for data verification.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This is the unified implementation for smart amplifier feature,
including both playback and capture pipelines.
The upper layer platform topology should include this unified
implementation and define specific macros to use it.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add the playback pipeline for smart amplifier use case, it will be used
with the reference capture pipeline together in the upper layer .m4
file.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This is for smart amplifier use case only, to get the amplifier
reference samples captured to the host user space.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add the initial version of smart_amp component for smart amplifier
widget, which will be use in the smart amplifier use case.
Todo: add blob kcontrol for it.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add macro DEC2HEX marcro to convert 2-digit decimal number to
hexadecimal one that prefixed with '0x'.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
In order to allow record s16_le/s24_le/s32_le format this
commit changes DAI component's and DMIC's format to s32_le
on PCM99.
In case recording s16_le/s24_le DAI component makes pcm
conversion from s16_le/s24_le to s32_le.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Add KWD pipelines with vol-kfpm pipe using intel-generic-dmic-kwd template.
DMIC01 on PCM 5 is renamed to DMIC48kHz, 16K DMIC KWD added on PCM 6.
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
This patch adds an Octave test script process_test.m to audio processing
components like FIR and IIR EQ.
Parts of src_test.m are moved to common functions to ease printing of
test results matrix.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds user friendly function eq_blob_plot(file) to
plot the IIR or FIR equalizer response that will be applied for
each channel.
The IIR and FIR decoders are modified to better support the higher
level script.
The copyright texts in impacted scripts are are updated to short
BSD-3-Clause style.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch reduces amount of printed text to screen when Matlab/Octave
EQ tool needs configuration blob header information. The output is
redicted to /dev/null.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reuse sof-glk-da7219-kwd by included cml.m4
for sof-cml-da7219-max98357a topology with KWD pipeline enabling
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
rrealloc function is no longer in use, so it is better
to remove it. Unused code is no longer tested so its
quality is unknown.
The current implementation is simple but expensive since
extra calls to malloc/free requires time and risky since
at some point requires double allocation of potentially
large object. Please consider re-implementation instead
of restoring.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Changes schedule operations to return error in case
chosen scheduler is not found or scheduler doesn't
support mandatory operation.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit adds CHANNELS define in sof-tgl-rt711-i2s-rt1308.m4
topology in order to properly set pipeline pcm channels and dmic
configuration (STEREO_PDM0 or FOUR_CH_PDM0_PDM1 mode).
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Previous memcpy of bytes is unsafe if new object is larger
then old one.
Typically realloc retrieves the old size internally and does
not need this information passed as argument but sof heap
implementation does not store the exact size of the allocated
memory buffer.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Previous memcpy of bytes is unsafe if new object is larger
then old one (which is probably most popular realloc use).
Typically realloc retrieves the old size internally and does
not need this information passed as argument but sof heap
implementation does not store the exact size of the allocated
memory buffer.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
With this commit:
./scripts/build-tools.sh -t -f | wc -l
525
VERBOSE=anything ./scripts/build-tools.sh -t -f | wc -l
137030
This a followup to commit aa6c0f2ad1 ("topology: cmake: silence super
chatty alsatplg unless VERBOSE=1")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This places all SectionWidget.TONE* topology widgets, created by
the W_TONE() macro on the same core, on which the respective pipeline
is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.MUXDEMUX* topology widgets, created by
the W_MUXDEMUX() macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.MIXER* topology widgets, created by
the W_MIXER() macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.KPBM* topology widgets, created by
the W_KPBM() macro on the same core, on which the respective pipeline
is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.DETECT* topology widgets, created by
the W_DETECT() macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.DCBLOCK* topology widgets, created by
the W_DCBLOCK() macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.SELECTOR* topology widgets, created by
the W_SELECTOR() macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.EQFIR* topology widgets, created by
the W_EQ_FIR() macro on the same core, on which the respective pipeline
is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.<DAI type><DAI index>.IN topology
widgets, created by the W_DAI_IN() macro on the same core, on which
the respective pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.EQIIR* topology widgets, created by
the W_EQ_IIR() macro on the same core, on which the respective pipeline
is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.PCM*C topology widgets, created by
the W_PCM_CAPTURE macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.<DAI type><DAI index>.OUT topology
widgets, created by the W_DAI_OUT() macro on the same core, on which
the respective pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This adds an optional "core" parameter to the W_BUFFER() macro, which
then allows buffers to be placed on the same core as the rest of the
pipeline. So far we only modify pipe-volume-playback.m4 to do that,
other pipelines can be modified later as needed.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.PGA* topology widgets, created by
the W_PGA() macro on the same core, on which the respective pipeline
is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This places all SectionWidget.PCM*P topology widgets, created by
the W_PCM_PLAYBACK macro on the same core, on which the respective
pipeline is scheduled.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
We need a way to explicitly place components on specific DSP cores.
Add a SOF_TKN_COMP_CORE_ID word token for that.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This reverts and replaces commit 2765b22049 ("probe-app: assume probe
packet aligned"). That commit applied a __builtin_assume_aligned(4) to
every pointer assignment of the following type:
uint32_t *ptr = struct probe_data_packet *packet;
Instead of using __builtin_assume_aligned(4) every time a
probe_data_packet is used like this, the probe_data_packet type
definition is now 32 bits aligned in only one place thanks to (packed,
aligned(4)).
struct probe_data_packet is made entirely of uint32_t members. It
is (packed) to avoid a 64 bits compiler hypothetically padding and
aligning these 32 bits members to 64 bits. However, (packed) alone is
roughly equivalent to aligned(1) (neither is part of the C standard)
which causes some gcc versions to warn about this:
sof/tools/probes/probes_main.c:228:5: error: converting a packed
‘struct probe_data_packet’ pointer (alignment 1) to a ‘uint32_t’
{aka ‘unsigned int’} pointer (alignment 4) may result in an
unaligned pointer value [-Werror=address-of-packed-member]
228 | w_ptr = (uint32_t *)packet;
| ^~~~~
Unlike "assuming" with __builtin_assume_aligned, (packed, aligned(4))
makes sure probe_data_packet are _actually_ 4 bytes aligned. As a
demontration, it stops the following _Static_assert() from failing:
modified src/probe/probe.c
@ -64,9 +64,12 @ struct probe_pdata {
struct probe_dma_ext ext_dma;
struct probe_dma_ext inject_dma[CONFIG_PROBE_DMA_MAX];
struct probe_point probe_points[CONFIG_PROBE_POINTS_MAX];
+ uint8_t dummy;
struct probe_data_packet header; // aligned(4)?
struct task dmap_work;
};
+_Static_assert(offsetof(struct probe_pdata, header) % 4 == 0 ,
+ "probe_data_packet is not 4 aligned");
In addition to gcc version 8 and 9, I tested and confirmed with
_Static_assert and pahole that the same attributes behave the same with
clang 9.0.1-2.fc31.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
For headset playback or capture, default pipe is volume. If The high pass
filter is required to prevent HDA codec headset glitches, it can be set by
HSMICPROC=eq-iir-volume. It use use 40 Hz high pass filter with +0 db
boost. If there is DMIC, this set default pipe as eq-iir, which use
the same 40 Hz high-pass filter too. For DMIC16K, 40 Hz high-pass for 16khz
version filter is used.
Default coefficient for FIR/IIR is changed fr m coef flat to coef pass.
Pass configuration has the advantage of low system load.
eq_fir_coef_flat.m4 to eq_fir_coef_pass.m4
eq_iir_coef_flat.m4 to eq_iir_coef_pass.m4
Below pipe files are renamed for naming convention,
pipe-eq-volume-playback.m4 -> pipe-eq-iir-eq-fir-volume-playback.m4
pipe-eq-capture-16khz.m4 -> pipe-eq-iir-volume-capture-16khz.m4
pipe-eq-capture.m4 -> pipe-eq-iir-volume-capture.m4
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
The patch shows a proposal how to propagate pipeline filter
coefficients data definition at topology top level. It is an
useful way to avoid to create different new pipeline macros for
different filter. Define filter coefficients data with macro
DEF_EQFIR_PRIV and DEF_EQFIR_COEF, which will be replaced
unique name by adding PIPELINE number. For IIR filter, equivalent macro
is DEF_EQIIR_PRIV and DEF_EQIIR_COEF.
Makefile define each pipeline processing HSEARPROC, HSMICRPOC, SPKPROC,
DMICPROC etc. Each variable should support default value to minimize
current topologies. When new filter blob is required, define
PIPELINE_FILTERx in makefile. This method provides more flexible way
to support variable number of filters in the pipeline.
The other clean up for topology macros include definions for unique
volume tokens and unique filter coefficient definitions.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Add macro for binary blob generation for muxdemux. With this macro the
stream routing matrix will be easier to visualize and manipulate.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Bit and byte manipulation macros are needed for building binary blobs,
so add them. Add also macro to generate sof_abi_version.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
This updates the minimal host buffer size to the
minimum value which enables sefe draining for all
pcm parameters.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>