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

Commit ccbba6e6 authored by Andy Hung's avatar Andy Hung
Browse files

AudioFlinger: Fix resampler tests

Test: Run resampler tests on Pixel XL
Bug: 34113617
Change-Id: Idee23b90bd1a353f841beab95c74a7b0ddb13783
parent 36867767
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -15,7 +15,9 @@ mm
echo "waiting for device"
adb root && adb wait-for-device remount
adb push $OUT/system/lib/libaudioresampler.so /system/lib
adb push $OUT/data/nativetest/resampler_tests /system/bin
adb push $OUT/system/lib64/libaudioresampler.so /system/lib64
adb push $OUT/data/nativetest/resampler_tests/resampler_tests /data/nativetest/resampler_tests/resampler_tests
adb push $OUT/data/nativetest64/resampler_tests/resampler_tests /data/nativetest64/resampler_tests/resampler_tests

sh $ANDROID_BUILD_TOP/frameworks/av/services/audioflinger/tests/run_all_unit_tests.sh

+3 −3
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ void testBufferIncrement(size_t channels, bool useFloat,
    // set up the reference run
    std::vector<size_t> refIncr;
    refIncr.push_back(outputFrames);
    void* reference = malloc(outputSize);
    void* reference = calloc(outputFrames, outputFrameSize);
    resample(channels, reference, outputFrames, refIncr, &provider, resampler);

    provider.reset();
@@ -127,7 +127,7 @@ void testBufferIncrement(size_t channels, bool useFloat,
    outIncr.push_back(1);
    outIncr.push_back(2);
    outIncr.push_back(3);
    void* test = malloc(outputSize);
    void* test = calloc(outputFrames, outputFrameSize);
    inputIncr.push_back(1);
    inputIncr.push_back(3);
    provider.setIncr(inputIncr);
@@ -194,7 +194,7 @@ void testStopbandDownconversion(size_t channels,
    // set up the reference run
    std::vector<size_t> refIncr;
    refIncr.push_back(outputFrames);
    void* reference = malloc(outputSize);
    void* reference = calloc(outputFrames, outputFrameSize);
    resample(channels, reference, outputFrames, refIncr, &provider, resampler);

    TO *out = reinterpret_cast<TO *>(reference);
+1 −1
Original line number Diff line number Diff line
@@ -8,5 +8,5 @@ fi
echo "waiting for device"
adb root && adb wait-for-device remount

#adb shell /system/bin/resampler_tests
adb shell /data/nativetest/resampler_tests/resampler_tests
adb shell /data/nativetest64/resampler_tests/resampler_tests