Bug 17473: Input volume disabled breaks going into DFU mode

This commit is contained in:
Ross Owen
2016-07-15 15:13:39 +01:00
committed by Larry Snizek
parent 82435da472
commit 0afb61385d
3 changed files with 7 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ sc_usb_audio Change Log
6.19.0
------
- RESOLVED: SPDIF_TX_INDEX not defined build warning only emitted when SPDIF_TX defined
6.18.1
------

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"