Commit Graph

64 Commits

Author SHA1 Message Date
Liam Girdwood a1dfcb7f4b
Merge pull request #110 from xiulipan/pr/daidir
Add direction for dai widget in topology
2018-10-18 16:58:20 +01:00
Pan Xiuli 25dcef9219 topolgy: m4: add direction for widget dai
Add direction for widget dai, 0 for playback and 1 for capture.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-10-18 18:59:24 +08:00
Pan Xiuli b6016cd5e5 topology: duplicate dai formart for pcm add
In PIPELINE_PCM_ADD, DAI_FORMAT is not set but are used later.
Need to set this value to avoid protenial issues.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-10-18 18:43:37 +08:00
Seppo Ingalsuo 27281d75e7 Topology: Add DMIC capture pipeline with gain and high-pass filter
This patch adds topology sof-apl-eq-dmic to help testing acoustical
audio capture via DMIC or work as example for other machine drivers. The
capture format is set as four channels, S32_LE, 48 kHz. The IIR EQ is
a 2nd order Butterworth high-pass with cut-off frequency at 50 Hz to
suppress non-audible lowest frequencies. The EQ provides additional
+20 dB gain to avoid the recording to sound too silent.

The IIR EQ or additional FIR EQ instance can when needed provide other
form factor specific equalization.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-10-11 17:12:27 +03:00
Jaska Uimonen 6b56dafe30 Topology: Add generic type string to effect widgets data field
Adding type string to widget data allows the driver to identify
different effects. As an example use this in the equalizer.

Also modify equalizer to pass default parameters in control's
private data.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-09-25 08:26:30 +03:00
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
Liam Girdwood 9af65849fa
Merge pull request #65 from juimonen/m4debug
[RFC] topology: first try of m4 debug macros
2018-09-04 13:09:03 +01:00
Jaska Uimonen 72629ac2d9 topology: first try of m4 debug macros
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-09-04 15:04:53 +03:00
Mengdong Lin e767798c7f topology: Define hda.m4 for HD-Audio configurations
This patch adds a new file hda.m4.

This file defines macro HDA_DAI_CONFIG(idx, link_id, name) for user to
define configurations for HDA Backend links. The link's data tuple will
carry the HDA type info for kernel driver to check the link type.

Pleae note that there are no HW configurations defined for HDA BE links
because current HW configurations is more suitable for SSP BE links, but
not for HDA. We'll decide what HW configurations are suitable for HDA BE
links later.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
2018-09-03 19:41:43 -04: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
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
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
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
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
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 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 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
Ranjani Sridharan 082f9714a9 topology: add DMIC config definition to DAI config
This patch adds the DMIC config definition and the DMIC
config entry in DAI config.

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
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
Keyon Jie 2c31bbdc20 topology: change virtual widget types to non-DSP ones
This means they won't be sent to firmware for components creation.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-05-24 12:31:19 +02:00
Rander Wang 35420bec93 topology: add virtual dapm route supported in topology file
To reuse some machine drivers in Linux kernel without hacking
dapm route info, some unsupported routes and widgets could be
added in toplogy file.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-05-18 11:31:48 +01:00
Liam Girdwood 4b8d6b5c60 dist: fix make dist for topology M4
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-05 11:22:05 +01:00
Keyon Jie 30aaefaea0 topology: pcm: add pipeline_id for stream name to avoid duplicate
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-28 14:35:38 +01:00
Keyon Jie 73a454544c topology: append pipeline id to PGA and control mixer
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-28 14:35:38 +01:00
Pan Xiuli 277b7a011a topology: utils: add get format name helper function
We may need to get format name from some format short name.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-22 12:35:03 +00:00
Liam Girdwood cc91c73aa3 topology: pcm: Fix PCM ID for topologies > 1 PCM
PCM number was not being preserved and was always zero. This would
overwrite previous PCMs and cause the FW to return invalid PCM error
messages.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-16 17:18:20 +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
Ranjani Sridharan 3105de2481 topology: fix dai capture tokens and move buffer size macro definition
This patch fixes typo in dai capture tokens and moves te buffer size
macro definition to buffer.m4

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 21:46: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 a99283da77 topology: create m4 wrapper for Data section in pipeline definition
This patch adds a m4 wrapper for data section in pipeline definitions

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 11:13:19 +00:00
Ranjani Sridharan c529b32eae topology: create m4 wrapper for VendorTuples section in pipeline definition
This patch adds a m4 wrpper for Vendor Tuples sections
in pipeline definition

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 11:13:19 +00:00
Ranjani Sridharan 9d846ac85a topology: create m4 wrapper SectionPCMCapabilities
This patch adds a m4 wrpper for PCM Capabilities sections
in pipeline definition

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 11:13:19 +00:00
Ranjani Sridharan 625f2e1cc0 topology: create m4 wrapper for Graph section
This patch adds a m4 wrpper for Graph sections in pipeline definition

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 11:13:19 +00:00
Ranjani Sridharan ee8afc8064 topology: create m4 wrapper for mixer control section
This patch adds m4 wrapper for mixercontrol section in
pipeline definition

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 11:13:19 +00:00
Ranjani Sridharan 29dd4df5d1 topology: add kcontrol for tone component
This patch adds the changes to add kcontrols to the tone component

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 11:13:19 +00:00
Ranjani Sridharan da6d3eabb7 topology: make list loop more generic with formatting argument
This patch adds changes to make list loop more generic with format argument

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-03-06 11:13:19 +00:00
Liam Girdwood 5b8dfd1301 topology: stringify buffer caps.
Needs to be string for proper alsa-conf parsing.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-05 16:05:39 +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
Pan Xiuli f6924b1701 topology: m4: add default_hw_conf_id
Add default_hw_conf_id to set the default_hw_config_id value in
ASOC and then we can set the dai config.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-02-13 09:23:07 +00:00
Ranjani Sridharan 09325e91fc topology: Allow multiple kcontrols for volume widget
This patch adds support for multiple kcontrols for the volume
widget and adds a mute switch kcontrol to the volume playback
pipeline.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-02-12 15:47:31 +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
Pan Xiuli c3bd862032 topology: m4: Add two macros for one direction PCM
We may need to generate capture only or playback only PCMs.
Add these macros to help generate them.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2017-12-19 11:11:04 +00:00
Liam Girdwood 8b254b5f3d topology: AIF directions are codec centric wrt PCMs
Commit 0a1a9bbc492e4eb22173ed57c7f5499c8f106289 discovered a bug in
the direction of AIF widgets in relation to PCMs. AIF widgets are codec
centric in ASoC so topology must align.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-13 21:06:27 +00:00
Keyon Jie 88519eee73 topology: fix 2 typos for capture pipeline
1. Widget N_PCMC type should be "aif_in", not "aif_out".
2. Widget W_DAI_IN data should be "N_DAI_IN", not "N_DAI_OUT".

Signed-off-by: Xiuli Pan <xiuli.pan@intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2017-12-13 21:06:27 +00:00