forked from PAWPAW-Mirror/lib_xua
Updates got v6.0
This commit is contained in:
@@ -326,8 +326,11 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, SetupPacket &sp, chanend
|
||||
i_tmp = buffer[0] | (buffer[1] << 8) | buffer[2] << 16 | buffer[3] << 24;
|
||||
|
||||
/* Instruct audio thread to change sample freq */
|
||||
g_curSamFreq = i_tmp;
|
||||
g_curSamFreq48000Family = g_curSamFreq % 48000 == 0;
|
||||
|
||||
if(i_tmp != g_curSamFreq)
|
||||
{
|
||||
g_curSamFreq = i_tmp;
|
||||
g_curSamFreq48000Family = g_curSamFreq % 48000 == 0;
|
||||
|
||||
if(g_curSamFreq48000Family)
|
||||
{
|
||||
@@ -349,7 +352,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, SetupPacket &sp, chanend
|
||||
|
||||
/* Wait for handshake back - i.e. pll locked and clocks okay */
|
||||
chkct(c_audioControl, XS1_CT_END);
|
||||
|
||||
}
|
||||
/* Allow time for our feedback to stabalise*/
|
||||
{
|
||||
timer t;
|
||||
|
||||
@@ -278,7 +278,7 @@ unsigned char hidReportDescriptor[] = {
|
||||
0x75, 0x01, /* Report Size (1) */
|
||||
0x95, 0x06, /* Report Count (6) */
|
||||
0x81, 0x02, /* Input (Data, Var, Abs) */
|
||||
0x95,0x02, /* Report Count (2) */
|
||||
0x95, 0x02, /* Report Count (2) */
|
||||
0x81, 0x01, /* Input (Cnst, Ary, Abs) */
|
||||
0xc0 /* End collection */
|
||||
};
|
||||
@@ -1857,6 +1857,7 @@ unsigned char cfgDesc_Audio1[] =
|
||||
#endif
|
||||
#if 0
|
||||
/* Standard DFU class Interface descriptor */
|
||||
/* NOTE, DFU DISABLED FOR AUDIO CLASS 1.0 BY DEFAULT DUE TO WINDOWS REQUESTING DRIVER */
|
||||
0x09, /* 0 bLength : Size of this descriptor, in bytes. (field size 1 bytes) */
|
||||
0x04, /* 1 bDescriptorType : INTERFACE descriptor. (field size 1 bytes) */
|
||||
(INPUT_INTERFACES+OUTPUT_INTERFACES+1), /* 2 bInterfaceNumber : Index of this interface. (field size 1 bytes) */
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#include "usbaudio20.h" /* Defines from USB Audio 2.0 spec */
|
||||
|
||||
#include "devicedefines.h"
|
||||
#include "DescriptorRequests.h" /* This device's descriptors */
|
||||
#include "descriptors_2.h" /* Descriptors */
|
||||
#include "DescriptorRequests.h" /* Standard descriptor requests */
|
||||
#include "descriptors_2.h" /* This devices descriptors */
|
||||
#include "clockcmds.h"
|
||||
#include "audiostream.h"
|
||||
#include "vendorrequests.h"
|
||||
@@ -24,33 +24,19 @@
|
||||
#include "hid.h"
|
||||
#endif
|
||||
|
||||
#define GLXID 0x0001
|
||||
#define PLL_CTRL_VAL ((1<<23) | (499<<8) | (2<<0))
|
||||
void glx_link_setup(unsigned myid, unsigned glxid);
|
||||
void glx_link_setup_with(unsigned myid, unsigned glxid, unsigned link_setup_val);
|
||||
int write_glx_periph_word(unsigned destId, unsigned periphAddress, unsigned destRegAddr, unsigned data);
|
||||
int read_glx_periph_word(unsigned dest_id, unsigned periph_addr, unsigned dest_reg_addr, unsigned &rd_data);
|
||||
int read_glx_periph_reg(unsigned dest_id, unsigned periph_addr, unsigned dest_reg_addr, unsigned bad_format, unsigned data_size, char buf[]);
|
||||
int write_glx_periph_reg(unsigned dest_id, unsigned periph_addr, unsigned dest_reg_addr, unsigned bad_packet, unsigned data_size, char buf[]);
|
||||
void read_sswitch_reg_verify(unsigned coreid, unsigned reg, unsigned &data, unsigned failval);
|
||||
void write_sswitch_reg_verify(unsigned coreid, unsigned reg, unsigned data, unsigned failval);
|
||||
/* Some warnings.... */
|
||||
|
||||
#define XS1_GLX_PERIPH_SCTH_ID 0x3
|
||||
|
||||
|
||||
/* Windows does not have a built in DFU driver (windows will prompt), so warn that DFU will not be functional in Audio 1.0 mode.Udi
|
||||
* Of course, OSX is unaffected.
|
||||
*/
|
||||
/* Windows does not have a built in DFU driver (windows will prompt), so warn that DFU will not be functional in Audio 1.0 mode */
|
||||
#if ((AUDIO_CLASS==1) || defined(AUDIO_CLASS_FALLBACK)) && defined(DFU)
|
||||
#warning DFU will require a seperate driver (but will be enabled) in AUDIO 1.0 mode
|
||||
#warning DFU will not be enabled in AUDIO 1.0 mode due to Windows requesting driver
|
||||
#endif
|
||||
|
||||
/* MIDI not supported in Audio 1.0 mode */
|
||||
#if ((AUDIO_CLASS==1) || defined(AUDIO_CLASS_FALLBACK)) && defined(MIDI)
|
||||
#warning MIDI is not supported and will not be enabled in AUDIO 1.0 mode
|
||||
#warning MIDI is currently not supported and will not be enabled in AUDIO 1.0 mode
|
||||
#endif
|
||||
|
||||
|
||||
/* If PID_DFU not defined, standard PID used.. this is probably what we want.. */
|
||||
#ifndef PID_DFU
|
||||
#warning PID_DFU not defined, Using PID_AUDIO_2. This is probably fine!
|
||||
#endif
|
||||
@@ -900,12 +886,6 @@ void Endpoint0( chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl,
|
||||
//outuint(c_audioControl, AUDIO_START_FROM_DFU);
|
||||
DFU_mode_active = 0;
|
||||
|
||||
{
|
||||
unsigned char wdata[1];
|
||||
wdata[0] = 77;
|
||||
write_glx_periph_reg(GLXID, XS1_GLX_PERIPH_SCTH_ID, 0x0, 0, 1, wdata);
|
||||
}
|
||||
|
||||
// Send reboot command
|
||||
//outuint(c_audioControl, SET_SAMPLE_FREQ);
|
||||
//outuint(c_audioControl, AUDIO_REBOOT_FROM_DFU);
|
||||
|
||||
Reference in New Issue
Block a user