~canonical-hwe-team/hwe-next/+git/sof:multiband_drc

Last commit made on 2020-12-03
Get this branch:
git clone -b multiband_drc https://git.launchpad.net/~canonical-hwe-team/hwe-next/+git/sof

Branch merges

Branch information

Name:
multiband_drc
Repository:
lp:~canonical-hwe-team/hwe-next/+git/sof

Recent commits

830db98... by Pin-chih Lin <email address hidden> on 2020-11-12

sof: multiband_drc: Add Multiband DRC component

Multiband DRC is a single-source-single-sink compound component which
consists of 4 stages: Emphasis Equalizer, Crossover Filter (from 1-band to
4-band), DRC (per band), and Deemphasis Equalizer of summed stream.

The following graph illustrates a 3-band Multiband DRC component:

                                 low
                                o----> DRC0 ----o
                                | |
                      3-WAY |mid |
x(n) --> EQ EMP --> CROSSOVER --o----> DRC1 ---(+)--> EQ DEEMP --> y(n)
                                | |
                                |high |
                                o----> DRC2 ----o

Signed-off-by: Pin-chih Lin <email address hidden>

7aec6e2... by Pin-chih Lin <email address hidden> on 2020-11-12

sof: crossover/drc: Expose algorithm functions

Some algorithm functions of crossover and drc are exposed to share the
usage from other components, e.g. a multi-band drc which includes
crossover and drc inside.

Signed-off-by: Pin-chih Lin <email address hidden>

984e02e... by Pin-chih Lin <email address hidden> on 2020-10-27

sof: drc: Implement s24 and s32 sample format cases

Implemented s24 and s32 sample format cases of both pass and default
functions.

Because both s24 and s32 cases use 32-bit samples for source/sink stream
while s16 case uses 16-bit, for pre_delay_buffers, it followed as well
(32-bit for s24/s32, 16-bit for s16). One special note is that we <<8 when
storing samples from source to pre_delay_buffers, and >>8 when loading from
pre_delay_buffers. It makes 32-bit samples in pre_delay_buffers are always
Q1.31 in both s24 and s32 cases.

In common functions (e.g. drc_compress_output), sample byte information is
required to pass if the function has the operation of pre_delay_buffers, to
distinguish 16-bit and 32-bit sample cases.

Signed-off-by: Pin-chih Lin <email address hidden>

8a70f62... by Pin-chih Lin <email address hidden> on 2020-10-22

sof: drc: component implemented by fixed-point calculations

In drc_generic.c and drc_math_generic.c, all floating-point math functions
are removed, and all float vaiables are replaced by fixed-point (int32_t)
variables with the appropriate precisions. It is verified that the
fixed-point replacement only lead to quite insignificant MSE errors among
all test patterns.

 - Multiplications are replaced by Q_MULTSR_32X32 with the appropriate
   precisions.

 - Divisions (x/y) are replaced by Q_MULTSR_32X32(x, inv(y)), where inv(y)
   is approximated 1/y by polynomial functions generated by fpminimax of
   Sollya with rexp optimization.

Signed-off-by: Pin-chih Lin <email address hidden>

91998d7... by Pin-chih Lin <email address hidden> on 2020-10-19

sof: drc: Use one_over_attack_frames in replace of attack_frames

Replaced the config coefficient "attack_frames" by "one_over_attack_frames"
(=1/attack_frames). It is because only "one_over_attack_frames" is used by
firmware and it could save a division operand by the replacement.

Signed-off-by: Pin-chih Lin <email address hidden>

03b1fba... by Pin-chih Lin <email address hidden> on 2020-10-15

sof: drc: More fixed-point approximative functions

Implemented the following fixed-point functions for the approximation of
math calculations in drc_math_generic.c. fpminimax of Sollya is used for
generating a good polynomial approximation of wanted functions.

logf(x)
 - Input is Q6.26: max 32.0
 - Output range ~ (-inf, 3.4657); regulated to Q6.26: (-32.0, 32.0)

linear_to_decibels(x)
 - Input is Q6.26: max 32.0
 - Output range ~ (-inf, 30.1030); regulated to Q11.21: (-1024.0, 1024.0)

asinf(x)
 - Use two-step polynomial approximation among [0, 1] whose pivot point is
   1/sqrt(2)
 - Input is Q2.30: (-2.0, 2.0)
 - Output range: [-1.0, 1.0]; regulated to Q2.30: (-2.0, 2.0)

powf(x, y)
 - Input x is Q6.26: (-32.0, 32.0); y is Q2.30: (-2.0, 2.0)
 - Output is Q12.20: max 2048.0

Signed-off-by: Pin-chih Lin <email address hidden>

9b5ba31... by Curtis Malainey <email address hidden> on 2020-10-28

dma-trace: free buffer on error

We are leaking memory if the host sends bad messages to the firmware
since we are not freeing the buffer.

Signed-off-by: Curtis Malainey <email address hidden>

85986e1... by Bartosz Kokoszko <email address hidden> on 2020-11-04

demux: add demux_prepare_active_look_up() function

This commit adds demux_prepare_active_look_up()
function. It contains channel parameter checking.
Look up table should not include elements referring
to channels higher than those actually set in
source/sink buffers.

Signed-off-by: Bartosz Kokoszko <email address hidden>

acc022b... by Bartosz Kokoszko <email address hidden> on 2020-11-04

mux: add channels check in mux_prepare_active_look_up()

This commit adds channel parameter checking in
mux_prepare_active_look_up() function. Look up
table should not include elements referring to
channels higher than those actually set in
source/sink buffers.

Signed-off-by: Bartosz Kokoszko <email address hidden>

473d889... by Bartosz Kokoszko <email address hidden> on 2020-11-04

mux: change prepare_active_look_up() function name

This commit changes prepare_active_look_up() function
name to be mux specific.

Signed-off-by: Bartosz Kokoszko <email address hidden>