xmos / lib_xua

XMOS USB Audio
Other
17 stars 13 forks source link

Mute 32 consecutive DoP audio samples when changing from PCM to DoP #162

Open oscarbailey-xmos opened 3 years ago

oscarbailey-xmos commented 3 years ago

From: http://bugzilla.xmos.local/show_bug.cgi?id=16706

When HOST changes format from PCM to DoP, consecutive 32 DoP samples comes and became “noisy” sound without mute.

Attachment is the result of the DoP mute feasibility study against consecutive 32 DoP samples which comes when changing from PCM to DoP. The function is in “audio.xc” with “#ifdef DOP_MARKER_MUTE.

In the code, all samples are buffered in 32 depth buffer. And there are checked if all 32 samples have DoP maker. If all 32 samples has DoP maker in PCM mode, these are format change packet from Host. And then it replaces the 32 consecutive DoP samples with zero samples in order to prevent noisy sound by the none sound samples.

The function was requested by (customer name redacted) (CRM ID:108098) and (customer name redacted) (CRM ID:108235, 108414) and has been delivered to the customers as result of feasibility study. The customers have verified with the code in his system.

If the function is with reference design, it's also worth for another customers who wants to mute DoP samples when format change from PCM to DoP.

xross commented 1 year ago

audio.xc.txt