From 3098e8bce51b4e5bd0ca64c6b964596a6921de53 Mon Sep 17 00:00:00 2001 From: Larry Snizek Date: Tue, 13 Mar 2018 17:01:33 +0000 Subject: [PATCH 1/6] Move host directory under lib directory so it gets released --- {host => lib_xua/host}/windows/testdfu.bat | 0 {host => lib_xua/host}/xmosdfu/Makefile.Linux32 | 0 {host => lib_xua/host}/xmosdfu/Makefile.Linux64 | 0 {host => lib_xua/host}/xmosdfu/Makefile.OSX32 | 0 {host => lib_xua/host}/xmosdfu/Makefile.OSX64 | 0 {host => lib_xua/host}/xmosdfu/Makefile.Pi | 0 .../host}/xmosdfu/libusb/Linux32/libusb.h | 0 .../host}/xmosdfu/libusb/Linux64/libusb.h | 0 .../host}/xmosdfu/libusb/OSX32/libusb-1.0.0.dylib | Bin .../host}/xmosdfu/libusb/OSX32/libusb.h | 0 .../host}/xmosdfu/libusb/OSX64/libusb-1.0.0.dylib | Bin .../host}/xmosdfu/libusb/OSX64/libusb.h | 0 {host => lib_xua/host}/xmosdfu/libusb/Rasp/libusb.h | 0 {host => lib_xua/host}/xmosdfu/testdfu.sh | 0 {host => lib_xua/host}/xmosdfu/xmosdfu.cpp | 0 15 files changed, 0 insertions(+), 0 deletions(-) rename {host => lib_xua/host}/windows/testdfu.bat (100%) rename {host => lib_xua/host}/xmosdfu/Makefile.Linux32 (100%) rename {host => lib_xua/host}/xmosdfu/Makefile.Linux64 (100%) rename {host => lib_xua/host}/xmosdfu/Makefile.OSX32 (100%) rename {host => lib_xua/host}/xmosdfu/Makefile.OSX64 (100%) rename {host => lib_xua/host}/xmosdfu/Makefile.Pi (100%) rename {host => lib_xua/host}/xmosdfu/libusb/Linux32/libusb.h (100%) rename {host => lib_xua/host}/xmosdfu/libusb/Linux64/libusb.h (100%) rename {host => lib_xua/host}/xmosdfu/libusb/OSX32/libusb-1.0.0.dylib (100%) rename {host => lib_xua/host}/xmosdfu/libusb/OSX32/libusb.h (100%) rename {host => lib_xua/host}/xmosdfu/libusb/OSX64/libusb-1.0.0.dylib (100%) rename {host => lib_xua/host}/xmosdfu/libusb/OSX64/libusb.h (100%) rename {host => lib_xua/host}/xmosdfu/libusb/Rasp/libusb.h (100%) rename {host => lib_xua/host}/xmosdfu/testdfu.sh (100%) rename {host => lib_xua/host}/xmosdfu/xmosdfu.cpp (100%) diff --git a/host/windows/testdfu.bat b/lib_xua/host/windows/testdfu.bat similarity index 100% rename from host/windows/testdfu.bat rename to lib_xua/host/windows/testdfu.bat diff --git a/host/xmosdfu/Makefile.Linux32 b/lib_xua/host/xmosdfu/Makefile.Linux32 similarity index 100% rename from host/xmosdfu/Makefile.Linux32 rename to lib_xua/host/xmosdfu/Makefile.Linux32 diff --git a/host/xmosdfu/Makefile.Linux64 b/lib_xua/host/xmosdfu/Makefile.Linux64 similarity index 100% rename from host/xmosdfu/Makefile.Linux64 rename to lib_xua/host/xmosdfu/Makefile.Linux64 diff --git a/host/xmosdfu/Makefile.OSX32 b/lib_xua/host/xmosdfu/Makefile.OSX32 similarity index 100% rename from host/xmosdfu/Makefile.OSX32 rename to lib_xua/host/xmosdfu/Makefile.OSX32 diff --git a/host/xmosdfu/Makefile.OSX64 b/lib_xua/host/xmosdfu/Makefile.OSX64 similarity index 100% rename from host/xmosdfu/Makefile.OSX64 rename to lib_xua/host/xmosdfu/Makefile.OSX64 diff --git a/host/xmosdfu/Makefile.Pi b/lib_xua/host/xmosdfu/Makefile.Pi similarity index 100% rename from host/xmosdfu/Makefile.Pi rename to lib_xua/host/xmosdfu/Makefile.Pi diff --git a/host/xmosdfu/libusb/Linux32/libusb.h b/lib_xua/host/xmosdfu/libusb/Linux32/libusb.h similarity index 100% rename from host/xmosdfu/libusb/Linux32/libusb.h rename to lib_xua/host/xmosdfu/libusb/Linux32/libusb.h diff --git a/host/xmosdfu/libusb/Linux64/libusb.h b/lib_xua/host/xmosdfu/libusb/Linux64/libusb.h similarity index 100% rename from host/xmosdfu/libusb/Linux64/libusb.h rename to lib_xua/host/xmosdfu/libusb/Linux64/libusb.h diff --git a/host/xmosdfu/libusb/OSX32/libusb-1.0.0.dylib b/lib_xua/host/xmosdfu/libusb/OSX32/libusb-1.0.0.dylib similarity index 100% rename from host/xmosdfu/libusb/OSX32/libusb-1.0.0.dylib rename to lib_xua/host/xmosdfu/libusb/OSX32/libusb-1.0.0.dylib diff --git a/host/xmosdfu/libusb/OSX32/libusb.h b/lib_xua/host/xmosdfu/libusb/OSX32/libusb.h similarity index 100% rename from host/xmosdfu/libusb/OSX32/libusb.h rename to lib_xua/host/xmosdfu/libusb/OSX32/libusb.h diff --git a/host/xmosdfu/libusb/OSX64/libusb-1.0.0.dylib b/lib_xua/host/xmosdfu/libusb/OSX64/libusb-1.0.0.dylib similarity index 100% rename from host/xmosdfu/libusb/OSX64/libusb-1.0.0.dylib rename to lib_xua/host/xmosdfu/libusb/OSX64/libusb-1.0.0.dylib diff --git a/host/xmosdfu/libusb/OSX64/libusb.h b/lib_xua/host/xmosdfu/libusb/OSX64/libusb.h similarity index 100% rename from host/xmosdfu/libusb/OSX64/libusb.h rename to lib_xua/host/xmosdfu/libusb/OSX64/libusb.h diff --git a/host/xmosdfu/libusb/Rasp/libusb.h b/lib_xua/host/xmosdfu/libusb/Rasp/libusb.h similarity index 100% rename from host/xmosdfu/libusb/Rasp/libusb.h rename to lib_xua/host/xmosdfu/libusb/Rasp/libusb.h diff --git a/host/xmosdfu/testdfu.sh b/lib_xua/host/xmosdfu/testdfu.sh similarity index 100% rename from host/xmosdfu/testdfu.sh rename to lib_xua/host/xmosdfu/testdfu.sh diff --git a/host/xmosdfu/xmosdfu.cpp b/lib_xua/host/xmosdfu/xmosdfu.cpp similarity index 100% rename from host/xmosdfu/xmosdfu.cpp rename to lib_xua/host/xmosdfu/xmosdfu.cpp From 69319f706d976f3a6797598d35961a60c5b21542 Mon Sep 17 00:00:00 2001 From: xross Date: Tue, 13 Mar 2018 18:33:45 +0000 Subject: [PATCH 2/6] Ignore dfu src in main build --- lib_xua/module_build_info | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index fdf467e3..9cfde05a 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -17,6 +17,9 @@ VERSION = 0.1.2 DEPENDENT_MODULES = lib_logging(>=2.1.0) lib_xud(>=0.1.0) +#ignore host dir +SOURCE_DIRS = src + #core EXCLUDE_FILES += descriptors_2.rst XCC_FLAGS_xua_endpoint0.c = -Os -mno-dual-issue $(XCC_FLAGS) From b6460a266e897f15a140ef6e2e29a6f064669176 Mon Sep 17 00:00:00 2001 From: xross Date: Wed, 14 Mar 2018 15:32:11 +0000 Subject: [PATCH 3/6] Fixed SOURCE_DIRS to handle subdirs --- lib_xua/module_build_info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index 9cfde05a..fca1e1f9 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -18,7 +18,7 @@ VERSION = 0.1.2 DEPENDENT_MODULES = lib_logging(>=2.1.0) lib_xud(>=0.1.0) #ignore host dir -SOURCE_DIRS = src +SOURCE_DIRS = src/* #core EXCLUDE_FILES += descriptors_2.rst From 566cf12c3f5542c8c67b9b32fc2046de2eadb999 Mon Sep 17 00:00:00 2001 From: Larry Snizek Date: Wed, 14 Mar 2018 17:49:56 +0000 Subject: [PATCH 4/6] Apply host directory move in DFU documentation too --- doc_dfu/Makefile | 2 +- doc_dfu/building_xmos_dfu.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_dfu/Makefile b/doc_dfu/Makefile index 0c2678c4..df405939 100644 --- a/doc_dfu/Makefile +++ b/doc_dfu/Makefile @@ -1 +1 @@ -SOURCE_INCLUDE_DIRS=../host/xmosdfu +SOURCE_INCLUDE_DIRS=../lib_xua/host/xmosdfu diff --git a/doc_dfu/building_xmos_dfu.rst b/doc_dfu/building_xmos_dfu.rst index db177023..ee3972ec 100644 --- a/doc_dfu/building_xmos_dfu.rst +++ b/doc_dfu/building_xmos_dfu.rst @@ -4,7 +4,7 @@ Building the XMOS DFU loader - macOS ==================================== The XMOS DFU loader is provided as source as part of the USB Audio -framework, located in sc_usb_audio/module_dfu/host/xmos_dfu_osx. +framework, located in lib_xua/host/xmosdfu. The loader is compiled using libusb, the code for the loader is contained in the file ``xmosdfu.cpp`` From 817e385f74db4e03daf06d07fa31f962e4e73d81 Mon Sep 17 00:00:00 2001 From: Ed Clarke Date: Fri, 20 Apr 2018 14:18:47 +0100 Subject: [PATCH 5/6] Ensure channel config properly set for UAC1 when chans != 2 Needed for Windows 10 MC output --- lib_xua/src/core/endpoint0/xua_ep0_descriptors.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h index 36ff8eb7..2acba0e1 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h +++ b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h @@ -2358,7 +2358,10 @@ unsigned char cfgDesc_Audio1[] = (OUTPUT_INTERFACES_A1 + 1), /* baInterfaceNr(2) AudioStreaming interface 2 belongs to AC interface */ #endif + #if (NUM_USB_CHAN_OUT > 0) +#define CHANNEL_CONFIG_OUT (0xFF >> (8 - NUM_USB_CHAN_OUT_FS)) + /* CS_Interface Input Terminal 1 Descriptor - USB streaming Host to Device */ 0x0C, UAC_CS_DESCTYPE_INTERFACE, /* bDescriptorType (UAC_CS_DESCTYPE_INTERFACE) */ @@ -2367,7 +2370,7 @@ unsigned char cfgDesc_Audio1[] = 0x01, 0x01, /* wTerminalType (USB Streaming) */ 0x00, /* Associated terminal - unused */ NUM_USB_CHAN_OUT_FS, /* bNrChannels */ - 0x03, 0x00, /* wChannelConfig */ + CHANNEL_CONFIG_OUT, 0x00, /* wChannelConfig */ offsetof(StringDescTable_t, outputChanStr_1)/sizeof(char *), /* iChannelNames */ offsetof(StringDescTable_t, usbInputTermStr_Audio1)/sizeof(char *), /* iTerminal */ @@ -2427,6 +2430,8 @@ unsigned char cfgDesc_Audio1[] = #endif #if (NUM_USB_CHAN_IN > 0) +#define CHANNEL_CONFIG_IN (0xFF >> (8 - NUM_USB_CHAN_IN_FS)) + /* CS_Interface Input Terminal 2 Descriptor - Analog in from line in */ 0x0C, UAC_CS_DESCTYPE_INTERFACE, @@ -2435,7 +2440,7 @@ unsigned char cfgDesc_Audio1[] = 0x01, 0x02, /* Type - streaming in, mic */ 0x00, /* Associated terminal - unused */ NUM_USB_CHAN_IN_FS, /* bNrChannels */ - 0x03, 0x00, /* wChannelConfigs */ + CHANNEL_CONFIG_IN, 0x00, /* wChannelConfigs */ offsetof(StringDescTable_t, inputChanStr_1)/sizeof(char *), /* iChannelNames */ offsetof(StringDescTable_t, usbOutputTermStr_Audio1)/sizeof(char *), /* iTerminal */ From 949ff836872ea9987d09aa3ce645a1502989e345 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Mon, 23 Apr 2018 09:35:01 +0100 Subject: [PATCH 6/6] Update module_build_info Removed multiple SOURCE_DIR --- lib_xua/module_build_info | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index 6095afca..3460a1ed 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -20,9 +20,6 @@ DEPENDENT_MODULES = lib_logging(>=2.1.0) lib_xud(>=0.1.0) lib_spdif(>=3.0.0) #ignore host dir SOURCE_DIRS = src/* -#ignore host dir -SOURCE_DIRS = src/* - #core EXCLUDE_FILES += descriptors_2.rst XCC_FLAGS_xua_endpoint0.c = -Os -mno-dual-issue $(XCC_FLAGS)