Commit Graph

191 Commits

Author SHA1 Message Date
Mengdong Lin 26c9709f2d topology: Create HDA only m4 file for APL
This patch creates sof_apl_hda.m4 to create topology for HDA only FE
and BE links.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
2018-08-08 00:50:31 -04:00
Mengdong Lin 2f80d1e9f5 topology: Define HDA_DAI_CONFIG to configure HDA backend links
this patch define macro HDA_DAI_CONFIG(idx, link_id, name) for user to
define configurations for HDA Backend links.

Pleae note, there is not HW configurations defined for HDA BE links
because current HW configurations is more suitable for SSP BE links.
But the data tuple will carry the HDA type info for the link for kernel
driver to check the link type.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
2018-08-08 00:38:40 -04:00
Mengdong Lin 54fc02dd84 TOREMOVE: Remove test folder from make
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
2018-08-07 19:07:23 -04:00
Pierre-Louis Bossart 8e50a510c3 topology: add APL and GLK Chromebook support
The APL and GLK topologies are identical except for a swap of SSPs and MCLKs.
Tested on Reef and GLK

TODO:

1. there is currently a kernel bug where only duplex pipelines can be
assigned to the same PCM number. For now mark DMIC as device 99 to
track this is a work-around to be modified in the near future

2. Edit the Virtual routes/widgets to remove kernel warnings (no
functional impact)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-31 23:39:41 -05:00
Pierre-Louis Bossart 7c214b83b7 topology: Fix SectionPCM macros
PR43 and commit dc10876c20 ('topology: changes to SectionPCM
macros') went a bit too far and removed a much-needed alignment
between pcm id and dummy dai id. Tested on APL/Reef Chromebook

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-30 10:41:31 -05: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
Ranjani Sridharan f08c93721d topology: replace PIPELINE_PCM_DAI_ADD with PIPELINE_PCM_ADD
Avoid duplicating dai_add in sof-apl-nocodec topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-24 22:42:56 -07:00
Ranjani Sridharan 27d3e14bdf topology: add comments to sof-apl-nocodec m4 file
This makes it easier to look up the macro definitions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-24 09:19:21 -07:00
Ranjani Sridharan 2187702ee2 topology: add dmic pipeline to apl nocodec topology
Add DMIC capture pipeline for DMIC01 to the apl nocodec topology.
DMIC16k to be added later.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-24 09:19:21 -07:00
Liam Girdwood 48de25287e
Merge pull request #42 from ranj063/dai_id
topology: fix BE DAI id to be set to ID (not index)
2018-07-24 10:02:10 +01:00
Liam Girdwood d542a6eff6
Merge pull request #40 from xiulipan/daiindex
dai index alignment
2018-07-24 10:00:46 +01:00
Ranjani Sridharan c7adc3dae6 topology: fix BE DAI id to be set to ID (not index)
Previously it was set to be the dai index which works if there's
only one type of BE DAI's.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-23 19:49:34 -07:00
Pierre-Louis Bossart eecc7f6665 topology: fix Makefile.am
copy/paste mistake

Fixes: 3dd17dc0 ('dist: fix make dist for topology M4')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-23 11:43:32 -05:00
Pan Xiuli 3d903b5e3f topology: Add dai index in DAI SectionBE
DAI_TYPE and DAI_INDEX are both needed to get the dai in FW, add
DAI_INDEX in SectionBE to make sure we can handle multiple type dais.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-07-23 16:28:35 +08: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
Pierre-Louis Bossart 812c15cb66 topology: sof-apl-nocodec: enable all 6 SSPs
For some reason parts of the topology were commented out.  Make sure
all 6 SSPs are enabled.

Tested on Up2 with a LogicPro-based check on SSP5 (only interface
accessive on the HAT connector)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-17 17:25:16 -05:00
Liam Girdwood 576d15b9b4
Merge pull request #26 from RanderWang/icl
tplg: add nocodec topology for icelake
2018-07-17 11:42:53 +01:00
Rander Wang 6ba607461d tplg: add nocodec topology for icelake
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-07-16 09:59:02 +08:00
Pierre-Louis Bossart 4d1b3d15b6 topology: fix sof-apl-pcm512x
Remove DMIC support to avoid topology load fail,
Remove capture (not supported by PCM512x codec)
Simplify structure using PCM_PIPELINE_ADD instead of PCM_PIPELINE_DAI_ADD
Enable 24-bit output
Enable up to 32-bit PCM (tested with S16_LE and S32_LE)

Tested on Up2, no issues detected.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-13 13:14:50 -05:00
Zhang Keqiao e55cd317a2 topology: fix id for sof_cnl_rt274 topology
Codec SSP id doesn't match with machine driver, so
change the id to 1 to fix the topology loading issue.

Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2018-07-10 10:47:14 +08:00
Ranjani Sridharan 591a07d02d topology: add multi-stream topology for GLK
Add a multi-stream topology for GLK with speaker on SSP1, headset on
SSP2 and DMIC. Only playback pipelines on SSP1/2 for now. Capture
pipelines to be added later.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-07 23:08:50 -07:00
Pan Xiuli 794cf7a707 topology: fix id for sof_apl_pcm512x topology
SSP5 id should be kept to 0 and new added DMIC goes to 1 to keep old
machine driver work with both old topology and this topology.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-07-06 17:54:51 +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
Rander Wang fa2e98a118 SOFT: fix this topology failed to be loaded
Set dai id number according to NoCodec-id

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-07-04 14:05:45 +08:00
Liam Girdwood 9aa6193795
Merge pull request #12 from zhigang-wu/master
ssp2 should be 8-channel
2018-06-29 14:29:52 +01:00
Keyon Jie b5abe7194b topology: initial topology file for UP^2
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-06-29 18:38:12 +08:00
Keyon Jie 6da473ebab topology: sof-apl-nocodec: fix a comment typo
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-06-29 18:06:31 +08:00
Keyon Jie f359214717 Revert "topology: dai: correct default_hw_conf_id"
This reverts commit 229da95e0d which call
regression:
https://github.com/thesofproject/soft/issues/15

Default_hw_conf_id is id, not index of array, revert to fix it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-06-29 15:47:28 +08:00
Wu Zhigang 707d6d6a5c topology: reorder the ssp setting by increasing order
reorder the ssp setting according on the ssp port number
from ssp0~ssp5. make it more clear.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
2018-06-29 09:08:24 +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
Seppo Ingalsuo 3540310eea SOFT: Extend PCM parameters range in passtrough capture pipelines for DMIC
This patch extends the allowed sample rate range to 8 - 192 kHz, and
channels count to 1 - 16. Previously only 48 kHz and 2 - 4 channels was
allowed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-06-28 13:26:11 +03:00
Wu Zhigang 254013aa94 topology: ssp2 should be 8 channels
this is typo error. ssp2 should be 8-channel

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
2018-06-28 14:13:39 +08:00
Seppo Ingalsuo dc0d9e028e SOFT: Increase SRC playback topology buffer size
This patch increases the SRC source buffer to contain 5 periods of data
(measured for 1 ms @ 48 kHz ). It fixes the issue in 176.4 kHz to 48 kHz
playback conversion that the pipeline freezes with insufficient available
data in source buffer for SRC to convert and too little free in buffer
for host to fill another 48 frames.

176.4 kHz playback is currently the largest buffer size consumer due
to non-steady in/out rate. The higher rate conversion 192 kHz to 48 kHz
can operate with smaller size buffer due to steady in/out rate.

Note: This has been only simulated in the host test bench since SRC
playback does not run currently in real devices due to another issue.
However since buffers simulation is accurate this should be a real issue.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-06-27 16:44:43 +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 82996c24a5 topology: add pre-defined PDM controller configs
Add some pre-defined PDM controller configs that sets the
number of active controllers and the corresponding
pdm tuples.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-26 11:41:23 -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
Keyon Jie 553137d741 topology: sof-apl-nocodec: enable multiple SSP pipelines
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-06-26 21:37:27 +08:00
Keyon Jie 229da95e0d topology: dai: correct default_hw_conf_id
default_hw_conf_id was used by mistake, we should use index 0 of the hw
config array.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-06-26 21:29:39 +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 6d9ad7a505 tokens: move SAMPLE_BITS to ssp tokens
SAMPLE_BITS is SSP specific. So move it to be part of the
ssp tokens.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-24 23:00:49 -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 c0172307ff topology: add new token for SSP MCLK ID
Some platforms might have more than one MCLK's exposed. Add a token
that will allow specifying the MCLK ID to be used in such cases.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-24 21:11:22 -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 41ef0529fc topology: use switch IO handler for tone switch
Use the bespoke switch IO handler in the driver for the tone switch kcontrol.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-24 00:28:55 -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