Commit Graph

64 Commits

Author SHA1 Message Date
Pierre-Louis Bossart 8d0f1783a6 topology: renumber SSP tokens - ABI CHANGE
Initial _ACTIVE fields are replaced by a single clock control
This change can lead to regressions, it needs to be aligned with the same
change at the kernel level.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-10-23 12:28:47 -05:00
Pan Xiuli 489832137c topology: m4: add SOF_TKN_DAI_DIRECTION for DAI
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:18 +08:00
Seppo Ingalsuo 53f90d9c6a Topology: DMIC: Reduce PCM capabilities to DMIC configuration
This patch impacts topologies sof-apl-nocodec, sof-apl-da7219, and
sof-glk-da7219 those use the pipe-passthrough-capture macro for DMIC.

The PCM saple rate is limited to 48 kHz (was 8 - 192 kHz). The capture
channels count can be only PIPELINE_CHANNELS (was 1 - PIPELINE_CHANNELS).
This prevents corrupted audio capture that happens when DMIC topology
parameters and capture parameters differ. It happens because DMIC FIFOs
drop samples or add unwanted samples when the configuration does not match.

In sof-apl-nocodec topology the PIPELINE_CHANNELS is set to 2 that
matches the configuration.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-10-18 12:42:38 +03: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
Curtis Malainey 9050d82a7d Use passed in number of channels for pipeline
Pipelines should not expose more channels than what they are configured
to support.

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2018-10-02 13:54:04 -07: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
Curtis Malainey 46fc6fdf6e Set capabilities of channels to those defined in topology
Do not use a static defined number of channels, use the channels passed
in otherwise ASoC will try to allocate number of channels that should
not be allowed.

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2018-09-21 13:21:12 -07:00
Seppo Ingalsuo 157e37856d Decrease SRC pipeline buffers RAM size and update PCM configuration
This patch decreases pipeline buffers usage from 5x or 4x periods to 3x
to avoid DAI error in APL platform when allocating buffers. The smaller
buffers are sufficient since the test topology pipelines are scheduled
every 1ms (earlier assumption was every 5 ms).

The PCM capability is updated to 8 channels similarly as with low delay
pipeline. The highest sample rate is increased from 96 kHz to 192 kHz.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-08-21 13:31:01 +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
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
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 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 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
Wu Zhigang 2cc3ad2a92 topology: 8-channel should be supported
8 channels should be supported.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
Suggested-by: Keyon Jie <yang.jie@linux.intel.com>
2018-06-11 12:11:16 +01:00
Ranjani Sridharan a913f77e65 topology: add DMIC tokens
This patch introduces the DMIC specific config parameter tokens
in topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-31 21:21:38 +01:00
Ranjani Sridharan ed3f3aa94a topology: tone pipeline should be DAI driver and not timer driven
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-31 08:48:28 +01:00
Ranjani Sridharan 04691ffbe5 topology: add ssp tokens defined in kernel UAPI header
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-22 08:30:20 +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 b799e3fa3b topology: modify passthrough pipelien PCM capabilities
For passthrough PCM, we can only support the SSP DAI format as
PCM capabilities.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-22 12:35:03 +00:00
Pan Xiuli 105c88febf topology: Remove duplicate W_DAI_IN/OUT and W_PIPELINE
We call PIPELINE_PCM_DAI_ADD and DAI_ADD that will duplicate call
W_DAI_IN/OUT and W_PIPELINE.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-21 13:36:58 +00:00
Liam Girdwood dbd15bb847 topology: media: fix incorrect pipeline ID for media PCM
Missing include for pcm.m4

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-17 20:33:07 +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
Pan Xiuli 5b5bbe31e6 topology: Remove volume mute in volume pipeline
Volume mute will cause a regression. Delete it now.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-07 11:01:34 +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 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
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
Ranjani Sridharan f0b21aee38 topology: fix typos in capture pipelines
This patch fixes typos in the capture pipelines to avoid confusion.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-02-12 15:45:39 +00:00
Pan Xiuli b8ba5f65f2 topology: test: fix buffer size for volume
We may have different buffer size around volume.
Change the size due to the endpoint setting.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-01-27 16:54:51 +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 49d1ca9a13 topology: sof: Fix a typo for pipe src capture
Should be src capture here in capture pipe.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2017-12-20 10:10:59 +00:00
Liam Girdwood c20762ecac topology: test: Add simple component test generator.
Move testing pipelines into a test directory and reuse test scaffolding
so that they can be used to test multiple components on multiple target
with multiples configs.

Test topology scafolding are now pre-processed using a script to generate
the ALSA conf format with the various changes for each test case.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-13 21:08:57 +00:00
Liam Girdwood e76aeeb7e9 topology: modify passthrough volume playback for duplex operation
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-11 22:03:50 +00:00
Liam Girdwood e094d38e95 topology: Add passthrough volume capture pipe
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-11 22:03:24 +00:00
Liam Girdwood 83b1704555 topology: Modify passthrough playback pipe for duplex operation
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-11 22:00:51 +00:00
Liam Girdwood 475fbdc01e topology: Add passthrough capture pipe
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-11 22:00:18 +00:00
Pierre-Louis Bossart 31c4918ad5 topology: remove stream_name for all DAI definitions
stream_name is not used by any machine drivers, there is no point in
providing the information to topology layers

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2017-12-07 10:59:46 +00:00
Liam Girdwood d774609c90 topology: Allows playback and capture pipelines to share same PCM
Add support so that different playback and capture pipelines can share
the same host PCM device.

Modify board configs to use PCM0 for playback and capture.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-10-02 15:28:24 +01:00
Liam Girdwood 81b02a796f topology: SRC testing passthrough pipeline.
The testing pipline for 24 bit SRC 48kHz output.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-09-11 16:38:14 +01:00