Skip to content

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
@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
@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

@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
@singalsu
Copy link
Contributor Author

@perexg Can you please check this PR, thanks!

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>
@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from a624137 to 9ba5aaa Compare January 24, 2025 17:14
@singalsu singalsu force-pushed the sof_intel_dmic_boot_enable_drc_tdfb branch from 9ba5aaa to 40cff31 Compare January 24, 2025 17:28
@singalsu
Copy link
Contributor Author

No functional changes since push in December. Now fixed the spaces in two lines to tabs (found by ucm_validate).

@singalsu
Copy link
Contributor Author

@perexg What's up? It looks like last merged UCM patches from Github are are from mid-December. If you have time, feedback for this PR is very much welcome even if you would not be yet able accept and merge. The motivation for these patches is to get the sound experience with Linux & SOF on a notebook to better match a Windows install on same device, e.g. playback and capture loudness.

}

Define {
PostMixerAnalogPlaybackIirBytes "not available"
Copy link
Member

Choose a reason for hiding this comment

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

Just nitpicking. I would use "N/A" here to save some space.

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, that's better - Fixed.

]
Macro.Dmic0.SofEqBootSetup "endpoint='Dmic0' direction='Capture' eqtype='Iir'"
Macro.Dmic0.SofDrcBootSetup "endpoint='Dmic0' direction='Capture'"
Macro.Dmic0.SofBeamformerBootSetup "endpoint=Dmic0 direction=Capture"
Copy link
Member

Choose a reason for hiding this comment

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

Nitpicking: Use 'STR' everywhere or remove '' everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what to do, please help me to start. Can you point me an example .conf in UCM2 to follow for quotes style. Also, is https://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm__conf.html up-to-date for using 'x' and "y"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, above Capture should be 'Capture' ... I'll see if I have similar missed ''.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, I was blind.

# For SoundWire PC with PCH-DMIC set BootSequence and FixedBootSequence for eqiir, tdfb, drc
Macro.Dmic0ArrayIir.SofEqBootSetup "endpoint='Dmic0' direction='Capture' eqtype='Iir'"
Macro.Dmic0ArrayDrc.SofDrcBootSetup "endpoint='Dmic0' direction='Capture'"
Macro.Dmic0ArrayTdfb.SofBeamformerBootSetup "endpoint=Dmic0 direction=Capture"
Copy link
Member

Choose a reason for hiding this comment

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

Nitpicking: Use 'STR' everywhere or remove '' everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this is fixed too.

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>
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 40cff31 to b4e68a4 Compare January 28, 2025 11:30
@singalsu singalsu requested a review from perexg January 28, 2025 11:31
@perexg perexg closed this in 969c87e Jan 29, 2025
perexg pushed a commit that referenced this pull request Jan 29, 2025
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.

Closes: #481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Jan 29, 2025
This change adds a few blobs to use with SOF TDFB beamformer
and updates the instructions how to generate the blobs in SOF.

Closes: #481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Jan 29, 2025
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.

Closes: #481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Jan 29, 2025
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.

Closes: #481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Jan 29, 2025
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.

Closes: #481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Jan 29, 2025
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.

Closes: #481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sigurs pushed a commit to Sigurs/alsa-ucm-conf that referenced this pull request Apr 22, 2025
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.

Closes: alsa-project#481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sigurs pushed a commit to Sigurs/alsa-ucm-conf that referenced this pull request Apr 22, 2025
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.

Closes: alsa-project#481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sigurs pushed a commit to Sigurs/alsa-ucm-conf that referenced this pull request Apr 22, 2025
This change adds a few blobs to use with SOF TDFB beamformer
and updates the instructions how to generate the blobs in SOF.

Closes: alsa-project#481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sigurs pushed a commit to Sigurs/alsa-ucm-conf that referenced this pull request Apr 22, 2025
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.

Closes: alsa-project#481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sigurs pushed a commit to Sigurs/alsa-ucm-conf that referenced this pull request Apr 22, 2025
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.

Closes: alsa-project#481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sigurs pushed a commit to Sigurs/alsa-ucm-conf that referenced this pull request Apr 22, 2025
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.

Closes: alsa-project#481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sigurs pushed a commit to Sigurs/alsa-ucm-conf that referenced this pull request Apr 22, 2025
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.

Closes: alsa-project#481
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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