Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,50 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-efx-generic-4ch.bin,\
DEEPBUFFER_FW_DMA_MS=100,EFX_FIR_PARAMS=passthrough,EFX_IIR_PARAMS=passthrough,\
EFX_DRC_COMPONENT=multiband,EFX_MBDRC_PARAMS=passthrough"

# With 16 kHz DMIC1
Copy link
Collaborator

@RanderWang RanderWang Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question: can we have a flag to build these DMIC1 ? Currently we don't use these DMIC1 tplgs but need to add burden for CI

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RanderWang @fredoh9 @mengdonglin We had a testing gap and missed that alsatplg did not work correctly for two DMIC DAI case. I'd like to add some cases with DMIC1 and additionally with other than default 16 kHz to increase coverage. Suggestions of which platforms to use and what kind of topologies set to build are welcome. I used here two platforms I had hands-on access to. A MTL RVP platform and LNL might make better sense. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, MTL RVP is preferred. SDW platforms use SDW codec DMIC in current situation, do we need to test with it ?

Please check this in HDA machine driver, does your PR work with this ?

	{
		.name = "dmic16k",
		.id = 7,
		.dpcm_capture = 1,
		.no_pcm = 1,
		SND_SOC_DAILINK_REG(dmic16k, dmic_codec, platform),
	},

"sof-hda-generic\;sof-hda-generic-4ch-48k-16k\;\
HDA_CONFIG=mix,DEEPBUFFER_FW_DMA_MS=100,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch-48k-16k.bin,\
NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC1_ENABLE=passthrough,DMIC1_RATE=16000"

# With 96 kHz DMIC1
"sof-hda-generic\;sof-hda-generic-4ch-48k-96k\;\
HDA_CONFIG=mix,DEEPBUFFER_FW_DMA_MS=100,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch-48k-96k.bin,\
NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC1_ENABLE=passthrough,DMIC1_RATE=96000"

# With 96 kHz DMIC0
"sof-hda-generic\;sof-hda-generic-4ch-96k\;\
HDA_CONFIG=mix,DEEPBUFFER_FW_DMA_MS=100,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-hda-generic-4ch-96k.bin,\
NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_RATE=96000"

# SDW + DMIC + HDMI, with 16 kHz DMIC1
"cavs-sdw\;sof-mtl-sdw-cs42l42-l0-max98363-l2-48k-16k\;PLATFORM=mtl,\
NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\
DMIC1_ENABLE=passthrough,DMIC1_RATE=16000,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-sdw-cs42l42-l0-max98363-l2-48k-16k.bin,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
SDW_JACK_CAPTURE_CH=1,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true"

# SDW + DMIC + HDMI, with 96 kHz DMIC1
"cavs-sdw\;sof-mtl-sdw-cs42l42-l0-max98363-l2-48k-96k\;PLATFORM=mtl,\
NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\
DMIC1_ENABLE=passthrough,DMIC1_RATE=96000,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-sdw-cs42l42-l0-max98363-l2-48k-96k.bin,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
SDW_JACK_CAPTURE_CH=1,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true"

# SDW + DMIC + HDMI, with 96 kHz DMIC0
"cavs-sdw\;sof-mtl-sdw-cs42l42-l0-max98363-l2-96k\;PLATFORM=mtl,\
NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,DMIC0_RATE=96000,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-sdw-cs42l42-l0-max98363-l2-96k.bin,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
SDW_JACK_CAPTURE_CH=1,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true"

# CAVS HDA topology with gain and SRC before mixin for HDA and passthrough pipelines for HDMI
"sof-hda-generic\;sof-hda-src-generic\;HDA_CONFIG=src,DEEPBUFFER_FW_DMA_MS=100"

Expand Down
4 changes: 4 additions & 0 deletions tools/topology/topology2/platform/intel/dmic-default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Define {
DMIC0_ID 6 # Default link ID based on HDA generic machine driver
DMIC1_ID 7 # Default link ID based on HDA generic machine driver
DMIC0_PCM_ID 10 # Default DMIC0 PCM ID
DMIC1_PCM_ID 11 # Default DMIC1 PCM ID
FORMAT s32le
# IO_CLK applicable for TGL and ADL
DMIC_IO_CLK 38400000
Expand Down Expand Up @@ -36,4 +37,7 @@ Define {
DMIC_CORE_ID 0
PASSTHROUGH "false"
DMIC_PIPELINE_PRIORITY 0
DMIC0_RATE 48000
DMIC1_RATE 16000
DMIC1_ENABLE "false"
}
125 changes: 124 additions & 1 deletion tools/topology/topology2/platform/intel/dmic-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Object.Dai.DMIC [
id $DMIC0_ID
driver_version $DMIC_DRIVER_VERSION
io_clk $DMIC_IO_CLK
sample_rate $DMIC0_RATE
clk_min 500000
clk_max 4800000
unmute_ramp_time_ms 200
Expand Down Expand Up @@ -39,7 +40,7 @@ Object.Dai.DMIC [
dai_index 1
driver_version $DMIC_DRIVER_VERSION
io_clk $DMIC_IO_CLK
sample_rate 16000
sample_rate $DMIC1_RATE
clk_min 500000
clk_max 4800000
unmute_ramp_time_ms 200
Expand Down Expand Up @@ -84,10 +85,12 @@ IncludeByKey.PASSTHROUGH {
num_output_audio_formats 2
Object.Base.input_audio_format [
{
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
{
in_rate $DMIC0_RATE
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
Expand All @@ -97,10 +100,12 @@ IncludeByKey.PASSTHROUGH {
]
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
Expand All @@ -115,10 +120,12 @@ IncludeByKey.PASSTHROUGH {
num_output_audio_formats 2
Object.Base.input_audio_format [
{
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
{
in_rate $DMIC0_RATE
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
Expand All @@ -128,10 +135,12 @@ IncludeByKey.PASSTHROUGH {
]
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
Expand All @@ -149,10 +158,12 @@ IncludeByKey.PASSTHROUGH {
num_output_audio_formats 2
Object.Base.input_audio_format [
{
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
{
in_rate $DMIC0_RATE
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
Expand All @@ -162,10 +173,12 @@ IncludeByKey.PASSTHROUGH {
]
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
Expand All @@ -192,16 +205,112 @@ IncludeByKey.PASSTHROUGH {
type dai_out
stream_name $DMIC0_NAME
node_type $DMIC_LINK_INPUT_CLASS
num_input_audio_formats 2
Object.Base.input_audio_format [
{
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
{
in_rate $DMIC0_RATE
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
}
]
num_output_audio_formats 2
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
]
}

Object.Widget.module-copier."2" {
stream_name $DMIC0_NAME
num_input_audio_formats 2
Object.Base.input_audio_format [
{
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
{
in_rate $DMIC0_RATE
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
}
]
num_output_audio_formats 2
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
]
}

Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name 'DMIC0 Capture IIR Eq'
}
num_input_audio_formats 2
Object.Base.input_audio_format [
{
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
{
in_rate $DMIC0_RATE
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
}
]
num_output_audio_formats 2
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
]
}
Object.Widget.pipeline."1" {
core $DMIC_CORE_ID
Expand Down Expand Up @@ -234,10 +343,12 @@ IncludeByKey.PASSTHROUGH {
num_input_audio_formats 2
Object.Base.input_audio_format [
{
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
{
in_rate $DMIC0_RATE
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
Expand All @@ -248,10 +359,12 @@ IncludeByKey.PASSTHROUGH {
num_output_audio_formats 2
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
Expand All @@ -275,10 +388,12 @@ IncludeByKey.PASSTHROUGH {
num_input_audio_formats 2
Object.Base.input_audio_format [
{
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
{
in_rate $DMIC0_RATE
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
Expand All @@ -289,10 +404,12 @@ IncludeByKey.PASSTHROUGH {
num_output_audio_formats 2
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
Expand Down Expand Up @@ -327,6 +444,12 @@ Object.PCM.pcm [
formats 'S32_LE'
channels_min $NUM_DMICS
channels_max $NUM_DMICS
rate_min $DMIC0_RATE
rate_max $DMIC0_RATE
}
}
]

IncludeByKey.DMIC1_ENABLE {
"passthrough" "platform/intel/dmic1-passthrough.conf"
}
Loading