Commit Graph

1383 Commits

Author SHA1 Message Date
Ranjani Sridharan fcfd5d65be test: topology: fix build with latest alsa-lib
Remove the extra space to make the topology build with upstream
alsa-lib.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-06 09:52:51 -08:00
Kai Vehmanen afaad99125 coredump-reader: do not hardcode reset vector address
The gdb script created by coredump-reader has a fixed reset
vector address. This address only works on a subset of supported
SOF platforms and for other platforms, user has to manually fix
the reset address in the gdb script before use.

Modify the script to emit breakpoint for "_MemErrorVector"
symbol. This is not the reset vector, but the simulation will
still be trapped early. The symbol is part of the firmware
binary, so its address can be looked up at runtime.

Also add a second breakpoint for "_MemoryExceptionVector_text_start".
This will cover SOF binaries built with Zephyr as the RTOS.

BugLink: https://github.com/thesofproject/sof/issues/5125
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-01-05 13:28:51 +00:00
Lionel Koenig 9ee413bf46 comp: Add initial Google AEC
Introduce a new component to perform acoustic echo cancellation
on capture path using a buffer from the playback as a reference.

1. Put the google_rtc_audio_processing at
$SOF_REPO/third_party_libraries
  - libgoogle_rtc_audio_processing.a
  - libgoogle_rtc_audio_processing_tuning.a
  - libc++.a (Corresponding stdlibc++)
  - libc++abi.a
2. Put the header in $SOF_REPO/third_party_includes
  - google_rtc_audio_processing.h

3. Build firmware and tool with xcc

4. To verify it works:
  - aplay some speech
  - At the same time arecord the mic which uses AEC
  The mic signal should not exhibit any echo from the playback.

Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-01-04 15:24:18 -08:00
YC Hung 606cd44bc8 topology1: mt8195: support 1ms pipeline playback period
1. Default support 1ms period playback pipeline to update host position
more precisely.
2. Revise pcm node number description

Signed-off-by: YC Hung <yc.hung@mediatek.com>
2022-01-03 21:38:43 +00:00
Uday M Bhat 37ad90ba1c topology2: cavs-nocodec: support for the remaining 2 devices for nocodec
Current cavs-nocodec support only 1 playback device
This is to support 2 playback/capture devices.
Due to this, DMIC is moved PCM from 1 to 3

Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
2021-12-30 22:08:20 +00:00
Brent Lu 03adf55bed topology: sof-adl-max98357a-rt5682-4ch: add new topology
Add support for four max98357a speaker amplifiers running in TDM mode
which format is 8 slots with 32 bit slot/sample width on ADL boards.
The only difference between this one and sof-adl-max98360a-rt5682-4ch
is the SSP port for speaker amplifiers; this one is using SSP2 while
max98360a's topology is using SSP1.

This topology implements a 4-channel pipeline directly to speaker
amplifiers so audio effects need to be done in user space.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-12-27 20:53:31 +00:00
Marc Herbert 8f3f2d6f4b Revert "topology: redirection to workaround hardcoded alsatplg permissions"
This reverts commit eb34437522.

Fixes #5113

The `alsatplg -o -` feature is incompatible with `-v` and basically
buggy because it happily sends .tplg output and debug statements to
the same place without a care. To reproduce the bug, simply run:

   VERBOSE=1 ./scripts/build-tools.sh -T

... then observe .tplg output files like this:

B0x003d3b/015675 - pcm 'DMIC': write 912 bytes
B0x0040cb/016587 - pcm 'HDMI1': write 912 bytes
B0x00445b/017499 - pcm 'HDMI2': write 912 bytes
B0x0047eb/018411 - pcm 'HDMI3': write 912 bytes
B0x004b7b/019323 - pcm 'DMIC16kHz': write 912 bytes
B0x004f0b/020235 - block size for type be (11:10) is 0x2ad4/10964
B0x004f0b/020235 - header index 0CoSA^E^@^@^@^@^@^@^@^H^@^@^@$^@^@
^@^@^@^@^@s^@^@^@^@^@^@^@^A^@^@^@p^@^@^@ ^@^@^@.^@^@^@ ^@^@^@^F^@^
@^@^F^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^
@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^
@^@^@^@^@^@^@^@^@^...

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-25 20:55:54 +00:00
Marc Herbert 8e8d1060f5 logger: move "log_entry_address x not in dictionary range" to stderr
Make DMA trace corruption #5120 a bit more visible in the logs.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-25 20:46:32 +00:00
Mark Barton 37ce03fbd9 topology1: mt8195: Remove DTS-specific workaround for period
In a previous commit DTS changed the period of this topology to 1000 when `DTS` was defined. This
commit removes this behaviour as DTS codec now supports the original period for this topology

 Signed-off-by: Mark Barton <mark.barton@xperi.com>
2021-12-25 20:41:25 +00:00
Lionel Koenig 996a067632 topology: Ensure buffers get allocated on 0.
Ensure all buffers got allocated by core 0

Signed-off-by: Lionel Koenig <lionelk@google.com>
2021-12-22 21:34:38 +00:00
Marc Herbert 352ed2ca4b logger: when FW is loaded, show the expected checksum in -d output
Sample output:

logger ABI Version is   5:3:0
ldc_file ABI Version is 5:3:0
ldc_file src checksum           0x07d4f1ad
Loaded FW expects chksum        0x07d4f1ad       <=== NEW!

Components uuid dictionary size:        2400 bytes
Components uuid base address:           0x1fffa000
...

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-22 20:11:25 +00:00
Marc Herbert 4aaffbe9a2 logger: add dictionary checksum in output of dump_ldc option
Since commit 901f991eee ("logger: Validate by src_hash instead of abi
version from fw_ready") the dictionary checksum has become the most
important information.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-22 20:11:25 +00:00
Marc Herbert 9ce91cbf74 logger: rename verify_fw_ver() to verify_ldc_checksum(), fix -h help
Fixes commit 901f991eee ("logger: Validate by src_hash instead of abi
version from fw_ready") that changed the feature without updating the
name.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-22 20:11:25 +00:00
Ranjani Sridharan 5ce0d2b43f topology2: gain: fix dB scale min and step values
It is not intuitive for the end-ser to set linear values for
minimum gain. Set the dB gain min value to -90dB and steps to 2dB.
Also, modify the max to 45 to allow the volume gain range -90dB to 0dB.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-12-21 15:20:47 +00:00
Seppo Ingalsuo 0d296ce7d1 Tools: Tune: Make example FIR response long for large IPC test
The loudness EQ is changed to 250 taps to create large IPC
message type. It also improves subjective quality of this
effect with better bass response. The earlier version was
made very short to fit the that time IPC size limit.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-12-20 22:33:06 +00:00
Pierre-Louis Bossart 0bef266966 topology1: sof-hda-generic: use mixer-based pipelines for analog playback
Convert playback pipeline on analog output to have a mixer so adding a
deep-buffer pipeline will be simpler.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-12-16 11:13:59 +00:00
Pierre-Louis Bossart 02041297ac topology: sof-hda-generic: prepare addition of deep-buffer support
Just move of definitions, no functionality change

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-12-16 11:13:59 +00:00
Pierre-Louis Bossart 29e46af073 topology1: pipe-eq-iir-eq-fir-volume-playback: remove duplicate volume
The same volume information is present twice, remove the one that
seems out of place in the pipeline.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-12-16 11:13:59 +00:00
Pierre-Louis Bossart cfb3ac5b00 topology1: add pipe-mixer-eq-iir-eq-fir-volume-dai-playback.m4
mix/merge of parts coming from pipe-mixer-volume-dai-playback.m4 and
pipe-eq-iir-eq-fir-volume-playback.m4

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-12-16 11:13:59 +00:00
Pierre-Louis Bossart 43dacdc016 topology1: soundwire: split headphone pipe in host- and dai-parts
Prepare for the introduction of deep buffer support

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-12-16 11:13:59 +00:00
Pierre-Louis Bossart 9f4af6b013 topology1: soundwire: fix misleading comment on ALH buffer format
All platforms use s24le for ALH, fix misleading comment.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-12-16 11:13:59 +00:00
Pierre-Louis Bossart e8b8854e3a topology1: soundwire: move cnl-rt5682 to development directory
This topology was used initially on UpExtreme but isn't shipped in any
commercial device.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-12-16 11:13:59 +00:00
Pierre-Louis Bossart fb03464dd5 topology1: fix comments in pipe-mixer-volume-dai-playback.m4
buffer information and formatting was incorrect

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-12-16 11:13:59 +00:00
Pierre-Louis Bossart fad16d8330 topology1: rename pipe-mixer-dai-playback to pipe-mixer-volume-dai-playback
To include deep buffer for HDaudio topologies, we need the ability to
replace volume by some other component (e.g. eq-iir-eq-fir-volume)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-12-16 11:13:59 +00:00
Marc Herbert eb34437522 topology: redirection to workaround hardcoded alsatplg permissions
Use a redirection to work around hardcoded alsatplg permissions.
See bug https://github.com/alsa-project/alsa-utils/issues/126

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-14 10:39:14 +00:00
Marc Herbert 4538a07b02 topology: new add_alsatplg_command() CMake macro to reduce duplication
Less copy/paste/diverge => more maintenance.

Zero visible change, pure copy/paste reduction.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-14 10:39:14 +00:00
Dirk Su d2a3ec2273 sof_ri_info: add ADL Intel prod key to list of known keys
Extracted from
https://github.com/thesofproject/sof-bin/blob/main/v1.9.x/sof-v1.9.2/intel-signed/sof-adl.ri

Signed-off-by: Dirk Su <dirk.su@canonical.com>
2021-12-14 10:38:18 +00:00
Ranjani Sridharan f4287dd3e8 topology2: cavs: Set audio formats for all topologies
Set audio formats and new attributes for all modules in the CAVS
topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-12-14 10:33:16 +00:00
Ranjani Sridharan a4b8d11678 topology2: pipelines: cavs: Add audio formats for all pipeline modules
Add audio formats and all new attributes for all modules in the
cavs pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-12-14 10:33:16 +00:00
Ranjani Sridharan 4d23794607 topology2: mixin/mixout: Add audio formats and new attributes
Add audio format objects and num_audio_formats attribute.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-12-14 10:33:16 +00:00
Ranjani Sridharan eb96d21caf topology2: gain: Add new attributes for gain
Add audio format objects and num_audio_formats attribute for gain.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-12-14 10:33:16 +00:00
Ranjani Sridharan 6631743209 topology2: common: Add new class definition for audio_format
Add definition for audio format class for defining the input and output
audio formats for each components in cavs topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-12-14 10:33:16 +00:00
Ranjani Sridharan eb013c738b topology2: copier: Add extra attributes
Add some new attributes along with math expression to calculate the
attribute "is_pages".

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-12-14 10:33:16 +00:00
Ranjani Sridharan 0c517d4af7 topology2: copier: remove stale comment
All known DAI types added already.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-12-14 10:33:16 +00:00
Ranjani Sridharan d523e67e6e topology2: tokens: Add additional tokens needed for cavs topologies
Add all tokens required for cavs topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-12-14 10:33:16 +00:00
Ranjani Sridharan d0c3965808 topology2: cavs: Add some commonly used definitions for cavs topologies
Used for setting audio format attributes and copier attributes.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-12-14 10:33:16 +00:00
balapati 926fc9ad7d topology1: Add sof-rn-rt5682-max98360, sof-rn-rt5682-rt1019
Add topology support for max98360,rt1019 speaker amplifiers
for amd renoir platform.

Signed-off-by: balapati <balakishore.pati@amd.com>
2021-12-13 11:38:06 +00:00
Brent Lu 25f61384f9 topology: sof-adl-max98360a-rt5682-2way: rename macro
The macro 2_WAY_SPK is renamed 2CH_2WAY to specify it's a L/R 2-way
system.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-12-13 11:33:33 +00:00
Brent Lu 6c13aad711 topology: sof-adl-max98360a-rt5682-4ch: add new topology
Add support for four max98360a speaker amplifiers running in TDM mode
which format is 8 slots with 32 bit slot/sample width on ADL boards.

This topology implements a 4-channel pipeline directly to speaker
amplifiers so audio effects need to be done in user space.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-12-13 11:33:33 +00:00
Marc Herbert 07c63c1f99 topology1: build the production topologies one level down
Move generated *.conf and *.tplg v1 files down from:

  build_tools/topology/topology1/*.{conf,tplg}

_to:

  build_tools/topology/topology1/production/*.{conf,tplg}

... then copy/"install" the production/* subdirectory two levels up.

This fixes the race condition #5067 that also copied a random number of
development/ and dsp_enhancement/ topologies, sometimes even truncating
these.

In other words, this commit REMOVES the following two copies:

build_tools/topology/development/       # randomly corrupted copy, removed
build_tools/topology/dsp_enhancement/   # randomly corrupted copy, removed

build_tools/topology/topology1/development/    # real build dir, unchanged
build_tools/topology/topology1/dsp_enhancement # real build dir, unchanged

Production topologies are copied only to help with the v1->v2
transition. That duplication makes the build directory confusing enough,
no need to extend that copy to development topologies. A single instance
of development topologies in the build directory is enough.

This removal may break some CI script(s): this is perfect because such
CI script(s) were copying randomly corrupted data.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-13 10:57:20 +00:00
Ranjani Sridharan 3e1c160e50 topology1: fix errors due to newline in list generator
The recent changes to the string parser in alsa-lib cause the topology
builds to break for some topologies. Avoid adding a newline for the bytes
data for the MUXDEMUX config by introducing a new macro for creating lists
without new lines between items.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-12-08 21:13:23 +00:00
Ranjani Sridharan db041556ce topology1: sof-cml-src-rt5682: remove extra space after values
The string parser in alsa-lib is sensitive to these now. So fix it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-12-08 21:13:23 +00:00
Ranjani Sridharan 7aedc1604d topology2: cavs-*-hdmi: replace the use of @args with Define
The Define block replaces the use of @args for topology2 in the alsatplg
compiler. So replace all users.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-12-08 21:11:40 +00:00
Marc Herbert 7aa1b28070 sof_ri_info: assert Python version is 3.6 or above.
As reported by Bartosz, Python 3.5.2 fails with the relatively cryptic
TypeError: invalid file: PosixPath('sof-tgl.ri'). Make this failure much
less cryptic.

As of December 2021 Python 3.5 is completely out of support and 3.6 will
be soon https://www.python.org/downloads/

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-08 20:45:07 +00:00
Zhang Peng 350fc6c66d topology: 8ulp: Change sample rate to 8K
As changed SAI to 8Khz, then modify tplg file to
match this.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2021-12-08 10:51:07 +02:00
Yong Zhi 47b159fca3 topology: set default values for C_CONTROLBYTES string members
When the string fields left empty, the alsa topology parser treats
SND_CONFIG_TYPE_STRING type config as -EINVAL, so set defauls values.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-12-03 10:39:35 +00:00
Jaska Uimonen f9cc0f7a1a logger: rename asprintf and vasprintf
Rename asprintf and vasprintf into log_asprintf and log_vasprintf as the
names could clash with the standard libc ones. These functions are there
originally done because of windows compatibility, but the naming was not
thought through carefully.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-12-02 09:56:25 +00:00
Brent Lu f41010d386 topology: sof-adl-max98360a-rt5682-2way: add new topology
Add support for four max98360a speaker amplifiers running in TDM mode
which format is 8 slots with 32 bit slot/sample width on ADL boards.

To implement the 2-way woofer/tweeter speaker function in SOF, there
is a demux to create 4-channel audio data with EQ on each channel for
band-split function.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-11-25 16:41:37 +00:00
Brent Lu e2bb2602e1 pipe-demux-eq-iir-playback: support eq coef customization
Topology file could use PIPELINE_FILTER1 macro to include a m4 file
with eq coefficient. If macro is not defined, eq_iir_coef_bandsplit.m4
will be included.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-11-25 16:41:37 +00:00
Brent Lu 8ed1e90b5c topology: pipe-demux-eq-iir-playback: change slot mapping
Change the default slot mapping from L_lo-L_hi-R_lo-R_hi to
L_lo-R_lo-L_hi-R_hi so slot 0/1 is for woofer and slot 2/3 is for
tweeter.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-11-25 16:41:37 +00:00
Brent Lu 771c2bb318 topology: pipe-demux-eq-iir-playback: remove macro 'matrix1
The demux routing matrix and config are removed for two reasons: 1.
the config 'demux_priv_1' is hardcoded for pipeline 1 only. 2. other
m4 file with demux compoenet like pipe-volume-demux-playback has the
matrix and config defined in the topology file.

The topology which implement this pipeline should define the routing
matrx and config named as 'demux_priv_<pipeline id>' before including
this m4 file.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-11-25 16:41:37 +00:00
Ming Jen Tai d959089d8e Modify RTNR to work with KWD on TGL and ADL.
Modify RTNR to work with KWD on TGL and ADL.
Remove unused RTNR 16kHz topology.
Add RTNR support to max98390 on ADL.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2021-11-23 13:22:11 +00:00
Ming Jen Tai dda9d0f9fc Add RTNR support in intel-generic-dmic-kwd.m4.
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2021-11-23 09:57:10 +00:00
Marc Herbert 2c208b52fb sof_ri_info: add JSL Intel prod key to list of known keys
Extracted from
https://github.com/thesofproject/sof-bin/blob/main/v1.9.x/sof-v1.9.2/intel-signed/sof-jsl.ri

Note previous sof-jsl.ri releases were signed with the ICL key:
https://github.com/thesofproject/sof/issues/4916

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-11-21 22:38:23 +00:00
Marc Herbert e14ec39124 sof_ri_info: change "Other" to "Unknown key"
Now grepping for 'key' always works.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-11-21 22:38:23 +00:00
Ranjani Sridharan b66010f0fa topology2: Add the passthrough and mixin-mixout topologies for cavs HDA
Add the passthrough and mixin-mixout versions for HDA topologies.

They can be built as follows:

For HDMI only passthrough topology:
alsatplg -p -c cavs-passthrough-hdmi.conf -o cavs-passthrough-hdmi.tplg

For passthrough HDA topology:
alsatplg -D HDA_CONFIG="passthrough" -p -c cavs-passthrough-hdmi.conf
-o cavs-passthrough-hda.tplg

For mixin-mixout HDA topology
alsatplg -D HDA_CONFIG="mix" -p -c cavs-passthrough-hdmi.conf
-o cavs-mixin-mixout-hda.tplg

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan 13dc7812eb topology2: mixin/mixout: Add cpc attribute
And set default values.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan c3fdf30364 topology2: pipelines: Add the other mixin/mixout pipelines
Add all the missing mixin/mixout pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan d69ab6e6f1 topology2: mixin-playback: Add the copier->mixin route
Add the route from the host copier to the mixin widget in the class
definition so it doesnt have to set in the top-level topology everytime.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan 5a0d1df4a6 topology: copier: change default cpc
To match the cavs production topology value. It can be overwritten
in the kernel.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan cfc467c242 topology2: tokens: fix tuple for CPC copier token
Align with the kernel definition.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan 6ed84e4a16 topology2: cavs-gain-hda: Add option to build HDMI only topology
Add an argument to specify if we want to build the HDMI only topology.
To build the HDMI only topology, use the following command:

alsatplg -p -c cavs-gain-hdmi.conf -o cavs-gain-hdmi.tplg

To build the HDA topology use the following command:

alsatplg -D HDA_CONFIG="gain" -p -c cavs-gain-hdami.conf -o
cavs-gain-hda.tplg

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan 1c4fb7ce64 topology2: cavs-gain-hda: fix pipelines and PCM instances
Make them unique and incremental.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan 0d542ae87e topology2: cavs-gain-hda: clean up routes
Add the host<->gain route in the gain-playback/gain-capture
pipeline and keep only the top-level routes in the top-level topology
file.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan abce00d224 topology2: cavs-gain-hda: clean up includes
Add search directories and trim the includes.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Ranjani Sridharan 428c654f62 topology2: cavs-gain-hda: fix routes
Fix the typos in the routes to fix the DAPM graphs.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-19 11:20:50 +00:00
Guennadi Liakhovetski 9a6569d48c topology: nocodec: fix graph drawing
No functional change, only fix an ASCII-art topology representation
in a comment.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-11-17 13:51:01 +00:00
Keyon Jie 0ced257b36 topology1: sof-tgl-nocodec: change to support multi-core
Add multi-core coverage for tgl-nocodec platforms, the initial DSP core
assignment as below:

DMIC48k: Core 1
SSP0: Core 2
SSP1: Core 3
DMIC16k, SSP2: Core0

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-11-17 21:48:59 +08:00
Keyon Jie 8434f81d94 topology1: sof-adl-nocodec: change to support multi-core
Add multi-core coverage for adl-nocodec platforms, the initial DSP core
assignment as below:

DMIC48k: Core 1
SSP0: Core 2
SSP1: Core 3
DMIC16k, SSP2: Core0

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-11-17 21:48:59 +08:00
Mac Chiang b29636b936 topology: add nau8825 headphone variant boards support on ADL
sof-adl-nau8825.tplg:
    headphone connects SSP0 link.
    bluetooth offload uses SSP2 link.

With nau8825 headphone, enabled MCLK/BCLK early start.
Add smart amp and dumb speakers support separately.

sof-adl-max98373-nau8825.tplg:
sof-adl-max98360a-nau8825.tplg:
    headphone connects SSP0 link.
    speakers connects SSP1 link.
    bluetooth offload uses SSP2 link.

sof-adl-rt1019-nau8825.tplg:
    headphone connects SSP0 link.
    speakers connects SSP2 link.

Co-developed-by: David Lin <CTLIN0@nuvoton.com>
Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2021-11-15 22:26:18 +00:00
Libin Yang 7835669c92 topology2: cavs-nocodec: fix dmic compile failure
The current topology2 requires to set id in PCM.pcm and to set index in Pipeline.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2021-11-15 17:12:52 +00:00
Jairaj Arava c5c0c1701e topology: sof-tgl-max98373-rt5682: add flag for Bluetooth audio offload
This patch adds flag to choose Bluetooth audio offload support

Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
2021-11-12 16:58:10 +00:00
Yong Zhi 4f54914ceb topology2: add dmic pipeline to nocodec topology
With dmic definition already in, add pipeline to make use of the pcm.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-11-12 15:48:53 +00:00
Jaska Uimonen ba86bb4cab topology2: add io_clk attribute to dmic and ssp
Add io_clk attribute to dmic and ssp dai class. This is the platform
dependent clock that needs to variated in upper level topology files.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-11-12 12:59:29 +00:00
Jaska Uimonen 4a5f6a8795 topology2: add nhlt flag to manifest
Add boolean nhlt attribute to manifest class. This attribute will tell
alsatplg to generate nhlt blob from dai definitions and add it into
the manifesst itself.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-11-12 12:59:29 +00:00
Ranjani Sridharan 5048eb74b1 topology2: pcm/pipeline: add instance attribute
Add an instance attribute for all pipeline class definitions and the pcm
class. This will be used to instantiate unique PCM/pipeline instances.

The ID attribute for PCM and the index attribute for pipeline may be the
same as the instance attribute in most cases. But in some cases, the
pipeline ID or the PCM index will be passed from the CMakeLists.txt file
as pre-processor definitions and they will be replaced as needed.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-11 16:44:38 +00:00
John Zimmermann 17d0e2d5ab logger: use more specific format specifiers
Signed-off-by: John Zimmermann <me@johnnynator.dev>
2021-11-11 13:24:33 +00:00
Bard Liao fa6365b0ad Topology2: tokens: add token for low power mode
Adding low power mode token

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-11-11 13:21:40 +00:00
Paul Olaru 6cc5ba98ed tools: ctl: CMakeLists: Add -Wall and -Werror flags
These flags are required to prevent unwanted bugs in the ctl tool. They
have been used to detect an undefined behaviour instance which occurred
due to lack of a return value in a non-void function.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2021-11-10 08:34:53 +02:00
Paul Olaru e3ac593f86 tools: ctl: Fix various errors
Most of the errors are unused variables, plus an unused label. Those are
benign.

One of the errors was the following:

/work/repos/sof/tools/ctl/ctl.c: In function ‘ctl_set_get’:
/work/repos/sof/tools/ctl/ctl.c:497:1: error: control reaches end of
non-void function [-Werror=return-type]
  497 | }
      | ^

This error had caused an undefined-behaviour-driven bug internally (an
error being displayed with a return code of 0, when it shouldn't have
been possible to display that message if the return code was 0). At line
614 of the old code, the message "Error: could not Set control, ret:0"
was displayed.

The errors only show up when you add -Wall -Werror to the compile
options of ctl, which I will do in the next commit.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2021-11-10 08:34:53 +02:00
Kai Vehmanen 601cbc061d topology1: sof-cavs-nocodec: fix documentation
Fix the documentation to match actual topology definition. The comments
did not include addition of mixers nor the capture PCMs. Also many
comments reflect a fixed core id that is no longer accurate.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-11-08 13:29:13 +00:00
Bartosz Kokoszko 15c9335962 scheduler: allow scheduler_free functions to disable only irqs
This commit:
- adds flags argument into scheduler_free function pointer in
  scheduler_ops struct;
- adds SOF_SCHEDULER_FREE_IRQ_ONLY flag, which indicates to disable
  only interrupts in scheduler_free() functions.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2021-11-08 13:25:44 +00:00
Jaska Uimonen ff63219de2 topology2: add mic extension and vendor mic config classes
Add two classes to be used with dmic for nhlt conformance. Mic extension
includes snr and sensitivity values. Mic vendor config has multiple
values for defining the mic array geometry and mic positions.

Do not add tokens as these values are used currently only with nhlt
generation. Defining these classes in dmic is optional.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-11-08 12:18:06 +00:00
Seppo Ingalsuo 3eeda96c0c Test: Add cmocka test case for IIR equalizer
This patch adds for the IIR equalized component a test with
comparison 100 ms of Octave generated output to output of the
component. The test signal is a full scale chirp signal. The
IIR response is both amplifying and attenuating to trigger as
much as possible issues with internal overflows.

All test data was generated by Octave script
cmocka_data_eq_iir.m. Re-run of script updates the used header
files the in cmocka tests directory.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-11-08 12:14:43 +00:00
Yong Zhi bb847b7639 topology2: nocodec: remove index initialization from DMIC instance
The DMIC DAI does not have index attribute, so remove it.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-11-08 12:06:25 +00:00
Ranjani Sridharan ef5358474a topology2: cavs: gain-playback/capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 328e1650d8 topology2: cavs: mixin-playback: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan ee2cb09ba6 topology2: cavs: mixout-gain-playback: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 7fc1b7159b topology2: cavs: passthrough-capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan f30cb4b1a3 topology2: cavs: passthrough-playback: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan dbc3ba5e3e topology2: eq-iir-volume-capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan f21a25abe5 topology2: Add class definition for EQIIR
Add the class definition for EQIIR widget.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 06684c9308 topology2: passthrough-capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 47c6dba606 topology2: volume-capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan f29234fba8 topology2: volume-demux-playback: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan da6ea477da topology2: Add class definition for muxdemux
Add the class definition for the MUX/DEMUX process type widget.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan e98847bf6e topology2: volume-playback: Add all includes
Include add dependencies so that this conf file can be built
individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 8243b51e8d topology2: volume: include mixer.conf
Include mixer.conf so the conf can be built without errors.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan b30d6b7c47 topology2: remove virtual_widget
It is a duplicate of virtual.conf

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 5c7e82e944 topology2: always override array elems
Always use "!" with array definitions so that items do not get
duplicated when arrays are merged when the conf file is included
multiple times.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Mark Barton ff3dec2f41 audio: codec_adapter: Add DTS Codec to mt8195 topology
The DTS Codec can be conditionally added to the sof-mt8195-mt6359-rt1019-rt5682 topology on those pipelines intended for headphone and speaker output.

To enable processing and configure settings, additional bytes must be sent to the control via ALSA TLV. The intention is that endusers will use ALSA UCM to achieve this.

Signed-off-by: Mark Barton <mark.barton@xperi.com>
2021-11-02 14:06:49 -07:00
Daniel Baluta b0bb21dc0e topology1: Fix codec adapter pipeline
Commit 771db86de2 ("topology1: codec_adapter: Add 'codec_adapter' pipeline configuration")
in an attempt to support PCM + compr mixer scenarios broke simple codec adapter
pipelines.

So, similar with PCM case (see sof/pipe-host-volume-playback.m4 vs
sof/pipe-volume-playback.m4) we introduce two separate configuration
files.

One for Passthrough codec-adapter pipeline and one standalone Host +
codec-adapter pipeline that can be independently scheduled in a scenario
with a mixer for example.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-10-29 22:38:30 +01:00
Daniel Baluta 5ef33e6310 topology: Add simple host codec adapter playback pipeline
As opposed to pipe-codec-adapter-playback this has its own scheduling
task and can be used in more complex scenarios.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-10-29 22:38:30 +01:00
Gongjun Song d54c0385cf topology1: Add sof-adl-rt711-l2-rt1316-l01-rt714-l3
Support SKU 0B29 product, the audio hardware configuration is rt711
on link2, two rt1316s on link0 and link1, rt714 on link3.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2021-10-29 15:01:05 +08:00
Gongjun Song d40ab8c853 topology1: Add sof-adl-rt1316-l2-mono-rt714-l3
Support SKU 0B13 product, the audio hardware configuration is rt1316
on link2 and rt714 on link3.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2021-10-29 15:01:05 +08:00
Gongjun Song 102793970a topology1: Add sof-adl-rt1316-l12-rt714-l0
Support SKU 0AF3 product. The audio hardware configuration is two
rt1316s on link1 and link2, and rt714 on link0.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2021-10-29 15:01:05 +08:00
Mac Chiang e839650271 topology: add max98390 2/4 codecs and bt_offload support
This patch adds support for three configurations:

SSP1 connects max98390 2/4 speakers
SSP2 connects max98390 2 speakers

The SSP TDM configuration uses 4 slots for playback and
4 slots for the echo reference capture - regardless of the number of speakers.

UCM files in userspace specify which channels needs to be used on the specific platform.
There is no information reported by the topology/firmware related to valid channels.

Max98390 uses following channels mapping for playback and EchoRef capture
Chan 0 = Left
Chan 1 = Right
Chan 2 = Tweeter Left
Chan 3 = Tweeter Right
(Chan 0 and 1 with regular speakers;Chan 2 and 3 with tweeter speakers)

Addition:
  Add SSP2 BT_OFFLOAD support

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2021-10-26 21:01:25 +01:00
Brent Lu b365447dc6 topology: sof-jsl-rt5682: add SSP_CC_BCLK_ES flag to codec DAI
Add support for cs42l42 with max98360a running on JSL boards. The
cs42l42 needs to enable bclk earlier in prepare stage and disable bclk
at hw_free statge so we add the SSP_CC_BCLK_ES flag for it.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-10-26 20:24:47 +01:00
Daniel Baluta 955c7c9009 topology1: imx8: Add mixing PCM and Compr stream topology
This topologies are for i.MX8QXP/i.MX8QM, i.MX8MP demonstrating
mixing for 1 PCM stream and 1 Compr stream.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-10-21 15:53:11 +01:00
Marc Herbert f8ca8536fd sof_ri_info: add new --erase_vars feature for reproducible builds
sof_ri_info.py  --erase_vars reproducible.ri sof.ri

replaces variable fields (signature and date right now) by constants.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert d9b7d9f6eb sof_ri_info: new attributes signature and date start and length
Signature and date are (for now) the only variable fields when
re-signing with the same tool so their locations matter.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert a43cf1aff0 sof_ri_info: pylint: disable=invalid-name, missing-function-docstring
Add:

... to reduce pylint warnings to a usable amount.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert 85aa873198 sof_ri_info: minor reader.info() additions and tweaks
These changes are visible only in -v mode.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert 31b3a39202 sof_ri_info: print error messages on stderr
stderr is often highlighted with a different color.
This also makes the usual >/dev/null redirection possible.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert 2dbec9f2b2 sof_ri_info: show file offsets for most components + some lengths
File offsets were critical in finding the serious begin_off bug fixed in
the same series. The information is already there so just show it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert 06187791d7 sof_ri_info: fix adsp_mft_cse_entry.entry_file_offset
Fixes the adsp_mft_cse_entry Component added by
commit 8885b465df ("tools: sof-ri-info: move parsing adsp mft outside
cse mft").

`adsp_mft_cse_entry.entry_file_offset` did not account for the extended
manifest.

Also fix the large `reader.ext_mft_length + entry_offset`
copy/paste/diverge

That variable did not seem to be used anywhere yet but it's wrong value
was confusing and time-consuming when debugging.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert c66e26a9cf sof_ri_info: fix wrong begin_off in parse_mft_extension()
This broke parsing any extension past the first one.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Ming Jen Tai bf1e3b7f5b Support both 48kHz and 16kHz recording
Add 48kHz recording support to RTNR
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2021-10-19 13:40:12 +01:00
Brent Lu b50afe03cd topology: sof-tgl-max98357a-rt5682: add support for max98360a
Add support for max98360a running on ADL boards. We choose SSP1 for
speaker amplifier for BT offload compatibility. Also increase the
sample depth to 32 bits for more dynamic range and avoid using m/n
counter.

We add the flag SSP_CC_BCLK_ES to SSP0 for the compatibility with
CS42L42 in the future.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-10-13 14:54:22 +01:00
Ajit Kumar Pandey d4254be1ad topology: topology1: Add initial topology for AMD Renoir
Add m4 and headers to support basic topology with passthrough
pipeline for ACPSP and DMIC use cases support on renoir platform.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: balapati <balakishore.pati@amd.com>
2021-10-07 15:06:55 +01:00
Kai Vehmanen 40484a87f2 topology1: correct misleading comments for priority/core
Comments for calls to PIPELINE_PCM_ADD and DAI_ADD describe parameters
in the same order they are passed to the macros. The only exception is
order of "priority" and "core", and this can be very misleading. In
most cases the actual current values for the two parameters are 0,
making it even easier to make a mistake when modifying them.

Fix the order in the comments to match the actual order in which the
parameters should be passed to PIPELINE_PCM_ADD and DAI_ADD.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-10-05 15:11:22 +01:00
Kai Vehmanen 9dfd2bd493 topology: intel: use 38.4Mhz MCLK for all Bluetooth use-cases
Updated guidance for BT hardware is to use 38.4Mhz MCLK for both
SCO and A2DP mode. This applies for all Intel platforms supporting
Bluetooth offload.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-10-05 15:05:25 +01:00
Daniel Baluta 771db86de2 topology1: codec_adapter: Add 'codec_adapter' pipeline configuration
This adds 'codec_adapter' pipeline configuration  allowing this
pipeline to be part of a more complex topology.

Important configuration here is the 'scheduler' widget. Without this,
'codec_adapter' would work in a more complex topology. This is because
each individual pipeline needs to have a 'scheduling' component.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-09-30 15:45:50 +01:00
Pierre-Louis Bossart 425743e772 topology1: add missing Dell SKU 0A45 topology
Same as before but with newer SDCA codecs.

Matching kernel PR: https://github.com/thesofproject/linux/pull/3162

BugLink: https://github.com/thesofproject/linux/issues/3161
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-09-29 10:58:21 +01:00
Seppo Ingalsuo b3c9ec46d9 Tools: Test: Audio: Run testbench tests with valgrind
The run with valgrind will error if memory leaks are detected.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-09-27 12:28:37 +01:00
Ming Jen Tai e4e23d47ec Integrate RTNR into sof-adl-max98357a-rt5682
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2021-09-23 13:50:35 +01:00
Seppo Ingalsuo f47b823cfe Tools: Testbench: File write DAI needs data structures of DAI
Previously the file component stored component data to device
private data similarly as processing components. However the
pipeline treats file as DAI. Without this patch the missing driver
and DAI operation get_init_delay_ms() causes a segfault in pipeline
parameters walk. It is sufficient for the walk to pass to have just
rzalloc() cleared pointers in driver structure.

The file component data is now placed into DAI private data.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-09-15 14:41:47 +01:00
Libin Yang 714518f5e9 topology1: fix a typo of a tplg name in CMakefile
sof-adl-rt1316-l2-mono-rt714-link0 should be
sof-adl-rt1316-l2-mono-rt714-l0

Signed-off-by: Libin Yang <libin.yang@intel.com>
2021-09-15 14:28:34 +01:00
Zhang Keqiao f6bc279da6 topology1: add a test topology sof-adl-nocodec-ci build support
We plan to test the CI test topology on ADL-P nocodec device, so
add the topology build support in cmake list.

Signed-off-by: Zhang Keqiao <keqiao.zhang@intel.com>
2021-09-13 15:44:52 +01:00
Curtis Malainey a0acad3414 CMake: require version 3.13
Without CMP0079 we cannot conditionally include libraries against SOF in
sub directories without seriously restructuring the project. This is
because the old policy requires the link target must be created in the
same folder. This does not work well from a configuration standpoint for
3P audio libraries trying to keep their config in src/audio/*. Rather
than enable the policy, lets simply upgrade since 3.13 is widely
available.

With this upgrade we can also remove the two version dependent checks at
the top of our scripts.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-09-10 17:19:29 +01:00
Pierre-Louis Bossart 8fc5247289 topology: move IMX and MTK topologies out of Intel list
Not sure why they were intertwined, let's separate them out to avoid
git conflicts with integration.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-09-08 20:19:41 +01:00
Pierre-Louis Bossart 24ad7ea0fa topology: sof-glk-es8336: initial support
This topology is used on GLK and TGL. variations include:
- DMIC supported on TGL and not on GLK
- TGL uses SSP0 instead of SSP2

APL support was added only based on user reports. This assumes the
same topology as GLK but was not tested.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-09-08 20:19:41 +01:00
Allen-KH Cheng 7eda2d509e topology1: add sof-mt8195-mt6359-rt1019-rt5682 topology
Add sof-mt8195-mt6359-rt1019-rt5682 topology

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng 3342311c8e topology1: add afe config
Add afe config for mt8195

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng 5ae624cf4e topology1: add afe tokens
Add afe tokens for mt8195

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng e9ae9e07ca topology1: add afe.m4
Add afe.m4 for afe related define

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng 16975ced60 topology1: add sof-mt8195-mt6359-rt1019-rt5682.m4
Add sof-mt8195-mt6359-rt1019-rt5682.m4 for mt8195

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng afc39d10a5 topology1: add mt8195.m4
Add mt8195 pipelines and components

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Guennadi Liakhovetski f5760a648d pipeline: trigger START from the task context
When the firmware receives a START or RELEASE IPC message, it
immediately triggers all involved components, which starts DMA.
Then it schedules the pipeline task, but since the scheduler can be
already running at that time, the task might be scheduled when DMA
data isn't available yet or has already overflowed. To fix this
change the control flow to also trigger all components from the task
during its first run. Actual data processing then begins with the
next period. Note, that this is currently only possible with
pipelines, using timer-based scheduling. Pipelines, using DMA
interrupts for scheduling are unaffected.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-08-31 21:14:37 +01:00
Guennadi Liakhovetski 1103860a8d pipeline: add two new trigger commands and a new state
We need to split the START trigger command into two commands because
some components have a long delay inside their START handling. This
patch introduces two new trigger commands: PRE_START and
PRE_RELEASE and a new state PRE_ACTIVE to prepare for that split.
For simmetry POST_STOP and POST_PAUSE are also added, however they
aren't used yet.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-08-31 21:14:37 +01:00
ShriramShastry 3d674bca57 TDFB Improve directivity index and WNG
Added singular value decomposition algorithm
	for diagonal matrix calculation. Added filters for side
	lobe artifacts.

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2021-08-30 11:00:52 +01:00
Seppo Ingalsuo 23c7e4739c Topology: Add development example of demux and EQ band-split pipeline
This patch adds topologies sof-apl-nocodec-demux-eq-2ch4ch.tplg and
sof-apl-nocodec-demux-eq-4ch4ch.tplg. Playback of 2ch creates 4ch
output in format L_lo, L_hi, R_lo, and R_hi. An example band-split
at 2 kHz is configured for EQ processing. The low band contains
an additional 80 Hz high-pass.

The pipeline was tested in UP2 device. The nocodec topology enables
an useful SPP loopback mode. The capture PCM is connected to DAI
loopback so this pipeline can be tested with simultaneous 2ch aplay
and 4ch arecord.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-08-26 09:57:35 +01:00
Rander Wang 0fefcc8bdf topology2: ipc4: add mixin & mixout support
Also add a simple pipeline used by windows. A normal
playback pipeline is : copier -> mixin -> mixout -> gain -> copier

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-08-26 09:49:43 +01:00
Jaska Uimonen 73803adec9 topology2: add dmic to nocodec topology
Add dmic definition to nocodec topology.

Suggested-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-08-25 15:39:43 +01:00
Jaska Uimonen c4880ff50a topology2: add dmic and pdm classes
Add classes for dmic and pdm config.

Suggested-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-08-25 15:39:43 +01:00
Pin-chih Lin 541e070eec multiband_drc: Add switch control for enabling DRC
Add mixer type control switch for enabling/disabling DRC.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-08-24 17:46:09 +01:00
Ming Jen Tai d3381eaa13 Integrate RTNR into sof-tgl-max98357a-rt5682.m4
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2021-08-24 17:41:38 +01:00
Marc Herbert 1d8f68140e tools: remove spurious dependency on rimage
This reverts May 2020 commit a2de860f42 ("cmake: fix tools build
with submodules") that added a dependency on rimage for the entire
`tools/` subdirectory, probably because `smex/ldc.h` included
`rimage/fw.h` (removed in previous commit).

Looking at the code review I can see no apparent attempt to understand
anything, not even a quote of a build error message.

This will hopefully unblock
https://github.com/zephyrproject-rtos/zephyr/pull/37250

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-08-24 13:22:47 +03:00
Yong Zhi 0570315cd9 topology: pipe-volume-demux-playback: fix pipeline comments
Update the comments to match the P_GRAPH definition.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-08-23 13:25:37 +01:00
Fred Oh ce97fc7128 topology1: sof-tgl-sdw-max98373-rt5682: use a mockup of the smart amp
Remove 3rd party library dependency.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2021-08-18 13:10:45 +01:00