1

I've got a devkit that I'm running android (KK 4.4.3) on. This board doesn't come with a display so all the work I'm doing is in the command line.

I want to integrate a linux audio loopback device as a new piece of audio hardware. I've got a basic understanding of how to implement the Audio HAL.

What I'm not sure of is how I can test this device. Are there any command line utilities etc that allow me to capture or playback audio?

There are 2 utilities tinyplay and tinycap, but they interface directly to the TinyALSA layer which completely bypasses the android audio HAL.

Thanks.

Dushara
  • 616
  • 1
  • 5
  • 25
  • You could write an app that uses `AudioRecord` / `AudioTrack` and which you can control via the command line rather than through a GUI (e.g. pass a string containing some sort of command as extra data to the intent when you start the app). – Michael May 18 '15 at 08:35
  • @Michael Yes looks like that's what I'm going to have to do. I was hoping for something like radiooptions – Dushara May 21 '15 at 03:23
  • Did you ever finish this? I am struggling with a very similar requirement http://stackoverflow.com/questions/39746221 – GPS Oct 06 '16 at 11:10

1 Answers1

0

You can use below commands from command line to playback and record.

adb shell am start -a android.intent.action.VIEW -d file:///sdcard/Music/closeyoureyes.wav -t audio/wav

am start -a android.intent.action.MAIN -n com.android.soundrecorder/com.android.soundrecorder.SoundRecorder

This is similar to how you you will be playing and recording if you had display. It will go through Android Audio HAL.

Vijeth PO
  • 400
  • 1
  • 2
  • 19