CY8CKIT-062: Audio control is unstable

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
MaGa_4619181
Level 1
Level 1
First like given

Hi!

I'm currently working on a composite device (UAC-CDC) where the host PC streams audio to a FIFO in DMA. I used the Request Received and Completed callback from the PSoC 6 MCU USB Audio Device FreeRTOS example project. The problem comes when I try to select the audio device, I can only select the device from the "Audio Settings" of Windows and if I try to change the volume it flickers between 0 and the level desired to always end back to 0. Also, if I have spotify running, it will start to skip songs without me pressing an button.

I think the cause is the request handlers but I don't really know where the problem might be or how to handle it.

0 Likes
1 Solution

That means you got an OVERFLOW in the Audio OUT endpoint buffer.

This will definitely happen if you run in debug mode and stop in a breakpoint while streaming data.

I bet you didn't observe this issue if you remove all the breakpoints and run the firmware continuously.

View solution in original post

0 Likes
3 Replies
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

It would be nice if you could keep the structure of files the same as in the code example, so we can easily see the changes you did in the code.

A few questions:

Does the code example work in your environment as it is (no changes)?

Does the code example work after you added your CDC descriptor, but kept the Audio related files as it is?

0 Likes
lock attach
Attachments are accessible only for community members.

Alright so I was able to make the project works. However I have a lot of things to change to make it match my needs. I tried to modify the project to achieve that and I'm stuck on the DMA buffer.

What I need from this project is only to store audio data from the PC to the device. I can't use the I2S block because our custom board won't have that feature. So how would you use a DMA to store the audio data from the OUT endpoint without the I2S block to a simple buffer that can be accessed later on. The buffer can be wiped at each pass it just needs to have the data at one point in time.

I linked my whole project with the modification I made. The error I get is after two pass in the out endpoint callback, the system goes to a system failure error

/* This error condition indicates system failure */                    

if (0U != (sourceMask & USBFS_USBDEV_ARB_EP_BUF_OVER_Msk))             

{                                                                      

    /* The DMA cannot move the data from the mxusbfs IP                

    * hardware buffer fast enough and so caused an overflow. Give a DMA

    * channel for this endpoint greater priority or increase the clock 

    * at which it operates.                                            

    */                                                                 

    CY_ASSERT_L1(false);                                               

}         

I really don't understand what I am doing wrong or what I'm missing.

0 Likes

That means you got an OVERFLOW in the Audio OUT endpoint buffer.

This will definitely happen if you run in debug mode and stop in a breakpoint while streaming data.

I bet you didn't observe this issue if you remove all the breakpoints and run the firmware continuously.

0 Likes