Routing a voice call to external device connected via USB


#1

I tried to route a voice call to an external device connected via USB Audio Class.
Following pic shows my hardware.

For the test, I used the audioTest example
static void ConnectAudioToUsb(void)
{
mdmRxAudioRef = le_audio_OpenModemVoiceRx();
mdmTxAudioRef = le_audio_OpenModemVoiceTx();

// Redirect audio to the USB.
usbTxAudioRef = le_audio_OpenUsbTx();
usbRxAudioRef = le_audio_OpenUsbRx();

audioInputConnectorRef = le_audio_CreateConnector();
audioOutputConnectorRef = le_audio_CreateConnector();

if (mdmRxAudioRef && mdmTxAudioRef && usbTxAudioRef && usbRxAudioRef &&
    audioInputConnectorRef && audioOutputConnectorRef)
{
    le_audio_Connect(audioInputConnectorRef, usbRxAudioRef);
    le_audio_Connect(audioInputConnectorRef, mdmTxAudioRef);
    le_audio_Connect(audioOutputConnectorRef, usbTxAudioRef);
    le_audio_Connect(audioOutputConnectorRef, mdmRxAudioRef);
}

}
All functions work well, no error, but when I establish a call, no voice is routed.
I would like to know if Legato supports this kind of application?


#2

Hi @AE_1,

Yes I would think that’s supported.
Did you print all the *AudioRef to make sure that you enter the case with all the le_audio_Connect?

Which version of Legato & firmware do you have? (cm info + legato version)


#3

Hi CoRfr,
I am using following versions.
root@swi-mdm9x15:~# cm info
Device: WP8548
IMEI: 359377060007811
FSN: LL540300110503
Firmware: SWI9X15Y_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19
Bootloader: SWI9X15Y_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19
priIdPn: 9904889
priIdRev: 01.11
skuId: 1102621
root@swi-mdm9x15:~# legato version
16.10.3_7776bb75a488e0db67b0d24975b46dd0_modified
root@swi-mdm9x15:~#

Should I activate the audio intreface using the command AT!USBCOMP=1,1,9011D?

at!usbcomp?
Config Index: 1
Config Type: 1 (Generic)
Interface bitmask: 0008011D (diag,nmea,modem,at,rmnet0,ecm)

OK

Audio is not listed …

Thanks for your support


#4

The at!usbcomp command is to control the USB device interface of the target AFAIK.
It is about how your target appears if you connect it to a PC for instance.
It should not impact the behavior of USB devices connected to the target (in which case the target is the USB host).

Have you tested that the USB audio adapter works properly on a normal PC?

Otherwise I can see that is a test case for it, I will try to run it today and see what it does.


#5

Hi CoRfr,
yes, I tesetd the USB audio Adapter on an normal PC. Works fine.
It would be perfect when you will run it. Please let me know your test results.