Hi All,
I’ve been attempting to manipulate the outgoing audio stream from the modem to the caller. We currently have the device setup to use I2S to bring audio in from our codec on the board, and then transmit that to the current caller. In Legato I’m doing the following:
COMPONENT_INIT
{
le_audio_ConnectService();
le_voicecall_ConnectService();
le_audio_StreamRef_t modemTxRef = le_audio_OpenModemVoiceTx();
le_audio_StreamRef_t playToneRef = le_audio_OpenPlayer();
le_audio_StreamRef_t i2sRxRef = le_audio_OpenI2sRx(LE_AUDIO_I2S_STEREO);
le_audio_ConnectorRef_t audioTxConnector = le_audio_CreateConnector();
le_result_t result;
result = le_audio_Connect(audioTxConnector, i2sRxRef);
result = le_audio_Connect(audioTxConnector, modemTxRef);
if (LE_OK != result) {
Debug::Log(Debug::LogLevel::DEBUG_ERR, "Unable to connect Modem Voice TX audio stream [%p] to TX connector. Error: %d", modemTxRef, result);
}
result = le_audio_Connect(audioTxConnector, playToneRef);
if (LE_OK != result) {
Debug::Log(Debug::LogLevel::DEBUG_ERR, "Unable to connect DTMF player audio stream [%p] to TX connector. Error: %d", playToneRef, result);
}
}
Some interesting logging statements:
Dec 11 16:01:04 swi-mdm9x28-wp user.info Legato: INFO | audioDaemon[1086]/le_pa_audio T=main | pa_audio.c pa_audio_SetDspAudioPath() 1942 | Set the following path: 1 (in.8 out.5)
Dec 11 16:01:04 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1086]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_SWI_M2M_AUDIO_SET_AVCFG_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=5.[0x05]
Dec 11 16:01:04 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1086]/le_pa_audio T=main | pa_audio.c pa_audio_SetDspAudioPath() 2033 | Cannot set the audio physical interface to 1
Dec 11 16:01:04 swi-mdm9x28-wp user.err Legato: =ERR= | VoiceManagerExe[1129]/VoiceManager T=main | debug.cpp Log() 43 | L4G-VoiceManager: Unable to connect Modem Voice TX audio stream [0x1a9] to TX connector. Error: -6
Dec 11 16:01:04 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1086]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_SWI_M2M_AUDIO_SET_MEDIA_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=5.[0x05]
Dec 11 16:01:04 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1086]/le_pa_audio T=main | media_routing.c media_routing_SetDspAudioPath() 208 | Cannot set the audio media interface to 5
Dec 11 16:01:04 swi-mdm9x28-wp user.err Legato: =ERR= | VoiceManagerExe[1129]/VoiceManager T=main | debug.cpp Log() 43 | L4G-VoiceManager: Unable to connect DTMF player audio stream [0x3a9] to TX connector. Error: -6
Dec 11 16:04:27 swi-mdm9x28-wp user.warn Legato: -WRN- | VoiceManagerExe[1129]/VoiceManager T=main | debug.cpp Log() 40 | L4G-VoiceManager: Error [-6] playing dtmf tone on stream: 0x3a9
Also, when I attempt to increase or decrease the gain, or mute/unmute the audio stream I get no errors, but the commands don’t modify the stream either.
le_result_t mute_result = le_audio_Mute(modemTxRef);
le_result_t unmute_result = le_audio_Unmute(modemTxRef);
le_result_t set_gain_result = le_audio_SetGain(modemTxRef, gain);
These functions all return LE_OK, but don’t modify the stream, in that the volume doesn’t increase/decrease, nor does the stream mute/unmute.
Regards,
Chris