Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c3da978 authored by Saketh Sathuvalli's avatar Saketh Sathuvalli Committed by Andy Hung
Browse files

libeffects: Fixed bit mismatch seen with 3 channel input

The output for a 3 channel input is not bit-exact with that of
2 channel input when concert surround is enabled and tested using lvmtest.

Test: local native test (lvmtest)
Bug: 124085228
Change-Id: Icb2d1d5d858be0c37cb11dd3734f8a6244d3cc1c
parent 0e2c6b80
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -132,8 +132,8 @@ void Copy_Float_Stereo_Mc(const LVM_FLOAT *src,
    src += NrChannels * (NrFrames - 1);
    for (ii = NrFrames; ii != 0; ii--)
    {
        dst[0] = src_st[0];
        dst[1] = src_st[1];
        dst[0] = src_st[0]; // copy 1 before 0 is required for NrChannels == 3.
        for (jj = 2; jj < NrChannels; jj++)
        {
            dst[jj] = src[jj];
+1 −9
Original line number Diff line number Diff line
@@ -54,21 +54,13 @@ fs_arr=(
    192000
)

ch_arr=(
    1
    2
    4
    6
    8
)

# run multichannel effects at different configs, saving only the stereo channel
# pair.
for flags in "${flags_arr[@]}"
do
    for fs in ${fs_arr[*]}
    do
        for ch in ${ch_arr[*]}
        for ch in {1..8}
        do
            adb shell $testdir/lvmtest -i:$testdir/sinesweepraw.raw \
                -o:$testdir/sinesweep_$((ch))_$((fs)).raw -ch:$ch -fs:$fs $flags