I simply dropped in your HAL and it worked right away. I am now using a USB mic/speaker device which was automatically selected. The hardware I have now set up with the direct I2S devices doesn’t have a display so it would be quite cumbersome to grant recording permissions in an Android app.
A notable difference from using tinycap (which works great with the USB mic levels-wise) is that in Android (using MediaRecorder) the mic levels are pretty low again. That should be fixable though…
Thanks again! I would be nowhere without your contributions…
[edit]
I’m trying to follow what happens in your HAL, but for some reason logcat only shows a few lines:
04-04 19:19:55.562 2203 2330 D modules.car96audio_hal.hikey: adev_set_parameters: kvpairs: A2dpSuspended=false
04-04 19:19:55.563 2203 2330 D modules.car96audio_hal.hikey: adev_set_parameters: kvpairs: BT_SCO=off
04-04 19:20:23.250 2203 2203 D modules.car96audio_hal.hikey: adev_set_parameters: kvpairs: A2dpSuspended=false
04-04 21:11:08.861 2203 2203 D modules.car96audio_hal.hikey: adev_set_parameters: kvpairs: card=1;connect=16384;device=0
04-04 21:11:09.177 2203 2203 D modules.car96audio_hal.hikey: SCANDIR found SoC card at 0
04-04 21:11:09.179 2203 2330 D modules.car96audio_hal.hikey: adev_set_parameters: kvpairs: card=1;connect=-2147479552;device=0
But nothing when it actually plays back audio or records audio. is that normal? or…is something else actually doing the playback and recording and I’m just thinking it is your HAL?