Sure. I have also figured out something new which partially solves my problem which I will also explain.
I have an application that listens for new calls, answers, and connects the RX and TX audio to the speaker and microphone. After the call is connected and this happens, I do the following:
root@swi-mdm9x28-wp:~# microcom /dev/ttyAT
AT!AVAUDIO=4,1,/tmp/rec1.wav
Speak into the modem’s microphone and the calling cell’s microphone, and then stop the recording:
root@swi-mdm9x28-wp:~# microcom /dev/ttyAT
AT!AVAUDIO=4,0
Finally, end the call and listen to the wav file. The audio spoken into the modem’s mic and the cell’s mic will both be in the wav file (as a reminder, I only want the audio from the cell’s mic/received by the modem and NOT the audio from the modem’s mic/transmitted by the modem).
The bit of new info I have is that if I run the following command after starting the recording using AT!AVAUDIO, I get exactly what I want, but there’s a catch…
amix 'MultiMedia1 Mixer PRI_MI2S_TX' 0
The catch is that I have to stop the AT!AVAUDIO recording BEFORE the call ends, or on the next call I can’t connect the modem’s speaker and mic to the modem RX/TX streams - it fails when connecting them to their respective connectors. I can’t stop the recording before the call ends because I don’t know when the remote caller is going to hang up. Here are the errors I see when trying to connect the audio streams on the next call:
Dec 4 13:35:36 swi-mdm9x28-wp user.info Legato: INFO | audioDaemon[1142]/le_pa_audio T=main | pa_audio.c pa_audio_SetDspAudioPath() 1942 | Set the following path: 2 (in.0 out.5)
Dec 4 13:35:36 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1142]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_SWI_M2M_AUDIO_SET_AVCFG_REQ_V01 failed: rc=-2 (Service), resp.result=0.[0x00], resp.error=0.[0x00]
Dec 4 13:35:36 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1142]/le_pa_audio T=main | pa_audio.c pa_audio_SetDspAudioPath() 2033 | Cannot set the audio physical interface to 2
Dec 4 13:35:36 swi-mdm9x28-wp user.info Legato: INFO | audioDaemon[1142]/le_pa_audio T=main | pa_audio.c pa_audio_SetDspAudioPath() 1942 | Set the following path: 2 (in.4 out.1)
Dec 4 13:35:36 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1142]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_SWI_M2M_AUDIO_SET_AVCFG_REQ_V01 failed: rc=-2 (Service), resp.result=0.[0x00], resp.error=0.[0x00]
Dec 4 13:35:36 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1142]/le_pa_audio T=main | pa_audio.c pa_audio_SetDspAudioPath() 2033 | Cannot set the audio physical interface to 2
I have also tried using the above mixer setting while using the stream generated by le_audio_OpenRecorder(), but this causes no audio to be recorded by the recorder - it disconnects all audio somehow instead of just from the modem’s mic. Apparently AT!AVAUDIO works differently from the le_audio stream handling.