Tools: Topology: Add echo reference for SDW speaker and jack
This patch adds an echo reference capture PCM for speaker and jack playback. The additions are normally disabled but can be enabled with build options SDW_JACK_ECHO_REF=true and/or SDW_SPK_ECHO_REF=true.
This depends on merge of https://github.com/thesofproject/sof/pull/10329
This PR depends on https://github.com/thesofproject/sof/pull/10329 and kernel patch by @ranj063 .
Build variants with echo reference, for both speaker and jack, just speaker, just jack, echoref but without speaker post-processing.
Echo reference for jack:
Echo reference for jack and speaker, no EQ and DRC.
Echo reference for speaker:
Echo Reference for speaker and jack, with EQ and DRC for speaker:
Can echo ref be always available in the topology and switch on/off by opening the PCM ?
Yep, the PCMs can be used or ignored. If there is no playback and ref capture is done, it produces silence.
Can echo ref be always available in the topology and switch on/off by opening the PCM ?
Yep, the PCMs can be used or ignored. If there is no playback and ref capture is done, it produces silence.
Perfect, lets do this so its available for general usage. This would need a new PCM ID. I assume this would capture playback if the playback PCM was in use ?
I updated the virtual DAI name to LoopbackCapture_virtual_DAI, and added build for sof-ptl-rt721-echoref.tplg.
The virtual DAI name is shortened to "Loopback_Virtual". The previous name was too long for kernel name limit. This matches the updated https://github.com/thesofproject/linux/pull/5609 .
Updates: I removed the $JACK_RATE from speaker pipelines. Also I moved the basic host-copier output formats to class definition, so they don't need to be repeated for speaker. Same also for formats for siggen.
Also I tried to remove some formats definition stuff from virtual DAI to reduce tplg code amount but seems it's needed. Kernel parsed it but the formats appeared as 0 Hz and 0 bit, so I felt it wasn't safe to do.