[WP76xx]: Audio streams are not connecting

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

Have you tried AT command like !avsetprofile, !avcfg or !avtxvol ?

Hi,

I have used those commands, and they do work as expected however, DTMF tones using !AVTONEPLAY or +VTD/+VTS do not work as expected. With those commands I am getting the following errors:

[ 1507.633500] voice_get_session: Invalid session_id : 0
[ 1507.637548] voc_set_route_flag: invalid session_id 0x0
[ 1507.643296] voice_get_session: Invalid session_id : 0
[ 1507.647700] voc_set_device_config: Invalid session_id 0x0
[ 1507.653925] voice_get_session: Invalid session_id : 0
[ 1507.658251] voc_get_route_flag: invalid session_id 0x0

OK
[ 1508.188088] voice_get_session: Invalid session_id : 0
[ 1508.192237] voc_set_route_flag: invalid session_id 0x0
[ 1508.197246] voice_get_session: Invalid session_id : 0
[ 1508.203468] voc_disable_device: v is NULL

Ideally, I’d still like to use the Legato API to mute/unmute, modify gain, and play DTMF tones, but if I can get tones, mute/unmute, and gain control via AT commands, I’d be happy with that as well.

I can use AT!AVTONEPLAY and hear the voice in headset:

at!avcfg=5,1,2
OK
AT!AVSETPROFILE=5
OK
AT!AVAUDIO=1,1,/home/root/0-to-9_8k.wav
OK
at!avaudio=1,0
OK
at!avtoneplay=0,1,200
OK
ati3
Manufacturer: Sierra Wireless, Incorporated
Model: WP7605
Revision: SWI9X07Y_02.28.03.05 000000 jenkins 2019/07/08 11:04:16
IMEI: 353532100020465
IMEI SV: 6
FSN: 2A917285070404
+GCAP: +CGSM

OK

Hi,

I have to use slightly different commands, but my output is still the same as before:

AT!AVCFG=5,1,1
[ 1438.868559] afe_get_cal_topology_id: [AFE_TOPOLOGY_CAL] not initialized for this port 4096
[ 1438.973298] afe_get_cal_topology_id: [AFE_TOPOLOGY_CAL] not initialized for this port 4097
[ 1440.356630] qdsp_cvp_callback: cmd = 0x1133d returned error = 0x2
[ 1440.363073] send_voice_apr: DSP returned error code = [ADSP_EBADPARAM], opcode = 0x1133d

OK
AT!AVSETPROFILE=5
OK
AT!AVAUDIO=3,1,/home/root/file_example_WAV_1MG.wav
OK
AT!AVTONEPLAY=0,1,200
[ 1563.087112] voice_get_session: Invalid session_id : 0
[ 1563.091220] voc_set_route_flag: invalid session_id 0x0
[ 1563.096256] voice_get_session: Invalid session_id : 0
[ 1563.101777] voc_set_device_config: Invalid session_id 0x0
[ 1563.106672] voice_get_session: Invalid session_id : 0
[ 1563.111970] voc_get_route_flag: invalid session_id 0x0

OK
[ 1563.615503] voice_get_session: Invalid session_id : 0
[ 1563.619535] voc_set_route_flag: invalid session_id 0x0
[ 1563.625089] voice_get_session: Invalid session_id : 0
[ 1563.629685] voc_disable_device: v is NULL
ati3
Manufacturer: Sierra Wireless, Incorporated
Model: WP7610
Revision: SWI9X07Y_02.37.03.00 73df45 jenkins 2020/04/08 10:59:14
IMEI: 015250000345540
IMEI SV: 14
FSN: ZT022173790710
+GCAP: +CGSM,+DS,+ES

OK

the audio file /home/root/file_example_WAV_1MG.wav does not play over the phone call I’m in, and I still don’t hear the tone.

I can hear the wave file on the peer phone:

atd1234567;
OK

+CREG: 1,"2F1D","19ADDF",2

+CGREG: 1,"2F1D","19ADDF",2

CONNECT
AT!AVAUDIO=3,1,/home/root/0-to-9_8k.wav
OK

And I can hear the tone play in local headset:
at!avtoneplay=0,1,200

Hey,

I downloaded the file you provided 0-to-9_8k.wav and placed in the root folder.
The command never works for me:-
AT!AVAUDIO=3,1,/home/root/0-to-9_8k.wav
ERROR
But this works and I am able to hear it via headset.
AT!AVAUDIO=1,1,/home/root/0-to-9_8k.wav

ati3
Manufacturer: Sierra Wireless, Incorporated
Model: WP7607
Revision: SWI9X07Y_02.25.02.01 000000 jenkins 2019/01/30 08:13:05
IMEI: 359779080353077
IMEI SV: 6
FSN: V3021586080910
+GCAP: +CGSM

OK

Does any configuration needs to be changed to be able to execute AT!AVAUDIO=3,1 command?

Good catch. My hardware isn’t set up for me to hear locally, so I couldn’t test that way. I’m curious to see if there’s a config change required to get remote play to work.

Are you testing in voice call?

You might try usb audio

Yes, I am assuming after I get OK for AT!AVAUDIO=3,1 and when I try atd(Number) it should play the wav file for both my headset and receiver headset. Unfortunately AT!AVAUDIO=3,1 always gives me error. I tried replicating your firmware choice and profile but no luck.

at!avcfg=5,1,2
OK
AT!AVSETPROFILE=5
OK
AT!AVAUDIO=1,1,/home/root/0-to-9_8k.wav
OK
at!avaudio=1,0
OK
AT!AVAUDIO=3,1,/home/root/0-to-9_8k.wav
ERROR

can other side hear your voice in headset during voice call?

I am only hearing a periodic beep sound on the receiver headset and hear nothing on the board headset.

Seems the voice call is having problem …
Are you using mangoh board?

There should not be problem on wp7607

Yes, I am using Mangoh Green board. I am able to execute the mangohVoiceCall application and talk with the receiver. But when I call using the microcom, I hear only the periodic beep sound on the receiver end. Do you have suggestions to figure out what is failing?

Are you typing the “atd1234567;” in usb AT command port?

I am typing atd “mynumber” not 1234567

Are you typing this in usb AT port or uart console microcom?

I am using my laptop (Mac os) with virtual machine and using USB to communicate and power the board.

um… I don’t see problem here, probably need to find a way to reproduce this issue.

Do you see problem to accept the call by ATA?

Did you enable USB audio in AT!USBCOMP?