cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor II

Helo

They want to send both video and microphone audio to the HOST PC side via USB using FX3/CX3
In order to realize the above, I think that it is necessary to transfer both UVC and UAC classes in synchronization
Furthermore, I think that it will be possible if UVC and UAC can be recognized as a composite device class.
Q1) But,  please tell me how to set as the above composite class
Q2) Please provide a sample FW that worked as a composite class of UVC and UAC
Q3) Could you tell us about the evaluation environment if you have a reference KIT, etc.?

Best Regards

Arai

0 Likes
Reply
1 Solution
Moderator
Moderator

Hello,

Currently we do not have a firmware which implements both UVC and UAC. The FX3 SDK has separate firmware for UVC and UAC.

Please refer to this thread which addresses a similar query: Example of UVC and UAC in single project?

You can combine the descriptors to enumerate the device as both UVC and UAC in the host PC by implementing new interfaces and combining them using the interface association descriptors.

The functionality part in the firmware must be modified accordingly.

Thanks,

Yatheesh

View solution in original post

0 Likes
Reply
4 Replies
Moderator
Moderator

Hello,

Currently we do not have a firmware which implements both UVC and UAC. The FX3 SDK has separate firmware for UVC and UAC.

Please refer to this thread which addresses a similar query: Example of UVC and UAC in single project?

You can combine the descriptors to enumerate the device as both UVC and UAC in the host PC by implementing new interfaces and combining them using the interface association descriptors.

The functionality part in the firmware must be modified accordingly.

Thanks,

Yatheesh

View solution in original post

0 Likes
Reply
New Contributor II

Hello Yatheesh san

>

>Please refer to this thread which addresses a similar query: Example of UVC and UAC in single project?

>

---

>If that is not possible, we can use the standard image sensor interface (FV / LV / PCLK) and take in video data through GPIF. And use SPI for >audio data. But we should be careful not to introduce processing delays in the audio data channel, so that it does not affect the video data >channel.

>

Without using FPGA, we plan to input video(GPIF) and audio(SPI)  to FX3 by the above method and transfer to the host.

Q1-1)  In the above case, how is it best to send the  combined (video/audio )data structure/arrangement to the HOST?

Audio is input to the microphone in real time, but please tell us what kind of data structure (including header) should be used when sending data as a composite device to the HOST.

Q1-2)Or is it best to use 2ch of IN endpoint and divide into UVC and UAC respectively and send to the HOST?

Q2) About descriptor setting for composite device

In order for the HOST to recognize it as a composite device, it is necessary to set the descriptor in the FW of FX3. What kind of value should be set specifically?

Also, is there any settings other than the above descriptor that needs to be set in order to be recognized as a composite device?

Best Regards

Arai

0 Likes
Reply
Moderator
Moderator

Hello Arai san,


Please find the attached UVC + UAC descriptor file which is modified in the AN75779 project.
You can replace the header file in the AN75779 firmware with this one which will make the FX3 enumerate as a composite device with UVC and UAC interfaces as shown below:

pastedImage_0.png

1-1 & 1-2) As mentioned in the thread you are referring to, it is already mentioned that you can use two separate channels for UVC and UAC.
The UAC channel needs to be created between SPI as producer socket and USB as consumer socket along with the UVC streaming and control channel.


The UAC data stream needs to be sent when the video data is not being committed to the host, i.e., when !FV (video data frame completed)  happens.
But, considering 16-bit PCM and 48KHz resolution, the required data rate = 96KBps for SPI channel alone which needs to be stored in a buffer until the state machine reaches !FV condition and if all the buffers inside FX3 for audio channel gets filled up and there is new data coming, the data will be discarded --> data loss.

Because of this reason, it's not advisable to use FX3 alone for a composite UVC + UAC device and an FPGA is recommended to be able to buffer/store the audio data until a video frame is committed and then commit the stored audio data to the host over a different channel.

If this condition can be avoided, you can go ahead and add the audio functionality from the USBAudioClass example provided with the FX3 SDK in the following path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\uac_examples\cyfxuac

The above example gets a pre-burned audio data from the on-board SPI FLASH and plays it over UAC interface.

You can add the channel creating along with the SPI init and the callback function handling as well as the committing of UAC data to the host from a SPI slave device (Microphone) into the AN75779 project.

2.) The descriptor file is attached.

Regards,
Yashwant

0 Likes
Reply
New Contributor II

Hello Yashwant san

Thank you for your detailed explanation.

Best Regards,

Arai

0 Likes
Reply