Commit Graph

930 Commits

Author SHA1 Message Date
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
Chao Song 7882b1a93d topology2: add pin binding classes for multiple I/O queue
An IPC4 widget may support multiple I/O queue. Queue ID is
required during widget binding in route setup.

This patch adds sink_pin_binging and src_pin_binding classes
for multiple I/O queue support.

For widget requires special pin(queue) binding, sink_pin_binding
or src_pin_binding should be defined in the widget object. So
that the kernel knows which pin to use during widget binding
by parsing topology.

Note that pin binding should be defined for all sink/source pins
or for none. Even if there is only one sink pin requires special
pin binding, pin binding should be defined for all sink pins, and
for pins that are not used, give the value "NotConnected". This rule
applies to source pins, too.

Example: smart_amp widget has two sink pins and one source pin,
and its feedback sink pin requires special pin binding, so we have to
define sink_pin_binding objects within smart_amp object like this:

Object.Base.sink_pin_binding.1 {
    # the main sink pin is connected to host for playback data
    sink_pin_binding_wname	"copier.host.1.1"
}
Object.Base.src_pin_binding.2 {
    # the feedback sink pin is connected to capture dai for codec feedback.
    sink_pin_binding_wname	"copier.SSP.2.1"
}

In this example, smart_amp is connected to host and DAI directly,
it is also possible to be connected to host and DAI indirectly (with
gain or other widget in the middle).

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2022-08-29 13:26:49 +01:00
Chao Song 721e58f3d2 topology2: add num_sink/source_pins tokens for widget
These two tokens will be used by the kernel to decide the
supported number of sink/source pins, thus to allocate
correct widget queue id in route setup.

These two tokens are mandatory for IPC4 widgets, because
the default value in Linux kernel is zero, which is invalid
for queue id allocation.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2022-08-29 13:26:49 +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
Rander Wang d40fb8fc99 topology2: add stream token in topology2
Add stream d0i3 token

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-08-25 13:24:25 +01:00
Marc Herbert e1d6b9a08a topology2: build only when alsatplg is v1.2.7 or greater
Fixes: #5323

The v1.2.6 requirement was a lie the whole time because alsatplg v1.2.6
does not have any `-I` option. The truth was: un-released alsa-utils
from git was required. The check for v1.2.6 was an approximation good
enough for many users but not for everyone, see for instance #5323.

Now that alsa-utils v1.2.7 has been released we can stop lying:
 https://github.com/alsa-project/alsa-utils/commit/7d934f3142549

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-08-18 13:36:49 +01: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
Fred Oh 23e81f7c20 topology2: cavs: add mixer-based hda pipelines to passthrough hdmi tplg for mtl
First two pipelines are mixer-based HDA playback and capture pipelines.
Tested with ALC256 HDA codec.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-07-15 09:08:12 +01:00
Fred Oh fcca1c3b7c topology2: cavs: re-order cavs hda toplogies
Re-ordering CNL TGL to MTL and DMIC 2ch to 4ch.
No functionality change.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-07-15 09:08:12 +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
Bard Liao 606857bca5 topology2: cavs-passthrough-hdmi: use hdmi-generic.conf
hdmi-generic.conf can be used for all topologies with HDMI
support.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao 96ac486b58 topology2: add HDMI support on SDW
Create a hdmi-generic.conf and use it in cavs-sdw.conf to add
HDMI support

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao c97fb30f97 topology2: sdw-cavs: add dmic support
Add PCH DMIC support for MTL RVP with dmic01 id = 2 and dmic16k id = 3.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao 73f4f86d73 topology2: remove pipeline format parameter
The "format" parameter is never used by IPC4. And it should not be
mandatory.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao 67daf2ecf5 topology2: add num_audio_formats for gain
We should set num_audio_formats in pipelines when we remove the
default value from gain.conf.
Otherwise, we will see below error with cavs-mixin-mixout-hda-2ch-tgl.tplg
tplg: ready widget id 2 pipe 1 type 6 name : gain.1.1 stream none

Fixes: 773a05a3 ('topology2: add S24LE support')
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-04 15:53:06 +01:00
Yong Zhi 45f6d6fa59 topology2: cavs: hda: add tplg build for mtl
Add the topology for skl_hda_dsp_generic machine.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2022-07-04 15:28:47 +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
Rander Wang 773a05a32e topology2: add S24LE support
S24LE is the major format used by SOF IPC4 FW and windows platform
and has better perfomance than S32.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang bf65c0783d topology2: add src support on sdw platform
Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang 715233aac9 topology2: add pipeline for src
This pipeline supports conversion from 8k ~ 192k to 48k.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang 7b6d395aca topology2: add cavs src support
Cavs src is different with sof src. It has different uuid
and param which are composed of base module definition and
output rate.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang 3f12097f36 topology2: add support for sampling rate
The original calculation will generate 44 sample size for
44.1khz, actually it at least needs 45 sample size.
This patch uses ceil value for such rate, also inlcude
11.025kh, 22.05kh, 88.2khz, 176.4khz.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +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
Pierre-Louis Bossart 51f2b1fe8e topology2: cavs: cavs-mixin-mixout-hda: use macro for DAI name
The copier 'stream_name' and dai 'name' need to match, use macro to
enforce consistency.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart 1ef9979c73 topology2/cavs/cavs-mixin-mixout-hda: remove pipeline object from widget
The pipeline stream_name is not used at all, and as a consequence we
can remove the pipeline from the Widget objects

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart e21649c109 topology2: cavs: use macro for PCM devices
The same 'Analog Playback' string is used for the copier stream_name
and PCM caps name. This is not a coincidence but a requirement to
match PCM and widgets. Same for 'Analog Capture'

Use a macro to make sure this 1:1 mapping is not broken.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart 80c1cb0deb topology2: cavs: rename mixin-capture as dai-copier-gain-mixin-capture
Be exhaustive on pipeline contents.

Also remove Windows references and copy/pasted comments

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00