Home | History | Annotate | Download | only in audio

Lines Matching full:code

56 <li><code>cd frameworks/av/services/audioflinger</code></li>
57 <li>Edit <code>Configuration.h</code>.</li>
58 <li>Uncomment <code>#define TEE_SINK</code>.</li>
59 <li>Re-build <code>libaudioflinger.so</code>.</li>
60 <li><code>adb root</code></li>
61 <li><code>adb remount</code></li>
62 <li>Push or sync the new <code>libaudioflinger.so</code> to the device's <code>/system/lib</code>.</li>
68 <li><code>adb shell getprop | grep ro.debuggable</code>
69 <br />Confirm that the output is: <code>[ro.debuggable]: [1]</code>
71 <li><code>adb shell</code></li>
72 <li><code>ls -ld /data/misc/media</code>
89 <li><code>echo af.tee=# &gt; /data/local.prop</code>
90 <br />Where the <code>af.tee</code> value is a number described below.
92 <li><code>chmod 644 /data/local.prop</code></li>
93 <li><code>reboot</code></li>
96 <h4>Values for <code>af.tee</code> property</h4>
99 The value of <code>af.tee</code> is a number between 0 and 7, expressing
101 See the code at <code>AudioFlinger::AudioFlinger()</code> in <code>AudioFlinger.cpp</code>
119 <li><code>adb shell dumpsys media.audio_flinger</code></li>
121 <code>tee copied to /data/misc/media/20131010101147_2.wav</code>
124 <li><code>adb pull</code> any <code>/data/misc/media/*.wav</code> files of interest;
126 but are still saved to <code>/data/misc/media</code> upon track closure.
144 <li>Do the <code>dumpsys</code> immediately after test;
159 <li>Revert the source code changes to <code>Configuration.h</code>.</li>
160 <li>Re-build <code>libaudioflinger.so</code>.</li>
161 <li>Push or sync the restored <code>libaudioflinger.so</code>
162 to the device's <code>/system/lib</code>.
164 <li><code>adb shell</code></li>
165 <li><code>rm /data/local.prop</code></li>
166 <li><code>rm /data/misc/media/*.wav</code></li>
167 <li><code>reboot</code></li>
181 <code>__android_log_print</code>
182 declared in <code>&lt;android/log.h&gt;</code>.
187 prefer macros named <code>ALOGE</code>, <code>ALOGW</code>,
188 <code>ALOGI</code>, <code>ALOGV</code>, etc. They are declared in
189 <code>&lt;utils/Log.h&gt;</code>, and for the purposes of this article
190 we'll collectively refer to them as <code>ALOGx</code>.
195 throughout the Android platform. In particular the <code>mediaserver</code>
197 <code>ALOGx</code> extensively.
201 Nevertheless, there are some limitations to <code>ALOGx</code> and friends:
208 missed information. The <code>ALOGV</code> variant is disabled at
216 special concern to time-critical threads such as <code>FastMixer</code> and <code>FastCapture</code>.
229 The <code>NBLOG</code> APIs and associated <code>media.log</code>
230 process and <code>MediaLogService</code>
233 "media.log" to refer to all three, but strictly speaking <code>NBLOG</code> is the
234 C++ logging API, <code>media.log</code> is a Linux process name, and <code>MediaLogService</code>
239 A <code>media.log</code> "timeline" is a series
247 The benefits of the <code>media.log</code> system are that it:
251 <li>Can be examined even when <code>mediaserver</code> crashes or hangs.</li>
261 The diagram below shows the relationship of the <code>mediaserver</code> process
262 and the <code>init</code> process, before <code>media.log</code> is introduced:
273 <li><code>init</code> forks and execs <code>mediaserver</code>.</li>
274 <li><code>init</code> detects the death of <code>mediaserver</code>, and re-forks as necessary.</li>
275 <li><code>ALOGx</code> logging is not shown.</li>
280 after <code>media.log</code> is added to the architecture:
294 Clients use <code>NBLOG</code> API to construct log entries and append them to
299 <code>MediaLogService</code> can dump the contents of the circular buffer at any time.
304 shared memory will not crash <code>MediaLogService</code>, and it will still be able
324 that use the <code>media.log</code> system. Though the new APIs are not as
325 easy to use as <code>ALOGx</code>, they are not extremely difficult either.
330 <code>FastMixer</code> and <code>FastCapture</code> threads.
338 First, you need to add logs to your code.
342 In <code>FastMixer</code> and <code>FastCapture</code> threads, use code such as this:
350 As this <code>NBLog</code> timeline is used only by the <code>FastMixer</code> and
351 <code>FastCapture</code> threads,
356 In other AudioFlinger threads, use <code>mNBLogWriter</code>:
364 For threads other than <code>FastMixer</code> and <code>FastCapture</code>,
365 the thread's <code>NBLog</code> timeline can be used by both the thread itself, and
366 by binder operations. <code>NBLog::Writer</code> does not provide any
368 within a context where the thread's mutex <code>mLock</code> is held.
376 A separate <code>NBLog::Writer</code> timeline is required per thread,
379 existing mutex (as described above for <code>mLock</code>). Or you can
380 use the <code>NBLog::LockedWriter</code> wrapper instead of <code>NBLog::Writer</code>.
386 The full <code>NBLog</code> API is at <code>frameworks/av/include/media/nbaio/NBLog.h</code>.
392 <code>media.log</code> is disabled by default. It is active only when property
393 <code>ro.test_harness</code> is <code>1</code>. You can enable it by:
411 The command <code>ps media</code> will now show two processes:
417 Note the process ID of <code>mediaserver</code> for later.
438 Now try killing <code>mediaserver</code> process: <code>kill -9 #</code>, where # is
439 the process ID you noted earlier. You should see a dump from <code>media.log</code>
440 in the main <code>logcat</code>, showing all the logs leading up to the crash.