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 DRC and TDFB pre-processing #481

Open
wants to merge 4 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.

The SOF control blobs related variables set are moved to dsp.conf
that is included from top level sof-hda-dsp.conf.

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

Signed-off-by: Seppo Ingalsuo <[email protected]>
This patch adds enable of the 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.

Signed-off-by: Seppo Ingalsuo <[email protected]>
@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
If The user or product configuration defines blobs for DRC
or TDFB, apply them as FixedBootSequence in every device boot.
This allows to override the generic blobs in topology with
device specific blobs based on DMI ID.

Signed-off-by: Seppo Ingalsuo <[email protected]>
@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
@@ -1,7 +1,7 @@
# How to build

These blobs were exported with example_drc.m tool from
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@perexg @lgirdwood I will change the file suffix from .blob to .bin for added blob. Also I'll change the existing ones to .bin to have similar looking file names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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 <[email protected]>
@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from 7c8231b to 9fc75f8 Compare December 10, 2024 12:14
@@ -32,13 +32,23 @@ If.SOFIPCVer {
PostMixerAnalogPlaybackFIRBytes "Post Mixer Analog Playback FIR Eq bytes"
PostMixerAnalogPlaybackDRCBytes "Post Mixer Analog Playback DRC bytes"
PostMixerAnalogPlaybackDRCSwitch "Post Mixer Analog Playback DRC switch"
Dmic0CaptureDRCBytes "Dmic0 Capture DRC bytes"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better to change this. The SDW PCs can also have PCH-DMIC and their topologies do no have same "Post Mixer Analog" class controls. So better to handle DMIC processing separately for code reuse.

Control "name='${var:EndpointDrcSwitch}'"
}
True {
If.Dmic0DrcBlobDefined {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change in this and next Dmic0 to Endpoint to look more generic.

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.

2 participants