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!
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
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
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.
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