Merge branch 'master' of git://git/apps/sc_usb_audio

This commit is contained in:
Ross Owen
2014-03-28 12:22:49 +00:00
3 changed files with 17 additions and 7 deletions

View File

@@ -619,12 +619,17 @@ enum USBEndpointNumber_Out
#define MAX_VOL (0x20000000) #define MAX_VOL (0x20000000)
#ifdef SELF_POWERED #ifdef SELF_POWERED
#define BMAX_POWER 0 /* Default to taking no power from the bus in self-powered mode */
#ifndef BMAX_POWER
#define BMAX_POWER 0
#endif
#else #else
#ifndef BMAX_POWER /* Default to taking 500mA from the bus in bus-powered mode */
#define BMAX_POWER 250 #ifndef BMAX_POWER
#endif #define BMAX_POWER 250
#endif
#endif #endif
/* Length of clock unit/clock-selector units */ /* Length of clock unit/clock-selector units */

View File

@@ -53,6 +53,12 @@ void ConfigAudioPortsWrapper(
#endif #endif
unsigned int divide, unsigned int dsdMode) unsigned int divide, unsigned int dsdMode)
{ {
/* Ensure dsd clock is on in all modes since I2S mode sets it low on exit
* to avoid stop_clock() potentially pausing forever. If this is not done
* an exception will be raised with audio() attempts to set this port low
*/
/* TODO Do we really need to do this on every SF change? Once is probably enough */
EnableBufferedPort(p_dsd_clk, 32);
if(dsdMode) if(dsdMode)
{ {
@@ -61,7 +67,6 @@ unsigned int divide, unsigned int dsdMode)
{ {
EnableBufferedPort(p_dsd_dac[i], 32); EnableBufferedPort(p_dsd_dac[i], 32);
} }
EnableBufferedPort(p_dsd_clk, 32);
ConfigAudioPorts( ConfigAudioPorts(
#if (DSD_CHANS_DAC != 0) #if (DSD_CHANS_DAC != 0)

View File

@@ -1,5 +1,5 @@
#ifdef XUD_ON_U_SERIES #if (XUD_SERIES_SUPPORT==1)
#include "archU_powerSaving.h" #include "archU_powerSaving.h"
#include <xs1.h> #include <xs1.h>
#include <xs1_l_registers.h> #include <xs1_l_registers.h>