Transfer audio data from USB host to another USB device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Transfer audio data from USB host to another USB device

1,084 Views
vikingyuan
Contributor II

Hi,

I have the following setup with MIMXRT1060-EVK board:

RT1060 USB 1=> config as USB AUDIO , connect to host of PC

RT1060 USB 2=> config as USB host, a USB speaker is connected to this port

My target is that I can hear the voice input from the USB speaker on the speaker of "USB AUDIO", or redirect the input of USB speaker to the speaker of USB AUDIO. 

I've tried to redirect the data input from USB speaker when writing to the SD card to the TX DMA buffer of USB AUDIO directly, but it seems doesn't work.

Is there any way I can do so?

Thanks!

0 Kudos
Reply
5 Replies

1,042 Views
vikingyuan
Contributor II

@jingpan Thanks!

I want to redirect the voice data saved to the SD(evkmimxrt1060_host_audio_recorder_freertos) to another USB audio device I created.

 

0 Kudos
Reply

1,029 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @vikingyuan ,

So, you want to have two USB host on RT1060. The evkmimxrt1060_host_audio_recorder_freertos means rt1060 is a host. You want to send voice to another USB device, this means rt1060 act as a host too. You can refer to

https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Implementation-of-Dual-USB-Host-on-RT1060-EVK/ta...

The project is a host_audio_recorder + host_audio_speaker. You can have a ping-pong buffer to save audio data. recorder fill the buffer and speaker get data from the buffer. That is better than send data to TX buffer directly.

 

Regards,

Jing

0 Kudos
Reply

1,024 Views
vikingyuan
Contributor II

Hi @jingpan 

One host only, and the other one is configured as a USB device, which can be enumerated under Windows. 

I connect a USB Microphone to the host, and would like to redirect the voice data to the USB device.

0 Kudos
Reply

1,000 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @vikingyuan ,

Host+Device is also possible on RT. The build step is similar to that guide. Or you can refer to https://community.nxp.com/t5/i-MX-RT/IMXRT1050-Using-both-USB-Host-and-USB-Device/m-p/1088500#commen...

Between host and device. You need a buffer to temporary store data. This can make merging host and device project easier.

 

Regards,

Jing

0 Kudos
Reply

1,056 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @vikingyuan ,

Do you mean your speaker has a microphone, it can input voice. You want to pass this voice data to computer and save in a  SD card?

 

Regards,

Jing

0 Kudos
Reply