Commit Graph

327 Commits

Author SHA1 Message Date
Zhang Keqiao fd6208d65b topology: sof-cml-demux-rt5682: revise physical link iDisp1 ID
to align with machine driver

The physical link iDisp1 ID for HDMI should be changed to 3,4,5
to align with machine driver. ID 2 is defined for DMIC16k.

Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2019-07-25 13:38:47 +02:00
Seppo Ingalsuo 4870332719 Topology: Updates for single EQ pipeline definitions
This patch provides needed maintenance. The pipelines
missed the volume ramp tokens and caused topology build fail for
topologies those would use the pipeline macros
pipe-eq-fir-volume-playback.m4 and pipe-eq-iir-volume-playback.m4.

The embedded filter coefficients in these pipelines were replaced
by included default FIR and IIR filter coefficients to fix ABI
incompatibility in the configuration blobs and ease future
maintenance of these pipelines.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-07-12 09:24:51 +02:00
Keyon Jie 09b416bb5a topology: sof-cml-rt5682-max98357a: switch to use kwd pipelines
Switch to use sof-cml-rt5682-kwd.m4 which can support Keyword Detect
feature.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-07-11 15:32:01 +02:00
Keyon Jie b56fcbc44a topology: sof-cml-rt5682-max98357a: change BE id to align with machine
driver

The BE id for amplifier pipeline should be changed to 6 to align with
machine driver (The commit ASoC: Intel: sof-rt5682: correct naming for
dmic16k).

Cc: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-07-11 15:32:01 +02:00
Keyon Jie d1ae32a322 topology: sof-cml-rt5682: refining for dmic16k pipeline
Add volume component, change to use 16KHz sample rate, and modify the
PCM ID from 5 to 8, as it is in lower priority comparing with pipelines
like amplifier.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-07-11 15:32:01 +02:00
Janusz Jankowski 27cdfbdb40 m4: support for ssp bclk_delay token
BCLK delay is optional last value (after quirks),
in SSP_CONFIG_DATA.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-07-05 11:55:51 +02:00
Keyon Jie 2762ada65e topology: cml-rt5682-kwd: change to use S24_LE format for CML
As dmic only support 16 bit or 32 bit, we configure dmic dai to be
s32_le, and pipelines to be s24_le.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-07-03 14:10:00 +02:00
Keyon Jie 6a9fc3c56e topology: kwd: add volume component after dmic
We need volume component after dmic for either volume change or format
converting, here add volume component between dmic and kpb.

And after this, our kwd can support all s16_le, s24_4le, and s32_le PCM
capabilities.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-07-03 14:10:00 +02:00
Keyon Jie f5186ece2c topology: pipe-detect: add kcontrol for model blob
We need to split detector config and model blob, create another bytes
kcontrol for model blob.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-06-25 18:44:19 +07:00
Keyon Jie 767a81bd9f topology: add sof-cml-rt5682-kwd m4 file for cml keyword detect
It is derived from sof-cml-rt5682.m4, keyword detect pipelines added to
it for Keyphrase Detection feature support.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-06-21 15:44:16 +02:00
Keyon Jie f5832aa273 Topology: sof-cml-rt5682: add dmic16k PCM and dai
Adding dmic16k PCM and dai, this is aligned with driver side.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-06-21 15:44:16 +02:00
Keyon Jie 333f15f363 topology: pipe-detect: enlarge the bytes kcontrol size for blob settings
For detector component, the size of configure blob can be up to 300KB,
here enlarge the max to meet this requirement.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-06-19 10:13:15 +02:00
Seppo Ingalsuo 909b790235 Topology: Add SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS token
This patch adds to all DMIC related topologies the new token
SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS. The value is set to 400
to correspond to 400 milliseconds long unmute ramp time. The
topology defined unmute will override the firmware internal
hard coded value if it is set in topology.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-06-17 21:47:31 +01:00
Marcin Rajwa e2122e79ff topology: provide default config for new detector params
This patch provides default parameters for newly added
detect_preamble and history_depth. Both by default are
set to max buffering time of KPB.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-06-11 13:25:16 +02:00
Jaska Uimonen 88c2ba2a84 topology: unify byt media pipeline params with apl media pipe
Byt media pipeline has different parameters in topology for scheduling
deadline and frame count than apl. This produces funny 4-8x speed
playback. So unify with apl media pipe.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-06-03 14:07:58 +02:00
Janusz Jankowski ba2fefb172 license: use spdx identifier in shell scripts
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Janusz Jankowski e99bae6187 tools: fix sh-bang in scripts
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Janusz Jankowski c6064624f6 cmake: add spdx license identifier
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Janusz Jankowski e39ed5ebf4 include: split uapi headers into more directories
Some of interface headers are not needed by kernel,
but are needed by user-space applications, so we can split them
into multiple directories that indicate their purpose.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-31 20:10:45 +01:00
Ranjani Sridharan c0434e27ce topology: apl-nocodec: change pipeline format to s32le
Pipeline format determines the buffer size calculation. With the
pipeline format set to S16_LE, hw_params fails for S24_LE and S32_LE
formats. So, change the pipeline format to s32le to support all
three formats.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-05-31 18:13:10 +02:00
Seppo Ingalsuo d58e733c7b Topology: Change 16kHz DMIC DAI into 32bit mode and make scheduling 1ms
This patch changes the secondary DMIC FIFO configuration into 32 bits
mode for better quality. Since there is volume component in DMIC
capture pipelines the conversion to other PCM formats can happen
there. Using volume controller with 32 bit input gives a lot better
audio quality when the microphone signal needs amplification.

The scheduling of 16 kHz DAI is changed to 1000us. The comment
of 1000 us is correct but the parameter 48 is not. With 16 frames
the scheduling becomes the desired. This change should also save
some RAM due to smaller buffers.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-29 12:06:05 +01:00
Seppo Ingalsuo 5afafa880c Topology: Add support for 4ch 32bit 48kHz DMIC DAI
This patch restores the missing configuration into macro
intel-generic-dmic.m4. Without this patch the 48 kHz DMIC DAI
is not created. Both DMIC FIFOs are available at any channels
number and PCM format so there is no need to delete a DAI when
4ch configuration is used.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-29 12:06:05 +01:00
Jaska Uimonen a8ca07f6e7 topology: add more buffering to media pipe after src
Currently we have 1.5 times buffering after SRC in media pipeline. This
will not work for S24 or S32 playback as SRC will use the bigger buffers
with non-integer sample rate conversions as 44.1kHz to 48kHz. So add as
big buffer after SRC as before it.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-05-29 12:01:18 +01:00
Jaska Uimonen a26c51a43e topology: add volume component to demux topology
Demux topology doesn't have format conversions so playback files need to
be converted to S24 or S32 format. As this is a bit cumbersome add
volume component to demux topology to enable standard 16 bit playback
from alsa. Also change the demux capture pipe PCM format range.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-05-24 10:18:18 +02:00
Jaska Uimonen 3e423f418e topology: fix pipeline indexes in cml demux topology
Dmic and hdmi1 have wrong pipeline id's in demux topology
so fix them.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-05-21 11:48:32 +02:00
Keyon Jie 8ca92a4b3f topology: sof-glk-da7219-kwd: add virtual widgets for driver
Add virtual widgets to remove error warnings in kernel dmesg logs, this
is also aligned to sof-glk-da7219 topology file.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-20 11:09:47 +02:00
Tomasz Lauda 346a522cbf topology: fix sof-glk-da7219-kwd topology
This patch fixes two things:
- Configures HDA pipelines to be timer driven.
- Moves definition of pipe-kfbm-capture to avoid overwrite
of deadline and frames for other pipelines.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-16 19:37:27 -07:00
Seppo Ingalsuo 6951af2a6d DMIC: Add topologies for DMIC configuration variants testing
The example and test topologies demonstrate new non-symmetrical
microphones/channels setup for capture via FIFOs A and B.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-17 00:00:46 +02:00
Keyon Jie caa4808186 topology: kwd: update detector configure blob to align with default
settings

We should load_mips to be 0, align values with default settings, that
is:

load_mips = 0, load_memory_size = 0, keyphrase_length = 0x780,
activation_shift = 0x3, activation_threshold = 0x3fff.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-16 10:59:22 +02:00
Jaska Uimonen 73cefecd15 topology: add platform define for demux topology
Add whl define to cmakefile to compile the cml demux topology
correctly with SSP names and indexes defined.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-05-15 22:35:24 +02:00
Jaska Uimonen 1d3b0ccfc3 topology: add demux topology for apl and cml
This topology will add a capture branch back from playback pipeline's
mux component. It can be used for example as a echo cancellation
reference signal.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-05-14 10:58:52 -07:00
Seppo Ingalsuo 992aa661ab Topology: Rename pipe-src-playback.m4 macro
This patch renames the macro to pipe-src-volume-playback.m4 for
consistency with other audio processing plus volume
pipelines. The topologies those use it are modified for the new
file name.

A new macro for testbench usage called pipe-src-playback.m4 is
added. It is plain SRC component pipeline without volume. The
volume component in the pipeline caused difficulties with test.
The script tools/test/topology/tplg-build.sh will use the
pipeline to create test topology for SRC component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-11 09:28:44 +02:00
Keyon Jie 030c81c75b topology: keyword-detect: add bytes control for detector
Add bytes control and initial value for detector component.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-09 22:25:53 +01:00
Keyon Jie 4a34ab058a topology: keyword-detect: get kpb configure data from ipc
We design to use bytes kcontrol to send kpb configuration data via IPC
from topology, here implement it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-09 22:25:53 +01:00
Seppo Ingalsuo 7dd76db0a8 Topology: Add volume ramp tokens into topologies
This patch adds volume configuration tokens as fifth parameter
for pga.m. All the topologies those use W_PGA() are updated to
use a linear (type=0) ramp with length of 250 ms.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-09 22:13:48 +01:00
Keyon Jie e4cb046a2c Topology: kwd: change to use correct buffer caps
We don't need to use host/dai caps for detector buffer and selector
buffer, here correct it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-09 14:57:19 +02:00
Rander Wang 39a373500d topology: add virtual widgets for hda_idisp
Add some more virtual widgets to suppress the machine driver errors.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-05-08 20:24:38 +02:00
Rander Wang d50fa6f920 topology: correct widget type for HDA
It should be type of input for capture widgets

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-05-08 20:24:38 +02:00
Fred Oh 35e438501f topology: hda: fix virtual widget warnings
Add some more virtual widgets to suppress the machine driver errors.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2019-05-07 08:05:04 +02:00
Keyon Jie 47fcac2d47 topology: add topology file for glk kwd.
Add topology file sof-glk-da7219-kwd.m4 which is used for Keyword
Detection feature integrated on GLK platform.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-06 18:16:23 +01:00
Keyon Jie b424c98cd8 topology: pipe-kfbm-capture: use DMIC16k for Keyword Detect PCM
Use DMIC16k for Keyword Detect PCM to align with driver.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-06 18:16:23 +01:00
Xun Zhang 6dfddfc550 topology: add rt5682 m4 topology file for icl and byt platforms
Add topology support for rt5682 codec in both Bay Trail and Icelake
platforms.

Signed-off-by: Xun Zhang <xun2.zhang@intel.com>
2019-05-06 14:57:17 +01:00
Keyon Jie 6e4faef8e7 topology: keyword-detect: change to use DMIC FIFO B
We need use FIFO B for keyword detect DMIC, here change it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-04-30 15:12:53 +01:00
Libin Yang 68a237c963 topology: DMIC: DMIC16k use pipe-volume-capture-16khz.m4
DMIC16k only supports 16KHz sample rate. It should use
pipe-volume-capture-16khz.m4 to create the pipe which supports
the 16KHz recording.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2019-04-26 09:41:24 -07:00
Libin Yang 55d1f5ac81 topology: sof: add pipe-volume-capture-16khz.m4
DMIC16k only supports 16000Hz sample rate. pipe-volume-capture.m4
only supports 48000Hz. Add pipe-volume-capture-16khz.m4 to support 16KHz
record.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2019-04-26 09:41:24 -07:00
Yong Zhi 092eb61781 topology: glk-rt5682: add more virtual widgets
Add some more virtual widgets to suppress the machine
driver errors.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2019-04-26 10:43:49 +01:00
Ranjani Sridharan e4c1651b36 topology: glk: add more virtual widgets
Add some more virtual widgets to suppress the machine
driver errors.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-04-23 13:40:52 +01:00
Ranjani Sridharan 332e2735c9 topology: apl/byt: add low-latency and media pipelines
This patch does the following:
1. Modify pipe-pcm-media to use the SCHED_COMP macro to set the
scheduling comp for the media pipeline.
2. Add low-latency and media pipelines to the apl nocodec
and apl pcm512x.
3. For the byt codec and nocodec topologies, modify the
PIPELINE_PCM_ADD macro to pass the scheduling comp name

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-04-23 10:47:05 +01:00
Ranjani Sridharan fc5dedd57f topology: pipe-dai: save the scheduling comp name
This will be used by pipelines like the media pipeline, which will
need the information to set up their scheduling comps.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-04-23 10:47:05 +01:00
Ranjani Sridharan ae2b0a4603 topology: pipeline: add scheduling comp argument to PIPELINE_PCM_ADD
Add the scheduling comp argument to PIPELINE_PCM_ADD that
will be used to pass the name of the scheduling comp
when the pipeline is created.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-04-23 10:47:05 +01:00
Rander Wang 896f73d36a topology: dmic: add dmic support in generic hda topology
Now sof kernel driver supports two dmic dai links: DMIC01 PIN,
which supports rate of 48k, and DMIC16k Pin, which supports rate
of 16k. And if four channels dmic is used, we only support one dmic
dai link. CHANNELS would check in intel-generic-dmic to generate
the correct topology file.

Tested on whiskylake & icelake & apollolake up2

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-04-19 10:19:04 +01:00
Seppo Ingalsuo 5ef0713b7b TPLG: Rename a volume scale macro to avoid confusion
The macro in tlv.m4 defines a volume scale from -64 dB with 2 dB
steps for playback pipelines. Hence the name m90s3 is incorrect.
The new name m64s2 is a correct description of the defined volume
scale. It's useful since there's another volume scale defined for
capture pipelines.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-18 22:06:13 +02:00
Seppo Ingalsuo 90a6efd154 TPLG: Change volume capture pipeline gain range to -50 .. +30 dB
This patch replaces the -64 to 0 dB volume scale for capture with
more practical -50 to +30 dB gain. The step is 1 dB. It allows to
compensate for different microphone model sensitivities when constant
acoustical decibels to digital decibels level is needed in a
microphone capture application.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-18 22:06:13 +02:00
Tomasz Lauda 68f27263c8 topology: increase number of periods for low latency pipeline
Increases number of periods for low latency playback pipeline
from 1 to 2 for volume and mixer components. 1 period
is not good enough to have continuous DMA transfer across
the whole pipeline, especially with the new copy flow,
which requires playback pipeline preload.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-16 10:13:20 +01:00
Seppo Ingalsuo 1b15fad849 TPLG: Fix mistake in 2ch configuration related DMIC macro
This patch fixes 2ch dmic capture topology. It appeared as topology
completion fail in SOF boot. The missing quote characters in m4
caused the STEREO_PDM0 macro triggered lines to no not be included
into conf file.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-15 23:08:08 +02:00
Bard liao ed97bb9418 topology: update HDA index
The index should be 0,1,2 instead of all 0.

Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
2019-04-02 09:52:25 +01:00
Ranjani Sridharan eac4a73232 scripts: use project root directory instead of relative path
Use the SOF project root directory in get_abi.sh to read the
ABI macros instead of using the relative path.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-04-01 10:39:26 +01:00
Bard liao 052942c863 topology: add ABI information
We can add ABI information to the Manifest section. So kernel can
check if the topology is compatible with the kernel.

Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
2019-03-29 16:55:04 +00:00
Kai Vehmanen a9cb19ada3 topology: add param check to PIPELINE_*() macros
Abort build if not all mandatory arguments are passed to
the top-level pipeline macros.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2019-03-29 12:14:05 +00:00
Kai Vehmanen 10c641d307 topology: add param check to VIRTUAL_WIDGET()
Abort build if not all mandatory arguments are passed to the
macro.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2019-03-29 12:14:05 +00:00
Kai Vehmanen 90fbcd54f3 topology: add param check to DAI_CONFIG()
Abort build if not all mandatory arguments are passed to the
macro.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2019-03-29 12:14:05 +00:00
Kai Vehmanen 322fe24e95 topology: add param checks to PCM macros
Abort build if not all mandatory arguments are passed to
the macros. This should help to catch invalid usage.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2019-03-29 12:14:05 +00:00
Tomasz Lauda 6a0dcb3a10 topology: update all HDA pipelines to use timer
Updates all HDA pipelines in topologies to use
timer as a scheduling source.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-27 21:44:02 +00:00
Keyon Jie 0da78d7236 topology: refine scheduling period and add time domain for pipelines
Rename 'deadline' to 'period' to indicate pipeline scheduling period,
and add time domain to indicate the pipeline scheduling domain (e.g. DMA
interrupt, timer interrupt).

Please be noticed that this might introduce an abi change so consequent
abi changes in both FW and driver side are needed.

Haven't set the flag in topology/sof/sof-xxx.m4 yet, that means it will
use io/interrupt scheduling for those topologies/pipelines at the
moment, if wanna to change them, please change them specific there.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-27 21:44:02 +00:00
Fred Oh 498a5f571d topology: enable LBM for nocodec topology
Add quirks parameter in SSP_CONFIG_DATA(). Enable LBM in dupulex pipelines
by setting quirks as SOF_DAI_INTEL_SSP_QUIRK_LBM 64(1<<6). SSPx.IN port get
PCM data from SSPx.OUT. Note both mclk and quirks are optional parameter.
When quirks set, mclk should have value or initialize to default value
which is 0.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2019-03-27 11:39:58 +00:00
Fred Oh 5194eabf4f topology: ssp: add quirks parameter in SSP_CONFIG_DATA
Support quirks setting from topology. quirk are used to set
ssc1/ssc2 registers according to its bit value.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2019-03-27 11:39:58 +00:00
Tomasz Lauda 9890d2b782 topology: add missing param to hda-generic-idisp topology
Adds missing param to sof-hda-generic-idisp.m4.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-26 17:18:22 +00:00
Pierre-Louis Bossart e54087caa4 topology: add support for HDMI only w/ 3 iDISP streams
This is useful for headless devices such as Up2 with no external
HDAudio codec but an HDMI/DP output.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-03-21 15:39:00 +00:00
Pierre-Louis Bossart 65fb817100 topology: rename HDA topology to name used by kernel
s/sof-hda-intel-common/sof-hda-generic

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-03-21 15:39:00 +00:00
Sathya Prakash M R b70e9151cb topology: Add CML topology support for rt5682+max98357a variant
Add max98357a speaker on top of sof-rt5682 CML Audio topology

Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
2019-03-20 11:19:31 +00:00
Ranjani Sridharan 0ead3bda19 topology: merge bdw codec topologies into single m4
Use the same m4 file to generate the topology for all bdw
boards based on the CODEC name defined during compilation.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan 08c0db49f1 topology: merge all byt codec topologies into one m4 file
BYT with RT5645, RT5640, RT5651 and DA7213 all have similar
topologies with the only difference in codec name. Merge
them all into a single m4 file and set the codec name
using the macro defined during compilation.

This will also take care of adding the virtual widgets
for all the BYT topologies for compatibility with the
machine drivers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan cd2168cf2b topology: pipe-pcm-media fix various typos/errors in comments
fix some typos and copy errors in pipe-pcm-media m4 file.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan 958ed657c1 topology: merge sof-byt-nocodec and sof-cht-nocodec m4 files
Merge the 2 m4 files and use the PLATFORM defined during
compilation to generate the appropriate topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan e5e5dcc806 topology: merge sof-apl-dmic-2ch and sof-apl-dmic-4ch m4 files
Use the same m4 files to generate both 2ch and 4ch topologies
by defining channels during compilation.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan 17f85baa70 topology: merge sof-cml-rt5682 and sof-whl-rt5682 m4 files
The only difference between them is the SSP index and name.
Use a macro during compilation to indicate which platform
we're building for and set these appropriately.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-15 11:51:18 +00:00
Liam Girdwood e31ef3b96a topology: keyword: Add keyword detection topology for APL
Add initial pipeline for keyword detection on APL platform.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-11 15:41:06 +00:00
Jaska Uimonen 500d64fe5d topology: keyword: selector: add bytes control
Add bytes control for selector to send binary
data to it.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-03-11 15:41:06 +00:00
Ranjani Sridharan b0c900b9a7 topology: Add keyword detect pipeline
Add pipeline with keyword detect and channel selector comps.
This should be connected to a capture pipeline such as
pipe-kfbm-capture.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-11 15:41:06 +00:00
Keyon Jie 5711211e0d topology: add support for channel selector component in topology
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-11 15:41:06 +00:00
Ranjani Sridharan 082122556a topology: add support for keyword detect component in topology
Add support for constructing and adding keyword detect
component in topology

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-11 15:41:06 +00:00
Ranjani Sridharan 1da08478c0 topology: Add kpbm capture pipeline
Add support for generic capture pipeline with a KPBM between PCM and
other pipelines. This can be used for Keyword detection use case.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-11 15:41:06 +00:00
Keyon Jie a22e9fddcc topology: add support for key phrase buffer manager component in topology
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-11 15:41:06 +00:00
Keyon Jie 21049e31fb topology: tokens: remove subtype for process token
We can use widget type combined with component type to identify specific
process type, the subtype is no need anymore, here remove it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-11 15:41:06 +00:00
Keyon Jie 1825275784 Topology: define schedule component macro for pipe-dai-capture
This can be used for schedule component sharing between pipelines.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-11 15:41:06 +00:00
Ranjani Sridharan 93c130aeec topology:sof-byt-rt5651: add virtual widgets for machine driver compatibitlity
Add virtual widgets for ssp2 RX/TX for compatibility with the
bytcr_rt5651 machine driver. This is needed now because a recent
change in the driver removed these from the dai definitions
which results in card registration failure.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-11 15:09:14 +00:00
Fred Oh 5cd7b64100 topology: remove unused properties in tokens
Some properties are not populated from the topologies and not being used
by DSP either. Need to clean up token data structures. These are
identified as unused.

comp_tokens: preload_count
dai_tokens: dmac_config

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2019-03-11 14:39:17 +00:00
Zhu Yingjiang 8d9438388c topology: fix two comments
fix two comments of SSP number, the da7219 is connected to
SSP2

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-03-07 12:40:10 +00:00
Zhu Yingjiang 05ca4ebd06 topology: fix kcontrol name by topology
the kcontrol item name doesn't follow the SOURCE:DIRECTION:FUNCTION, and
can't separate playback and capture when display in alsamixer.
This fix is to move the pipeline id from the end of the name to the
head, this will make alsamixer to serperate playback and capture when
press F3 F4.

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-03-07 12:35:49 +00:00
Ranjani Sridharan 488cedaf79 topology: pipeline: add sched_comp argument to PIPELINE_ADD
Some pipelines might need to share the scheduling comp
with other pipelines. In this case, the scheduling comp
name should be passed as an argument.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-06 17:53:49 +00:00
Keyon Jie cc51ff8f0c topology: change token name from effect to process
The token can be used for more generic processing, not only effect
component, let's rename it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-06 17:53:49 +00:00
Bard liao 56eb603c74 topology: add topology for cht with Realtek codecs
This topology is tested on Up board with Realtek rt5682 codec.

Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
2019-03-05 15:00:14 +00:00
Ranjani Sridharan e38db1a69d topology: remove dapm route from PCM dev to host comp
This route is automatically created when the host comp is created
during topology loading. So remove it to avoid duplicating
the connection in the dapm graph.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-02-26 13:02:59 +00:00
Dragos Tarcatu e9c81160ee topology: ssp: add polarity inversion option in SSP_CLOCK
alsatplg allows setting inverted bclk and fsync polarities
by setting either bclk_invert or fsync_invert to "true".
This patch adds a default parameter in the SSP_CLOCK m4
macro which allows setting inverted bclk and fsync polarities.

Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
2019-02-26 12:50:29 +00:00
Ranjani Sridharan 2b4467c007 topology: whl: add topology for whl with rt5682
Add topology for WHL with RT5682. This will be merged with
sof-cml-rt5682 in the future to avoid maintaining 2 files
with just the difference in SSP port numbers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-02-18 16:29:47 +00:00
Ranjani Sridharan abc0d2fc6a topology: cml: change SSP port num for rt5682
The CML board has the rt5682 connected to SSP0 and the
machine driver defines the dai link for the headset
with the name "SSP0-codec" too. So change the topology
file accordingly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-02-18 16:29:47 +00:00
Janusz Jankowski dff70c4490 cmake: tools: remove autotools
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-02-14 18:00:26 +00:00
Janusz Jankowski 44c0ce7388 cmake: tools: topology
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-02-14 18:00:26 +00:00
Pierre-Louis Bossart fb137dec6b topology: up2 without HDMI
the kernel supports easy removal of HDMI support, let's add the
matching topology.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-02-06 10:26:25 +00:00
Pierre-Louis Bossart 6e26683f9f topology: apl-pcm512x: fix HDMI3 support
missing 2 in DAI_ADD() macro. This seems to be the only place where this
typo/mistake happens

we really need a parameter checker or move away from M4...

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-02-05 13:08:41 +00:00
Ranjani Sridharan e56326ab48 topology: cht: fix link id for nocodec DAI
Nocodec machine driver adds all the BE dai links with
ID's linearly incrementing from 0. So the link ID
should match with the SSP dai index.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-02-02 16:35:16 +00:00
Seppo Ingalsuo 1c191a20fd DMIC: Enable capture from secondary FIFO
This patch enables the FIFO B in addition to previously supported
FIFO A. It allows in topology to use in pipelines the DMIC DAI
type with indices 0 and 1. The DAI instances can be operated with
different sample rate and different PCM format. The other
topology parameters for microphones need to be the same (number
of channels and enabled microphones). If the request via topology
differs for those parameters the latter request overrides the
first request. Typical usage for this added feature is to provide
compact 16 kHz / 16 bit capture version for speech in addition to
normal 48 kHz / 32 bit media quality audio capture.

The DMIC HW actually provides a bit more freedom for FIR/FIFO A/B
usage difference but all of that is not exposed yet via the
driver due to added complexity.

Some trace prints for DMIC parameters and used configuration are
modified to print shorter lines for easier reading. The print
order is adjusted to be more logical.

The patch modifies two topologies to showcase the feature. The
sof-apl-dmic-2ch/4ch topologies for APL nocodec machine driver
are changed to instantiate in addition PCM7 set for 16 kHz 16 bit
format in addition to earlier PCM6.

Note: The required change to pipe-passthrough-capture.m4 PCM
capability to enable other than 48 kHz rate is not done to not
break important test cases. Another PR addresses the PCM
capabilities and after it is merged allowing 16 kHz PCM for DMIC
capture can be done safely.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-01-31 20:41:24 +00:00
Bard liao f80c828a77 topology: add cml topology with src supported
The topology is based on sof-cml-rt5682.m4 but use src on SSP playback

Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
2019-01-31 20:39:31 +00:00
Pierre-Louis Bossart 7fa7413527 topology: remove tone support
This was never properly supported and generates errors. Will re-add when it
actually works

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-01-31 20:26:44 +00:00
Rander Wang a5d32b4c3a topology: hda: fix a hda bug when pipeline is in 24bit
sof audio pipeline with the format of 24bit doesn't
work on HDA platform. It is caused by sample data layout. SOF supports
S24_LE, and each sample format is like pattern of 0ddd, d stands for
data. Samples are padded with 0‟s at the MSB.

Link dma copys samples directly to hda bus, but hda bus requires samples
layout like pattern of ddd0. Samples are padded with 0‟s at the LSB to
left justify the sample within the container.

Now there is a volume at the end of hda pipeline. We only need to
convert dai type from S24_LE to S32_LE to make volume convert hda data to
correct format

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-01-29 09:53:39 +00:00
Rander Wang b46740523b topology: hda: delete sof-whl-hda.m4
It is useless now and sof-hda-generic.m4 would be used by WHL.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-01-29 09:53:39 +00:00
Zhu Yingjiang a766e471b0 add nocodec topology for CNL
add nocodec topology for CNL, with three SSPs and one DMIC

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-01-23 09:20:41 +00:00
Ranjani Sridharan 364f52b74f topology: cml: update macros for HDA DAI's
HDA_DAI_CONFIG has been replaced to re-use DAI_CONFIG.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-01-17 08:50:06 +00:00
Zhu Yingjiang 2981a6f22c add topology file for Cometlake with rt5682
add the topology file for Cometlake with codec rt5682, a
analog codec with SSP1, and DMIC, HDMIs

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-01-16 13:35:21 +00:00
Ranjani Sridharan a00a38a1ec topology: remove HDA_DAI_CONFIG and re-use DAI_CONFIG
remove the HDA_DAI_CONFIG macro and reuse the DAI_CONFIG
macro with type HDA. This will ensure the hw_config
section gets added for HDA dai's as well.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-01-16 09:53:09 +00:00
Xun Zhang 24422c6373 topology: fix virtual widget warnings
add some widgets to prevent kernel warnings generated by the machine
driver.

Signed-off-by: Xun Zhang <xun2.zhang@intel.com>
2019-01-14 11:50:36 +00:00
Seppo Ingalsuo 843553646a Topology: Add volume control into SRC playback pipeline
This patch adds a volume component after SRC to be able to convert
the variable pipeline s16/s24/s32 PCM format into PCM format used
by DAI. The PCM capabilities are changed to allow all formats.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-01-09 16:30:58 +00:00
Seppo Ingalsuo 676e72a895 Topology: EQ IIR: Allow capture with all formats with pipe-eq-capture
This patch adds to IIR EQ capability to convert from s32 source to
s16/s24/s32 sink formats in normal PCM samples equalization. The
feature is useful in microphone equalization where input dynamic
range is high but where pipeline needs to be lower word length. A
typical IIR high-pass response when combined with gain will reduce
the dynamic range by suppressing lowest frequencies from signal to
better fit the smaller sample word length.

The PCM capability in topology macro pipe-eq-capture.m4 is changed to
allow the s16/s24/s32 formats.

The patch also includes 4096 bytes increase to SOF_TEXT_SIZE for CNL
platform.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-20 14:08:32 +00:00
Seppo Ingalsuo dd8cfda311 EQ: Update ABI version number in configuration to match current version
This patch updates the provided example responses as data for
sof-eqctl and in the include files for topologies. The updates into
Matlab scripts are included also. The FIR and IIR example script is
updated to contain all examples.

The patch includes also a bug fix into IPC handler where the check
against SOF_IPC_MSG_MAX_SIZE is off by one and caused it to reject
all set data commands (to the EQs).

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-19 10:28:25 +00:00
Naveen Manohar 8e1249c293 topology: Add GLK topology support for chromebook rt5682+max98357a variant
Add new PCMs and backends for GLK chromebook with codecs rt5682+max98357a.

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
2018-12-18 11:30:08 +00:00
Seppo Ingalsuo 0526077c87 Tools: Update SRC tool for 50 kHz modes, SRC testbench, add topology
This patch adds 50 kHz into SRC generator script for std and tiny
profiles. The src generator script is cleaned up and the default
conversion matrix is moved into caller script for easier maintenance.
The plots appearance is improved and the generated coefficients code
look is improved to pass the git pre- and post-commit script
requirements.

The SRC test bench scripts are updated for changed locations. A SRC
playback topology is used for test bench and real device usage.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-18 11:29:32 +00:00
Liam Girdwood dd98c4721e topology: apl: nocodec config out of host GW DMAC channels
By default topology is using too many capture and playback PCMs, DAIs and
pipelines for available host GW DMAC channels. Comment out some so that
DMAC channels stay within bounds. This also gives users options to
re-enable for theer given test HW.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-13 17:18:16 +00:00
Ranjani Sridharan 30007ca825 topology: glk: change DMIC capture to support 4ch 16-bit format
The requirement for DMIC capture is to support upto 4ch
and 16-bit format. So modify the topology accordingly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-12-11 20:25:33 +00:00
Pierre-Louis Bossart ddebac091f topology: realign sof-apl-da7219 on sof-glk-da7219
Somehow those two files should only differ on SSP connections and MCLK
ID1, so it's pretty obvious no one has tested this since August...

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-12-07 15:47:52 +00:00
Rander Wang 5571da6dc1 topology: hda: change stream format from 32bits to 24bits
For most of hda codecs, 32bits is not supported and 24bits
is a suitable one.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-12-04 13:36:57 +00:00
Rander Wang 15e891202f topology: hda: refine dai setting for hda
This refinement follows commit on WHL

topology: whl: refine topology for hda on whl

    Fix the issue that ipc timeout when simutalously playback
    and capture. Now in FW, playback and capture are supported
    by different dai. So dai index should be different for playback
    and capture in the same be dai, or playback would use the same
    dai as capture

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-12-04 13:36:57 +00:00
Seppo Ingalsuo 2e4b435302 Tools: Topology: Update EQ related topology files for new user ABI
This patch adds the ABI header into topology EQ data files and updates
the pipe-eq-volume-playback.m4 to include the coefficients from m4
directory like other topology files to prevent duplication of
response data.

The CONTROLBYTES_MAX is decreased to 304 due to larger IPC header size.
The update is not critical since the kernel contains other checks to
cover this. However it's done to avoid confusion.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-11-30 14:19:37 +02:00
Liam Girdwood bad017ba56
Merge pull request #636 from ranj063/fix/glk-virtual-widget-warnings
Topology: Fix glk virtual widget warnings
2018-11-27 14:30:25 +00:00
Ranjani Sridharan 6ff198df7c topology: glk: fix virtual widget warnings
Modify hard-coded virtual widgets to prevent kernel
warnings generated by the machine driver. No need to
add virtual_dapm_routes. Just adding the required virtual
widgets suffices to suppress the warnings.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-11-27 00:10:01 -08:00
Ranjani Sridharan f9b8e08f75 topology: modify virtual_widget definition
Modify virtual_widget macro definition to take type as
an input so it can used for different types and update
its users.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-11-27 00:08:53 -08:00
Rander Wang f9c23243d6 topology: whl: refine topology for hda on whl
Fix the issue that ipc timeout when simutalously playback
and capture. Now in FW, playback and capture are supported
by different dai. So dai index should be different for playback
and capture in the same be dai, or playback would use the same
dai as capture

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-11-27 13:59:45 +08:00
Curtis Malainey 5b5888ce07 Move SOFT into sub folder for SOF merge
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2018-11-24 23:27:24 -08:00