From c914a7d9c668bf3f5775ada8f5aeb8def462619c Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 6 Mar 2014 10:31:13 +0000 Subject: [PATCH] Added global format change vars for stream change communications from usb_buffer(). --- module_usb_audio/usb_buffer/decouple.xc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index 806be67b..ae359d2b 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -72,6 +72,11 @@ unsigned g_aud_from_host_flag = 0; unsigned g_aud_from_host_info; unsigned g_freqChange_flag = 0; unsigned g_freqChange_sampFreq; + +unsigned g_formatChange_SubSlot; +unsigned g_formatChange_DataFormat; +unsigned g_formatChange_NumChans; + int speedRem = 0; xc_ptr aud_from_host_fifo_start; @@ -104,12 +109,15 @@ unsigned unpackData = 0; unsigned packState = 0; unsigned packData = 0; +/* Default to something sensible but the following are setup at stream start: */ +unsigned g_curSubSlot_out = HS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES; +unsigned g_curSubSlot_in = HS_STREAM_FORMAT_INPUT_1_SUBSLOT_BYTES; + +/* Init to something sensible, but expect to be re-set before stream start */ #if (AUDIO_CLASS==2) -int g_slotSize = SAMPLE_SUBSLOT_SIZE_HS; /* 4 bytes per ssample for Audio Class 2.0 */ -int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_CLASS_TWO; +int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_HS; #else -int g_slotSize = SAMPLE_SUBSLOT_SIZE_FS; /* 3 bytes per sample for Audio Class 1.0 */ -int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_CLASS_ONE; +int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_FS; #endif #pragma select handler