Skip to content

Conversation

@singalsu
Copy link
Collaborator

No description provided.

singalsu added 2 commits July 22, 2025 13:37
If a non-supported conversion is requested the sizes to
allocate and copy are zero. This addition prints a more
descriptive error for the situation. Without this change
the next null check printed more confusing error "failed to
allocate coefficients".

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to coefficients generator script sof_src_ipc4.m
the conversions for 8 - 192 kHz to 64 kHz rate. It has been
missing previously.

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

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

LGTM

This patch adds the header files with coefficients for supported
new rate conversions from 8 - 192 kHz to 64 kHz. Only the headers
with changed coefficients values are included.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
Copy link
Collaborator Author

@lgirdwood I added new coefficients into the latest push. To minimize the changes I had to use another computer to generate with Matlab the coefficients since they were previously generated with it. With Octave with other FIR tool in practice all coefficients would have changed.

@singalsu
Copy link
Collaborator Author

Test results for new conversions with testbench and src_test(32, 32, [8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000], 64000, 1, 1);:

SRC test result: Gain dB
in \ out,     64.0
     8.0,    -0.00
    11.0,     0.00
    12.0,    -0.00
    16.0,     0.00
    22.1,    -0.00
    24.0,    -0.00
    32.0,    -0.00
    44.1,     0.00
    48.0,     0.00
    88.2,    -0.00
    96.0,     0.00
   176.4,    -0.00
   192.0,    -0.00


SRC test result: Frequency response +/- X.XX dB (YY.Y kHz)
in \ out,         64.0
     8.0,  0.00 ( 3.6)
    11.0,  0.00 ( 5.0)
    12.0,  0.00 ( 5.4)
    16.0,  0.00 ( 7.2)
    22.1,  0.00 ( 9.9)
    24.0,  0.00 (10.8)
    32.0,  0.00 (14.4)
    44.1,  0.00 (19.8)
    48.0,  0.00 (21.6)
    88.2,  0.00 (28.7)
    96.0,  0.00 (28.7)
   176.4,  0.00 (28.7)
   192.0,  0.00 (28.7)


SRC test result: Frequency response -3 dB 0 - X kHz
in \ out,     64.0
     8.0,     3.73
    11.0,     5.14
    12.0,     5.60
    16.0,     7.46
    22.1,    10.28
    24.0,    11.19
    32.0,    14.92
    44.1,    20.56
    48.0,    22.39
    88.2,    29.85
    96.0,    29.85
   176.4,    29.85
   192.0,    29.85


SRC test result: Worst-case THD+N vs. frequency
in \ out,     64.0
     8.0,   -92.30
    11.0,   -96.61
    12.0,   -89.72
    16.0,   -94.83
    22.1,   -98.71
    24.0,   -90.51
    32.0,   -94.05
    44.1,   -93.25
    48.0,   -98.83
    88.2,   -93.97
    96.0,  -109.18
   176.4,   -93.48
   192.0,  -171.58


SRC test result: Dynamic range dB (CCIR-RMS)
in \ out,     64.0
     8.0,   169.07
    11.0,   167.85
    12.0,   170.18
    16.0,   184.30
    22.1,   165.68
    24.0,   153.32
    32.0,   186.03
    44.1,   149.15
    48.0,   178.81
    88.2,   153.37
    96.0,   189.28
   176.4,   154.33
   192.0,   190.68


SRC test result: Attenuation of alias products dB
in \ out,     64.0
     8.0,        -
    11.0,        -
    12.0,        -
    16.0,        -
    22.1,        -
    24.0,        -
    32.0,        -
    44.1,        -
    48.0,        -
    88.2,   -82.71
    96.0,   -63.47
   176.4,   -81.58
   192.0,   -69.72


SRC test result: Attenuation of image products dB
in \ out,     64.0
     8.0,   -92.92
    11.0,   -97.73
    12.0,   -92.23
    16.0,  -100.60
    22.1,   -94.81
    24.0,   -93.83
    32.0,  -100.93
    44.1,  -105.36
    48.0,   -99.17
    88.2,        -
    96.0,        -
   176.4,        -
   192.0,        -


SRC test result: chirp/gain/FR/THD+N/DR/AAP/AIP
in \ out,           64.0
     8.0,  0/0/0/0/0/x/0
    11.0,  0/0/0/0/0/x/0
    12.0,  0/0/0/0/0/x/0
    16.0,  0/0/0/0/0/x/0
    22.1,  0/0/0/0/0/x/0
    24.0,  0/0/0/0/0/x/0
    32.0,  0/0/0/0/0/x/0
    44.1,  0/0/0/0/0/x/0
    48.0,  0/0/0/0/0/x/0
    88.2,  0/0/0/0/0/0/x
    96.0,  0/0/0/0/0/0/x
   176.4,  0/0/0/0/0/0/x
   192.0,  0/0/0/0/0/0/x


Number of passed tests = 78
Number of failed tests = 0
Number of non-applicable tests = 13
Number of skipped tests = 0

Test passed.

I'll change this to non-draft.

@singalsu singalsu marked this pull request as ready for review July 22, 2025 14:12
@singalsu singalsu requested a review from abonislawski as a code owner July 22, 2025 14:12
@singalsu singalsu requested review from golowanow, jsarha and lyakh July 22, 2025 14:23
Copy link
Member

@golowanow golowanow left a comment

Choose a reason for hiding this comment

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

this change resolves a problem we've observed at 64 kHz rate set on a PCM

@lgirdwood
Copy link
Member

SOFCI TEST

@singalsu
Copy link
Collaborator Author

this change resolves a problem we've observed at 64 kHz rate set on a PCM

Excellent, thanks for testing it!

@lgirdwood lgirdwood merged commit 800f6ce into thesofproject:main Jul 23, 2025
37 of 45 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.

5 participants