From 4c41251badd0cd36835897253c9b5ec0341ad559 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 29 Apr 2025 18:06:25 +0300 Subject: [PATCH 1/2] 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 ac0e088b34b047c7ce1f3d3c436918446f7e5b23 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 30 Apr 2025 18:27:35 +0300 Subject: [PATCH 2/2] Do not merge: For testing enable 8-bit formats for cAVS25 Signed-off-by: Seppo Ingalsuo --- app/boards/intel_adsp_cavs25.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/boards/intel_adsp_cavs25.conf b/app/boards/intel_adsp_cavs25.conf index 72104567491a..d85553e9b667 100644 --- a/app/boards/intel_adsp_cavs25.conf +++ b/app/boards/intel_adsp_cavs25.conf @@ -23,6 +23,12 @@ 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_PCM_CONVERTER_FORMAT_U8=y +CONFIG_PCM_CONVERTER_FORMAT_A_LAW=y +CONFIG_PCM_CONVERTER_FORMAT_MU_LAW=y # SOF / infrastructure CONFIG_AMS=y