Hi All,
We have used the example code "app_usb_aud_xk_216_mc" in the software bundle "sw_usb_audio-[sw]_6.15.2rc1" with build configuration of "1i2o2xxxxxx"
Now the device is enumerated as UAC 1.0 device and we are able to play an audio through it.
The problem we are seeing is we are seeing glitches [like missing data in the output sine wave] in the audio. When we probed further we have the below details.
1. The number of samples sent from USB is same as number of samples sent out in I2S
2. The frequency of audio sine wave played is same as what we are sending from PC
3. There is no Packet drops in USB transfer [ Monitored using device monitoring studio ]
We suspect it could be a problem with the data/pointer manipulation of the circular buffer which handles the audio data received from USB.
Please let us know if anybody had faced this issue or if you have any inputs on this.
Any help on this to resolve the issue will be helpful for us.
Thanks in advance.
Note : We had to edit the audio OUT endpoint descriptor to be able to play the audio successfully.
In file descrptors.h --> "cfgDesc_Audio1[]" Line Number:2530 to 2542
Updated Descriptor snippet
/* Standard AS Isochronous Audio Data Endpoint Descriptor 4.6.1.1 */
0x09,
0x05, /* ENDPOINT */
ENDPOINT_ADDRESS_OUT_AUDIO,
0x05, /* attributes - isochronous async */
(FS_STREAM_FORMAT_OUTPUT_1_MAXPACKETSIZE&0xff), /* 4 wMaxPacketSize (Typically 294 bytes)*/
(FS_STREAM_FORMAT_OUTPUT_1_MAXPACKETSIZE&0xff00)>>8, /* 5 wMaxPacketSize */
0x01, /* bInterval */
0x00, /* bRefresh */
0x00,
Thanks
Uthrakumar
Glitches in playing audio with xCORE200 UAC1.0
-
- New User
- Posts: 3
- Joined: Thu Jul 14, 2016 8:35 pm
-
- Respected Member
- Posts: 275
- Joined: Fri Mar 12, 2010 6:03 pm
Have you tried another host, Windows or Mac? Are class 2 configurations such as 2i10o10xxxxxx working ok? Are there any glitches in the input direction (host recording)?
-
- XCore Legend
- Posts: 1126
- Joined: Thu May 27, 2010 10:08 am
I don't 100% get this - how can there be missing data if the number of samples sent/received is the same? Do you mean zeroed data?The problem we are seeing is we are seeing glitches [like missing data in the output sine wave] in the audio. When we probed further we have the below details.
1. The number of samples sent from USB is same as number of samples sent out in I2S
2. The frequency of audio sine wave played is same as what we are sending from PC
3. There is no Packet drops in USB transfer [ Monitored using device monitoring studio ]
Sorry for even more questions - the reason for them is that the core buffering code has been stable for many years over hundreds of USB audio projects with lots of long term soak testing passes. It's possible there could be a bug in there, but I'd recommend looking elsewhere first. Ie. no known issues in the buffering.
The answers to Larry's questions will help provide some good data to get to the bottom of this.
-
- XCore Expert
- Posts: 966
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
If i'm reading your code correctly you seem to have set bSyncAddress to 0.
Seems like a bad idea to me..
The address of the endpoint used to communicate synchronization information if required by this endpoint. Reset to zero if no synchronization pipe is used.
-
- Experienced Member
- Posts: 119
- Joined: Mon Sep 15, 2014 1:32 pm
Hi uthrakumar,
do you have glitches in playback audio in all device format (24bit/16bit + 44100Hz/48000Hz)?
I have self-made board based on xCORE200 and I use software reference design sw_usb_audio-[sw]_6.15.2rc1 also with some modifications.
For my board I built 2 firmware images with configuration 1i2o2xxxxxx - UAC1, Analog Out, Analog IN
1. 16bit/44100Hz, 16bit/48000Hz
2. 24bit/44100Hz, 24bit/48000Hz
For test playback audio I connect my board to PC Win7 x64 Pro. Headphones are connected to Analog outputs directly.
Mouse right-click on "Dynamics" icon, open "Playback devices" list,
mouse right-click on my device - "Properties" - tab "Additional",
select Format from list, press "Check" button.
I hear crackling in sound only in format 24/44100. In other 3 formats output sound is clear.
Can you check it on your xCORE200 board with original firmware?
do you have glitches in playback audio in all device format (24bit/16bit + 44100Hz/48000Hz)?
I have self-made board based on xCORE200 and I use software reference design sw_usb_audio-[sw]_6.15.2rc1 also with some modifications.
For my board I built 2 firmware images with configuration 1i2o2xxxxxx - UAC1, Analog Out, Analog IN
1. 16bit/44100Hz, 16bit/48000Hz
2. 24bit/44100Hz, 24bit/48000Hz
For test playback audio I connect my board to PC Win7 x64 Pro. Headphones are connected to Analog outputs directly.
Mouse right-click on "Dynamics" icon, open "Playback devices" list,
mouse right-click on my device - "Properties" - tab "Additional",
select Format from list, press "Check" button.
I hear crackling in sound only in format 24/44100. In other 3 formats output sound is clear.
Can you check it on your xCORE200 board with original firmware?
-
- Experienced Member
- Posts: 119
- Joined: Mon Sep 15, 2014 1:32 pm
Hi XCore Experts
This is interesting:
I built the same firmware images (see my previous post) for older XMOS board XR-USB-AUDIO-MC-2.0 1V2.
There is no any crackling in all formats.
This is interesting:
I built the same firmware images (see my previous post) for older XMOS board XR-USB-AUDIO-MC-2.0 1V2.
There is no any crackling in all formats.