Commit Graph

282 Commits

Author SHA1 Message Date
Ming Jen Tai 21d8948e73 rtnr: Support setting data blob
This commit lets user to set  data blob from host.

For example:
$ amixer -Dhw:0 controls | grep RTNR
numid=47,iface=MIXER,name='RTNR10.0 rtnr_bytes_10'
numid=48,iface=MIXER,name='RTNR10.0 rtnr_data_10'
numid=49,iface=MIXER,name='RTNR10.0 rtnr_enable_10'

$ sof-ctl -Dhw:0 -n 48 -b -s ./preset.bin

A new empty data control added to the topology will be used to send the
blob.
Model handler is now used for transferring the blob data.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>

Code Refine
2022-10-05 13:25:44 +01:00
Seppo Ingalsuo e2d73e236a Tools: Topology1: Add MFCC component
This patch adds basic macros needed for MFCC in testbench and in
developmemnt topologies for hda-generic-2ch and up2. The
configuration blob in this matches the reference Matlab code
as configured to match Pytorch default MFCC.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-05 13:07:10 +01:00
Daniel Baluta 5b63f446d2 topology1: Add topology with wm8960/cs42888 for imx8qxp/imx8qm
This topology is used for i.MX8QXP/i.MX8QM with baseboard
to enable both cs42888 and wm8960 codecs.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-10-05 13:05:48 +01:00
Daniel Baluta 19661fe74a topology1: Merge i.MX AAC/MP3 compr topology
Because now we can support multiple codecs with same topology
lets merge i.MX aac/mp3 topologies.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-09-30 11:00:57 +03:00
Daniel Baluta e60caa0c0c topology1: Update documentation to reflect multicodec support
This updates documentation to reflect that now param id is only 2 bytes
followed by 2 bytes codec id.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-09-30 11:00:57 +03:00
Muralidhar Reddy 586716e1b9 topology1: CMakeLists: add ADL support for ES83x6 & HDMI_In Capture
Add ADL support for ES83x6 on SSP1, LT_HDMI_In capture on SSP0 & SSP2.
Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com>
2022-09-26 11:24:23 +01:00
Muralidhar Reddy 187c845ddc topology1: CMakeLists: add ADL support for ES83x6
Added ADL support for ES83x6 on SSP1.
Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com>
2022-09-26 11:24:23 +01:00
Joe.Cheng a78fdcebc1 topology1:enable SOF EQ + DTS on AMD renoir
Period has to be 1ms to avoid playback noise issue on Renoir
when SOF EQ + DTS are both enabled.

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-09-26 11:03:29 +01:00
Joe.Cheng 87de994f49 topology1:remove runtime config from DTS topologies
Follow PR#5190, remove runtime config from DTS topologies

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-09-14 12:08:36 +01:00
Ming Jen Tai 8496d585d1 Modify periods setting for RTNR capturing pipeline
With the  release of RTNR version 20220728, period for capturing pipeline requires at least 5ms.

Periods setting for 16KHz capturing pipeline is also removed since RTNR is currently running in 48KHz capturing pipeline only.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-08-31 11:26:18 +01:00
Chunxu Li 8d9c5485c4 topology1: remove mt8186 unused topologies
Remove mt8186 unused topologies.

We use sof-mt8186 on our demo board, sof-mt8186-mt6366-rt1019-rt5682s
and sof-mt8186-mt6366-da7219-max98357 will no be used anymore.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
2022-08-25 16:20:26 +03:00
Laurentiu Mihalcea 3590936101 topology1: Add new i.MX topology for PCM capture using compress API
We add a new i.MX8MP topology which will use the compress API for PCM
capture. This topology is mainly used for testing.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea b99bf48195 topology1: Add new i.MX topology for PCM playback using compress API
We add a new i.MX8MP topology which will use the compress API for PCM
playback. This topology is mainly used for testing.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea cb38eec76e topology1: Add new i.MX topology for PCM capture using compress API
We add a new i.MX8Q(M/XP) topology which will use the compress API for
PCM capture. This topology is mainly used for testing.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea 476b31ecdb topology1: Add new i.MX topology for PCM playback using compress API
We add a new i.MX8Q(M/XP) topology which will use the compress API for
PCM playback. This topology is mainly used for testing.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea def03928d5 topology1: pcm: Add new macro for compress capture
We want to be able to create topologies for the case of
compress capture. This change will enable us to do so.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea 9d54236675 topology1: pcm: Introduce compress parameter for pcm_capture_add_common
This change will allow us to prepare for adding a new macro
for the case of compress capture.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
barry.jan 8efd627964 topology: add Waves for sof-mt8186-mt6366-rt1019-rt5682s tplg
Signed-off-by: barry.jan <barry.jan@waves.com>
2022-08-16 21:53:12 +01:00
Daniel Baluta 8a1b051940 topology1: codec_adapter: Remove ca_config bytes
After commit:
5763c74bf4 ("codec_adapter: Remove setup config from module data")
we no longer setup config bytes in codec adapter control bytes.

So, we need to remove ca_config bytes and fix payload size. This
didn't introduce any bug because this is the default
CA_SETUP_CONTROLBYTES. Each topology uses a custom control bytes
which overrides this default values.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-08-15 12:53:29 +01:00
Seppo Ingalsuo a328223ba5 Topology1: Allow S24_4LE and S32_LE playback with PCM4
This patch allows to test SRC with all 16/24/32 bit formats
in UP-squared device. Without this patch only 16 bit is
supported.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-08-10 07:54:39 +01:00
Daniel Baluta 6231528924 topology: Fix setup control bytes comments
setup config data was removed with commit
5763c74bf4 ("codec_adapter: Remove setup config from module data")
update documentation to reflect this.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-08-05 19:22:37 +01:00
Pierre-Louis Bossart 190cfd79f7 topology1: add SSP1 for all ES8336, SSP5 for APL/GLK
We apparently missed quite a few platforms with SSP1, and SSP5 is also
needed for APL/GLK.

One day we'll have a better way to add topologies, but so far it's
brute-force combinatorial addition. Oh well.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-08-05 12:28:12 +01:00
Kai Vehmanen 8881a406af topology: add sof-rpl-nocodec.tplg
Add nocodec topology for Intel Raptor Lake.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-04 16:22:56 +01:00
Kai Vehmanen f2bfa2824e topology: add sof-rpl-rt711 and sof-rpl-rt711-4ch topologies
Add new topologies for Intel Raptor Lake.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-04 16:22:56 +01:00
Kai Vehmanen 09944bc058 topology: Add platform definition file for Intel Raptor Lake
Start with Alder Lake definitions.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-04 16:22:56 +01:00
Pierre-Louis Bossart d87adcd2dc topology1: CMakeLists: add missing APL/GLK support for ES8336 with DMIC.
For some reason we added DMIC-based topologies for all platforms
except GLK and APL.

This should be back-ported to 2.2 stable.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-19 09:40:28 +01:00
Brent Lu 41e56b336d topology: sof-jsl-rt5682: enable mclk always-on feature
Enable the always-on feature for pop.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-07-18 14:20:09 +01:00
Brent Lu 8dfc008b8b intel: ssp: implement mclk always-on feature
In the earliest design, mclk is turned on in set_config() and never
turned off. The behavior is modified in this commit:

d5840a9200 ("ssp: move mclk request/release to pre_start and post_stop")

Now the mclk is enabled only during audio streaming so some codec may
pop. This commit adds the always-on behavior back as an new feature.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-07-18 14:20:09 +01:00
Pierre-Louis Bossart 4be016befc topology1: sof-tgl-rt711-rt1308: use EXT_AMP_REF for rt1316
RT1316 is exposed by the machine driver as having an echo reference,
so the indices are different from the regular ones.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-12 09:34:39 +01:00
Pierre-Louis Bossart 04df9161cb topology1: sof-tgl-rt711-rt1308: make BT_OFFLOAD a CMakeFiles parameter
Somehow we assumed that all ADL platforms support BT_OFFLOAD. Wrong,
this is only valid for Chromebooks and needs to be set externally in
the CMakeFiles definitions.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-12 09:34:39 +01:00
Pierre-Louis Bossart 7666716e12 topology1: CMakeLists: add topology for HP Omen 16
RT711 on link0 and RT1316 on link3.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-12 09:34:39 +01:00
Pierre-Louis Bossart e70fd0fbf7 topology1: sof-tgl-rt711-rt1308: make amplifier link configuration
HP Omen 16 devices have an amplifier on link3, add the required
configuration macro.

BugLink: https://github.com/thesofproject/linux/issues/3727
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-12 09:34:39 +01:00
Pierre-Louis Bossart 9d9c28848d topology1: generate new sof-hda-generic version for 2ch PDM1
Generate 2 files for 1 and 2ch cases.

These topologies can be used by setting

options snd-sof-pci tplg_filename=<file>

in /etc/modprobe.d/alsa-base.conf

BugLink: https://github.com/thesofproject/sof/issues/5989
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-11 15:52:25 +01:00
Pierre-Louis Bossart 73fd9248e0 topology1: intel-generic-dmic: add macro to enable PDM1 for 2ch cases
There are multiple cases where we cannot detect that PDM1 is used
instead of the default PDM0.

BugLink: https://github.com/thesofproject/sof/issues/5989
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-11 15:52:25 +01:00
Joe.Cheng 2cad1764e4 topology1:renoir:add DTS topology
Add topology pipe-dts-codec-playback to support Renoir platform

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-06-29 13:10:33 +01:00
balapati 5c4ca781ec tools:topology: Add HS topology
Add HS I2S instance topolgy for Rembrandt target.

Signed-off-by: balapati <balakishore.pati@amd.com>
2022-06-29 13:00:26 +01:00
Pierre-Louis Bossart c8551e3563 topology1: sof-tgl-rt711-rt1308: add missing switch
For some reason we never added the switch in this topology, with leads
to a missing control when parsing UCM files

BugLink: https://github.com/thesofproject/sof/issues/5950
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/179
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-29 12:29:45 +01:00
Kehuang Li 60df52d454 component: add initial post processing component and topology
Introduce a new component to perform configurable audio post processing
on playback path before smart amplifier.

1. Put google_audio_post_processing libs at $SOF_REPO/third_party/lib
   - libgoogle_audio_post_processing.a
   - libc++.a
   - libc++abi.a
2. Enable google_audio_post_processing in config override
   $SOF_REPO/src/arch/xtensa/configs/override
   CONFIG_COMP_GOOGLE_AUDIO_POST_PROCESSING=y
3. Build the firmware and tool with xcc
4. To verify it works:
   - aplay some audio
   - amixer and grep GAPP
   - sof-ctl to get/set control

Signed-off-by: Kehuang Li <kehuangli@google.com>
2022-06-20 16:06:17 +01:00
Libin Yang fa8570d22d topology1: sof-icl-rt711-rt1308-rt715-hdmi: fix typo
Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-06-01 10:27:01 +01:00
Pin-chih Lin 5df56355d1 topology1: rtnr: set bytes control to read-only
Due to security requirement, the config bytes control is set to read-only
for RTNR with hard-coded the config blob in the topology.

It's WA until the security approval is obtained.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2022-05-25 13:59:22 +01:00
Paul Olaru d1dbc41312 topology1: remove setup config info from further codec_adapter topologies
Remove the setup config info from all initial config data in the
codec_adapter kcontrol's. This is no longer needed.

Fixes: bfd5e61768 ("topology1: remove setup config info from all codec_adapter topologies")
Fixes: 692299f2a6 ("codec_adapter: Remove setup config from module data")

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2022-05-24 16:45:18 +01:00
Pierre-Louis Bossart f3ec2e590a topology1: soundwire: use dynamic pipelines in kernel-dependent cases
We've never enabled dynamic pipelines for SoundWire CI, it's high time
we did so.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-05-18 17:40:27 +01:00
Pierre-Louis Bossart 43a4ddc6f8 topology1: soundwire: add macro to remove HDMI
This is useful for debug and tests.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-05-18 16:04:08 +01:00
Brent Lu 36f4578c50 topology: sof-adl-max98360a-rt5682-4ch: enable BT offload
Enable compile option "BT_OFFLOAD" to enable pipeline for Bluetooth
Offload.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-05-18 15:54:58 +01:00
Brent Lu ee5d375c98 topology: sof-adl-max98360a-rt5682-2way: enable BT offload
Enable compile option "BT_OFFLOAD" to enable pipeline for Bluetooth
Offload.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-05-18 15:54:58 +01:00
Seppo Ingalsuo a781886f6f Topology: Topology1: Fix mistake in buffer size calculation
Pipeline macro pipe-eq-iir-volume-capture-16khz.m4 misses an
update done to other pipelines. The macro COMP_PERIOD_FRAMES()
gives the correct buffer size in other pipelines.

Without this patch change of pipeline scheduling to 10 ms
from default 1 ms causes pipeline fail to buffer size check.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-05-10 17:11:20 +01:00
Ming Jen Tai c8b375638c topology1: mt8195: support Google rtc audio process with RTNR
This commit adds Google RTC Audio Processing with RTNR to MT8195
topology.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-05-10 12:01:05 +02:00
Brent Lu b36db45a7d topology: sof-adl-max98360a-rt5682: enable BT offload
Enable compile option "BT_OFFLOAD" to enable pipeline for Bluetooth
Offload.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-05-08 10:03:38 +01:00
Vamshi Krishna c8fe1927c0 topology1: change audio format to 24 bit for rt1019
with changes we have - 3.072MHz bclk, 32-bit slot-width,
24-bit data-width.
rt1019 in auto mode is compatible with rt1015p driver.
By keeping the SSP configuration same as rt1015 will have fewer
configuration.

Signed-off-by: Vamshi Krishna <vamshi.krishna.gopal@intel.com>
2022-05-03 14:53:49 +01:00
Ming Jen Tai 4789d623a9 Add RTNR to MT8195 topology
This commit adds RTNR to MT8195 with MAX98390 topology.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-05-03 14:53:07 +01:00
Ming Jen Tai 2e6bfbec1c RTNR: Decouple switch-enable control from params blob
This PR is based on https://github.com/thesofproject/sof/pull/5616

It decouples the switch-typed control for enabling/disabling from the
control bytes.

Previously, control blobs should be sent from userspace to to toggle
RTNR on/off.
With this PR, RTNR can be toggled by setting the UCM switch value.

cset "name='RTNR10.0 rtnr_enable_10' off"
cset "name='RTNR10.0 rtnr_enable_10' on"

or from command line

amixer -c0 cset name='RTNR10.0 rtnr_enable_10' 1
amixer -c0 cget name='RTNR10.0 rtnr_enable_10' 0

Signed-off-by: Pin-chih Lin <johnylin@google.com>
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>

merge copy_func
2022-05-03 14:52:35 +01:00
Brent Lu a7103e0255 topology: sof-tgl-max98357a-rt5682: include intel-boards for link ID
Include intel-boards.m4 for BE DAI Link ID definition.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-04-28 15:02:53 +01:00
Brent Lu deb6c5c55a topology: intel-boards: new file for machind driver differentiation
The order of BE DAI Link in topology must match the order in machine
driver. Create this include file to organize the definition of BE DAI
Link ID.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-04-28 15:02:53 +01:00
Brent Lu 68871b05ca topology: sof-adl-cs35l41: support cs35l41 speaker amplifier
Add a topology sof-adl-cs35l41 which supports four Cirrus Logic
CS35L41/CS35L53 speaker amplifiers running in TDM mode without
headphone codec on ADL platform.

Two compile options are added to support the board configuration:
'NO_HEADPHONE' removes headphone pipelines from the topology while
'SSP_AMP_LINK_ORDER' uses the DAI Link order in sof_ssp_amp.c machine
driver instead of sof_rt5682.c.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-04-28 15:02:53 +01:00
Chunxu Li 75dea11da9 topology1: add mt8186 related pipelines and components
add topology file for mt8186
detail:
mt8186.m4
sof-mt8186-mt6366-da7219-max98357.m4
sof-mt8186-mt6366-rt1019-rt5682s.m4

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
2022-04-27 10:42:54 +01:00
Pierre-Louis Bossart d380674ef2 topology1/kernel_dependent/v5.19: enable SoundWire deep-buffer headset topologies
This patch duplicates the configuration at the higher level and adds
the "HEADSET_DEEP_BUFFER" definition.

This is not very elegant and will require changes in two places, but I
don't see a better solution with M4.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart d636482970 topology1: SoundWire: make deep-buffer optional
We don't want to release these topologies to world+dog due to
dependencies on kernel version, so let's make the deep-buffer
optional. The next patch will enable these topologies in the
development/ directory.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart f1cf43126e topology1: SoundWire: add deep buffer support for headphone
Deep buffer is device 31 by convention

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 045e6f44e4 topology1: CMakeLists: split SoundWire NOJACK topologies
Before we enable the headset deep-buffer solution, we want to extract
the NOJACK topologies where the headset deep-buffer would be an
oxymoron.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 746bbff485 topology1: CMakeLists: regroup SoundWire topologies
For some reason the topologies are in separate blocks, regroup them.

No functionality change.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 15200e4091 topology1/kernel_dependent/v5.19: enable HDaudio codec deep-buffer topologies
This patch duplicates the configuration at the higher level and adds
the "DEEP_BUFFER" definition. The topologies are generated in the
kernel_dependent/v5.19 directory and shall only be used by
distro/users when their kernel is based on 5.19-rc1 or later. If these
topologies are used with an older kernel, the ASoC DPCM state machine
issues will result in broken audio. We have no ability to detect a
dependency on kernel to load a topology.

This is not very elegant and will require changes in two places, but I
don't see a better solution with M4.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 94203a22ff topology1: sof-hda-generic: make deep-buffer optional
We don't want to release these topologies to world+dog due to
dependencies on kernel version, so let's make the deep-buffer
optional. The next patch will enable these topologies in the
development/ directory.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 030f27d556 topology1: sof-hda-generic: add deep-buffer pipeline for analog playback
Use SoundWire convention with deep-buffer using device 31.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 96be83b0ab topology1: move sof-hda-generic-kwd to development
We don't support this topology in production and it's not clear if
it's even maintained, move to development.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Seppo Ingalsuo 09a4aa8a8e Topology: Topology1: Add topology with playback DRC to HDA generic
This patch enables testing of DRC in HDA generic devices by adding
it to headset/speaker pipeline after mixer.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-25 16:00:02 +01:00
Marc Herbert 78f4fd7de9 tools: stop copying v2 topologies to the v1 directory
STOP copying all files
 from dir: sof/tools/build_tools/topology/topology2/cavs/
 to dir:   sof/tools/build_tools/topology/

The original plan discussed in the reviews of commit c0bee428ae
("topology: prepare for Topology2.0") and commit 308a24a92b
("topology2: Add build support") and more recently
mentioned in #4611 was to overwrite in place some v1 topologies with
newer v2 topologies in order to "force" users to upgrade without them
realizing it. This original plan is now being abandoned. v2 topologies
will never overwrite v1 topologies and if ever then certainly not "en
masse". Moreover, v2 topologies will be placed in a new /lib/firmware/
subdirectory. So, partial revert the aforementioned commits. More
specifically. stop installing v2 topologies into the same directory as
v1 topologies.

Note there had never been any actual overwrite of any v1 topology yet
because there had never been any v2 topology of the same name.

At this point in time this gets rid of the following copies:

tools/build_tools/topology: abi.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-cnl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-cnl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-tgl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-tgl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-cnl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-cnl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-tgl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-tgl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda.conf
tools/build_tools/topology: cavs-mixin-mixout-hda.tplg
tools/build_tools/topology: cavs-passthrough-hdmi.conf
tools/build_tools/topology: cavs-passthrough-hdmi.tplg
tools/build_tools/topology: cavs-sdw.conf
tools/build_tools/topology: cavs-sdw.tplg
tools/build_tools/topology: cavs-tgl-nocodec.conf
tools/build_tools/topology: cavs-tgl-nocodec.tplg
tools/build_tools/topology: nhlt-ace-mtl-nocodec.bin
tools/build_tools/topology: nhlt.bin
tools/build_tools/topology: nhlt-cavs-tgl-nocodec.bin
tools/build_tools/topology: sof-mtl-nocodec.conf
tools/build_tools/topology: sof-mtl-nocodec.tplg

From an "installer/" and sof-bin release perspective, this removes the
following topology that was just added by commit
ba26eeff9d ("topology2: cavs-nocodec: Add support for MTL nocodec
topology"). Installing v2 topologies into a new /lib/firmware/
subdirectory has not been implemented yet.

No other change besides dropping these copies, everything else is the
same.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-04-25 15:07:12 +01:00
Pierre-Louis Bossart dbdaba93bb topology1: sof-hda-generic: remove digital paths
These paths are not well supported on all devices and lead to errors such as

17:06:06 kernel: HDA Digital: ASoC: dpcm_be_dai_startup() failed at Digital Playback and Capture (-22)
17:06:06 kernel: Digital Playback and Capture: __soc_pcm_open() failed (-22)
17:06:06 kernel: snd_hda_codec_conexant ehdaudio0D0: ASoC: error at snd_soc_dai_startup on Digital Codec DAI: -22
17:06:06 kernel: snd_hda_codec_conexant ehdaudio0D0: ASoC: error at snd_soc_dai_startup on Digital Codec DAI: -22
17:06:06 kernel: snd_hda_codec_conexant ehdaudio0D0: didn't find PCM for DAI Digital Codec DAI

We've already removed this digital path for IPC4/topology2, let's also remove this for topology1.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-22 14:37:57 -05:00
Curtis Malainey 9cf8e0c777 m4: add RO bytecontrol
Sometimes we want to load a binary block of data without letting
userspace interact with the underlying control. An RO control will do
this exactly by loading the data and providing no write access.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2022-04-18 16:39:43 +01:00
Seppo Ingalsuo a10ccbdcb2 Tools: Topology: Add a development topology to RUN SRC on UP2
Add this topology to be able to test SRC playback and capture.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-11 21:45:29 +01:00
Vamshi Krishna 39f2626c47 topology1: sof-adl-rt1019-rt5682: add new topology
for amplifier rt1019 SSP1 link is used
for headset rt5682 SSP0 link is used

Signed-off-by: Vamshi Krishna <vamshi.krishna.gopal@intel.com>
2022-04-08 13:20:13 +01:00
Ming Jen Tai a5fd52ec43 [RTNR] Fix buffer size calculation
The correct frame length should be calculated by
FRAME_LEN = SAMPLING_RATE * PERIODS / 1000000

The macro COMP_PERIOD_FRAMES does the thing.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-03-30 14:00:16 +01:00
Joe.Cheng 64378c57f0 topology1:ADL:add DTS topology
The DTS Codec can be conditionally added to the sof-adl-nau8825 topology
on those pipelines intended for headphone and speaker output.

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-03-28 16:14:04 +01:00
Jairaj Arava 95c53eafc7 topology1: add DMIC 48K Core ID flag to CMake for RTNR
For builds with no Hotword on DSP, generic dmic m4 is used.
RTNR is running on DMIC CORE ID 1. Hence adding the flag.

Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
2022-03-24 13:39:06 -07:00
Libin Yang 5ef9e496d0 topology1: CMakefile: add sof-adl-rt711-l2-rt1316-l01
Add sof-adl-rt711-l2-rt1316-l01 support. This tplg doesn't include any
local MICs.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-03-21 16:21:29 +00:00
Libin Yang 0bb995a7a6 topology1: sof-icl-rt711-rt1308-rt715-hdmi: add NO_LOCAL_MIC & NOAMP support
add sof-icl-rt711-rt1308-rt715-hdmi NO_LOCAL_MIC & NOAMP support

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-03-21 16:21:29 +00:00
Libin Yang 4bb686380e topology1: sof-icl-rt711-rt1308-rt715-hdmi: correct the link description
The links are dynamically assigned. The descriptions should
be changed correspondingly.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-03-21 16:21:29 +00:00
Libin Yang 2898a1a6d9 topology1: sof-icl-rt711-rt1308-rt715-hdmi: remove NO_AGGREGATION
NO_AGGREGATION is never used now. Let's remove it.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-03-21 16:21:29 +00:00
Pin-chih Lin 0c634ab6f7 topology: add waves and waves-2way for sof-adl-max98357a-rt5682 tplg
Add support for waves codec for both two and four max98357a speaker
amplifiers on ADL boards.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2022-03-17 13:07:25 -07:00
Ming Jen Tai bcccf1253d [RTNR] Add Realtek Noise reduction support option to ADL with MAX98360A topology
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-03-16 17:44:29 -07:00
Ben Zhang 51e7c61801 google_rtc_audio_processing: Add config controls
1. Added a byte control to accept Google RTC audio processing
   configuration blob
     `name='GOOGLE_RTC_PROCESSING10.0 Config'`

Tested using:
    sof-ctl -n 48 -t 0 -b -r -s /root/tuning.bin
And verified correct audio processing behaviour on a alderlake board.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-03-15 16:27:53 -07:00
Allen-kh Cheng edc80c793f topology1: add sof-mt8195-mt6359-max98390-rt5682 topology
Add sof-mt8195-mt6359-max98390-rt5682 topology

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2022-03-14 15:36:39 +00:00
Seppo Ingalsuo 6f0bb2b012 Topology: Add sof-hda-generic topologies to test multiband-drc
This patch adds build of topologies sof-hda-generic-multiband-drc.tplg
and sof-hda-generic-2ch-multiband-drc.tplg. The processing happens in
pipeline part after mixer. Volume is controlled in PGA before mixer.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-03-14 11:40:22 +00:00
Balakishorepati 8be523eb79 topology1: Set Dmic samplerate to 48000Hz
Set default samplerate for DMIC to 48000Hz for
amd platforms.

Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
2022-03-11 13:19:53 +00:00
Lionel Koenig 980a5b25b3 topology1: Fix m4 issue in conditional definition
Due to m4 peculiarities it is require to escape the content of an
ifdef. I forgot to add those escaping for around the `SPK_MIC_PERIOD_US`
definition leading to erroneous value if GOOGLE_RTC_AUDIO_PROCESSING was
defined.

Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-03-08 22:05:15 +00:00
Pierre-Louis Bossart 83ada5ac08 topology: disable SSP0 and SSP1 on APL/GLK to enable Zephyr tests
This is a temporary work-around to enable CI tests while performance
is being optimized.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-03-08 15:17:29 +00:00
Lionel Koenig 21a1ee1d16 topology1: Simplify the DMICPROC selection
This should make sure to surface pipeline period and microphone
processing in the top topology file so incoherence are easier to spot
and correct.

I compared topology1/production/*.conf outputs prior and after the
change: except some new line and comment change introduced by the
simplification, there are no changes.

Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-03-08 14:58:44 +00:00
YC Hung ecec8d11d1 topology1: mt8195: support 2ms pipeline capture period
When host is more heavy loading(e.g. camera recoding case),
the size of dai buffer is 4ms and not enough. Increase 2ms
period capture pipeline to buffer more data to avoid overrun.

Signed-off-by: YC Hung <yc.hung@mediatek.com>
2022-03-07 14:21:12 +02:00
Pierre-Louis Bossart 9709ef81dc topology1: sof-glk-es8336: use mclk ID0
It's not clear why the initial contribution used mclk ID1, mclk ID0 is
used by 99% of devices - and a manual inspection of NHLT supports that
claim. We will have to deal with the MCLK ID1 case with quirks.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-03-03 16:46:39 +00:00
Malik_Hsu c42ede6a97 topology: sof-adl-max98360a-rt5682-waves: add new topology
Add support for max98360a speaker amplifiers with waves function.

Signed-off-by: Malik_Hsu <malik_hsu@wistron.corp-partner.google.com>
2022-03-02 14:00:40 +00:00
Curtis Malainey 57e0e149aa topology1: add build with no hotword or 16k dmic
Some builds require more memory, hotword can be handled by CRAS so lets
add the ability to drop it. The 16kHz dmic is not needed either so lets
drop that too.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2022-02-28 13:19:19 +00:00
Pierre-Louis Bossart 0fcad5052c topology: sof-apl-da7219: add missing virtual widgets
Align this topology with the GLK one to avoid probe errors

[    4.224516] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no source widget found for iDisp3 Tx
[    4.224518] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp3 Tx -> direct -> hifi3
[    4.224522] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no sink widget found for iDisp3 Tx
[    4.224524] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp3_out -> direct -> iDisp3 Tx
[    4.224529] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no source widget found for iDisp2 Tx
[    4.224531] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp2 Tx -> direct -> hifi2
[    4.224535] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no sink widget found for iDisp2 Tx
[    4.224537] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp2_out -> direct -> iDisp2 Tx
[    4.224542] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no source widget found for iDisp1 Tx
[    4.224544] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp1 Tx -> direct -> hifi1
[    4.224549] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no sink widget found for iDisp1 Tx
[    4.224551] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp1_out -> direct -> iDisp1 Tx
[    4.224559] bxt_da7219_max98357a bxt_da7219_mx98357a: snd_soc_bind_card: snd_soc_dapm_add_routes failed: -19

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-02-25 15:26:34 +00:00
Chao Song 2c0d875df1 topology1: move capture dai to another pipeline for echo ref
The explanation takes sof-adl-max98357a-rt5682 as an example:

During pipeline_complete(), we search for the source widget
for a pipeline from a list and the ipc_get_ppl_comp() returns
the first widget from the list of source widgets for a pipeline.

With SSP2.IN on pipeline 1, which is the same pipeline ID as the
ECHO_REF playback pipeline for PCM0P, pipeline_complete() for
pipeline 1 ends up not walking the rest of widgets in pipeline 1.

This Echo Ref feature works in chrome kernel today by accident,
because we set up the widgets in the reverse order after resuming
from runtime suspend and the source widget happens to be PCM0P.

To fix this, create a new pipeline for the capture dai widget SSP2.IN,
so that it doesn't pollute the widget list for pipeline 1.

Fixes: #5395

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2022-02-24 22:59:45 +00:00
Marc Herbert 15a7774626 Revert "topologies: switch all .m4 files to codec_provider and codec_consumer"
This reverts commit f50b6fe0ad.

I discovered the hard way that this change causes alsatplg version
1.2.2 (the default version in the current LTS Ubuntu) to corrupt just
a few bytes in .tplg output in an incredibly discrete and
time-consuming way: no error message at build time and same file size.
See example at https://github.com/thesofproject/sof/pull/5162.

We could/should just require a minimum alsatplg version at the CMake
level but at this moment we don't even know which minimum version is
needed and we would also need to take some time to test a few alsatplg
versions. If version 1.2.2 would just fail with an decent error
message that can be searched and discussed then everything would be
fine but silent corruption is really not OK.

So users of recent versions will unfortunately have to live with the
huge number of warnings for now.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-02-18 11:22:36 +00:00
Pierre-Louis Bossart 04a0d3c1b5 topology1: sof-cml-es8336: use correct 24MHz MCLK
Rookie mistake, the clock can't possibly be 19.2 MHz

Reported-by: Nikolai Kostrigin <nickel@altlinux.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-02-16 12:01:30 +00:00
Ranjani Sridharan 6001e44241 topology1: remove redundant kcontrol for codec adapter pipelines
The codec adapter component only uses a single config now. So remove the
runtime config kcontrol as the same kcontrol can be used for runtime
config as well.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-16 12:28:08 +02:00
Seppo Ingalsuo cf43cb1604 Tools: Topology: Add long FIR EQ topology for sof-hda-generic
The topology is useful for testing long binary control IPC and to
test equalization of headset and speaker in sof-hda-generic devices.
It adds a flat IIR and a generic FIR that creates a mild loudness
effect.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-11 10:41:55 +00:00
Seppo Ingalsuo e9048e4b7d Tools: Topology: Fix erratic FIR example response
The previous patch increased the FIR length but it also triggered
a numerical issue in FIR design with long minimum phase filters. The
filter became essentially a band-stop filter and causes difficulties
in test of EQ component. Also the equalizer sounds subjectively
bad. The fix is to change the design to linear phase that always
converges.

Fixes: 0d296ce7d1

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-11 10:41:55 +00:00
Lionel Koenig 28de049330 topology1: Fix issue in google-rtc-audio-processing pipeline
This fixes a mistmatch in the PCM capabilities for the Google
RTC audio processing pipeline.

Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-02-10 16:37:13 -08:00
Seppo Ingalsuo e5d95d1dd3 Tools: Topology: Change playback volume ramp to 20 us
The topologies sof-hda-generic were earlier fixed to use short
20 ms ramp because of nearly inaudible UI blip tones with 250 us
ramp. Some changes to topologies build m4 macros have brought
back the long ramp.

This patch fixes the playback ramps to use 20 ms long transitions.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-09 10:19:48 +00:00
Seppo Ingalsuo b3b937eb3d Tools: Topology: Make PGA token objects unique
This patch avoids the issue that topology .conf file after m4
processing can contain multiple same name objects playback_pga_conf
for volume component tokens with possibly different settings. Alsatplg
does not error from such input and it's not defined which impacs
topology binary.

The new naming is pga_conf_X and and_pga_tokens_X where X is the
pipeline number.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-09 10:19:48 +00:00