Skip to content

Commit

Permalink
UCM2: sof-soundwire: Add setup of IIR, DRC, beamformer for mic array
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
singalsu committed Dec 17, 2024
1 parent 7e7b132 commit 93e9553
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ucm2/Intel/sof-hda-dsp/dsp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ Define {
Dmic0CaptureBeamformerBytes "not available"
Dmic0CaptureBeamformerBeamSwitch "not available"
Dmic0CaptureBeamformerBeamAngleSet "not available"
MicArrayCaptureIirBytes "not available"
MicArrayCaptureDrcBytes "not available"
MicArrayCaptureDrcSwitch "not available"
MicArrayCaptureBeamformerBytes "not available"
MicArrayCaptureBeamformerBeamSwitch "not available"
MicArrayCaptureBeamformerBeamAngleSet "not available"
}

If.SOFHdaIpc4 {
Expand Down Expand Up @@ -86,6 +92,21 @@ If.SOFDmic0Proc {
}
}

If.SOFSdwMicArrayProc {
Condition {
Type ControlExists
Control "name='Microphone Capture IIR Eq'"
}
True.Define {
MicArrayCaptureIirBytes "Microphone Capture IIR Eq"
MicArrayCaptureDrcBytes "Microphone Capture DRC bytes"
MicArrayCaptureDrcSwitch "Microphone Capture DRC switch"
MicArrayCaptureBeamformerBytes "Microphone Capture TDFB bytes"
MicArrayCaptureBeamformerBeamSwitch "Microphone Capture TDFB beam switch"
MicArrayCaptureBeamformerBeamAngleSet "Microphone Capture TDFB angle set enum"
}
}

If.SOFPath {
Condition { Type AlwaysTrue }
True.Define {
Expand All @@ -106,6 +127,10 @@ If.SOFPath {
PostMixerSpeakerPlaybackIirBlob ""
PostMixerSpeakerPlaybackFirBlob ""
PostMixerSpeakerPlaybackDrcBlob ""
# Also leave SDW microphone array default blobs empty.
MicArrayCaptureDrcBlob ""
MicArrayCaptureBeamformerBlob ""
MicArrayCaptureIirBlob ""
ConfPathFromDMI "${var:SOFVendor}/${var:SOFProduct}.conf"
SOFProductConfig "/blobs/sof/product_configs/${var:ConfPathFromDMI}"
SOFConfFullPath "${ConfTopDir}${var:SOFProductConfig}"
Expand Down
5 changes: 5 additions & 0 deletions ucm2/sof-soundwire/sof-soundwire.conf
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,8 @@ Include.dsp-variables.File "../Intel/sof-hda-dsp/dsp.conf"
Macro.SpeakerDrc.SofDrcBootSetup "endpoint='PostMixerSpeaker' direction='Playback'"
Macro.SpeakerIir.SofEqBootSetup "endpoint='PostMixerSpeaker' direction='Playback' eqtype='Iir'"
Macro.SpeakerFir.SofEqBootSetup "endpoint='PostMixerSpeaker' direction='Playback' eqtype='Fir'"

# Set BootSequence and FixedBootSequence for Mic array eqiir, tdfb, drc
Macro.MicArrayIir.SofEqBootSetup "endpoint='MicArray' direction='Capture' eqtype='Iir'"
Macro.MicArrayDrc.SofDrcBootSetup "endpoint='MicArray' direction='Capture'"
Macro.MicarrayTdfb.SofBeamformerBootSetup "endpoint='MicArray' direction='Capture'"

0 comments on commit 93e9553

Please sign in to comment.