Commit Graph

998 Commits

Author SHA1 Message Date
Ranjani Sridharan 426d7816e2 topology: nocodec: switch to dynamic pipelines
Switch the APL/CNL/ICL/JSL/TGL nocodec topologies to use dynamic
pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-05-13 11:58:06 +01:00
Ranjani Sridharan b371f93c51 topology: hda: re-enable dynamic pipelines
Re-enable dynamic pipelines for HDA topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-05-13 11:58:06 +01:00
Pin-chih Lin 1f68cabafa topology: add drc-eq-volume-demux playback pipeline and default coefs
Adds pipe-drc-eq-volume-demux-playback.m4 for locating Multiband DRC and EQ
IIR on the path of the internal speaker.

This pipeline will be used by Eldrid first for Audio DRC/EQ offloading
purpose.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-05-12 13:44:28 +01:00
fy.tsuo 7fa9befd57 topology: sof-tgl-max98373-rt5682: added igonr.
Added sof-tgl-max98373-rt5682-igonr.tplg.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-12 13:01:15 +01:00
Pierre-Louis Bossart d430091259 topology: add missing configuration for byt-max99080
Somehow we only support this configuration for BYT, but there are
Baytrail devices using the same codec.

BugLink: https://github.com/thesofproject/sof/issues/4160
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-05-12 09:23:22 +01:00
Marc Herbert 96f6a7b385 logger: add error messages when failing in the middle of fetch_entry()
Failing _in the middle of one log entry_ should really not be treated as
a normal event. The purpose of a logging tool is to find issues, not
hide them.

Don't abort on EOF because of valid use cases like device suspend but
don't do it quietly.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert e6f0f8b60f logger: add or fix error handling in read_entry_from_ldc_file()
Add a few missing log_err().

Remove calls to ferror() because:
- its return value is a meaningless "non-zero" boolean,
- we don't really care whether the dictionary file is in an error state
  or not; an unexpected end of dictionary file is just as bad.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert fb02c56649 logger: don't sound like the DMA trace can wrap
In general the DMA trace runs until interrupted but there are cases
where it can exit "normally": when reading from a file or stdin, when
some error happens,....

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert 1e64b7e83c logger: fix relative timestamp when re-opening the trace after EOF
Need to reset the (now global) entry number.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Liam Girdwood 80666b7cc7 ipc: component: abstract the component creation API
Make sure component creation is not tightly coupled to a particular IPC
version. This is mostly a mechanical change of structures being passed
to the comp creation APIs away from IPC specific to general structures.

Highlevel changes

1) Pass a common component data object and a component
specific data object during create().

2) Mark the component IPC derived data as "ipc_config" within the
component device to help developers track the data source origin.

3) Pass component specific data during creation so that componets
can allocate and copy to thier private data.

4) Comp_dev no longer has component specific data appended to it.
Instead we can store all in the comp private data (and hence use the
compiler to access it rather than by developer access methods).

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-05-10 15:36:07 +01:00
Keyon Jie 47d223c09f topology: sof-tgl-nocodec-ci: change to run smart_amp on core 1
Change to run smart_amp pipelines on DSP core 1, this will help reduce
the core 0 usage and add multi-core to the CI coverage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-08 22:43:58 +08:00
Ross Chisholm f706843697 topology: adding IIR component on max98373-rt5682 topology
Builds a configuration of the max98373-rt5682 topology with AMP_SSP=2
defined and includes the IIR component

Signed-off-by: Ross Chisholm <ross.chisholm@xperi.com>
2021-05-06 17:21:57 +01:00
Libin Yang 7851493534 topology: add sof-adl-rt711 topologies
Add sof-adl-rt711.tplg and sof-adl-rt711-4ch.tplg.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2021-05-06 16:59:52 +01:00
Libin Yang 37c485df36 topology: sof-tgl-rt711-rt1308: add EXT_AMP option
Some devices are using rt711 only, without amplifiers.
Add the "EXT_AMP" option in sof-tgl-rt711-rt1308.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2021-05-06 16:59:52 +01:00
Daniel Baluta 8397e064da topology: Allow overriding DAI_PERIODS
This will allow topologies to use different size dai periods.

Fixes: 1280987999 ("topology: use DAI_PERIODS in calculation of DAI buffer size")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-05-06 14:44:20 +01:00
Jaska Uimonen b1775f27ea topology: define a channel map macro for all topologies
Previously we had a channel map macro only in general dmic topology. As
the pipelines used with dmic are also used with other topologies the
dmic specific macro does not work anymore. Thus define generic macro in
pipeline.m4 that defaults to stereo channel map. This can be overridden
in topologies as shown in general dmic.

fixes: #4136

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-05-06 14:34:23 +01:00
Ranjani Sridharan f2bd51a138 Revert "topology: Switch HDA topologies to use dynamic pipelines"
This reverts commit 2c69afc5fd.
The dynamic pipeline feature is broken with PA enabled. Revert
this change until the issue is sorted.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-05-06 14:31:50 +01:00
fy.tsuo 37d97d4357 audio: igo_nr: Added intelliGo noise reduction wrapper code and topology
This commit consists of files for adding IGO_NR component in arbitrary
topology. The proprietary static library shall be released by intelliGo
via private channel upon request.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-05 12:48:47 +01:00
fy.tsuo 776977852a topology: Added IGO_NR in sof-tgl-max98373-rt5682 topology.
This commit added IGO_NR component into sof-tgl-max98373-rt5682.m4
as DMIC capture PCM99 pipeline.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-05 12:48:47 +01:00
Seppo Ingalsuo b12ce50712 Topology: Add build of topology to run ASRC in cml-rt1011-rt5682
This patch adds development topology to run ASRC playback and
capture via SSP port to headset plug. We don't have many topologies
to test ASRC in current development devices so this is useful

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-05-04 20:04:13 +01:00
Brent Lu 1ccc16c27d topology: sof-glk-da7219: add support for cs42l42
Add support for cs42l42 running on GLK boards. We add a 10 ms BCLK
delay to the SSP_CONFIG_DATA of SSP2 since the codec PLL is locking on
BCLK. Without the delay, there could be noise on TX path.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-05-03 22:17:13 +01:00
Curtis Malainey 758e7be0c9 oss-fuzz: fix build
looks like with the new ipc mechanisms we changed the function signature
and moved casting the message from platform code to ipc code.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-30 11:50:16 +01:00
Marc Herbert 7dbcd7ee33 logger: add ktime and date in header
Every log file should have a date.

ktime can be related to the TIMESTAMP column. It is especially useful to
spot logs delayed or stuck.

Some logs use ktime while others use a date and it can be sometimes
difficult to connect them with one another. This header can help.

Before:

TIMESTAMP (us) DELTA C# COMPONENT CONTENT

[  5120116529] (  0) c0 dma-trace ERROR FW ABI 0x3012001 ...

After:

TIMESTAMP (us) DELTA C# COMPONENT \
                   CONTENT ktime=5132.663s @ 2021-04-27 14:36:09 -0700 PDT

[  5120116529] (  0) c0 dma-trace ERROR FW ABI 0x3012001 ...

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-29 12:09:10 +01:00
Daniel Baluta 5ca0e9bba3 topology: Use generic name for 8qxp/8qm
i.MX8QXP / i.MX8QM have the same configuration w.r.t topology.
But since we firstly added support for 8qxp all the names use
8qxp and then for 8qm we just borrow the files but using the 8qxp
naming.

This sometimes might cause confusion. So, we group under the
umbrella of imx8 naming both i.mx8qxp and i.mx8qm.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-04-28 20:11:19 +01:00
Marc Herbert 158089ceb6 Add and fix many logger and dma-related comments. No code change.
Learned the hard way.  Will help refactoring or duplicated
"reverse-engineering" effort.

Zero code change, pure comments: no functional change.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-28 15:52:44 +01:00
Marc Herbert d6f6a456c1 logger: fix column and header alignments
Increase default width from 10 to 12 to stop common misalignment,
especially in relative mode.

New timestamp_width() function to avoid duplication and
divergence.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-27 12:17:53 +01:00
Marc Herbert 37e87e54b1 logger: partial rewording of one log_err() and usage message
Cosmetic change that does not fit in any other commit.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-27 12:17:53 +01:00
Marc Herbert 1a79de1c16 logger: warn user about wrapped logs and skipped garbage
Don't sweep logging issues under the rug.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-23 13:32:17 +01:00
Marc Herbert d54a9281f8 logger: print a separator when the timestamp goes back in time
This makes the display of the mailbox ring buffer log much less
confusing. It should not happen with the DMA trace but will behave the
same in case something goes wrong.

Before this commit the only clue that wrapping had happened was a NaN in
the delta column (instead of the negative value).

The "other?" is because the start of the mailbox is sometimes corrupted,
or the timestamp goes sometimes back at boot for no obvious reason. In
other words this new separator is useful to highlight bugs too.

Absolute mode -e 0 with this commit:

    TIMESTAMP         DELTA C# COMPONENT          LOCATION

[22598174808] (        11) c0 ipc                  src/ipc/....
[22598174824] (        15) c0 ipc                  src/ipc/....
[22598443257] (    268433) c0 dma-trace             src/trace/....
[22598443271] (        14) c0 dma-trace             src/trace/....
[22598443286] (        14) c0 dma-trace             src/trace/....
[22598943257] (    499971) c0 dma-trace             src/trace/....

		 --- negative DELTA: wrap, IPC_TRACE, other? ---

[22430943257] (         0) c0 dma-trace             src/trace/....
[22530943257] ( 100000000) c0 dma-trace             src/trace/....
[22542943257] (  12000000) c0 dma-trace             src/trace/....
[22542943271] (        14) c0 dma-trace             src/trace/....
[22542943285] (        14) c0 dma-trace             src/trace/....

Relative mode -e 1 with this commit:

    TIMESTAMP         DELTA C# COMPONENT          LOCATION

[  3080783.6] (       11.4) c0 ipc                  src/ipc/....
[  3080799.1] (       15.5) c0 ipc                  src/ipc/....
[  3349232.5] (   268433.4) c0 dma-trace             src/trace/....
[  3349246.8] (       14.3) c0 dma-trace             src/trace/....
[  3349261.2] (       14.4) c0 dma-trace             src/trace/....
[  3849232.4] (   499971.2) c0 dma-trace             src/trace/....

		 --- negative DELTA: wrap, IPC_TRACE, other? ---

[22430943257.0] (      0.0) c0 dma-trace             src/trace/....
[100000000.0] (100000000.0) c0 dma-trace             src/trace/....
[111999999.5] ( 12000000.0) c0 dma-trace             src/trace/....
[112000013.9] (       14.4) c0 dma-trace             src/trace/....
[112000028.2] (       14.3) c0 dma-trace             src/trace/....

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-23 13:28:26 +01:00
Keyon Jie d5c779918c Revert "topology: sof-tgl-nocodec-ci: change to run smart_amp on core 1"
This reverts commit cd2444adbf.

Reverting this to unblock the CI runningon tgl-nocodec-ci platform.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-04-22 19:43:03 +01:00
Curtis Malainey 30719babb4 testbench: print error on failure to prepare
We are capturing the error, we should log it, thank cppcheck for the
find.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey 0f0dd1d7ab testbench: remove unused sets
looks like a bug to checkpatch.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey f227ae7af2 tplg_parser: fix exit path
goto after return is incorrect since it generates unreachable code.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey 30f7931c4e tplg_parser: don't use void * in pointer math
Void * math is technically undefined, so for portability sake lets not
use it.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey 5436fec004 tplg_parser: don't use unsigned types with signed math
cppcheck is (legitmately) upset that we are doing signed math size_t

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey f2bd45bac8 tplg_parser: don't assign unused values
minor style violation

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Yong Zhi 05eb73e4cb topology: sof-tgl-max98373-rt5682: add Bluetooth audio offload support
Add passthrough pipelines to support Bluetooth sample rates
on SSP port2.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-04-21 22:32:09 +01:00
Yong Zhi 5fc21b6fb7 topology: intel: add generic Bluetooth audio offload pipeline
Make BT offload m4 generic for platforms that supports it.
User needs to provide id number for pipe/link/pcm and hw config.

I2S config for BT SCO:
16 bit samples, 1 slot TDM, no padding
19.2Mhz MCLK, 256/128kHz BCLK, 16/8kHz fsync
Frame-sync length 1 cycle ("DSP_A" mode)
Codec clk in primary mode

For BT A2DP:
16 bit samples, DSP_A protocol
2 slot TDM, no padding
38.4Mhz MCLK, 1.536Mhz BCLK, 48kHz fsync
Codec clk in secondary mode

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-04-21 22:32:09 +01:00
Yong Zhi e81c25eab7 topology: Add CHANNELS_MIN macro for passthrough pipeline
Add macro to restrict channel number of PCM capabilities, this will
allow channels_min to be configurable. The default behavior is
not changed with this patch.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-04-21 22:32:09 +01:00
Ross Chisholm c08f030d53 topology: fixing comments in jsl-rt1015 topology
Corrected comments relating to s32le (was s24le)

Signed-off-by: Ross Chisholm <ross.chisholm@xperi.com>
2021-04-20 19:28:03 +01:00
Ross Chisholm 71814655e6 topology: adding optional support for IIR component on jsl-rt015 topology
Allows the IIR component to be added to the jsl-rt015 topology allowing
tuning

Signed-off-by: Ross Chisholm <ross.chisholm@xperi.com>
2021-04-20 19:28:03 +01:00
Marc Herbert dc0ab8a449 logger: fix precision bug introduced by new -e option
Add missing "break" so the -e option stops spilling on the -f precision
option. Fixes commit 53ce8b9d9f ("logger: new relative timestamps
option, relative to first entry seen"). Since that commit the -e option
was wrongly assigned to the precision too.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-19 15:43:06 +01:00
Liam Girdwood 1931168185 pipeline: decouple IPC major from pipeline_new().
Decouple the IPC ABI major version from pipeline creation. This moves
struct sof_ipc_pipe_new from the pipeline and replaces it with it's
members (saving 8 bytes as no header is needed).

Add new feature specific pipeline APIs to configure pipeline at creation.

Additionally align testbench and UTs to API change.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-19 14:29:37 +01:00
Kai Vehmanen be065e55a8 topology: ssp: fix a bug in passing SSP_MULTI_CONFIG_DATA args
The m4 ifelse parameters using defn() are not working as expected.
If more than 3 parameters are passed to SSP_MULTI_CONFIG_DATA(),
the values are not correctly passed.

Fix this by removing defn() and correctly quoting the whole
ifelse section.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-04-16 16:12:43 +01:00
Kai Vehmanen 49547404e9 topology: ssp: fix a bug in passing SSP_CONFIG_DATA args
The m4 ifelse check on macro parameters is not working as expected.
If optional parameters are not passed, an empty string is written
to output conf file, instead of the "0" string specified in
the ifelse statement.

This has not caused functional errors as the empty string has
been interpreted as zero. Fix the logic despite this so that this
is not copied to other macros.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-04-16 16:06:40 +01:00
Liam Girdwood 6678b4022f testbench: align IPC structures on 4 bytes.
IPC is aligned on at least 4 bytes, removes compiler warning about packed
data being aligned on 1 bytes.

In file included from /home/lrg/work/sof/sof/tools/testbench/file.c:23:
/home/lrg/work/sof/sof/tools/testbench/include/testbench/file.h:59:1: error: alignment 1 of ‘struct sof_ipc_comp_file’ is less than 4 [-Werror=packed-not-aligned]
   59 | } __attribute__((packed));
      | ^

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-14 10:51:13 +01:00
Keyon Jie cd2444adbf topology: sof-tgl-nocodec-ci: change to run smart_amp on core 1
Change to run smart_amp pipelines on DSP core 1, this will help reduce
the core 0 usage and add multi-core to the CI coverage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-04-13 21:16:56 +01:00
Liam Girdwood c80270e7e4 ipc: structures should all be aligned on 4 bytes
Give the compiler a chance to further optimise IPC data access since it's
all on a 4 byte alignment.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-13 15:32:26 +01:00
Pierre-Louis Bossart fbdc330263 topology: add ADL SoundWire topologies
This is based on early hardware information and subject to change.

The ADL topologies use the link information to avoid confusions on
configurations. The kernel tables will use the same conventions.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-04-13 10:43:03 +01:00
Pierre-Louis Bossart 8af787ae2b topology: add adl.m4
copy/pasted from tgl.m4, will need to differentiate later

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-04-13 10:43:03 +01:00