奥迪(Audi卡塔尔(قطر‎o Debugging

时间:2018年12月18日(周二)9:00-11:30

Audio Debugging

This article describes some tips and tricks for debugging Android audio.

地点:京师学堂第一会议室

Tee Sink


The “tee sink” is an AudioFlinger debugging feature, available in custom
builds only, for retaining a short fragment of recent audio for later
analysis. This permits comparison between what was actually played or
recorded vs. what was expected.

For privacy the tee sink is disabled by default, at both compile-time
and run-time. To use the tee sink, you will need to enable it by
re-compiling, and also by setting a property. Be sure to disable this
feature after you are done debugging; the tee sink should not be left
enabled in production builds.

The instructions in the remainder of this section are for Android 5.0,
and may require changes for other versions.

主题:Analyzing Writing Processes Using Keystroke Logs

Compile-time setup

  1. cd frameworks/av/services/audioflinger
  2. Edit Configuration.h.
  3. Uncomment #define TEE_SINK.
  4. Re-build libaudioflinger.so.
  5. adb root
  6. adb remount
  7. Push or sync the new libaudioflinger.so to the device’s
    /system/lib.

内容简介

Run-time setup

  1. adb shell getprop | grep ro.debuggable
    Confirm that the output is: [ro.debuggable]: [1]
  2. adb shell
  3. ls -ld /data/misc/media

    威尼斯官方网站,Confirm that the output is:

    drwx------ media media ... media
    
If the directory does not exist, create it as follows:

    mkdir /data/misc/media
    chown media:media /data/misc/media
  1. echo af.tee=# > /data/local.prop
    Where the af.tee value is a number described below.
  2. chmod 644 /data/local.prop
  3. reboot

目前越来越多的研究对数字化写作评估测验(digital writing
assessments)中的Keystroke Log信息进行分析,基于写作过程(writing
processes)的结果和反馈不仅能够提升传统只报告一个测验分数的报告方式,还能够为考官提供关于考生更加丰富和有针对性的信息。此次讲座将讨论如何使用基于Keystroke
Log收集到的过程性特征(process
features)等信息来理解学生的英文写作能力。为了对该技术现状进行相应的概述,将介绍其中一些较为完整的研究,其中一个研究是结合过程性特征和结果特征(抽取于自动评分系统)来预测考生的写作表现。There
is a growing literature on the analytics and use of keystroke logs in
digital writing assessments. The results and feedback based upon writing
processes can not only enhance traditional score reports, which may
contain only a single score, but also provide the test users with much
targeted and rich information about the test takers. This workshop will
discuss the use the process features collected from keystroke logs in
understanding students’ English writing proficiency. To give an overview
of the state-of-the-art, this workshop will describe several completed
research studies including one on the effectiveness of using process
features in combination with product features (extracted from automated
scoring system) to predict writing performance.

Values for af.tee property

The value of af.tee is a number between 0 and 7, expressing the sum of
several bits, one per feature. See the code at
AudioFlinger::AudioFlinger() in AudioFlinger.cpp for an explanation
of each bit, but briefly:

  • 1 = input
  • 2 = FastMixer output
  • 4 = per-track AudioRecord and AudioTrack

There is no bit for deep buffer or normal mixer yet, but you can get
similar results using “4.”

主讲人简介

Test and acquire data

  1. Run your audio test.
  2. adb shell dumpsys media.audio_flinger
  3. Look for a line in dumpsys output such as this:
    tee copied to /data/misc/media/20131010101147_2.wav
    This is a PCM .wav file.
  4. adb pull any /data/misc/media/*.wav files of interest; note that
    track-specific dump filenames do not appear in the dumpsys output,
    but are still saved to /data/misc/media upon track closure.
  5. Review the dump files for privacy concerns before sharing with
    others.

威尼斯官方网站 1

Suggestions

Try these ideas for more useful results:

  • Disable touch sounds and key clicks.
  • Maximize all volumes.
  • Disable apps that make sound or record from microphone, if they are
    not of interest to your test.
  • Track-specific dumps are only saved when the track is closed; you
    may need to force close an app in order to dump its track-specific
    data
  • Do the dumpsys immediately after test; there is a limited amount
    of recording space available.
  • To make sure you don’t lose your dump files, upload them to your
    host periodically. Only a limited number of dump files are
    preserved; older dumps are removed after that limit is reached.

张莫,美国考试服务中心(ETS)研发部的研究员,从华盛顿州立大学获得其博士学位,并于2011年加入ETS。她的研究工作主要集中于写作的过程分析,建构反应题的自动评分,以及基于表现性(performance-based)的评估设计和分析。张老师在相关学科领域已发表30多篇学术期刊论文,也是多个学术会议如NCME等的长期报告人。

Restore

As noted above, the tee sink feature should not be left enabled. Restore
your build and device as follows:

  1. Revert the source code changes to Configuration.h.
  2. Re-build libaudioflinger.so.
  3. Push or sync the restored libaudioflinger.so to the device’s
    /system/lib.
  4. adb shell
  5. rm /data/local.prop
  6. rm /data/misc/media/*.wav
  7. reboot

报名方式:请于12月17日上午11:00前发送报名信息(姓名、单位、联系方式+报名参加基于Keystroke
Log信息分析英文写作过程讲座)至中心短期课程邮箱 xt_workshop@bnu.edu.cn

media.log


ALOGx macros

The standard Java language logging API in Android SDK is
android.util.Log.

The corresponding C language API in Android NDK is __android_log_print
declared in <android/log.h>.

Within the native portion of Android framework, we prefer macros named
ALOGE, ALOGW, ALOGI, ALOGV, etc. They are declared in
<utils/Log.h>, and for the purposes of this article we’ll collectively
refer to them as ALOGx.

All of these APIs are easy-to-use and well-understood, so they are
pervasive throughout the Android platform. In particular the
mediaserver process, which includes the AudioFlinger sound server,
uses ALOGx extensively.

Nevertheless, there are some limitations to ALOGx and friends:

  • They are susceptible to “log spam”: the log buffer is a shared
    resource so it can easily overflow due to unrelated log entries,
    resulting in missed information. The ALOGV variant is disabled at
    compile-time by default. But of course even it can result in log
    spam if it is enabled.
  • The underlying kernel system calls could block, possibly resulting
    in priority inversion and consequently measurement disturbances and
    inaccuracies. This is of special concern to time-critical threads
    such as FastMixer and FastCapture.
  • If a particular log is disabled to reduce log spam, then any
    information that would have been captured by that log is lost. It is
    not possible to enable a specific log retroactively, after it
    becomes clear that the log would have been interesting.

发表评论

电子邮件地址不会被公开。 必填项已用*标注

相关文章