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

Commit d478859f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "aaudio: add glitch detection to loopback, improve latency check" into oc-dr1-dev

parents 3afa6a5f fcf9efd5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,7 +4,8 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_C_INCLUDES := \
    $(call include-path-for, audio-utils) \
    frameworks/av/media/libaaudio/include
    frameworks/av/media/libaaudio/include \
    frameworks/av/media/libaaudio/examples/utils

# NDK recommends using this kind of relative path instead of an absolute path.
LOCAL_SRC_FILES:= ../src/loopback.cpp
+794 −0

File added.

Preview size limit exceeded, changes collapsed.

+199 −601

File changed.

Preview size limit exceeded, changes collapsed.

+14 −0
Original line number Diff line number Diff line
#!/system/bin/sh
# Run a loopback test in the background after a delay.
# To run the script enter:
#    adb shell "nohup sh /data/loopback.sh &"

SLEEP_TIME=10
TEST_COMMAND="aaudio_loopback -pl -Pl -C1 -n2 -m2 -tm -d5"

echo "Plug in USB Mir and Fun Plug."
echo "Test will start in ${SLEEP_TIME} seconds: ${TEST_COMMAND}"
sleep ${SLEEP_TIME}
date > /data/loopreport.txt
${TEST_COMMAND} >> /data/loopreport.txt
date >> /data/loopreport.txt
+13 −5
Original line number Diff line number Diff line
@@ -151,9 +151,13 @@ public:
                case 'd':
                    mDurationSeconds = atoi(&arg[2]);
                    break;
                case 'm':
                    AAudio_setMMapPolicy(AAUDIO_POLICY_AUTO);
                    break;
                case 'm': {
                    aaudio_policy_t policy = AAUDIO_POLICY_AUTO;
                    if (strlen(arg) > 2) {
                        policy = atoi(&arg[2]);
                    }
                    AAudio_setMMapPolicy(policy);
                } break;
                case 'n':
                    setNumberOfBursts(atoi(&arg[2]));
                    break;
@@ -198,7 +202,11 @@ public:
        printf("      -b{bufferCapacity} frames\n");
        printf("      -c{channels} for example 2 for stereo\n");
        printf("      -d{duration} in seconds, default is %d\n", DEFAULT_DURATION_SECONDS);
        printf("      -m enable MMAP\n");
        printf("      -m{0|1|2|3} set MMAP policy\n");
        printf("          0 = _UNSPECIFIED, default\n");
        printf("          1 = _NEVER\n");
        printf("          2 = _AUTO, also if -m is used with no number\n");
        printf("          3 = _ALWAYS\n");
        printf("      -n{numberOfBursts} for setBufferSize\n");
        printf("      -p{performanceMode} set output AAUDIO_PERFORMANCE_MODE*, default NONE\n");
        printf("          n for _NONE\n");
Loading