Commit Graph

687 Commits

Author SHA1 Message Date
Pierre-Louis Bossart b51cb9113a topology: remove cht-src-50kHz-pcm512x
No one uses this topology so let's remove it.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2020-07-07 09:23:15 +01:00
Pierre-Louis Bossart 1a8c123511 topology: cht-rt5682: align with byt-codec topology
Same parameters, so let's use the same template

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2020-07-07 09:23:15 +01:00
Pierre-Louis Bossart 1a56804ff7 topology: align cht-nocodec and byt-codec topologies
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>
2020-07-07 09:23:15 +01:00
Pierre-Louis Bossart ec47eefa13 topology: sof-byt-codec: connect pipe-host-volume-playback to mixer-dai
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>
2020-07-07 09:23:15 +01:00
Pierre-Louis Bossart 7189916c53 topology: introduce pipe-host-volume-playback
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>
2020-07-07 09:23:15 +01:00
Pierre-Louis Bossart b971f2b753 topology: add pipe-mixer-dai-playback
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>
2020-07-07 09:23:15 +01:00
Rander Wang 7b532d3712 topology: tgl-sdw-max98373: change DMIC16k format to 32LE
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>
2020-07-01 09:56:51 +01:00
Keyon Jie 77e42657c6 topology: sof-hda-generic-kwd: switch to use vol-kfbm mode
We need PGA to tune the volume for the KWD pipeline, switch to use
vol-kfbm mode to get it done.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2020-06-30 11:13:48 +01:00
Seppo Ingalsuo 673e335a7a Tools: Topology: Change playback volume ramp duration to 20 ms
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>
2020-06-29 21:55:44 +01:00
Keyon Jie 20ab16c36e topology: sof-smart-amplifier: change the mclk to fix the noise issue
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>
2020-06-24 20:04:03 +01:00
Keyon Jie fc2b8d14a6 topology: sof-smart-amplifier: configure ssp quirk to 0 by default
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>
2020-06-24 20:04:03 +01:00
Rander Wang 642ac57ed3 topology: tgl-max98373-rt5682: adjust channel usage for sdw DSM support
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>
2020-06-24 20:02:50 +01:00
Marc Herbert a3a9eb3a2b cmake: no space after -imacros to avoid de-duplication
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>
2020-06-24 11:29:27 +01:00
Karol Trzcinski cb10221109 logger: Rename float_precision to time_precision
New name better describes variable functionality.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-06-24 09:30:26 +01:00
Karol Trzcinski d97e9291e1 logger: Add possibility to hide timestamps
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>
2020-06-24 09:30:26 +01:00
Pan Xiuli 19c3ff9924 topology: fix wrong parameter for HDMI in sof-jsl-da7219
Remove the wrong one more 0 in the DAI config for HDMI.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-06-23 12:13:49 +01:00
Jaska Uimonen d76622a967 topology: fix dmic names (again)
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>
2020-06-23 12:05:05 +01:00
Marc Herbert 1002899b95 Use '-imacros config.h' instead of explicit #include <config.h>
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>
2020-06-22 13:01:26 +01:00
Bartosz Kokoszko a2d1e1efdc component: add set of helper functions for large config configuration
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>
2020-06-17 11:33:23 +02:00
Uday M Bhat 4d005a0554 topology: Add jsl+ MX98360a amp with ALC5682 Headset codec
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>
2020-06-12 11:00:28 +01:00
Yong Zhi 52c1174c18 topology: Add jsl+ tplg for RT1015 amp and ALC5682 Headset codec
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>
2020-06-10 12:03:33 +01:00
Seppo Ingalsuo f269d0c732 Topology: Add ASRC capture pipe for WM8804 SPDIF input
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>
2020-06-10 12:01:02 +01:00
Karol Trzcinski 27d4c943f3 testbench: Add UUID for file component
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>
2020-06-04 15:42:52 +01:00
Slawomir Blauciak 9b2b031da7 topology: fix pipeline parameters mismatched with hardware configuration
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>
2020-06-04 14:22:36 +01:00
Rander Wang 30e801c4d4 topology: sdw: fix dmic issue on tgl sdw platforms
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>
2020-06-01 10:55:36 +01:00
Seppo Ingalsuo 145d9aa09f Tools: Tune: Improve robustness of remote audio measure
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>
2020-05-29 15:59:33 +01:00
Karol Trzcinski bebdbca87b rimage: Update to version with changed headers location
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>
2020-05-29 11:15:22 +01:00
Marcin Maka caae629f79 tools: sof-ri-info: make cse mft parsing optional
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>
2020-05-28 20:25:48 +02:00
Marcin Maka 58e244ee88 tools: sof-ri-info: add more verbose info about parsing progress
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>
2020-05-28 20:25:48 +02:00
Marcin Maka a28525b23b tools: sof-ri-info: fix css mft parsing for bin with ext mft
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>
2020-05-28 20:25:48 +02:00
Marcin Maka 3f39319549 tools: sof-ri-info: remove trailing zeroes from strings
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>
2020-05-28 20:25:48 +02:00
Marcin Maka 5c3d0225a9 tools: sof-ri-info: display memory map
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>
2020-05-28 20:25:48 +02:00
Marcin Maka ebf381658f tools: sof-ri-info: compact layout of module entry info
More compact output is better for binaries containing
many module entries.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-05-28 20:25:48 +02:00
Marcin Maka ec13b0828f tools: sof-ri-info: add modules only mode
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>
2020-05-28 20:25:48 +02:00
Marcin Maka 8885b465df tools: sof-ri-info: move parsing adsp mft outside cse mft
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>
2020-05-28 20:25:48 +02:00
Marcin Maka dcefb7f753 tools: sof-ri-info: log via info method only
All logging dispatched via Reader info method is more
consistent and better controlable.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-05-28 20:25:48 +02:00
Marcin Maka 4b7523c8c9 tools: sof-ri-info: use colors for terminal output only
Do not use colors if stdout is not a tty.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-05-28 20:25:48 +02:00
Karol Trzcinski 0596f5b71c logger: Pass input file in -d flag
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>
2020-05-27 13:24:10 +01:00
Karol Trzcinski 44a25a1a64 logger: Do not open input file for ldc_dump
Input file is not needed for these functionalities, so shouldn't be
opened.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-05-27 13:24:10 +01:00
Karol Trzcinski fe3dfe4007 logger: Fix help message consistency
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>
2020-05-27 12:15:29 +01:00
Karol Trzcinski 1535738355 logger: Move optstring from getopt function to separate variable
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>
2020-05-27 11:31:59 +03:00
Karol Trzcinski 6cfd3e5a5e logger: Increment uuid name during ldc dump
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>
2020-05-26 18:33:53 +03:00
Seppo Ingalsuo 66a78a2d8c Topology: HDA-generic: Use +20 dB EQ gain for 16 kHz DMIC capture
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>
2020-05-21 10:01:37 +01:00
Seppo Ingalsuo efbfa2c4dd Tools: Tune: Add generation for SRC profile small int32
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>
2020-05-21 09:37:36 +01:00
Marc Herbert 11ee3b872b tplg-build.sh: invoke m4 with --fatal-warnings
Also use || exit 255 to stop xargs from burying the error message(s).

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-05-20 22:16:52 +01:00
Marc Herbert cff1bb62b0 tplg-build.sh: add NO_PROCESSORS, use VERBOSE more.
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>
2020-05-20 22:16:52 +01:00
Marc Herbert d4e508cf86 topology: invoke with m4 --fatal-warnings
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>
2020-05-20 22:16:27 +01:00
Pierre-Louis Bossart 96623e6038 topology: remove sof-tgl-rt711-i2s-rt1308-nohdmi.conf
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>
2020-05-20 14:08:19 +01:00
Seppo Ingalsuo 68da4d7024 Topology: HDA-generic: Use +20 dB EQ gain for DMIC capture pipelines
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>
2020-05-20 14:05:14 +01:00
Pierre-Louis Bossart e1876f35b4 topology: add support for rt5682 on link2 in SoundWire mode
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>
2020-05-19 09:08:24 +01:00