Commit Graph

4813 Commits

Author SHA1 Message Date
Janusz Jankowski d7ad0c134d tools: sof_ri_info: make executable
Script is meant to be used as standalone tool,
so it should have executable file attribute.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-04-02 20:51:37 +01:00
Slawomir Blauciak d00c8d599b kpb: perform additional pointer sanity checks
Issues detected by code scans.

Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2020-04-02 18:05:03 +02:00
Marcin Maka 8d9c762de2 agent: trace drift message as warning, not error
Non-critical drifts should be traced as warnings (WARN,
yellow color), not errors since the system is expected
to recover in this scenario.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-04-02 14:39:19 +01:00
Pan Xiuli 06401fe589 topology: add KWD comp into sof-tgl-max98373-rt5682
Add KWD pipelines with vol-kfpm pipe using intel-generic-dmic-kwd tmplate.
48K DMIC still uses PCM 99
Add 16K DMIC KWD on PCM 100

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-04-02 11:45:35 +02:00
Pan Xiuli 4d1cbd32c7 topology: add hda generic kwd pipeline
Add KWD pipeline with kfpm only for HDA generic topology.
DMIC 48K have PCM 6
DMIC 16K have PCM 7

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-04-02 11:45:35 +02:00
Pan Xiuli 8454f7a1b7 topology: intel: add generic dmic key word dection
Add generic dmic kwd template.
Need to define flowing variable to make it work:
CHANNELS: channel for the DMIC

KFBM_TYPE: kfpm or vol-kfpm

DMIC_PCM_48K_ID: PCM ID for 48K DMIC
DMIC_PIPELINE_48k_ID: pipeline ID for 48K DMIC
DMIC_DAI_LINK_48K_ID: dai link ID in machine dirver for
48K DMIC

DMIC_PCM_16k_ID: PCM ID for KWD 16K DMIC
DMIC_PIPELINE_16k_ID: pipeline ID for 16K DMIC
DMIC_PIPELINE_KWD_ID: pipeline ID for KWD
DMIC_DAI_LINK_16k_ID: dai link ID in machine driver
for 16K DMIC

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-04-02 11:45:35 +02:00
Pan Xiuli c5b4421c99 topology: add pipe-vol-kfbm-capture to have vol before kfbm
Add vol comp before kfbm comp in pipe-vol-kfbm-capture.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-04-02 11:45:35 +02:00
Pan Xiuli 6c83df8186 topology: fix ID typo in kfbm pipeline
The PCM ID should use PCM_ID instead for PIPELINE_ID

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-04-02 11:45:35 +02:00
Artur Kloniecki 40ee1a0e85 topology: buffer: Add flags field to struct sof_ipc_buffer.
2 flags have been added for use during buffer instantiation:
SOF_BUF_OVERRUN_PERMITTED and SOF_BUF_UNDERRUN_PERMITTED,
along with struct sof_ipc_buffer member fields flags and reserved.
Flags field is supposed to hold the above-mentioned flags to allow
some control over XRUN behaviour, i.e. prevent XRUN on buffers which
are allowed to under/overrun by design.
Also added reserved field to the structure in case it comes in handy
some time in the future.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-04-02 10:29:46 +01:00
Artur Kloniecki 23ae5d824a muxdemux: Rename unused API fields to '_deprecated'.
After the cleanup few elements of the API are no longer used/accessed.
This allows for ABI simplification in the future if we so decide.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-04-02 10:12:28 +01:00
Artur Kloniecki e20cd2811e muxdemux: Remove obsolete references to config->num_channels.
Few artifacts of the past were left after dependency removal. This patch
is there to address that.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-04-02 10:12:28 +01:00
Artur Kloniecki f1aeaa5f93 muxdemux: Remove obsolete references to comp_dev within process functions.
After optimizations done in 2 previous commits, reference to base
component is no longer necessary inside provessing functions, which
allows for simplification of the internal interface.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-04-02 10:12:28 +01:00
Artur Kloniecki a0c9aebe05 muxdemux: Remove dependency on config->num_channels.
In the past, when parameters were held by components, it was impossible
to manage input/output streams with different channels' count.
Now, after params were moved to buffers, we can properly handle such
scenario, which in turn allows for more flexible approach in terms of
runtime configurability.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-04-02 10:12:28 +01:00
Artur Kloniecki 8d76846ba8 muxdemux: Remove dependency on config->frame_format.
(de)mux_get_processing_function() call depended on config->frame_format
being properly configured, which was obsolete from the very beginning.
This patch removed that dependency in favor of reading frame_fmt from
downstream buffer during the call, rendering that field completely
obsolete.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-04-02 10:12:28 +01:00
Marcin Maka 578e21decd audio-buffer: use parentheses around parameters in rw-frag macros
This change is required before dereference is applied,
to make the macros callable with arguments that have address-of
operator, e.g.

&source->stream

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-04-02 10:07:36 +01:00
Shreeya Patel db1bf13597 scripts: build-tools.sh: Use getopts, breakdown script to functions
Breakdown script to functions, use local variables, and a main function.

Use getopts to parse the arguments instead of manual parsing to leave no
room for errors, bugs, and inconsistent conventions introduced by custom
implementation.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
2020-04-02 10:06:33 +01:00
Bard Liao 5452ac5695 Topology: Add ALH config
We need to config ALH rate and channels.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-04-01 16:29:18 +01:00
Fred Oh b707be3607 topology: glk: add eq capture for DMIC
glk da7119 bobba platform has DMIC already installed. It is good platform
to test DMIC with and without EQ.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-04-01 14:13:14 +01:00
Seppo Ingalsuo 32f3b31345 Tools: Tune: Cleanup for example speaker EQ script
This patch updates the generated file names and locations. The
private data names for topology are changed to DEF_EQIIR_PRIV
and DEF_EQFIR_PRIV to work with updated private date naming scheme.

The copyright text is updated to short BSD-3-Clause text version.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo 1d63f8028e Tools: Topology: Add new example FIR EQ coefficient sets
This patch adds FIR coefficients for loudness effect, mid-boost, and
pass-through. They are useful when testing FIR pipelines.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo 2831f463db Tools: Tune: Clean and improve example FIR EQ generator script
This patch cleans the FIR examples generation with more consistent
directories output and file names. The EQ private data name is
renamed for a more consistent scheme into DEF_EQFIR_PRIV for all
generated coefficient data files.

The copyright text is updated to new shorter BSD-3-Clause version.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo 97b03853fc Tools: Topology: Fix IIR high-pass coefficient blobs with wrong gain
This patch fixes the high-pass coefficients those produce 0 dB gain
instead of the intended +20 dB. Fortunately none of these have
been used in topology builds.

The 50 Hz +20 dB coefficient blobs those are used in some DMIC
capture pipelines did not have this issue due to being generated
before these and not modified when these were introduced.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo 895abe605a Tools: Topology: Add IIR example coefficients
This patch adds IIR responses band-pass, bass-boost, loudness, and
pass-through for inclusion to topology.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo b7d7d9dc62 Tools: Tune: Cleanup of example IIR responses generator script
This patch makes the script more consistent with file names
and paths lets the script to output more useful example IIR
responses into m4 directory for usage with topologies and
testing.

The not consistent naming of IIR private data is aligned. The
label DEF_EQIIR_PRIV is used always that should be macro replaced
by pipeline specific name prior to including them into topology to
enable several EQ instances to be set up with different filter
coefficients.

The copyright text for updated files is updated to short BSD-3-Clause
version.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo c186cbed97 Tools: Tune: Fix wrong gain in IIR high-pass responses generator
This patch fixes the issue in script example_iir_eq.m with gain
parameter for function hp_iir_eq(). The last parameter was hard
coded to 0 that caused all 20 dB labeled topologies to to have in
reality 0 dB gain.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-04-01 13:55:51 +01:00
Pan Xiuli beea8e56fb ipc: cc_version: use fixed length for CC_DESC
There is a bug in the Cadence XCC compiler that give us different
linkage section sizes for flex length struct sof_ipc_ext_data in
ELF file compared to GCC version. And there are appending struct
in the same ELF section, this will bring wrong offset for those
struct binary in ELF file.

Example:
When the CC_DESC is " RG-2017.8-linux", we should have struct
length for 0x50 in header size, but the binary length in ELF file
is 0x4c. When the CC_DESC is " RG-2017.8-win", size are both 0x4c

All existing compiler description has length less than
32 bytes. So use a fixed length 32 in this structure.

ABI version changes to 3.15.0

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-04-01 11:47:37 +01:00
Pan Xiuli 75ba94b1e3 ipc: cc_version: change type char to uint8_t
Replace char with uint8_t to have fixed lenght for string.
char has minimum 8 bits length.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-04-01 11:47:37 +01:00
Simran Singhal 1e39ceec78 alloc: Simplify function return logic
Simplify function returns by merging assignment and return into
one command line.

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
2020-03-31 15:11:45 +01:00
Shreeya Patel 79b39ccc9b gen-doc.sh: Use getopts for parsing arguments
Use getopts to parse the arguments instead of manual parsing to leave no
room for errors, bugs, and inconsistent conventions introduced by custom
implementation.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
2020-03-31 15:10:34 +01:00
Sam Muhammed 1213bc2450 src: Remove unneeded ret variable
Return ret; is not useful if it always returns 0.
return immediately instead and remove the ret variable.

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
2020-03-31 15:01:14 +01:00
Sam Muhammed 288b8f3ade test: cmocka: Use ARRAY_SIZE
Instead of computing array size, use the ARRAY_SIZE
macro defined in <sof/common.h>.

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
2020-03-31 15:01:14 +01:00
Marc Herbert aa6c0f2ad1 topology: cmake: silence super chatty alsatplg unless VERBOSE=1
Successfully tested with both Make and Ninja on Linux.

Non-portable but approved by @jajanusz in former PR #2626

With this commit:

$                  make -C tools/build_tools/ | wc -l
    770

$ VERBOSE=anything make -C tools/build_tools/ | wc -l
  10387

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-03-30 14:59:51 +01:00
Marc Herbert 8dbbbf0329 test: fix mixer_test.c:comp_register() 'uninitialized err' -Werror
Fixes:

  error: 'err' may be used uninitialized in this function
                           [-Werror=maybe-uninitialized]
  if (err)
     ^

As I found nothing in the entire code base checking the return value of
comp_register() (the real function seems to always succeed), I also
simplify the main path and pass through the value returned by
memcpy_s().

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-03-30 14:56:26 +01:00
Curtis Malainey 4d13fdf43e Add CODEOWNERS for DCBlocker
Add Google owners as owners of imported code

Signed-off-by: Curtis Malainey <curtis@malainey.com>
2020-03-30 14:48:52 +01:00
Karol Trzcinski d1b02d4ec8 logger: Make CC_DESC string length indivisible by four
When variable length array, filled with string will be
placed in sucha manner that null terminator address will
be divisible by four, then it will be lost in output
binary file. It leads to troubles during scanning content
of such a section. Such a problem occur in firmware
and produce logger and FW debug ABI mismatch and it's why
logger output is broken.
After change length of XCC_TOOLS_VERSION to be none of
number four multiplication problem with logger disappear.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-30 14:44:52 +01:00
Yong Zhi 1ce07dcfb2 topology: kwd: remove volume from pipeline description
Remove volume to match updated pipeline.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2020-03-29 19:56:54 +01:00
Yong Zhi adc7b1a627 pipeline: remove unneeded function declarations
Remove unneeded function prototypes in the header file.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2020-03-29 19:56:54 +01:00
Seppo Ingalsuo 78a8ec53fd SRC: Fail params() if sink stream rate is zero
This patch prevents a firmware crash due to divide by zero. It can
happen with DAI types those do not return actual values in pipeline
walk with e.g. hda_get_hw_params().

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-29 13:26:14 +02:00
Seppo Ingalsuo 15f1559c93 ASRC: Fail params() if sink stream rate is zero
This patch prevents a firmware crash due to divide by zero. It can
happen with DAI types those do not return actual values in pipeline
walk with e.g. hda_get_hw_params().

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-29 13:26:14 +02:00
Marcin Maka 392b784910 audio-stream: dox: rephrase audio stream description
Relevant aspects of the audio stream highlighted in the
structure documentation at the beginning in order to
provide more complete introduction on the audio stream
use.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-28 13:04:55 +01:00
Marcin Maka eee6a252a5 audio-stream: dox: add full api documentation
Audio stream is an important piece used by components
therefore full documentation is required by component
developers to operate on source and sink buffers
attached ot their components.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-28 13:04:55 +01:00
Adrian Bonislawski 73934f39c8 probe: safe check for heavy size configurations
Probe data buffer is big enough for most use cases but
not sufficient in rare situations with many probe points
and heave size configurations like 48000Hz32b32b8ch
In such cases this patch will check remaining buffer size
and trigger additional probe_task run if needed.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-03-28 12:07:57 +01:00
Adrian Bonislawski 57022fa5b9 probe: add check for invalid purpose
This will allow to validate probe point purpose

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-03-28 12:07:57 +01:00
Adrian Bonislawski 6aef5b9134 probe: show correct dma in probe point info
This patch will ignore provided stream tag for extraction probe point.
It is used only for checking probe point info by the user and now for
all extraction points it will show the same and valid stream tag.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-03-28 12:07:57 +01:00
Janusz Jankowski e5a910d21b xtensa: cmake: use xt-ranlib
CMake should use ranlib that comes with toolchain.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-03-28 12:07:33 +01:00
Sebastiano Carlucci 521895e3a0 sof: dcblock: Fix unaligned pointer value issue
gcc-9 shows the following issue:
error: taking address of packed member of ‘struct sof_abi_hdr’ may
result in an unaligned pointer value [-Werror=address-of-packed-member]
   225 |   request = (int32_t *)cdata->data->data;
       |                        ^~~~~

This commit fixes the issue. The warning was introduced in GCC-9, and
was therefore not raised by previous compiler versions.

Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
2020-03-28 12:03:23 +01:00
Tomasz Lauda de0d11c876 idc: wait for core to power up
Implements new IDC sending mode dedicated to powering up
the cores. Master core should wait until slave core reports
that is ready for further operations. Without such confirmation
there is a race possibility, where next IPC should be processed
by slave core, but it's not yet powered up.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-27 19:31:10 +01:00
Tomasz Lauda 978abac46e idc: wait for message receival using registers
Changes method of waiting for blocking IDC messages to
use appropriate IDC registers. This way we no longer
need additional boolean status variables and also
we don't need to enable IDC DONE interrupts.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-27 19:31:10 +01:00
Tomasz Lauda 3073aa5fc4 idc: extract waiting function
Extracts procedure for waiting in blocking mode for slave
core to receive the message.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-27 19:31:10 +01:00
Tomasz Lauda 85600db50f cpu: don't block interrupts on core power up
There is no need for blocking all the interrupts,
when powering up slave core. Only one path of execution
exists to do that anyway.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-27 19:31:10 +01:00