Microphone input from WM8960 Codec in Android 9

The microphone input from WM8960 Chip is connected to I2S-0.
Tinyalsa was correctly configured for sound playing and then the microphone input was added the same way.
Audio HAL did not print any errors and warnings to logs.
Sound/Music from speaker/headphones is working.

The problem is that no data going from microphone. In the logcat logs I see the ‘open input stream’ actions with stream information. Tinymix correctly changed when board is in capture mode.

Where tinycap tool can be found in Android 9 source code for Edge ?

Does tinyalsa have integration with microphone?

Is there a way to debug microphone issues?

The initial topic was related to audio problem using WM8960 Codec.

2 Likes
tinycap /sdcard/test.pcm -D x -d y
tinyplay /sdcard/test.pcm -D x -d y

x for your sound card, y for your channel.

This tool is missed in default build Android 9 for Edge. How can I enable it?

By default…

This tool does not exist in the adb shell (but tinyplay, tinymix, tinypcminfo do exist). But tinycap tool is not a solution. I am just asking about it, because it is related to recording from microphone and probably microphone integration is not ready yet for Android 9. So the main question is:

Does tinyalsa have integration with microphone in Android 9 and how it can be configured?

hlm@Server:/users/hlm/9_Edge/device/rockchip/common$ git diff
diff --git a/device.mk b/device.mk
index 3ffccc7..076723c 100755
--- a/device.mk
+++ b/device.mk
@@ -471,6 +471,7 @@ PRODUCT_PACKAGES += \
     libtinyalsa \
     tinymix \
     tinyplay \
+    tinycap \  
     tinypcminfo
1 Like

Fixed by removing mic-det-gpio line from DTS file, adding card name to the hardware/rockchip/audio/tinyalsa_hal/audio_hw.c file. Also, I made a few corrections to wm8960_config.h file, because it contains invalid control names.

4 Likes