Skip to content

Conversation

@singalsu
Copy link
Collaborator

@singalsu singalsu commented Oct 1, 2025

This PR is a cherry-pick from main branch.

The exported header file is missing the include for stdint.h
for the used uint32_t type. Without it some builds fail to
warning. Also the copyright text is updated.

This patch also adds static const to the array declaration.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
(cherry picked from commit d8560dc)
Need to drop the TLV header (used for Linux kernel bytes control)
from data to keep the existing format after the header was added
to sof-ctl generated data header. This header is not passed to
firmware, only the kernel that this usage of filter coefficients
passes, is using it.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
(cherry picked from commit a3450ba)
This patch adds script sof_sound_dose_time_domain_filters.m
that exports IIR and FIR coefficients to approximate A-weight
function. The current choice is IIR only for lower MCPS load.

The script sof_sound_dose_blobs.m creates a few control blobs
to test the sound_dose component.

A simple script sof_sound_dose_ref.m to compute dBFS and MEL
for a wav file is added to compare with firmware reported values.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>

(cherry picked from commit f908a2f)
The added plot is useful especially with parametric IIR
equalizer tuning to see achieved response error vs. target.
A numerical mean(abs()) value of error is printed to help
see filter parameters change impact.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
(cherry picked from commit 3b753ec)
The build topologies are
- sof-hda-benchmark-sound_dose32.tplg
- sof-mtl-sdw-benchmark-sound_dose32-sdw0.tplg
- sof-mtl-sdw-benchmark-sound_dose32-simplejack.tplg

The controls are for example initialized to
- sensitivity 100 dB, 0 dBFS equals 100 dBSPL (a worst case loudness)
- volume 0 dB, assumes codec gain for headphones is set to max
- gain 0 dB, user's music playback is not attenuated

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>

(cherry picked from commit c96891e)
This patch adds a new SOF component Sound Dose. The purpose is
to calculate for audio playback MEL values (momentary sound
exposure level) to provide to user space the data to compute the
sound dose CSD as defined in EN 50332-3.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>

(cherry picked from commit 951a27c)
@singalsu singalsu changed the title Audio: Sound Dose: Add new component Audio: Sound Dose: Add new component for SOF 2.14 Oct 1, 2025
@singalsu singalsu marked this pull request as ready for review October 1, 2025 13:45
@kv2019i kv2019i merged commit cea0631 into thesofproject:stable-v2.14 Oct 1, 2025
30 of 44 checks passed
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.

3 participants