0

I have a couple of questions regarding Qualcomm MSM 8960 on Android Kit Kat.

  1. When I record/render audio in native code using openSL + set the mode to IN_CALL from Java the Qualcomm MSM8960 echo canceller seems to be running. But if I set the mode to IN_COMMUNICATION, the echo canceller does not seem to be running. So my question is : What is the correct way to invoke the Qualcomm HW AGC, AEC and noise suppressor in native code ?

  2. Is it technically possible to configure the Qualcomm MSM 8960 audio subsystem directly in native code (by-passing openSL and/or Java audio interfaces) ? I would like my code to be as close as possible to the HW.

Link: https://android.googlesource.com/platform/hardware/qcom/audio/+/android-4.4.2_r2/hal/msm8960/

user1884325
  • 2,530
  • 1
  • 30
  • 49
  • The issue with talking directly to hardware drivers is typically that the device node is owned by some privileged user/group and only directly accessable via a system component that 3rd part App/Service code is supposed to interact with via IPC-based APIs. If you change the security model (for example, get root and chmod the node, possibly on every boot) then you could perhaps talk directly, though you might have to get the normal system service to relinquish the peripheral. – Chris Stratton Apr 12 '14 at 14:42
  • If you can get your code to run as the same user/group as the `mediaserver` process you might be able to talk directly to the `audio.primary` module or the user-space ALSA library. What are you trying to achieve, and why do you think that bypassing Android's multimedia framework would make things better? – Michael Apr 14 '14 at 08:02
  • Michael: I'm not sure it would make things better, but there's no need to even consider it if it's not technically possible. So that's why I asked the question. My first question, however, is more important to get an answer to. It seems like the Qualcomm MSM 8960 HW AEC only runs in the audio path in one of the modes (IN_CALL) and not in the other (IN_COMMUNICATION). So I'm wondering if somebody can confirm that this is true? – user1884325 Apr 14 '14 at 13:39
  • Michael: When I acquire mic audio using VOICE_COMMUNICATION and MODE_IN_COMMUNICATION in Java, I clearly see that the mic audio has been processed by the Qualcomm noise suppressor. How do I obtain the same result if I open up recording mic audio in openSL? In other words, how do I make sure that the mode and audio source is set correctly when I acquire mic audio natively in C via openSL ? – user1884325 Apr 14 '14 at 14:35

0 Answers0