Skip to content
Merged
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
10 changes: 10 additions & 0 deletions tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -390,4 +390,14 @@ NHLT_BIN=nhlt-sof-tgl-cs35l56-ssp2.bin"
PDM1_MIC_B_ENABLE=1,DMIC0_PCM_ID=99,PREPROCESS_PLUGINS=nhlt,NUM_HDMIS=4,\
NHLT_BIN=nhlt-sof-adl-max98357a-rt5682.bin,SPK_ID=7,DEEPBUFFER_FW_DMA_MS=10,INCLUDE_ECHO_REF=true,\
INCLUDE_BT_OFFLOAD=false,DEEP_BUF_SPK=true,SPEAKER_CODEC_NAME=SSP2-Codec,SPEAKER_SSP_DAI_INDEX=2"

# RT721 eval board with PCH-DMIC, sof_sdw_quirk_table with SOC_SDW_PCH_DMIC
# Enable FLOAT_LE and U8 PCM formats
"cavs-sdw\;sof-ptl-rt721-4ch-allfmt\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,NUM_DMICS=4,\
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=5,DMIC1_ID=6,HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt721-4ch-allfmt.bin,DMIC0_ENHANCED_CAPTURE=true,\
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\
DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,PCM_FORMAT_ALL=true"
)
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ Define {
SSP_BLOB_VERSION_1_0 0x100
SSP_BLOB_VERSION_1_5 0x105
SSP_BLOB_VERSION_3_0 0x300

PCM_FORMAT_ALL false # Basic s16/s24/s32, no float, 8-bit etc.
}
78 changes: 61 additions & 17 deletions tools/topology/topology2/platform/intel/deep-buffer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,60 @@ Object.Pipeline.deepbuffer-playback [
Object.Widget.host-copier.1 {
stream_name $DEEP_BUFFER_PCM_NAME
pcm_id $DEEP_BUFFER_PCM_ID
Object.Base.input_audio_format [
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 16
in_valid_bit_depth 16
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
IncludeByKey.PCM_FORMAT_ALL {
"true" {
num_input_audio_formats 5
Object.Base.input_audio_format [
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 16
in_valid_bit_depth 16
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_FLOAT
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 8
in_valid_bit_depth 8
in_sample_type $SAMPLE_TYPE_UNSIGNED_INTEGER
}
]
}
"false" {
num_input_audio_formats 3
Object.Base.input_audio_format [
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 16
in_valid_bit_depth 16
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
}
]
}
Object.Base.output_audio_format [
{
out_rate $DEEP_BUF_JACK_RATE
Expand Down Expand Up @@ -83,7 +120,14 @@ Object.PCM.pcm [

Object.PCM.pcm_caps.1 {
name $DEEP_BUFFER_PCM_NAME
formats 'S16_LE,S24_LE,S32_LE'
IncludeByKey.PCM_FORMAT_ALL {
"true" {
formats 'S16_LE,S24_LE,S32_LE,U8,FLOAT_LE'
}
"false" {
formats 'S16_LE,S24_LE,S32_LE'
}
}
# To avoid DMA spinning on a buffer we need bigger
# buffer than the host buffer size, let's say twice as
# big
Expand Down
239 changes: 190 additions & 49 deletions tools/topology/topology2/platform/intel/dmic-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ IncludeByKey.PASSTHROUGH {
stream_name $DMIC0_PCM_CAPS
pcm_id $DMIC0_PCM_ID
num_input_audio_formats 1
num_output_audio_formats 1
IncludeByKey.DMIC0_PCM_CHANNELS {
"1" {
Object.Base.input_audio_format [
Expand All @@ -120,56 +119,192 @@ IncludeByKey.PASSTHROUGH {
in_ch_map $CHANNEL_MAP_MONO
}
]
Object.Base.output_audio_format [
IncludeByKey.PCM_FORMAT_ALL {
"true" {
num_output_audio_formats 5
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 16
out_valid_bit_depth 16
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
}
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
}
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 24
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
}
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_FLOAT
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
}
{
out_rate $DMIC0_RATE
out_bit_depth 8
out_valid_bit_depth 8
out_sample_type $SAMPLE_TYPE_UNSIGNED_INTEGER
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
}
]
}
"false" {
num_output_audio_formats 1
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

Removed line that sets num_output_audio_formats to 1, but this value is still needed when PCM_FORMAT_ALL is false. The conditional logic should preserve this line in the false branch.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wrong. Every output format definition contains now the num_output_audio_formats 1 for PCM_FORMAT_ALL false.

Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_channels 1
out_bit_depth 32
out_valid_bit_depth 32
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
}
]
}
}
}
"2" {
Object.Base.input_audio_format [
{
out_rate $DMIC0_RATE
out_channels 1
out_bit_depth 32
out_valid_bit_depth 32
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
IncludeByKey.PCM_FORMAT_ALL {
"true" {
num_output_audio_formats 5
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 16
out_valid_bit_depth 16
}
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 24
}
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_FLOAT
}
{
out_rate $DMIC0_RATE
out_bit_depth 8
out_valid_bit_depth 8
out_sample_type $SAMPLE_TYPE_UNSIGNED_INTEGER
}
]
}
"false" {
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
}
"2" {
Object.Base.input_audio_format [
{
in_rate $DMIC0_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
"4" {
Object.Base.input_audio_format [
{
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
}
]
Object.Base.output_audio_format [
{
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
}
]
}
}
"4" {
Object.Base.input_audio_format [
{
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
}
]
IncludeByKey.PCM_FORMAT_ALL {
"true" {
num_output_audio_formats 5
Object.Base.output_audio_format [
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 16
out_valid_bit_depth 16
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 32
out_valid_bit_depth 24
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
{
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
}
{
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
out_sample_type $SAMPLE_TYPE_FLOAT
}
{
out_rate $DMIC0_RATE
out_channels 4
out_bit_depth 8
out_valid_bit_depth 8
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
out_sample_type $SAMPLE_TYPE_UNSIGNED_INTEGER
}
]
}
"false" {
num_output_audio_formats 1
Object.Base.output_audio_format [
{
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" {
Expand Down Expand Up @@ -881,8 +1016,14 @@ Object.PCM.pcm [

Object.PCM.pcm_caps.1 {
name $DMIC0_PCM_CAPS
# only 32-bit capture supported now
formats 'S32_LE'
IncludeByKey.PCM_FORMAT_ALL {
"true" {
formats 'S16_LE,S24_LE,S32_LE,U8,FLOAT_LE'
}
"false" {
formats 'S32_LE'
}
}
channels_min $DMIC0_PCM_CHANNELS
channels_max $DMIC0_PCM_CHANNELS
IncludeByKey.DMIC0_RATE {
Expand Down
Loading
Loading