topology2: add support form compressed playback#10547
topology2: add support form compressed playback#10547ujfalusi wants to merge 5 commits intothesofproject:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for compressed audio playback pipelines that can be mixed with normal PCM streams through a mixout widget. The implementation enables compressed playback for both HDA-generic and SoundWire-based topologies.
Changes:
- Added compressed playback pipeline configuration files and component definitions (decoder/encoder widgets)
- Enabled compressed playback in three topology configurations: sof-hda-generic-compr.tplg (production), sof-arl-cs42l43-l0-compr.tplg and sof-ptl-rt722-compr.tplg (development)
- Added support for flexible SoundWire endpoint configurations (Jack only, Speaker only, or both)
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/topology/topology2/sof-hda-generic.conf | Includes new compressed playback configuration files |
| tools/topology/topology2/production/tplg-targets-hda-generic.cmake | Adds production build target for HDA generic compressed topology |
| tools/topology/topology2/platform/intel/compr.conf | Defines compressed playback pipeline configurations for Jack and Speaker endpoints |
| tools/topology/topology2/platform/intel/compr-default.conf | Provides default settings for compressed audio playback |
| tools/topology/topology2/include/pipelines/cavs/compr-playback.conf | Defines the compressed playback pipeline class structure |
| tools/topology/topology2/include/components/encoder.conf | Adds encoder widget component definition |
| tools/topology/topology2/include/components/decoder.conf | Adds decoder widget component definition |
| tools/topology/topology2/development/tplg-targets.cmake | Adds development build targets for SoundWire topologies with compressed support |
| tools/topology/topology2/cavs-sdw.conf | Integrates compressed playback support into SoundWire topology with endpoint-specific configuration |
| tools/topology/topology2/cavs-mixin-mixout-hda.conf | Adds compressed playback pipeline definitions for HDA analog output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # converts the input to 48KHz | ||
| # note: this is wrong for 96/192KHz HiRes audio!!!! |
There was a problem hiding this comment.
This comment indicates known incorrect behavior for high-resolution audio at 96/192KHz sample rates. This should either be fixed or the limitation should be documented more clearly with an explanation of why this limitation exists and what the impact is.
| # converts the input to 48KHz | |
| # note: this is wrong for 96/192KHz HiRes audio!!!! | |
| # Sample-rate conversion stage. | |
| # NOTE: This SRC always converts the input to 48 kHz (see rate_out below), | |
| # including 96/192 kHz high-resolution streams. This is a known limitation | |
| # of this topology: downstream widgets (gain/mixin) are constrained to | |
| # 48 kHz operation, so high-resolution audio is downsampled to 48 kHz | |
| # and is not preserved end-to-end. Use an alternative pipeline/topology | |
| # if true 96/192 kHz playback is required. |
There was a problem hiding this comment.
I'll leave it brief as it was.
| out_bit_depth [ 32 ] | ||
| out_valid_bit_depth [ 32 ] | ||
| } | ||
| ] |
There was a problem hiding this comment.
Inconsistent indentation with tabs vs spaces. Lines 631-633 use spaces while the rest of the file uses tabs, making the code harder to maintain and visually inconsistent.
| out_bit_depth [ 32 ] | |
| out_valid_bit_depth [ 32 ] | |
| } | |
| ] | |
| out_bit_depth [ 32 ] | |
| out_valid_bit_depth [ 32 ] | |
| } | |
| ] |
| } | ||
|
|
||
| # converts the input to 48KHz | ||
| # note: this is wrong for 96/192KHz HiRes audio!!!! |
There was a problem hiding this comment.
Duplicate of the same issue on line 280. This comment indicates known incorrect behavior for high-resolution audio at 96/192KHz sample rates. This should either be fixed or the limitation should be documented more clearly.
| # note: this is wrong for 96/192KHz HiRes audio!!!! | |
| # NOTE: This SRC unconditionally resamples all input (including 96/192 kHz | |
| # high‑resolution audio) down to 48 kHz. As a result, this pipeline | |
| # does not preserve bit‑perfect 96/192 kHz playback and currently | |
| # does not support true HiRes output at those sample rates. |
| @@ -0,0 +1,63 @@ | |||
| # | |||
| # Decoder widget component definition | |||
There was a problem hiding this comment.
The comment incorrectly says 'Decoder widget component definition' when this file defines an encoder widget.
| # Decoder widget component definition | |
| # Encoder widget component definition |
| # cadence codec UUID | ||
| uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa" | ||
| no_pm "true" | ||
| num_output_pins 1 | ||
| num_input_pins 1 |
There was a problem hiding this comment.
Inconsistent indentation with leading spaces instead of tabs as used elsewhere in the file.
| # cadence codec UUID | |
| uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa" | |
| no_pm "true" | |
| num_output_pins 1 | |
| num_input_pins 1 | |
| # cadence codec UUID | |
| uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa" | |
| no_pm "true" | |
| num_output_pins 1 | |
| num_input_pins 1 |
| # cadence codec UUID | ||
| uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa" | ||
| no_pm "true" | ||
| num_output_pins 1 | ||
| num_input_pins 1 |
There was a problem hiding this comment.
Inconsistent indentation with leading spaces instead of tabs as used elsewhere in the file.
| # cadence codec UUID | |
| uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa" | |
| no_pm "true" | |
| num_output_pins 1 | |
| num_input_pins 1 | |
| # cadence codec UUID | |
| uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa" | |
| no_pm "true" | |
| num_output_pins 1 | |
| num_input_pins 1 |
| # cadence codec UUID | ||
| uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa" | ||
| no_pm "true" | ||
| num_output_pins 1 | ||
| num_input_pins 1 |
There was a problem hiding this comment.
Inconsistent indentation with leading spaces instead of tabs as used elsewhere in the file.
| # cadence codec UUID | |
| uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa" | |
| no_pm "true" | |
| num_output_pins 1 | |
| num_input_pins 1 | |
| # cadence codec UUID | |
| uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa" | |
| no_pm "true" | |
| num_output_pins 1 | |
| num_input_pins 1 |
| COMPR_PCM_NAME 'Compr Jack Out' | ||
|
|
||
| COMPR_2_PIPELINE_ID 32 | ||
| COMPR_2_PCM_ID 52 | ||
| COMPR_2_PIPELINE_SRC 'mixin.32.1' | ||
| COMPR_2_PIPELINE_SINK 'mixout.21.1' | ||
| COMPR_2_PCM_NAME 'Compr Speaker' |
There was a problem hiding this comment.
The abbreviated name 'Compr' is less clear than 'Compressed'. Consider using 'Compressed Jack Out' for consistency and clarity.
| COMPR_PCM_NAME 'Compr Jack Out' | |
| COMPR_2_PIPELINE_ID 32 | |
| COMPR_2_PCM_ID 52 | |
| COMPR_2_PIPELINE_SRC 'mixin.32.1' | |
| COMPR_2_PIPELINE_SINK 'mixout.21.1' | |
| COMPR_2_PCM_NAME 'Compr Speaker' | |
| COMPR_PCM_NAME 'Compressed Jack Out' | |
| COMPR_2_PIPELINE_ID 32 | |
| COMPR_2_PCM_ID 52 | |
| COMPR_2_PIPELINE_SRC 'mixin.32.1' | |
| COMPR_2_PIPELINE_SINK 'mixout.21.1' | |
| COMPR_2_PCM_NAME 'Compressed Speaker' |
| COMPR_2_PCM_ID 52 | ||
| COMPR_2_PIPELINE_SRC 'mixin.32.1' | ||
| COMPR_2_PIPELINE_SINK 'mixout.21.1' | ||
| COMPR_2_PCM_NAME 'Compr Speaker' |
There was a problem hiding this comment.
The abbreviated name 'Compr' is less clear than 'Compressed'. Consider using 'Compressed Speaker' for consistency and clarity.
| COMPR_2_PCM_NAME 'Compr Speaker' | |
| COMPR_2_PCM_NAME 'Compressed Speaker' |
| COMPR_PCM_ID 50 | ||
| COMPR_PIPELINE_SRC 'mixin.20.1' | ||
| COMPR_PIPELINE_SINK 'mixout.2.1' | ||
| COMPR_PCM_NAME 'Compr HDA Analog' |
There was a problem hiding this comment.
The abbreviated name 'Compr' is less clear than 'Compressed'. Consider using 'Compressed HDA Analog' for consistency and clarity.
| COMPR_PCM_NAME 'Compr HDA Analog' | |
| COMPR_PCM_NAME 'Compressed HDA Analog' |
ee5d196 to
813f209
Compare
|
Changes since v1:
|
This will be used in the compressed playback pipelines. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This will be used in the compressed capture pipelines. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Add the basic building blocks for compress playback support following the way deepbuffer is defined as the compr pipeline will be used in a similar way in topology files. We support two COMPRESSED pipeline initially, the second one is used for SDW Speaker path, but the naming is generic for easier adaptation to other topologies Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The compr pipeline will connect to `mixout.2.1` if COMPRESSED is set to true. Normal PCM, DeepBuffer and Compr can be used concurrently to play audio. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
If COMPRESSED is set to true then a compr pipeline will be attached to the Jack and Speaker path. Add example topology under development: sof-arl-cs42l43-l0-compr.tplg sof-ptl-rt721-compr.tplg sof-ptl-rt722-compr.tplg The patch supports: - no compressed pipeline - no regression - When COMPRESSED is set to true then it enables the compr pipeline dynamically for Jack and Speaker depending on their availability, in other words will work in tish combination: only Jack, only Speaker, both Jack and Speaker Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
813f209 to
92a8bf5
Compare
|
Changes since v2:
|
Hi,
the PR adds support for compressed playback pipeline which can be connected to a mixout widget to be mixed with normal PCM streams.
Both cavs-hda-generic and cavs-sdw based topologies can enable the support and the PR enables three for now:
sof-hda-generic-compr.tplg in production
sof-arl-cs42l43-l0-compr.tplg and sof-ptl-rt722-compr.tplg in development.
The implementation supports different endpoint configuration on sdw: Jack only, Speaker only or both Jack and Speaker.
In theory this can be enabled in functions as well, but not tested.
To play mp3 to HDA analog or Soundwire jack:
cplay -c0 -d50 -I MP3 <path to mp3 file>To play mp3 to Soundwire Speaker:
cplay -c0 -d52 -I MP3 <path to mp3 file>