Cherrypick DFU fix when input vol disabled

This commit is contained in:
Ross Owen
2016-07-15 15:13:39 +01:00
parent ecf5e669d0
commit 415ea3db52
3 changed files with 8 additions and 3 deletions

View File

@@ -5,6 +5,8 @@ sc_usb_audio Change Log
------
- RESOLVED: Intra-frame sample delays of 1/2 samples on input streaming in TDM mode
- RESOLVED: Build issue with NUM_USB_CHAN_OUT set to 0 and MIXER enabled
- RESOLVED: SPDIF_TX_INDEX not defined build warning only emitted when SPDIF_TX defined
- RESOLVED: Input volume disabled breaks going into DFU mode
6.19.0
------

View File

@@ -307,11 +307,12 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
if(cmd == SET_SAMPLE_FREQ)
{
sampleFreq = inuint(c_aud_ctl);
unsigned receivedSampleFreq = inuint(c_aud_ctl);
/* Don't update things for DFU command.. */
if(sampleFreq != AUDIO_STOP_FOR_DFU)
if(receivedSampleFreq != AUDIO_STOP_FOR_DFU)
{
sampleFreq = receivedSampleFreq;
#ifdef FB_TOLERANCE_TEST
expected_fb = ((sampleFreq * 0x2000) / frameTime);
#endif
@@ -341,7 +342,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
/* Ideally we want to wait for handshake (and pass back up) here. But we cannot keep this
* core locked, it must stay responsive to packets (MIDI etc) and SOFs. So, set a flag and check for
* handshake elsewhere */
SET_SHARED_GLOBAL(g_freqChange_sampFreq, sampleFreq);
SET_SHARED_GLOBAL(g_freqChange_sampFreq, receivedSampleFreq);
}
else if(cmd == SET_STREAM_FORMAT_IN)
{

View File

@@ -19,9 +19,11 @@ Warnings relating to configuration defines located in this XC source file rather
#warning MAX_FREQ not defined. Using 192000
#endif
#ifdef SPDIF_TX
#ifndef SPDIF_TX_INDEX
#warning SPDIF_TX_INDEX not defined! Using 0
#endif
#endif
#ifndef VENDOR_STR
#warning VENDOR_STR not defined. Using "XMOS"