Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UCM2: Intel: sof-hda-dsp: Enable Dmic0 pre-processing and SDW speaker post-processing #481

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

singalsu
Copy link
Contributor

@singalsu singalsu commented Dec 3, 2024

This patch adds enable of the microphone capture pre-processing features as BootSequence inital values if the controls for them are available. If the user later switches these off, they will remain off.

The DRC is dynamic range control that boosts the capture level, and the TDFB (time-domain fixed beamformer) improves capture signa-to-noise ratio for set beam angle direction. The used 0 degrees angle is defined as angle towards notebook computer user.

@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from ac9367a to f6c7a52 Compare December 4, 2024 17:26
@singalsu singalsu marked this pull request as ready for review December 4, 2024 17:29
cset "name='Dmic0 Capture Switch' on"
]
}
If.Dmic0Drc {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move DRC/Beamformer Ifs to dsp.conf to have all related things in one place? Define a macro.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it makes sense. I will start also with SoundWire codec PC's SOF processing setup, so I made for the macros the endpoint name a parameter.

@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from f6c7a52 to c84628b Compare December 5, 2024 17:44
@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from c84628b to 7c8231b Compare December 5, 2024 17:57
@singalsu singalsu requested a review from perexg December 5, 2024 18:00
@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from 7c8231b to 9fc75f8 Compare December 10, 2024 12:14
@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from 9fc75f8 to 5010678 Compare December 13, 2024 18:06
@singalsu singalsu marked this pull request as draft December 13, 2024 18:09
@singalsu
Copy link
Contributor Author

Converted to draft, this needs more testing. Also I will add a SDW speaker playback control patch.

@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from 5010678 to 6094159 Compare December 16, 2024 14:48
@singalsu singalsu marked this pull request as ready for review December 16, 2024 14:49
@singalsu singalsu changed the title UCM2: Intel: sof-hda-dsp: Enable Dmic0 DRC and TDFB pre-processing UCM2: Intel: sof-hda-dsp: Enable Dmic0 pre-processing and SDW speaker post-processing Dec 16, 2024
This patch moves SOF control blobs related variables set are to
a new dsp.conf that is included from top level sof-hda-dsp.conf.

The change allows to use the variables in InitBootSequence for the
controls. E.g. customize the default blobs applied based on
DMI ID of the device.

There's no change to functionality in this patch.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch cleans up definitions in preparation to add more
controlled processing for audio endpoints.

- The algorithms names write style is aligned to e.g. "Iir" instead
  of "IIR" and "Iir" to avoid mistakes from typos.
- Add prefix PostMixerAnalogPlayback to HDA analog playback
  blob names to separate them from other Speaker endpoints.
- Similarly rename SofControl macro.

The functionality is not changed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This change adds a few blobs to use with SOF TDFB beamformer
and updates the instructions how to generate the blobs in SOF.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from 6094159 to 93e9553 Compare December 17, 2024 13:44
@singalsu
Copy link
Contributor Author

Note: Added as 6th commit enable of SDW microphone array pre-processing in SOF after I got a device where I was able to test it.

Copy link
Contributor

@ujfalusi ujfalusi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@singalsu, I only have one real question, the other two are just nitpicks

ucm2/Intel/sof-hda-dsp/dsp.conf Show resolved Hide resolved
ucm2/Intel/sof-hda-dsp/dsp.conf Show resolved Hide resolved
ucm2/Intel/sof-hda-dsp/dsp.conf Show resolved Hide resolved
ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf Outdated Show resolved Hide resolved
This patch enables the SOF microphone capture pre-processing
features as BootSequence initial values if the controls for them
are available. If the user later switches these off, they will
remain off.

The DRC is dynamic range control that boosts the capture level,
and the TDFB (time-domain fixed beamformer) improves capture
signal-to-noise ratio for set beam angle direction. The used
0 degrees angle is defined as angle towards notebook computer
user.

The generic blobs in topology can be replaced with device
specific blobs based on DMI ID. See ucm2/blobs/sof/product_configs
and ucm2/blobs/sof/user_configs.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch enables SOF post-processing for soundwire speaker
output. The DRC processing is enabled as BootSequence, and
setup of DRC, IIR, and FIR equalizer blobs as FixedBootSeqeuence
by DMI ID if custom blobs have been defined for the device in
ucm2/blobs/sof/product_configs or ucm2/blobs/sof/user_configs.

The DRC can be turned off permanently by user space if not
desired since BootSequence is only used for first time UCM2
start.

The DRC, IIR, FIR blobs are set as FixedBootSequence only
if custom blobs are defined. Otherwise the blobs defined in
topology remain in use.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch enables as BootSequence the DRC and multi-microphone
beamformer processing with the supplied blobs in topology. The
enable is for defaults if there is no previous control state. The
user can permanently switch off them if needed.

If DMI ID based customization can done with scripts in
blobs/sof/product_configs or blobs/sof/user_configs. If the blob
file names are not empty the blobs are applied by UCM2 as
FixedBootSequence in every boot to replace topology defaults.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The SoundWire PCs with PCH-DMIC use the top level sof-soundwire.conf.
This patch adds similar Dmic0 end-point processing enable as done in
for DMIC in HDA codec PCs if the controls for processing exist.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from 93e9553 to a624137 Compare December 19, 2024 11:56
@singalsu singalsu requested a review from ujfalusi December 19, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants