Commit Graph

281 Commits

Author SHA1 Message Date
Sebastiano Carlucci 0cf80e2d32 tools: test: Add DC Block test case to tplg-build
This commit includes a new test case in tplg-build.sh. It also includes
the new simple pipelines pipe-dcblock-capture/playback. Those new
pipelines are used by tplg-build.sh to generate the test pipelines.

Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
2020-03-26 16:49:37 +00:00
Sebastiano Carlucci c6f83acd0e tools: tune: Add tools to generate bytes control
This commits adds the scripts to generate the bytes control blob
for the DCB. It also provides some generic scripts to convert
valid binary blob to a csv or binary file (usable by sof-ctl)
or an m4 byte control topology file.

This commit adds two new folders under tools/tune
- dcblock: scripts to generate the blob in Octave
- common: scripts to convert any generic blob to a config file.

Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
2020-03-26 16:49:37 +00:00
Sebastiano Carlucci eae636c4ff sof: dcblock: Add DC Blocking Filter Component
This change provides a DC Blocking Filter (DCB) component. A DCB is a
high-pass filter used to remove any DC offset from a signal. The
coefficients for the component can be set individually for each channel.

Currently, only the following formats are supported:

s16_le
s24_le
s32_le

Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
2020-03-26 16:49:37 +00:00
Fred Oh f734991fbe topology: enable eq pipeline when EQ is enabled in makefile
Instead of making new files for audio equalizer topology, reuse existing
topology and replace only volume pipeline by macro replacement.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-03-26 10:18:11 +00:00
Bard Liao ae53aebcff topology: sof-icl-rt711-rt1308-rt715-hdmi: define NO_AGGREGATION mode
We will create individual PCM for each speaker when NO_AGGREGATION
is defined

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-25 13:10:48 -05:00
Bard Liao 2c00080987 Topology: sof-icl-rt711-rt1308-rt715-hdmi: Use demux for platforms with multiple speakers
We only need demux for two speaker dais case.

Fixes: 5e8de9fd52 "topology: sof-icl-rt711-rt1308-rt715-hdmi: Merge
two pipeline with demux"

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-25 13:10:48 -05:00
Pan Xiuli 2978741118 topology: fix apl-demux-pcm512x HDMI dai id
The HDMI DAI id changed, update the demux topology.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-03-25 14:55:49 +01:00
Guennadi Liakhovetski 4722cf9314 topology: remove an unused parameter from dai.m4
The N_DAI_OUT and N_DAI_IN pacros, defined in dai.m4, don't take
parameters, fix their usage.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-03-25 13:12:14 +00:00
Guennadi Liakhovetski 3bccc18036 topology: fix a copy-paste error in comments
Replace multiple occurrences of a copy-paste error in comments in
bytecontrol.m4: CONTROLMIXER should actually be CONTROLBYTES.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-03-25 13:12:14 +00:00
Bard Liao 40454099b0 topology: pipe-volume-demux-playback: Move demux after volume
So the volume control will apply to both pipelines.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-25 13:00:12 +00:00
Libin Yang f755277000 topology: sof-icl-rt711-rt1308-rt715 add MIC MUTE LED support
Add support of MIC Mute LED for capture on
sof-icl-rt711-rt1308-rt715 platform.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
2020-03-25 12:24:25 +00:00
Libin Yang 74e626a7be topology: add pipe-highpass-switch-capture pipeline
This patch adds the highpass capture pipeline which enables the volume
and switch controls. In the switch control, it enables capture LED
controlling.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
2020-03-25 12:24:25 +00:00
Libin Yang 870448d374 topology: add pipe-volume-switch-capture pipeline
This patch adds the capture pipeline which enables the volume and switch
controls. In the switch control, it enables capture LED controlling.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
2020-03-25 12:24:25 +00:00
Fred Oh 3b66418a0e topology: move byt/cht platform specific settings
Move byt/cht platform specific ifelse to platform files.
And byt/cht have codec and nocodec differences, which need to have
PLATFORM-codec and PLATFORM-nocodec files.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-03-24 11:42:26 +00:00
Fred Oh 1040c35d23 topology: move ifelse conditions to platform files
Move platform specific conditions to each platform file.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-03-24 11:42:26 +00:00
Seppo Ingalsuo 26ea50ecd0 Topology: Fix in EQ only pipelines with macro PIPELINE_SINK
This patch fixes the buffer to define as PIPELINE_SINK. The
upper level topologies do not use these topologies so there has
not been related errors. However test pipelines were impacted.

Also the PIPELINE_PCM defined name is made more generic. It can
be whatever and not just high-pass type.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-20 13:29:00 +00:00
Seppo Ingalsuo 25c1d0fef7 Topology: BDW, BYT, CHT: Reduce buffer size max for media PCM
This change prevents the IPC error that happens if aplay or
speaker-test uses larger than 64 kB buffer size. The buffer
setting in PCM_CAPABILITIES() is now the same as for low latency
PCM.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-20 11:56:56 +00:00
Jairaj Arava 35e5b23f7f topology: add TGL tplg for Max98373 amp and ALC5682 Headset codec
This patch adds TGL topology for the DUT which has the
following audio configuration:
	Max98373 speaker (I2S), ALC5682 headset codec (I2S),
	DMIC, 4 HDMI devices.

Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
2020-03-20 11:30:40 +00:00
Bard Liao 5e8de9fd52 topology: sof-icl-rt711-rt1308-rt715-hdmi: Merge two pipeline with demux
Now kernel expots one PCM with two CPU dais. So use demux to play
with two DAIs.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-17 16:43:06 +00:00
Bard Liao 0a52c2e319 topology: add pipe-dai-endpoint
This will create a basic pipeline with a buffer only. Note that
we don't implement a SectionGraph to connect the buffer to its
starting component, we should define it manually.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-17 16:43:06 +00:00
Bard Liao da8ac71a29 topology: add pipe-dai-sched-playback
This is basically the same as pipe-dai-playback.m4, but use SCHED_COMP
instead of N_DAI_OUT.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-17 16:43:06 +00:00
Bard Liao 3ae3beffbc topology: dai: add DAI_ADD_SCHED to set scheduling component
So we can set scheduling component when adding a DAI.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-17 16:43:06 +00:00
Seppo Ingalsuo df6c637e8f Topology: BYT: Adjust SRC pipeline for lower RAM consumption
This patch removes support for over 48 kHz sample rates and changes
scheduling to every 1 ms to save in buffers sizes. In pipe-pcm-media.m4
the buffers in the pipeline are reduced from 4 to 2 or 3 periods.
These changes should allow the media PCM to work in BYT platform.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-16 19:43:44 +00:00
Yong Zhi 0c7514e379 topology: add JSL tplg for max98360a speaker amp.
Add MAX98360a support for Waddledoo product.
Tested mono playback with amp EVB on SSP1 in i2s mode.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2020-03-05 22:10:09 +00:00
Fred Oh 752f086bdc topology: add platform sku files to config platform settings
icl, cml whl are sharing some toplogy files. Create platform specific files
including DSP configuration, SSP setting and DMIC to simplify platform
settings.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-03-04 22:17:15 +00:00
Seppo Ingalsuo fc167f5e56 Tools: Test: Clean up test topologies build and update pipeline macros
This patch updates the tplg-build.sh script by omitting DMIC capture
test topologies generation, tone topolgies generation due to no
use and no maintenance. They can be fixed later.

The all DAI permutations are generated only for volume pipeline. The
src is removed. Instead a new algorithms topologies generation loop
is added for UP2 (APL) compatible topologies. The algorithms are
ASRC, FIR, IIR, and SRC.

The test-all, capture, playback macros are updated to use
PIPELINE_PCM_ADD and set up DAI for SCHEDULE_TIME_DOMAIN_TIMER. The
duplication of TEST_DAI_PORT in macro call is replaced by 0 to
prevent topology load fail on device.

The test-equalizer-playback-ssp.m4 is removed as obsolete.

Pipelines are added for FIR and IIR playback and capture. SRC playback
pipeline is improved by making tokens instance specific. The SRC
capture pipeline macro is only cosmetically improved.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-02-26 22:29:10 +00:00
Daniel Baluta 8780a88876 topology: Add topology for i.MX8MP with wm8960 codec
This pipeline adds support for S32_LE, 2 channels, 48KHz
playback/record.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-02-26 18:11:41 +02:00
Seppo Ingalsuo 7dd11a96c6 Topology: Remove ASRC DMIC capture demo topology
The DMIC capture is added to APL ASRC PCM512x topology so this
topology can be removed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-02-23 21:34:40 +00:00
Seppo Ingalsuo ac0b79dad9 Topology: Add capture pipelines to APL ASRC PCM512x demo topology
Since the new sof pcm512x machine driver supports the DMIC backend
it's practical to move the ASRC capture pipelines into this topology
to avoid need to change into nocodec mode for ASRC capture tests.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-02-23 21:34:40 +00:00
Seppo Ingalsuo 327631d089 Topology: ASRC: Fix mistake with source and sink buffers count
This patch fixes the apply of DAI_PERIODS for playback sink
and capture source buffers. Also the comments for components
instantiating are fixed to order sink, source as they are
in the parameters to avoid confusion.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-02-23 21:34:40 +00:00
Rander Wang e9fd746d70 Revert "topology: sof-icl-rt711-rt1308-rt715: refine dai index setting"
This reverts commit b90f4dd044.
The device id of rt715 and HDMI will be dynamic with this PR. This is
not friendly to UCM design. Let's deal with the id hole in machine
driver.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2020-02-14 14:28:14 +00:00
Amery Song 1fd1464b9d Topology: fix wrongly configured pipeline for sof-cml-rt5682-kwd.m4
Pipeline PCM0P and PCM0C in sof-cml-rt5682-kwd.m4 is wrongly
configured. This patch fix this error by removing redundent
'SSP' argument.

Signed-off-by: Amery Song <chao.song@intel.com>
2020-02-14 14:24:38 +00:00
Rander Wang 2eed3db430 topology: tgl: add support for tgl with 711 & 1308 in sdw mode
The file is derived from icl_711_1308_715, but 715 is not included.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2020-02-10 10:47:09 +00:00
Rander Wang fcb2d65bfc topology: tgl: add i2s in topology name
Rename topology file for 1308 in i2s mode according
to machine driver.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2020-02-10 10:47:09 +00:00
Rander Wang b90f4dd044 topology: sof-icl-rt711-rt1308-rt715: refine dai index setting
If mono is defined, dai index 3 is not used and DMIC uses index
4. Now sdw machine driver generates dai dynamically with consecutive
dai index. To align with machine driver, refine topology to also use
consecutive index.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2020-02-10 10:47:09 +00:00
Ranjani Sridharan 55afcf5496 topology: graph: Add PIPELINE_ID to graph name
Add the PIPELINE_ID to the graph section name to
make them unique for the playback and capture pipelines
that are associated with the same SSP. Also fix the
comment while we're at it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2020-02-04 14:45:58 +01:00
Daniel Baluta 8db2b101ee topology: imx8: Use s32le format for wm8960 codec
wm8960 codec drivers the master clock and for s24le we cannot easily
derive the bitclk.

So, switch to s32le. SAI supports s32le format. The initial s23le was
added because topology was based on sof-imx8qxp-cs42888.m4 which uses
ESAI and that's limited to s24le.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-01-30 17:07:59 +02:00
Daniel Baluta 03ddb48062 topology: imx8: Change DAI name
For now we are using generic simple-card as a machine driver, and
the DAI name must follow certain pattern <dai-name>-<codec-name>.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-01-30 17:07:59 +02:00
Seppo Ingalsuo 0e83f7d094 Topology: Set ASRC asynchronous mode plus add WM8804 and HDA tests
This patch adds two new test topologies. One is for testing ASRC
timestamp retrieving from HDA and one for WM8804 slave SSP interface
for APL. It is useful with UP^2 board with HiFiBerry Digi+ SPDIF
interface.

The asynchronous mode token is switched on in ASRC capture and
playback pipelines. It switches on DAI skew tracking feature
in ASRC.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-01-27 16:47:34 +00:00
Guennadi Liakhovetski a40175724f topology: APL: add 2 DMICs to sof-apl-pcm512x
Up^2 boards have a DMIC connector. Add support for such DMIC add-on
boards. Also adjust iDisp interface DAI IDs to match the new
sof_pcm512x.c Linux machine driver.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-01-23 15:59:43 +00:00
Guennadi Liakhovetski ea8055de14 topology: APL: add an SSP5 capture pipeline
HiFiBerry DAC+ADC codec card also contains a line-in jack for analog
audio recording. This patch adds support for it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-01-23 15:59:43 +00:00
Pierre-Louis Bossart b00869e204 topology: fix DMIC device names
DMIC01 is just useless for a user. After multiple rounds of
discussion, we agreed to remove numbers (which could be understood as
a mic position) or a frequency (which is misleading since it can be
updated to e.g. 96kHz by topology), so by default the DMIC interface
is called just that...

Conversely, we add a clear 16kHz qualifier for the low-frequency
path. While in theory the frequency can be changed with modifications
of the FIR filter, applications do need 16kHz support.

Also make sure we only use 'DMIC' for 'PCH-attached DMICs'. For
RT715-based solutions, the microphones can be analog, so use more
generic 'Microphones' description.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2020-01-21 16:21:26 +00:00
Seppo Ingalsuo 77b86202b1 DMIC: Add support for decimation factor 12
This patch adds driver capability to capture with combination
of 96 kHz and 16 kHz sample rates from FIFO A and FIFO B by using
decimation factor 12 in FIR. The earlier capability for 96 kHz was
with single FIFO only due to lack of suitable decimation filter
for the 16 kHz output.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-01-21 15:31:19 +00:00
Seppo Ingalsuo f08ec9a4b3 Topology: Apply high-pass filter to rt715 capture pipelines
This patch mitigates the start transient in capture from rt715
codec. The start transient is DC pulse that can be attenuated
significantly with a high-pass filter. The pipeline macro
pipe-highpass-capture.m4 adds a 40 Hz second order IIR filter
into the beginning of pipeline. The volume control in this pipeline
is also set to a longer 400 ms ramp length (normally 250 ms) that
is sufficient to conceal PCM waveform issues before the IIR filter
settles to DC level.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-01-21 10:30:45 +00:00
Seppo Ingalsuo e0a9afe6a7 Topology: Apply high-pass for HDA capture streams
This patch replaces in topology sof-hda-generic.m4 the use of macro
pipe-volume-capture.m4 usage with a new macro pipe-highpass-capture.m4.
The used 40 Hz cut-off is sufficient to suppress the DC pulse in the
beginning of capture from headset with minimal impact to other
applications such as recording music.

The capture volume ramp length is changed from 250 ms to 400 ms. The
longer ramp is feasible because the microphone path seems to open
at 500 ms from capture. It helps to attenuate the remaining noises
in the beginning of capture.

The patch also adds additional high-pass responses macros for
topology with different 20-50 Hz cut-off frequencies into
SOF/tools/topology/m4.

The changes for Matlab/Octave script example_iir_eq.m that
generated the filter coefficients are included here as well.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-01-16 19:48:33 +00:00
Yong Zhi 5340225a7c topology: Add JSL da7219+max98373 support
Add topology support for max98373 and da7219
codec for JasperLake platform.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2020-01-08 09:09:02 +01:00
Seppo Ingalsuo 707ffa7f07 Topology: FIR: Increase maximum size of configuration data blob
This patch increases the max. size to 4 kB. Such size allows
setting up e.g. 8ch 192 tap FIR. The multiple part configuration
IPC support has existed in the EQ component for a while and this
limit in topology has remained not updated.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-01-07 15:43:34 +00:00
Ranjani Sridharan f587993c75 topology: byt/cht: Add virtual widgets
Add the required virtual widgets to the BYT codec topology
to suppress the errors seen due to the dapm routes set up
in the machine driver and move them to the common header.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-12-18 15:38:15 +00:00
Pan Xiuli aa732a37dc topology: fix bdw codec topology
Add support for bdw-rt5677
Fix load issue with bdw codec toplogy issue, no SMP support.
Add virtual widgets.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-12-16 14:03:41 +00:00
Pan Xiuli a7bf07a772 topology: add bdw nocodec topology
Enable nocodec topology for bdw.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-12-16 14:03:41 +00:00