topology2: cavs-nocodec: include dmic-generic.conf if needed

Include dmic-generic conditionally based on NUM_DMIC's and add nhlt
build support in CMake variables.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2022-02-24 21:36:09 -08:00 committed by Liam Girdwood
parent ae5326ccd2
commit 3629141cbb
2 changed files with 21 additions and 97 deletions

View File

@ -25,8 +25,9 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt.bin"
# CAVS SDW topology with passthrough pipelines
"cavs-sdw\;cavs-sdw"
# CAVS SSP topology with passthrough pipelines
"cavs-nocodec\;cavs-tgl-nocodec"
# CAVS SSP topology for TGL
"cavs-nocodec\;cavs-tgl-nocodec\;NUM_DMICS=2,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-cavs-tgl-nocodec.bin"
)
# This will override the topology1 binaries with topology2 binaries

View File

@ -4,6 +4,7 @@
<searchdir:include/components>
<searchdir:include/dais>
<searchdir:include/pipelines/cavs>
<searchdir:cavs/platform/intel>
<vendor-token.conf>
<manifest.conf>
@ -12,6 +13,7 @@
<virtual.conf>
<passthrough-playback.conf>
<passthrough-capture.conf>
<passthrough-be.conf>
<data.conf>
<pcm.conf>
<pcm_caps.conf>
@ -26,9 +28,24 @@
<pipeline.conf>
<dai.conf>
<host.conf>
<dmic-default.conf>
Define {
MCLK 38400000
MCLK 38400000
NUM_DMICS 0
# override DMIC default definitions
DMIC0_HOST_PIPELINE_ID 13
DMIC0_DAI_PIPELINE_ID 14
DMIC0_HOST_PIPELINE_SINK 'copier.host.13.1'
DMIC0_DAI_PIPELINE_SRC 'copier.DMIC.14.1'
DMIC0_NAME 'NoCodec-6'
DMIC0_PCM_CAPS 'Passthrough Capture 13'
DMIC0_PIPELINE_STREAM_NAME 'copier.DMIC.14.1'
}
# include DMIC config if needed.
IncludeByKey.NUM_DMICS {
"[1-4]" "platform/intel/dmic-generic.conf"
}
#
@ -252,68 +269,6 @@ Object.Dai {
}
}
}
DMIC."0" {
name NoCodec-6
id 6
driver_version 1
clk_min 500000
clk_max 4800000
duty_min 40
duty_max 60
sample_rate 48000
fifo_word_length 16
unmute_ramp_time_ms 200
num_pdm_active 1
# these fir design parameters are for future use
# and they are currently ignored
fir_type "kaiser-linear-phase"
fir_length 127
cic_decimate 25
fir_decimate 2
fir_passband_end 20000
fir_stopband_start 24000
fir_passpand_ripple 10
fir_stopband_ripple -95000
Object.Base.hw_config."DMIC0" {
id 0
}
Object.Widget.copier."1" {
index 7
type "dai_out"
dai_type "DMIC"
copier_type "DMIC"
type dai_out
direction "capture"
stream_name "NoCodec-6"
period_sink_count 2
period_source_count 0
format s16le
node_type $DMIC_LINK_INPUT_CLASS
num_audio_formats 2
# 16-bit 48KHz 2ch
Object.Base.audio_format.1 {
in_bit_depth 32
out_bit_depth 32
dma_buffer_size "$[$ibs * 2]"
}
# 32-bit 48KHz 2ch
Object.Base.audio_format.2 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
dma_buffer_size "$[$ibs * 2]"
}
}
# PDM controller config
Object.Base.pdm_config."0" {
ctrl_id 0
}
}
}
#
@ -411,21 +366,6 @@ Object.Pipeline {
in_bit_depth 32
}
}
passthrough-capture."7" {
format "s16le"
index 7
Object.Widget.pipeline.1.stream_name "copier.DMIC.7.1"
Object.Widget.copier.1.stream_name "Passthrough Capture 3"
Object.Widget.copier.1.Object.Base.audio_format.1 {
# 32 -> 16 bits conversion is done here,
# so in_bit_depth is 32 (and out_bit_depth is 16).
in_bit_depth 32
}
}
}
Object.PCM {
@ -477,17 +417,6 @@ Object.PCM {
formats 'S16_LE,S32_LE'
}
}
pcm."3" {
name "DMIC"
id 3
direction "capture"
Object.Base.fe_dai."DMIC" {}
Object.PCM.pcm_caps."capture" {
name "Passthrough Capture 3"
formats 'S16_LE,S32_LE'
}
}
}
Object.Base {
@ -520,10 +449,4 @@ Object.Base {
source "copier.SSP.6.1"
sink "copier.host.6.1"
}
# bind pcm with host comp
route."7" {
source "copier.DMIC.7.1"
sink "copier.host.7.1"
}
}