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>
Usually this error has no run-time effect, so this fix is mostly
theoretical.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
System agent as a debug feature has very strict timing verification,
if the timing is not met it will result in a panic.
Such drastic measures are not suitable for release builds,
as a single scheduling delay has the potential to render the DSP FW
completely dead until reboot, due to lack of a FW recovery mechanism.
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
The 80 characters split lines were hard to read. This change
improves readability error codes enums.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes the issue where impulse response update can
randomly corrupt stack in testbench environment. The error seen
in freeing cd->asrc_obj was free(): invalid next size (normal).
The violation was also confirmed with valgrind with error
Invalid write of size 4.
The order of impulse response storage and channel buffers are swapped
to simplify the pointer initialize calculations. The default
sizes for them are added as macro definitions into asrc_farrow.h.
Checks for used sizes are added to buffer and filter initialize
functions. The clear of buffer is done with memset instead of for loop.
Fixes: 4c995d0375
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds logic for the platform_panic() function, called in case
of a DSP oops.
This is important because it add a panic code in the debug box so the
application processor can understand why the oops happened. Also in
notifies the application processor about the oops generating an interrupt.
Signed-off-by: Iulian Olaru <iulianolaru249@yahoo.com>
Build ALSA locally under /home/sof/work and don't delete it. This will
allow ALSA development within the container.
Change the folder owner to sof to avoid permission issue.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@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 get SHARED_DATA we should not use cache_to_uncache
macro directly, but platform_shared_get() function. Otherwise,
it can lead to situation, in which in one section there will
be cached and uncached variables not aligned to cache line
(as a result cache invalidation and writebacks could lead to
unexpected memory overwrite).
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit allows propagating pipeline reset to adjacent pipelines
assuming that they have the same schedule component.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This patch fixes the regression that happened in a previous fix
for stress test gitches issue. Since the passed 7th argument
(write_index) was set to output frames limit the ASRC copy()
terminated too early when converting from higher to lower sample
rate. It has caused issues at least in sof-diagnostic-driver based
validation for capture direction.
Fixes: f63adb42d9
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.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>
Update the IPC protocol documentation to include the extended data.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Switch to use UUID for component creation, if it is provided from the
host, otherwise, use component type for the component driver matching.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Use the 32bit reserved member of the struct sof_ipc_comp as the extended
data length, this will help to minimize the ABI change for adding new
extended data to the struct sof_ipc_comp, usually only minor ABI version
bump needed for every update with this new solution.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Initial the definition of struct sof_ipc_comp_new_ext, which will be
used to align the extended data between FW and the SW, add UUID array to
it.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.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>
Value for 'num_clients' has to be set, otherwise it may
have undefined value in later ifs.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.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 function should wait to transmission last element from FIFO,
what is indicated in SSSR and SSCR3 registers.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.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>