Commit Graph

55 Commits

Author SHA1 Message Date
Seppo Ingalsuo baa791f6e1 Topology: Add Equalizer
This patch adds EQ, bytecontrol, and EQ+volume pipeline m4 macros and an
enhanced topology with EQ for UP2 + HiFiberry. There is not yet FIR/IIR
type select. The EQ type is currently hardcoded into kernel.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-09-25 08:26:15 +03:00
Ranjani Sridharan dc10876c20 topology: changes to SectionPCM macros
This patch addresses the following:

1. Move PCM_PLAYBACK_ADD to pcm.m4
The macro was in the wrong m4 file (buffer.m4)

2. Remove pipeline_id argument and "index" from SectionPCM

"index" is not a member of struct snd_soc_tplg_pcm. So this
information is not used in the kernel at all.
Secondly, the PCM ID could be associated with more than
one pipeline especially in the case of DUPLEX PCM's. So better
to remove it to avoid ambiguities.

3. Remove dai_id

This dai_id is the ID given to the CPU DAI when the FE DAI link
is created. In the case of SOF, we should use an linearly increasing
unique ID for CPU DAI ID's. If this argument is omitted, the kernel
automatially assignes an ID based on the component->num_dai
which is linearly incremented every time a new DAI link is added.

4. Finally update users to align with the new definitions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-25 21:24:20 -07:00
Zhang Keqiao 3dd17dc01d dist: fix make dist for topology M4
Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2018-07-19 13:39:45 +08:00
Pan Xiuli dfe7fa9196 topology: test: set id to 0 for codec topology
For nocodec topology, we need the id to be same with SSP index since
all SSP ports are enabled in nocodec. Codec machine drivers always have
id to 0.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-07-06 17:54:51 +08:00
Seppo Ingalsuo 17f5a08d2e SOFT: Increase test capture pipeline max. channels count to 4
The 4ch DMIC capture test topologies can't work without this change to
pipeline.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-06-28 14:39:36 +03:00
Ranjani Sridharan ddbd2d655f topology: add more dmic test topologies
This patch modifies the test topology generator to add dmic topologies
with pre-defined PDM controller configurations, sample rates and
formats.

It also modifies the DMIC_CONFIG macro to get the number of
active pdm from the pdm config.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-26 11:42:27 -07:00
Ranjani Sridharan 71dff859e3 topology: add test topologies with mclk id 1
Add some test topologies with mclk id 1

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-26 11:18:09 -07:00
Keyon Jie 9ac2e32099 topology: change BE name for NoCodec to support multiple SSPs/BEs
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-06-26 21:42:56 +08:00
Liam Girdwood 308cf3d140
Merge pull request #4 from ranj063/dai_changes
DAI updates - topology changes
2018-06-26 12:19:29 +01:00
Ranjani Sridharan f73aa73978 topology: move dmic related macros to dmic.m4 in platform/intel
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-25 13:44:52 -07:00
Ranjani Sridharan f58a047278 topology: move ssp related macros to ssp.m4 in platform/common
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-25 13:44:52 -07:00
Ranjani Sridharan a835ff2ae9 topology: move platform m4 files from dsps directory to platform/intel
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-25 13:44:52 -07:00
Ranjani Sridharan 1adb92ab2e topology: dai: rename sample_bits macro to config_data
Rename SAMPLE_BITS macro to a more generic CONFIG_DATA macro for SSP
to also include the mclk id.

Also modify users of the macro with the new name.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-25 13:44:38 -07:00
Ranjani Sridharan e6140f8200 topology: add SAMPLE_RATE token for tone comp and define it in tone definition
Add SAMPLE_RATE token for tone comp.
Include it in tone definition and set it from the test pipeline definition.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-24 21:15:39 -07:00
Ranjani Sridharan 09148482f9 topology: add test tone pipelines for APL
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-24 00:29:05 -07:00
Ranjani Sridharan bd7dc88231 topology: remove DMAC ID/DMAC_CHANNEL from PIPELINE/PCM/DAI definitions
The firmware no longer uses the DMAC ID and channel info from topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-13 08:28:35 +01:00
Pan Xiuli 5a59eca380 topology: test: Fix tplb-build.sh when did no use XARGS
Miss TFILE when not using XARGS.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-04 09:29:08 +01:00
Ranjani Sridharan 07d290c8ac topology: add DMIC dai support in test capture m4
Add support for adding DMIC config for DMIC DAI type.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-31 21:21:38 +01:00
Ranjani Sridharan d6e201c961 topology: scripts: add dmic test topology
This patch adds the dmic test case to the tplg generating script.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-31 21:21:38 +01:00
Ranjani Sridharan 1dcac3225e topology: make m4 filenames dai type agnostic
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-31 21:21:38 +01:00
Ranjani Sridharan 56b8316e2a topology: separate ssp params from dai common params
This patch makes changes to DAI config in topology to separate out
SSP specific params from common params in preparation for other
DAI types coming soon.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-31 21:21:38 +01:00
Ranjani Sridharan e77a8ef269 topology: scripts: changes to accommodate different DAI types
This patch makes the following changes to make way for handling
different DAI types in tplg build script:

1. Define the test DAI type while processing m4 files
2. DAI format and DAI port might be relevant for other types of DAI's.
So use generic TEST_DAI_PORT and TEST_DAI_FORMAT instead of
TEST_SSP_PORT TEST_SSP_FORMAT

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-31 21:21:38 +01:00
Ranjani Sridharan 21f523401e topology:scripts: fix tplg build script to compile last topology when using xargs
When using xargs, the last topology file while batch processing alsatplg
doesn't get compiled properly.

Also remove a stray ; in the script.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-31 21:21:31 +01:00
Keyon Jie ed471edb8f topology: dai: add link_id for dai_link matching in DAI_CONFIG
This is used for the matching with snd_soc_dai_link.id in BE dai_links.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-05-31 16:48:45 +01:00
Ranjani Sridharan 28ab096452 topology: scripts: modify simple_test function to be generic and remove tone_test function
Make simple_test function generic by accepting the array of
test cases as an argument. The tone_test function can
be removed and replaced with the modified simple_test function
and passing the required test case to generate the tone
topology file.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-22 08:50:30 +01:00
Zhang Keqiao 86fe688a2b topology: test: add some passthrough topologies for CNL
Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2018-05-07 14:10:59 +01:00
Ranjani Sridharan d0f4aba934 topology: speed up topology build
Speed up topology with batch processing of m4 files

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-07 11:55:47 +01:00
Pierre-Louis Bossart 13b56fa604 topology: mirror alsa-lib definitions for mclk/bclk
ALSA-lib introduced new definitions to work around an logical
inversion for master/slave definitions. see e.g. commit 3778a30bb00
('ASoC: topology: Fix bclk and fsync inversion in
set_link_hw_format()')

Make sure clarifications are reflected in the topology files
bclk/fsync slave -> codec_slave
mclk slave -> codec_mclk_in

This patch requires the use of the latest alsa-lib git master (v1.1.6
does not contain the relevant patches).
This patch also requires an updated kernel.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-30 16:56:51 +01:00
Pierre-Louis Bossart 6ad7a30c76 topology: test: fix APL test loops
Copy/paste mistake, fix.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-13 19:51:21 +01:00
Pierre-Louis Bossart 935161d09f topology: test: generate more configurations for ApolloLake
Disk space is cheap, life is short, let's just brute-force generate
all the combinations supported on SSP. Testers should just pick from
the generated configurations instead of adding their own changes to
the tplg-build.sh file.

Passthrough is special-cased since pipeline and DAI format need to
match.

The frequencies and DAI formats remain in clear-text and duplicated,
we could optimize further but then it'd become unmaintainable.

Next step is to add slave mode and make the frame rate vary.

If this is deemed to heavy, we can define a 'make test' target to
avoid generating all these files by default. Alternatively people can select the modes needed by just changing the APL_ arrays.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-04-13 15:53:27 +01:00
Keqiao.Zhang 8e8cd884c3 Makefile: fix the make clean issue at the top-level directory
make clean done at the top-level does not clean the topology/test
directory, use clean-local instead of clean

Signed-off-by: Keqiao.Zhang <keqiao.zhang@linux.intel.com>
2018-04-11 19:41:26 +01:00
Keqiao.Zhang c0857f17fa dist: fix make dist for tone topology M4
Signed-off-by: Keqiao.Zhang <keqiao.zhang@linux.intel.com>
2018-04-11 19:37:30 +01:00
Keqiao.Zhang e2c5794d6d topology: test: remove 2 unsupported passthrough tplg
Signed-off-by: Keqiao.Zhang <keqiao.zhang@linux.intel.com>
2018-03-30 10:32:26 +01:00
Keqiao.Zhang 2bd31df02b topology: test: add different ssp modes of topologies for test
Signed-off-by: Keqiao.Zhang <keqiao.zhang@linux.intel.com>
2018-03-30 10:30:02 +01:00
Keqiao.Zhang 3c71cf866c topology: ssp: add TEST_SSP_MODE for ssp to support more modes
Signed-off-by: Keqiao.Zhang <keqiao.zhang@linux.intel.com>
2018-03-30 10:29:18 +01:00
Keqiao.Zhang 149d7c36ea topology: test: add more topologies for test
Signed-off-by: Keqiao.Zhang <keqiao.zhang@linux.intel.com>
2018-03-22 12:31:59 +00:00
Liam Girdwood 07d025363a topology: remove deprecated drivers from test topologies
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-16 12:00:04 +00:00
Liam Girdwood 8d9b8d51f9 topology: Add stream name to DAI widgets for binding to DAI links
DAI Widgets need bound to a DAI link to complete the DAPM graph. This is
only working atm as we are only using one DAI. Add stream name to DAI
widgets to be used by topology binder.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-13 20:35:42 +00:00
Pierre-Louis Bossart be6ff21ae9 topology: test: add simple test for Up2 board
Up^2 board exposes I2S signals on the 40-pin connector
(https://wiki.up-community.org/Pinout_UP2)

Add test for SSP5 (marked in pinout as AVS_I2S6)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-03-07 09:32:03 +00:00
Ranjani Sridharan c95433636f topology: break up topology builder m4 files into per component macros
This patch break up the local.m4 and build.m4 topology builder includes
into per component m4 files

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 11:25:26 +00:00
Ranjani Sridharan b99d1de979 topology: add a test hostless tone pipeline
This patch adds changes to create a test hostless tone pipeline.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 11:13:19 +00:00
Liam Girdwood e02f6910d1 topology: Add support for memory capabilities
Add support in topology to define different memory capabilities that can
be included by standard pipeline definitions to set platform specific
capabilities for buffers.

This patch allows memory capabilities to be defined for each platform and
included by all pipeline definitions.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-05 13:38:12 +00:00
Keyon Jie 33e4b0cc6f topology: test: change to use volume topology files for apl at the moment.
As it doesn't work for pass through at the moment.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-08 20:05:04 +00:00
Pierre-Louis Bossart 9f94b57e67 topology: test: fix shell macro expansion for MCLK argument
shell expands $10 as $1 followed by 0, so test .conf topology files contained
mclk_freq "codec0" instead of the expected value (e.g. 19200000).

Parenthesis are required when there are more than 9 arguments to a
macro...

Reported-by: "Wang, Yan" <yan.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-01-16 17:52:33 +00:00
Liam Girdwood a6bb8de907 topology: test: fix MCLK macro usage
Incorrect BCLK macro name used to specify MCLK. Fix.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-11 11:23:24 +00:00
Liam Girdwood 783198d190 Merge branch '1.0-stable'
# Conflicts:
#	topology/test/tplg-build.sh
2018-01-11 11:20:28 +00:00
Liam Girdwood 1f23137df9 rimage: build: Fix make dist and version.
make dist will now include the topology files.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-11 11:08:34 +00:00
Keyon Jie 1111cc11ca topology: test: make mclk configurable
The mclk may be different for different platforms, here make it
configurable for test topology files.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-01-10 20:37:55 +00:00
Pan Xiuli 0866b2a13e topology: test: Add test cases for SRC pipe
Add src pipe for test case.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2017-12-20 10:10:59 +00:00
Pan Xiuli c737dcacc3 topology: test: Add test cases for SRC pipe
Add src pipe for test case.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2017-12-20 10:10:05 +00:00