# Recording MdmTxAudio

**URL:** <https://mangoh.discourse.group/t/recording-mdmtxaudio/10058>\
**Category:** mangOH Yellow\
**Created:** [July 21, 2022, 5:20pm UTC](https://mangoh.discourse.group/t/recording-mdmtxaudio/10058 "2022-07-21T17:20:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jameswollaeger](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@jameswollaeger](https://mangoh.discourse.group/u/jameswollaeger)\
**Post date:** [July 21, 2022, 5:20pm UTC](https://mangoh.discourse.group/t/recording-mdmtxaudio/10058/1 "2022-07-21T17:20:23Z")

</div>

Hello, I posted a while back and learned that there is a limitation whereby a legato audio recorder cannot be connected to a legato audio player. I’m using mangoh Yellow and WP7611 modem. I thought about trying a different approach whereby I try to record/stream via HTTP the audio leaving the modem TX channel.  
To do this I use the following API’s:

MdmTxAudioRef = le\_audio\_OpenModemVoiceTx();  
AudioOutputConnectorRef = le\_audio\_CreateConnector();  
AudioOutputConnectorRef2 = le\_audio\_CreateConnector();  
res = le\_audio\_Connect(AudioOutputConnectorRef , MdmTxAudioRef );  
res = le\_audio\_Connect(AudioOutputConnectorRef2,MdmTxAudioRef);

In the above example, I create a new audio reference for file play, and connect it with AudioOutputConnectorRef. So my wav audio files should play over this connector.

I recently added the AudioOutputConnectorRef2 and connect it to MdmTxAudioRef. I don’t get any errors when connecting everything up. But I believe I see a kernal exception thrown in the logs:

[3559.890380] MDM Media1: ASoC: no backend DAIs enabled for MDM Media1  
[3559.896481] q6asm\_callback: cmd = 0x10bcd returned error = 0x1  
[3559.901769] \_\_q6asm\_cmd: DSP returned error[ADSP\_EFAILED] opcode 68557

```auto

=ERR= | audioDaemon[1784] | buffer_bytes = (2560,2560) omin=0 omax=0 int=1 empty=0 period_bytes = (320,320) omin=0 omax=0 int=1 empty=0
Jul 21 12:14:49 swi-mdm9x28-wp user.debug Legato: DBUG | audioCompExe[2029]/framework T=TransmitSamples | thread.c PThreadStartRoutine() 478 | Set nice level to 0.
Jul 21 12:14:49 swi-mdm9x28-wp user.info Legato: INFO | audioCompExe[2029]/audioComponent T=TransmitSamples | audio.c TransmitAudioSamplesThread() 263 | Tx Thread starting for audiostream with ref: 0x80f.
Jul 21 12:14:49 swi-mdm9x28-wp user.debug Legato: DBUG | audioCompExe[2029]/audioComponent T=TransmitSamples | perfTestLog.h LogPerfString() 9 | Perftest: TransmitSamplesThread Starting Transmit thread.: 2022-07-21 17:14:49.766
Jul 21 12:14:49 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1784]/alsa_intf T=main | pa_pcm_alsa.c InitPcmPlaybackCapture() 455 | Failed in pcm_prepare
Jul 21 12:14:49 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1784] | cannot prepare channel: errno =-22
Jul 21 12:14:49 swi-mdm9x28-wp user.err kernel: [3559.890380] MDM Media1: ASoC: no backend DAIs enabled for MDM Media1
Jul 21 12:14:49 swi-mdm9x28-wp user.err kernel: [3559.896481] q6asm_callback: cmd = 0x10bcd returned error = 0x1
Jul 21 12:14:49 swi-mdm9x28-wp user.err kernel: [3559.901769] __q6asm_cmd: DSP returned error[ADSP_EFAILED] opcode 68557
Jul 21 12:14:49 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[1784]/audio T=main | le_media.c le_media_Capture() 2204 | PCM cannot be open
Jul 21 12:14:49 swi-mdm9x28-wp user.debug Legato: DBUG | audioDaemon[1784]/audio T=main | le_media.c le_media_Stop() 2117 | Close pa_pcm
Jul 21 12:14:49 swi-mdm9x28-wp user.debug Legato: DBUG | audioDaemon[1784]/audio T=main | le_media.c le_media_Stop() 2134 | Interface 11 Stopped

```

Does anyone have any recommendations in trying to tap into the MdmTx channel and record the output?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [July 21, 2022, 11:25pm UTC](https://mangoh.discourse.group/t/recording-mdmtxaudio/10058/2 "2022-07-21T23:25:24Z")

</div>

are you trying to play audio or record audio during the voice call?

---

<div class="post-metadata">

**Author:** ![jameswollaeger](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@jameswollaeger](https://mangoh.discourse.group/u/jameswollaeger)\
**Post date:** [July 22, 2022, 6:29pm UTC](https://mangoh.discourse.group/t/recording-mdmtxaudio/10058/3 "2022-07-22T18:29:55Z")

</div>

I’m playing audio in one thread and then recording the call in another.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [July 23, 2022, 2:00am UTC](https://mangoh.discourse.group/t/recording-mdmtxaudio/10058/4 "2022-07-23T02:00:44Z")

</div>

have you tried the AT!AVAUDIO command first?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/9/9a3a7184c6beca752517dd5743de9277a7cefe9e.png)
