title: Android call recording using ALSA / CAF
body: <p>I'm writing a small call recording library for my rooted phone.
  <br>I saw in some application that recording is done through ALSA or CAF on rooted phones.<br>
  I couldn't find any example / tutorial on how to use ALSA or CAF for call recording (or even for audio recording for that matter).<br>
  I saw tinyAlsa lib project, but I couldn't figure how to use it in an android app.
  Can someone please show me some tutorial or code example on how to integrate ALSA or CAF in an Android application?</p>
  
  <p><strong>Update</strong>
  I managed to wrap tinyAlsa with JNI calls. However, calls like mixer_open(0) returns null pointers, and calls like pcm_open(...) returns a pointer but subsequent call to is_pcm_ready(pcm) always returns false.<br>
  Am I doing something wrong? Am I missing something?</p>