Commit Graph

23 Commits

Author SHA1 Message Date
Seppo Ingalsuo b17280cc0e Topology: Change minimum bus clock to 2.4 MHz for 48 kHz DMIC DAI
The driver configures a lowest feasible bus clock to save power.
Since the 48 kHz and 16 kHz DMIC DAI can now be instantiated in the
runtime there is possibility that the min. 500 kHz clock allowed could
be too low for a new 48 kHz capture when existing 16 kHz capture is
running.

The topologies those define a 48 kHz DMIC DAI need to increase the min.
clock to a sufficient rate. This patch changes every 500 kHz value to
2.4 MHz. This change does not change the external microphone clock in
any platform. The lower than 2.4 MHz clock rates never happened in
previous version to due to the 48 kHz DAI request in these topologies.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-03-08 12:14:26 +00:00
Seppo Ingalsuo 8bb8787cd3 Topology: Get PGA_NAME from pipeline caller macro
This patch fixes the error that happens with the hard-coded PGA
names Dmic0 and Dmic1 in pipelines pipe-eq-iir-volume-capture.m4
and pipe-eq-iir-volume-capture-16khz.m4. Pipelines for beamformer
TDFB have the same hard-coded PGA names and are fixed too.

If impacted pipelines are used for any other purpose than DMIC endpoints
the topology graph gets messed up. With this change the caller macro,
e.g. intel-generic-dmic.m4 needs to set the PGA_NAME macro when the
respective pipeline is instantiated. If it is not set the default
name via N_PGA() macro is used.

The macro intel-generic-dmic-kwd.m4 is updated to set the Dmic0
PGA name as well as the earlier missed PIPELINE_FILTER1 and
PIPELINE_FILTER2 definitions for passing filter coefficients.

Fixes: #3378

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-02-26 15:17:36 +00:00
Seppo Ingalsuo 242cc0ebcb Topology: Add support for DMICPROC macro to intel-generic-dmic.m4
This patch adds support to define from CMakeLists.txt or a
higher level platform topology file the definition of DMICPROC and
DMIC16KPROC to select desired capture processing algorithms pipeline
from pipe-x-capture.m4 and pipe-x-capture-16khz.m4 macros instead
of hard coded processing eq-iir-volume. It is preparation to add
support for beamformer processing for microphones.

The impacted platforms are sof-hda-generic, sof-cml-rt5682, and
sof-apl-pcm512x. This patch does not change built topologies.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-09-13 15:52:24 +01:00
Bard Liao aeaddf3af8 Topology: Add HDA config
We need to config HDA rate and channels.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-04-17 10:27:03 +01:00
Fred Oh d65495e984 topology: set DMIC pipe with eq-iir with 40 Hz highpass
For headset playback or capture, default pipe is volume. If The high pass
filter is required to prevent HDA codec headset glitches, it can be set by
HSMICPROC=eq-iir-volume. It use use 40 Hz high pass filter with +0 db
boost. If there is DMIC, this set default pipe as eq-iir, which use
the same 40 Hz high-pass filter too. For DMIC16K, 40 Hz high-pass for 16khz
version filter is used.

Default coefficient for FIR/IIR is changed fr m coef flat to coef pass.
Pass configuration has the advantage of low system load.
    eq_fir_coef_flat.m4 to eq_fir_coef_pass.m4
    eq_iir_coef_flat.m4 to eq_iir_coef_pass.m4

Below pipe files are renamed for naming convention,
    pipe-eq-volume-playback.m4 -> pipe-eq-iir-eq-fir-volume-playback.m4
    pipe-eq-capture-16khz.m4 -> pipe-eq-iir-volume-capture-16khz.m4
    pipe-eq-capture.m4 -> pipe-eq-iir-volume-capture.m4

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-04-07 14:37:37 +01:00
Fred Oh 8b49743a20 topology: add macro to support eq filters for sof-cml-rt5682
The patch shows a proposal how to propagate pipeline filter
coefficients data definition at topology top level. It is an
useful way to avoid to create different new pipeline macros for
different filter. Define filter coefficients data with macro
DEF_EQFIR_PRIV and DEF_EQFIR_COEF, which will be replaced
unique name by adding PIPELINE number. For IIR filter, equivalent macro
is DEF_EQIIR_PRIV and DEF_EQIIR_COEF.

Makefile define each pipeline processing HSEARPROC, HSMICRPOC, SPKPROC,
DMICPROC etc. Each variable should support default value to minimize
current topologies. When new filter blob is required, define
PIPELINE_FILTERx in makefile. This method provides more flexible way
to support variable number of filters in the pipeline.

The other clean up for topology macros include definions for unique
volume tokens and unique filter coefficient definitions.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-04-07 14:37:37 +01: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
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
Jaska Uimonen 8d62caef00 topology: sof-cml-rt5682.m4: remove extra parameters
sof-cml-rt5682 dmic definition has some extra parameters that should be
removed.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Tomasz Lauda 79efa9391c topology: revert all cAVS pipelines to 2 periods
Reverts all previosly changed cAVS pipelines from 3 to 2 periods.
Now we have separate buffers for DMA, so there is no need to make
DAI buffers consist of 3 periods. DMA will take care of any internal
hardware requirements.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-24 10:17:03 +02:00
Tomasz Lauda 6fa4e4c8ae topology: cavs: switch all pipelines to timer scheduling
Switches all pipelines for cAVS platforms to timer scheduling.
This way we limit the number of interrupt levels processed
in the system. Timer, IPC and IDC are already on level 2 and
DMAs are on level 5.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-16 14:16:18 +02:00
Tomasz Lauda cfe81f5127 topology: cml: cnl: use 3 periods for SSP, DMIC and ALH DAIs
Changes number of SSP, DMIC and ALH DAI periods from 2 to 3.
This way we can support both timer and new single DMA
channel scheduling.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-11 14:17:29 +02:00
Jaska Uimonen 77b6db8894 topology: enable pcm range and pipeline rate and remove frame count
Enable setting pcm min and max rate from top level m4 pipeline macro.
This way it is possible to configure the whole pipeline to correct
samplerate range in 1 file. Previously you needed to modify the pipeline
macros where the rate was hardcoded. As the frame count is calculated
from pcm/dai rate and scheduling time the frame count is obsolete.

Introduce pipeline rate parameter to help configuring components with
fixed output rate. We can't deduce this from pcm range since for example
src might accept bigger max rate than the following dai. Even though the
parameter is named "pipeline rate" it essentially means the "final"
output rate to which this pipeline is connected to (dai or other
pipeline). In capture pipelines it means the originating fixed dai rate.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-15 14:29:22 +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
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
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
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
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
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
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
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
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