Tools: Topology: Add selector to compress playback pipeline#10618
Tools: Topology: Add selector to compress playback pipeline#10618singalsu wants to merge 2 commits intothesofproject:mainfrom
Conversation
This patch moves formats definitions for the objects in pipeline compr-playback to separate include files in new directory include/formats. It avoids duplication of same input and output formats several times and prepares to add new formats and sample rates later. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The purpose of this patch is to add conversion of possible mono output from decoder to stereo format in the selector (micsel) module. If the decoded output is stereo, the selector goes to pass-through mode with minimal impact to processing load. This patch adds the mono format to all needed objects (host-copier, decoder, module-copier, src, input of selector). Selector has single stereo, S32_LE, 48 kHz output format. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
| <include/components/micsel/stereo_endpoint_playback_updownmix.conf> | ||
| } | ||
| <include/formats/compr_input_audio_formats_s32_48k.conf> | ||
| <include/formats/compr_output_audio_formats_s32_48k_stereo.conf> |
There was a problem hiding this comment.
If you add the 'micsel' right after the decoder then the module-copier, src, does not need new formats as they would keep receiving stereo?
Or is it better to run with mono on them and convert to stereo as late as possible?
There was a problem hiding this comment.
As far as I understand this convert to stereo late is the only option that kernel can support (and still needs #5694). I tried early convert to stereo but kernel could not handle the formats. Early convert to stereo will be beneficial for 5.1 and 7.1, while this late convert to stereo is optimal for mono content. The first is more critical though. Ideally kernel should support both and let the approach be chosen in topology.
There was a problem hiding this comment.
you cannot swap topology based on how many channels the file you play have...
You could have 2x micsel, the first would support mono and stereo out, the second would support only stereo.
if mono is played then it would pass the micsel as mono, if 5.1/7.1 then it gets converted to stereo. Mono->stereo would be done on the second micsel down the path.
But no idea how this can be done nicely in kernel, it sounds simple, but I don't like to add much heuristics.

WIP, this needs #10613 and thesofproject/linux#5694 .