From bac5f7c8e193915bc43f643a2eabac87ac8eba32 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 29 Apr 2025 18:06:25 +0300 Subject: [PATCH 1/6] Tools: Topology2: Add 8-bit formats to nocodec topologies To enable testing of new feature, this patch adds to nocodec topologies to PCM0 host copier playback and capture the support for 8-bit formats unsigned, A-law, and mu-law. Signed-off-by: Seppo Ingalsuo --- tools/topology/topology2/cavs-nocodec.conf | 78 +++++++++++++++++++++- 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/tools/topology/topology2/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf index da010064a95d..49daf702822e 100644 --- a/tools/topology/topology2/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -221,6 +221,43 @@ IncludeByKey.PASSTHROUGH { Object.Widget.host-copier.1 { stream_name 'SSP0 Playback' pcm_id 0 + num_input_audio_formats 6 + num_output_audio_formats 1 + Object.Base.input_audio_format [ + { + in_bit_depth 8 + in_valid_bit_depth 8 + in_sample_type $SAMPLE_TYPE_UNSIGNED_INTEGER + } + { + in_bit_depth 8 + in_valid_bit_depth 8 + in_sample_type $SAMPLE_TYPE_A_LAW + } + { + in_bit_depth 8 + in_valid_bit_depth 8 + in_sample_type $SAMPLE_TYPE_MU_LAW + } + { + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] } Object.Widget.gain.1 { curve_type "windows_fade" @@ -324,6 +361,43 @@ IncludeByKey.PASSTHROUGH { Object.Widget.host-copier.1 { stream_name 'SSP0 Capture' pcm_id $SSP0_PCM_ID + num_input_audio_formats 1 + num_output_audio_formats 6 + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 8 + out_valid_bit_depth 8 + out_sample_type $SAMPLE_TYPE_UNSIGNED_INTEGER + } + { + out_bit_depth 8 + out_valid_bit_depth 8 + out_sample_type $SAMPLE_TYPE_A_LAW + } + { + out_bit_depth 8 + out_valid_bit_depth 8 + out_sample_type $SAMPLE_TYPE_MU_LAW + } + { + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_bit_depth 32 + out_valid_bit_depth 24 + } + { + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] } Object.Widget.gain.1 { curve_type "windows_fade" @@ -1003,7 +1077,7 @@ Object.PCM.pcm [ Object.PCM.pcm_caps.1 { direction "playback" name "SSP0 Playback" - formats 'S16_LE,S24_LE,S32_LE' + formats 'S16_LE,S24_LE,S32_LE,U8,A_LAW,MU_LAW' IncludeByKey.SSP0_RATE { "48000" { rates '48000' @@ -1020,7 +1094,7 @@ Object.PCM.pcm [ Object.PCM.pcm_caps.2 { direction "capture" name "SSP0 Capture" - formats 'S16_LE,S24_LE,S32_LE' + formats 'S16_LE,S24_LE,S32_LE,U8,A_LAW,MU_LAW' IncludeByKey.SSP0_RATE { "48000" { rates '48000' From 605c0141e4d64a9a99c28e16733dd07d79b6b82c Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Mon, 2 Jun 2025 20:05:48 +0300 Subject: [PATCH 2/6] Tools: Topology: Add to nocodec support for float sample type This type adds to nocodec PCM and host-copier FLOAT_LE format support. The float format is converted at host-copier to/from normal S32_LE pipelines format. Signed-off-by: Seppo Ingalsuo --- tools/topology/topology2/cavs-nocodec.conf | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tools/topology/topology2/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf index 49daf702822e..a481d005e4dc 100644 --- a/tools/topology/topology2/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -221,7 +221,7 @@ IncludeByKey.PASSTHROUGH { Object.Widget.host-copier.1 { stream_name 'SSP0 Playback' pcm_id 0 - num_input_audio_formats 6 + num_input_audio_formats 7 num_output_audio_formats 1 Object.Base.input_audio_format [ { @@ -251,6 +251,11 @@ IncludeByKey.PASSTHROUGH { in_bit_depth 32 in_valid_bit_depth 32 } + { + in_bit_depth 32 + in_valid_bit_depth 32 + in_sample_type $SAMPLE_TYPE_FLOAT + } ] Object.Base.output_audio_format [ { @@ -362,7 +367,7 @@ IncludeByKey.PASSTHROUGH { stream_name 'SSP0 Capture' pcm_id $SSP0_PCM_ID num_input_audio_formats 1 - num_output_audio_formats 6 + num_output_audio_formats 7 Object.Base.input_audio_format [ { in_bit_depth 32 @@ -397,6 +402,11 @@ IncludeByKey.PASSTHROUGH { out_bit_depth 32 out_valid_bit_depth 32 } + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_sample_type $SAMPLE_TYPE_FLOAT + } ] } Object.Widget.gain.1 { @@ -1077,7 +1087,7 @@ Object.PCM.pcm [ Object.PCM.pcm_caps.1 { direction "playback" name "SSP0 Playback" - formats 'S16_LE,S24_LE,S32_LE,U8,A_LAW,MU_LAW' + formats 'S16_LE,S24_LE,S32_LE,U8,A_LAW,MU_LAW,FLOAT_LE' IncludeByKey.SSP0_RATE { "48000" { rates '48000' @@ -1094,7 +1104,7 @@ Object.PCM.pcm [ Object.PCM.pcm_caps.2 { direction "capture" name "SSP0 Capture" - formats 'S16_LE,S24_LE,S32_LE,U8,A_LAW,MU_LAW' + formats 'S16_LE,S24_LE,S32_LE,U8,A_LAW,MU_LAW,FLOAT_LE' IncludeByKey.SSP0_RATE { "48000" { rates '48000' From 8144ada9958b833aa8c1dbc5c74ceda8b15f6fc0 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 30 Apr 2025 18:27:35 +0300 Subject: [PATCH 3/6] App: Boards: Enable 8-bit and float formats for cAVS2.5 Signed-off-by: Seppo Ingalsuo --- app/boards/intel_adsp_cavs25.conf | 8 ++++++++ app/boards/intel_adsp_cavs25_tgph.conf | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/app/boards/intel_adsp_cavs25.conf b/app/boards/intel_adsp_cavs25.conf index 72104567491a..3a0857ea2223 100644 --- a/app/boards/intel_adsp_cavs25.conf +++ b/app/boards/intel_adsp_cavs25.conf @@ -23,6 +23,14 @@ CONFIG_PCM_CONVERTER_FORMAT_S16_C16_AND_S16_C32=y CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S32_C32=y CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S24_C32=y CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S16_C32=y +CONFIG_FORMAT_U8=y +CONFIG_FORMAT_A_LAW=y +CONFIG_FORMAT_MU_LAW=y +CONFIG_FORMAT_FLOAT=y +CONFIG_PCM_CONVERTER_FORMAT_U8=y +CONFIG_PCM_CONVERTER_FORMAT_A_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_MU_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_FLOAT=y # SOF / infrastructure CONFIG_AMS=y diff --git a/app/boards/intel_adsp_cavs25_tgph.conf b/app/boards/intel_adsp_cavs25_tgph.conf index b29a7ba18970..6ef138429bdf 100644 --- a/app/boards/intel_adsp_cavs25_tgph.conf +++ b/app/boards/intel_adsp_cavs25_tgph.conf @@ -23,6 +23,14 @@ CONFIG_PCM_CONVERTER_FORMAT_S16_C16_AND_S16_C32=y CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S32_C32=y CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S24_C32=y CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S16_C32=y +CONFIG_FORMAT_U8=y +CONFIG_FORMAT_A_LAW=y +CONFIG_FORMAT_MU_LAW=y +CONFIG_FORMAT_FLOAT=y +CONFIG_PCM_CONVERTER_FORMAT_U8=y +CONFIG_PCM_CONVERTER_FORMAT_A_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_MU_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_FLOAT=y # SOF / infrastructure CONFIG_LP_MEMORY_BANKS=1 From 0fe9ade1394f156eb1b734e585d4b5585c159241 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 24 Jun 2025 16:22:33 +0300 Subject: [PATCH 4/6] App: Boards: Enable 8-bit and float formats for ACE1.5 Signed-off-by: Seppo Ingalsuo --- app/boards/intel_adsp_ace15_mtpm.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/boards/intel_adsp_ace15_mtpm.conf b/app/boards/intel_adsp_ace15_mtpm.conf index 26a9680e92f1..969c16d90cb0 100644 --- a/app/boards/intel_adsp_ace15_mtpm.conf +++ b/app/boards/intel_adsp_ace15_mtpm.conf @@ -28,6 +28,14 @@ CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S16_C32=y CONFIG_PIPELINE_2_0=y CONFIG_SAMPLE_KEYPHRASE=y CONFIG_FAST_GET=y +CONFIG_FORMAT_U8=y +CONFIG_FORMAT_A_LAW=y +CONFIG_FORMAT_MU_LAW=y +CONFIG_FORMAT_FLOAT=y +CONFIG_PCM_CONVERTER_FORMAT_U8=y +CONFIG_PCM_CONVERTER_FORMAT_A_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_MU_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_FLOAT=y # SOF / audio modules / mocks # This mock is part of official sof-bin releases because the CI that From 44352b36d9fb0591c556a2b8ce48074ef8d68ab4 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 24 Jun 2025 16:23:54 +0300 Subject: [PATCH 5/6] App: Boards: Enable 8-bit and float formats for ACE2.0 Signed-off-by: Seppo Ingalsuo --- app/boards/intel_adsp_ace20_lnl.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/boards/intel_adsp_ace20_lnl.conf b/app/boards/intel_adsp_ace20_lnl.conf index a8888c9557d6..d54173ff8552 100644 --- a/app/boards/intel_adsp_ace20_lnl.conf +++ b/app/boards/intel_adsp_ace20_lnl.conf @@ -24,6 +24,14 @@ CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S16_C32=y CONFIG_PIPELINE_2_0=y CONFIG_SAMPLE_KEYPHRASE=y CONFIG_FAST_GET=y +CONFIG_FORMAT_U8=y +CONFIG_FORMAT_A_LAW=y +CONFIG_FORMAT_MU_LAW=y +CONFIG_FORMAT_FLOAT=y +CONFIG_PCM_CONVERTER_FORMAT_U8=y +CONFIG_PCM_CONVERTER_FORMAT_A_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_MU_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_FLOAT=y # SOF / infrastructure CONFIG_AMS=y From 365b188abd0c7b6bde0d7a147d5c125ee9be9831 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 24 Jun 2025 16:24:43 +0300 Subject: [PATCH 6/6] App: Boards: Enable 8-bit and float formats for ACE3.0 PTL Signed-off-by: Seppo Ingalsuo --- app/boards/intel_adsp_ace30_ptl.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/boards/intel_adsp_ace30_ptl.conf b/app/boards/intel_adsp_ace30_ptl.conf index 7af406131d76..d8cb29a64d9a 100644 --- a/app/boards/intel_adsp_ace30_ptl.conf +++ b/app/boards/intel_adsp_ace30_ptl.conf @@ -24,6 +24,14 @@ CONFIG_PCM_CONVERTER_FORMAT_S16_C32_AND_S16_C32=y CONFIG_PCM_CONVERTER_FORMAT_U8=y CONFIG_PIPELINE_2_0=y CONFIG_FAST_GET=y +CONFIG_FORMAT_U8=y +CONFIG_FORMAT_A_LAW=y +CONFIG_FORMAT_MU_LAW=y +CONFIG_FORMAT_FLOAT=y +CONFIG_PCM_CONVERTER_FORMAT_U8=y +CONFIG_PCM_CONVERTER_FORMAT_A_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_MU_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_FLOAT=y # SOF / infrastructure CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n