359 Commits

Author SHA1 Message Date
Luciano Martin
5bdfc61c3b Merge pull request #184 from xmos/release/v1.2.0
Merge release/v1.2.0 into master
2021-05-06 13:36:47 +01:00
Luciano Martin
679a8bb0e3 Merge pull request #186 from xmos/develop
Merge develop into release/v1.2.0
2021-05-05 15:29:13 +01:00
Luciano Martin
3a2497c8bf Merge pull request #185 from xmos/feature/remove_license_files
Remove license files in test folders
2021-05-05 15:28:44 +01:00
lucianom
70748bd106 Remove license files in test folders 2021-05-05 15:03:03 +01:00
Luciano Martin
0f09ae47e8 Merge pull request #183 from xmos/develop
Merge develop into release/v1.2.0
2021-05-05 13:58:34 +01:00
Michael Banther
39fab60a61 Merge pull request #181 from mbanth/feature/HID_AC1_sync_desc_length
AC1 HID descriptor
2021-04-27 17:01:39 +01:00
mbanth
0f392ffbb6 Update change log 2021-04-27 16:35:05 +01:00
mbanth
700ba975e7 Use sizeof to set length of the HID Report Descriptor reported in AC1 HID descriptor. Add comments to #endif statements. 2021-04-27 16:27:48 +01:00
danielpieczko
abf9f5e1a2 Merge pull request #180 from xmos/feature/public_licence
Use public licence
2021-04-23 11:49:57 +01:00
Daniel Pieczko
45c5f35165 Fix readme 2021-04-23 10:52:15 +01:00
Daniel Pieczko
7ca9bc22fd Add changelog entry 2021-04-22 17:18:26 +01:00
Daniel Pieczko
0aa60035a4 Update copyright notices and licence references 2021-04-22 17:17:39 +01:00
Daniel Pieczko
6f75a44d9c Use XMOS Public Licence Version 1 2021-04-22 17:15:08 +01:00
Brennan Magee
06e3439452 Merge pull request #177 from BrennanGit/feature/xjsl_0.16.2
Update Jenkins shared library
2021-03-11 15:42:08 +00:00
Brennan Magee
d161ed168c Update Jenkins shared library
This repo is still using an old version that is sensitive to brew upgrades of the python version
seen here: http://srv-bri-jcim0:8080/view/sw_xvf3510_develop/job/XMOS/job/lib_xua/job/develop/404/
2021-03-10 10:26:05 +00:00
Ed
53e0fbdcc8 Merge pull request #176 from xmos/feature/xs3_support
Add XS3 support in reboot
2021-03-09 17:06:47 +00:00
Ed
2e86563274 License date 2021-03-09 16:47:45 +00:00
Ed
f3063fdfc3 Update dates 2021-03-09 16:37:27 +00:00
Ed
90f8ede387 Add XS3 support in reboot 2021-03-09 14:42:16 +00:00
oscarbailey-xmos
c9299fce96 Merge pull request #174 from xmos/feature/6.15.3_fixes
Document 50 and 500 msec delays before DFU resets (sc_usb_audio 49e2ce9)
2020-12-08 16:39:57 +00:00
oscarbailey-xmos
30e8ba3717 Merge pull request #136 from xmos/xross-patch-1
Further updates for xs3 compat
2020-12-08 16:36:34 +00:00
oscarbailey-xmos
17bd4939a8 Merge pull request #137 from xmos/xross-patch-2
Update fastmix.S for xs3 compat
2020-12-08 16:36:16 +00:00
Oscar Bailey
04a991b37e Document 50 and 500 msec delays before DFU resets (sc_usb_audio 49e2ce9) 2020-12-08 16:02:57 +00:00
oscarbailey-xmos
9bdaf7ece6 Update CHANGELOG.rst 2020-12-08 15:57:39 +00:00
oscarbailey-xmos
05888a715f Merge branch 'develop' into xross-patch-2 2020-12-08 15:55:27 +00:00
oscarbailey-xmos
5d66159b40 Update copyright notice 2020-12-08 15:54:51 +00:00
oscarbailey-xmos
b9aae2092c Merge pull request #135 from xmos/feat/xs3
Update audioports for xs3 build
2020-12-08 15:53:43 +00:00
oscarbailey-xmos
23252ac323 Update copyright notice 2020-12-08 15:53:32 +00:00
oscarbailey-xmos
4a966aaa82 Merge pull request #157 from oscarbailey-xmos/feature/fix-hid-compiler-errors
Fix compiler errors when HID_CONTROLS > 0
2020-12-02 10:25:28 +00:00
oscarbailey-xmos
b31c9c6ab1 Merge pull request #73 from oscarbailey-xmos/feature/windows-dfu
Update xmosdfu
2020-12-02 10:24:30 +00:00
Oscar Bailey
16a927d63b Fix copyright notices 2020-11-24 16:40:55 +00:00
Oscar Bailey
7fc1f254b7 Update CHANGELOG 2020-11-24 15:24:02 +00:00
Oscar Bailey
7e7c557f38 Merge branch 'feature/windows-dfu' into feature/fix-hid-compiler-errors 2020-11-24 15:21:12 +00:00
Oscar Bailey
6dbff06dce Fix typo in pdm_mic.xc causing firmware crash 2020-11-10 14:35:54 +00:00
Oscar Bailey
46a304d545 Update LICENCE.txt 2020-10-29 10:22:04 +00:00
Oscar Bailey
eb9a90574e Update documentation and scripts to match xmosdfu changes 2020-10-27 15:28:32 +00:00
Oscar Bailey
60e23eb5cd Fix xmosdfu returning non-zero return code on success 2020-10-27 14:19:17 +00:00
Oscar Bailey
7465bc057b Fix copyright notice; Fix CHANGELOG 2020-10-27 13:45:59 +00:00
Oscar Bailey
3920ab831c Add line to changelog (fix issue #119) 2020-10-27 13:20:06 +00:00
Oscar Bailey
a57a45fd67 Add alias for _fileno (Windows xmosdfu) 2020-10-27 13:16:16 +00:00
Oscar Bailey
3a917e5161 Attempt to handle error case where input file is a directory 2020-10-27 13:14:34 +00:00
Oscar Bailey
a496040de0 Fix compiler warning for xmosdfu on Linux 2020-10-27 11:54:07 +00:00
Oscar Bailey
b85cb85205 xmosdfu now compiles to bin/; Add more compile tests to Jenkinsfile 2020-10-27 11:28:55 +00:00
Oscar Bailey
bf40fee271 Update version in module_build_info 2020-10-27 11:12:43 +00:00
Oscar Bailey
3076bdffcf Update CHANGELOG and default BCD 2020-10-27 11:01:58 +00:00
Oscar Bailey
32fd9c652b Merge branch 'develop' into feature/windows-dfu 2020-10-27 10:53:37 +00:00
Oscar Bailey
baa853985b Fix compiler errors when HID_CONTROLS > 0 2020-10-21 14:50:50 +01:00
Luciano Martin
758de74946 Merge pull request #154 from xmos/release/v1.1.1
Merge release/v1.1.1 into master
2020-10-08 13:56:12 +01:00
Luciano Martin
e6f6856df9 Merge pull request #153 from xmos/develop
Merge develop into release/v1.1.1
2020-10-07 16:29:27 +01:00
Luciano Martin
871ffbc5dd Merge pull request #152 from xmos/feature/remove_cpan_file
Remove not necessary cpanfile
2020-10-07 16:28:08 +01:00
lucianom
dde097b130 Remove not necessary cpanfile 2020-10-07 14:31:15 +01:00
Michael Banther
e8731a554c Merge pull request #151 from lucianomartin/feature/update_changelog
Add entry
2020-10-06 11:10:45 +01:00
lucianom
0766275a9a Add entry 2020-10-05 13:21:08 +01:00
Michael Banther
ce4424c471 Merge pull request #150 from xmos/feature/update_jsl
Update pinned version of xmos_jenkins_shared_library
2020-10-02 12:31:09 +01:00
lucianom
740f1250c7 Update pinned version of xmos_jenkins_shared_library 2020-10-02 11:19:02 +01:00
Michael Banther
45d699321d Merge pull request #148 from lucianomartin/feature/replace_pipfile
Replace Pipfile with requirements.txt file
2020-09-30 09:46:44 +01:00
lucianom
e0b8cdf5f7 Replace Pipfile 2020-09-22 09:00:36 +01:00
oscarbailey-xmos
ecaeb89ea8 Merge pull request #146 from ed-xmos/feature/fix_i2s_pushout_at_startup
Cherry pick decouple bug fix (v0.1.4) that solves the I2S timing issue
2020-09-21 09:36:56 +01:00
Ed
c4f32aceab Update changelog 2020-09-03 17:19:01 +01:00
Ed
2164d8d023 Cherry pick decouple bug fix (v0.1.4) that solves the I2S timing pushout on startup 2020-09-02 11:56:05 +01:00
Ed
a08060896d Merge pull request #143 from xmos/bump_version
Bump!
2020-06-22 16:55:28 +01:00
Ed
948546e0d0 Bump! 2020-06-22 16:29:18 +01:00
Michael Banther
ab2519ab4f Merge pull request #142 from xmos/release/v1.1.0
Release v1.1.0
2020-05-20 14:55:41 +01:00
Michael Banther
94ea3ba306 Merge pull request #141 from xmos/develop
Release v1.1.0
2020-05-20 14:22:58 +01:00
Michael Banther
3a4e626472 Merge pull request #140 from xmos/feature/update-JSL-v0.14.1
Update Jenkins Shared Library to v0.14.1
2020-05-20 12:17:19 +01:00
mbanth
a61f0e7a5f Update Jenkins Shared Library to v0.14.1 to correct a Groovy iteration bug that results in intermittent test failures. 2020-05-20 11:46:17 +01:00
Michael Banther
cd29ca91e3 Merge pull request #139 from lucianomartin/feature/serial_str_methods
Ability to read or modify serial number string
2020-05-19 16:29:40 +01:00
lucianom
7ccd5b526d Set iSerial correctly 2020-05-19 16:11:34 +01:00
lucianom
5c2a69288c Add missing bracket 2020-05-19 15:26:27 +01:00
lucianom
fda4c3afb1 Remove empty line 2020-05-19 14:12:51 +01:00
lucianom
05dacde043 Add SERIAL_STR configurable from xua_conf.h 2020-05-19 13:45:52 +01:00
lucianom
b7cbc5fe9e Ability to read or modify serial number string 2020-05-19 12:43:56 +01:00
Michael Banther
468b69cb62 Merge pull request #138 from xmos/feature/update-fastmix-copyright
Update copyright date range.
2020-05-14 16:26:56 +01:00
mbanth
74772d864e Update copyright date range. 2020-05-14 14:47:31 +01:00
xross
c18ca44768 Revert "Mixer update for XS3 compat"
This reverts commit 82f651d930.
2020-05-14 13:55:27 +01:00
Ross Owen
801e3fbe4e Update interrupt.h 2020-05-05 16:37:17 +01:00
Ross Owen
57932ee0df Update fastmix.S 2020-05-05 16:36:11 +01:00
Ross Owen
82f651d930 Mixer update for XS3 compat 2020-05-05 16:35:22 +01:00
Ross Owen
44d3e08305 Further updates for xs3 combat 2020-05-05 16:33:51 +01:00
Ross Owen
da3da9b422 Update audioports.xc 2020-05-01 16:39:41 +01:00
Michael Banther
3d9266a080 Merge pull request #134 from xmos/release/v1.0.1
Release v1.0.1
2020-05-01 15:54:39 +01:00
Michael Banther
4ac07b2df4 Merge pull request #132 from xmos/develop
Release v1.0.1
2020-05-01 15:05:25 +01:00
Michael Banther
afcf576d43 Merge pull request #133 from xmos/feature/update-Jenkinsfile
Update to Jenkins Shared Library v0.12.1
2020-05-01 14:43:33 +01:00
mbanth
bb73f2140e Update to Jenkins Shared Library v0.12.1 and allow view file names containing '.'. 2020-05-01 13:51:05 +01:00
Luciano Martin
c260039d0b Merge pull request #131 from lucianomartin/develop
Fix wrong size of vendor and product strings and add debug printouts
2020-04-17 16:33:30 +01:00
lucianom
a89371c143 Fix wrong size of vendor and product strings and add debug printouts 2020-04-17 14:44:19 +01:00
Michael Banther
f3ab9a8532 Merge pull request #130 from mbanth/feature/update_min_ver
Update dependent minimum versions
2020-03-20 14:11:42 +00:00
mbanth
fff1568c6f Update minimum dependency version for libraries with a higher major version 2020-03-19 16:21:57 +00:00
Michael Banther
5a13a1b751 Merge pull request #128 from xmos/develop
Early March 2020 release
2020-03-16 11:57:07 +00:00
Ed
2ada7e7534 Merge pull request #129 from ed-xmos/test_harness
Test harness needs access to internal state
2020-03-16 11:18:55 +00:00
Ed
c9989e4d87 Changelog 2020-03-12 10:20:30 +00:00
Ed
a1cb1336cd Merge commit 'ae599686ac5670c318a63cacc1bae5ea0318a9b6' into develop 2020-03-11 16:02:11 +00:00
Ed
bd71651cc4 Allow access of mclk setting externally for hardware test harness 2020-03-11 16:01:42 +00:00
Michael Banther
ae599686ac Merge pull request #127 from mbanth/feature/update_major_version
Update version number to indicate the first major release.
2020-03-10 11:29:13 +00:00
mbanth
045059ad1e Update version number to indicate the first major release.
The version number has been changed since the library is used in a
released product.
2020-03-10 10:53:21 +00:00
Luciano Martin
572bbdc8ff Merge pull request #126 from lucianomartin/feature/usb_str_cmds
Add new functions to read and write product and vendor strings
2020-03-05 11:51:31 +00:00
lucianom
4d0de4e01a Add missing string and memset buffers 2020-03-05 10:15:35 +00:00
lucianom
5fd34acab5 Allocate separate strings and fix descriptions 2020-03-05 09:14:03 +00:00
lucianom
c786b846d0 Define MIN if not defined 2020-03-04 22:05:36 +00:00
lucianom
09a81f5c1f Use standard functions and different empty strings 2020-03-04 21:53:49 +00:00
lucianom
ee1feb6c48 Use unsafe pointers 2020-03-04 17:51:03 +00:00
lucianom
3f2d0eb6f7 Move global variables 2020-03-04 17:16:35 +00:00
lucianom
b5d2aae3d6 Update entry 2020-03-04 17:12:13 +00:00
lucianom
d146435d07 Add XUA_Endpoint0_setStrTable() function 2020-03-04 17:10:36 +00:00
lucianom
ae27cfa89b Merge branch 'develop' of github.com:xmos/lib_xua into feature/usb_str_cmds 2020-03-03 22:52:47 +00:00
lucianom
e8bdaf8004 Add USB string functions 2020-03-03 22:52:36 +00:00
Michael Banther
db005a08ed Merge pull request #124 from xmos/develop
Early March 2020 release
2020-03-03 15:13:29 +00:00
chrisc-xmos
1dbad0ff89 Merge pull request #125 from larry-xmos/feature/configurable_bcd_device
Configurable bcdDevice
2020-03-03 07:57:31 +00:00
Larry Snizek
40ab0b563c Add commands to configure USB bcdDevice version 2020-03-02 16:02:26 +00:00
shuchitak
2175103510 Merge pull request #123 from shuchitak/feature/configurable_usb_rate_res
Feature/configurable usb rate res
2020-02-28 12:23:05 +00:00
shuchitak
73015bc44f remove extern from function declaration 2020-02-28 11:22:26 +00:00
shuchitak
8b52c83b4c include stdint.h 2020-02-28 10:38:54 +00:00
shuchitak
0978f0d50d Merge pull request #2 from keithauxmos/feature/configurable_usb_res_rate_shuchita
fixed typo of comments
2020-02-28 09:42:34 +00:00
Keith Au
cd8e46308f renamed xua_api.h to xua_usb_params_funcs.h 2020-02-28 17:14:47 +08:00
Keith Au
dbaf66fdb2 removed #if XC check 2020-02-28 17:08:58 +08:00
Keith Au
d3f2220be4 added xua_api.h for extern declaration of get/set_usb_to/from_device_rate/res APIs and removed from c/xc files 2020-02-28 15:53:27 +08:00
Keith Au
d125860552 changed define name USB_DESCRIPTOR_OVERRIDE_RATE_RES to XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES 2020-02-28 10:48:46 +08:00
Keith Au
11c8d56657 Merge branch 'feature/configurable_usb_rate_res' of github.com:shuchitak/lib_xua into feature/configurable_usb_res_rate_shuchita 2020-02-24 11:46:35 +08:00
shuchitak
abbafba3a7 changelog and source 2020-02-20 09:59:52 +00:00
shuchitak
b31028a3d6 undo copyright change 2020-02-20 09:28:16 +00:00
shuchitak
4ae9956a13 changelog + source check 2020-02-20 09:20:24 +00:00
shuchitak
be45d04423 undo changes in xua_ep0_uacreqs 2020-02-19 15:45:58 +00:00
Keith Au
0b5ddbd85e fixed typo of comments 2020-02-19 16:52:52 +08:00
shuchitak
c63df2e961 update g_curSubSlot_Out and g_curSubSlot_In under #if USB_DESCRIPTOR_OVERRIDE_RATE_RES 2020-02-18 10:20:25 +00:00
shuchitak
050d7757bc removed unused defines 2020-02-18 09:04:57 +00:00
shuchitak
ee239ba18c Merge pull request #1 from keithauxmos/feature/configurable_usb_res_rate_shuchita
removed USB_CMD_CFG_SAMP_FREQ related codes
2020-02-18 08:33:09 +00:00
Keith Au
1efe7c8822 removed USB_CMD_CFG_SAMP_FREQ related codes 2020-02-18 15:40:53 +08:00
shuchitak
dac808e9fa get usb_adaptive to compile 2020-02-17 12:09:54 +00:00
Keith Au
6402051165 Merge branch 'develop' into feature/configurable_rate_res 2020-02-14 17:05:57 +08:00
Keith Au
07b829cd7e further renamed global variables and APIs 2020-02-13 17:11:58 +08:00
Keith Au
76f12ccad6 rename default frequency naming 2020-02-13 16:35:21 +08:00
Keith Au
cb842df492 remove unnecessary AUDIO_CLASS checking 2020-02-13 16:10:57 +08:00
Keith Au
27c99623ac update Changelog 2020-02-13 15:54:46 +08:00
Keith Au
18cef82b06 modified to have USB out frequency be informed to c_audioControl after getting EP0 request 2020-02-13 15:48:46 +08:00
Keith Au
23cf086b84 replace all tab by 4 spaces 2020-02-13 15:33:43 +08:00
Keith Au
ed6ad4ce9f remove unused USB descriptor lines under USB_CMD_CFG_SAMP_FREQ in xua_ep0_descriptor.h 2020-02-13 15:05:45 +08:00
Keith Au
40a2ac6d73 moved the flow of changing USB descriptor values to XUA_Endpoint0_init() 2020-02-13 14:17:46 +08:00
oscarbailey-xmos
0a8db236f1 Merge pull request #122 from lucianomartin/feature/vid_pid_config
Add API functions for VID and PID
2020-02-12 10:00:22 +00:00
lucianom
035970c7a9 Fix description 2020-02-12 09:27:32 +00:00
lucianom
c8da4ca8f6 Fix typo 2020-02-11 16:54:48 +00:00
lucianom
f1b6a0b903 Fix typo 2020-02-11 16:53:38 +00:00
Keith Au
86c8bc9128 commit after updating to latest develop branch on 10 Feb 2020 2020-02-11 12:07:27 +08:00
Keith Au
d5d9c6ebc4 Merge branch 'develop' of github.com:xmos/lib_xua into feature/configurable_rate_res 2020-02-10 10:31:33 +08:00
lucianom
bef8fad109 Add new API functions for VID and PID 2020-02-07 19:17:24 +00:00
Keith Au
2c44f2c323 replace old g_BitResolution variable with latest API 2020-02-06 15:09:34 +08:00
Keith Au
e99d1cc486 remove extern reference to freq/bitres global variable 2020-02-04 16:16:05 +08:00
Keith Au
03b5dd6319 changed global variables to be accessed by APIs 2020-02-04 15:04:38 +08:00
Keith Au
a46c8b134a added default values for bit resolutions 2020-01-31 17:06:04 +08:00
Keith Au
f6d5bffad5 modified codes to change USB descriptor according to bit resolution variable values 2020-01-31 16:44:52 +08:00
Kevin Yeung
ad7ce6369e modified to change bit resolution 2020-01-31 12:34:35 +08:00
oscarbailey-xmos
a4507a172e Merge pull request #118 from larry-xmos/feature/dfu_detach_time_out
Expose DFU detach timeout value
2020-01-30 16:53:16 +00:00
Larry Snizek
5c5d7cb077 Merge develop into feature/dfu_detach_time_out 2020-01-27 12:53:59 +00:00
Larry Snizek
8666722798 Library checks 2020-01-21 16:45:54 +00:00
Larry Snizek
ae2f19224e Expose DFU detach timeout value 2020-01-21 16:12:38 +00:00
chrisc-xmos
75efab4a41 Merge pull request #117 from shuchitak/feature/gpi_to_hid_event
added an invalid event type
2020-01-21 15:47:34 +00:00
shuchitak
4e13f9e442 added an invalid event type 2020-01-21 11:32:36 +00:00
oscarbailey-xmos
b324bb04c8 Merge pull request #116 from mbanth/feature/hid_gpi_to_evt
Feature/hid gpi to evt
2020-01-20 09:48:53 +00:00
Keith Au
6485830a73 implemented descriptor handler flow for USB_DESCRIPTOR_OVERRIDE_RATE_RES 2020-01-20 16:14:09 +08:00
mbanth
dac71e8b38 Update copyright date range 2020-01-17 13:16:26 +00:00
mbanth
90edaebc6e Add comment to change log 2020-01-17 13:13:28 +00:00
mbanth
97e6ae4269 Shift bit flags to reflect the change to generic HID events.
Use AC Search to report Wake-phrase detection and AC Stop to report End
Call detection.
2020-01-17 11:55:19 +00:00
Michael Banther
27bf0e4fc4 Merge pull request #114 from mbanth/feature/hid_new_interface
Feature/hid new interface
2020-01-16 15:24:18 +00:00
mbanth
16138c2d42 Update copyright date range. 2020-01-16 12:27:25 +00:00
mbanth
7530591a64 Put trailing white space back because the License file check currently
fails if it's missing.
2020-01-16 12:18:33 +00:00
mbanth
6e184af899 Update copyright date range. 2020-01-16 12:07:24 +00:00
mbanth
c2f2ef1999 Merge branch 'develop' into feature/hid_new_interface 2020-01-16 11:07:46 +00:00
Keith Au
2f4da7f262 adding variable reference freqency support. Currently only 48kHz work 2020-01-16 15:05:41 +08:00
Keith Au
1ef566a570 modified AudioEndpointRequests_1 to distinguish between ep0 request for USB in and out 2020-01-13 10:15:10 +08:00
Keith Au
f6d0ede133 added USB IN alternate setting descriptor 2020-01-09 16:50:17 +08:00
mbanth
8f2509845a Update change log. 2020-01-08 11:09:03 +00:00
Keith Au
eae62a9e3c moved defined to xua_conf.h. Fixed bug that causes compile error 2020-01-08 13:49:54 +08:00
chrisc-xmos
95f39ae590 Merge pull request #113 from mbanth/feature/hid_reliance_custom_usages
Replace the HID Report descriptor with one that uses the Usage values
2020-01-07 17:36:10 +00:00
mbanth
4d5c0ec394 Merge branch 'feature/hid_reliance_custom_usages' into feature/hid_new_interface 2020-01-07 15:17:11 +00:00
mbanth
f189f02c02 Revert "Revert "Modify the interface to the User HID functionality.""
This reverts commit d81af18d1f.
2020-01-07 14:58:08 +00:00
mbanth
a2ff2897f9 Update license to new year. 2020-01-07 11:52:24 +00:00
Keith Au
5361ef8866 added option USB_CMD_CFG_SAMP_FREQ that allows host to conifgure sampling rate by endpoint command 2020-01-07 17:58:20 +08:00
Keith Au
6b1da7610f revert xua_ep0_uacreqs.xc so that frequency global variable is not affected by USB command. Now frequency can be varied by changing the default value. 2020-01-07 15:01:54 +08:00
mbanth
ad453c8a82 Update change log to keep Jenkins happy. 2020-01-06 17:22:57 +00:00
mbanth
67764fb0e8 Update change log. 2020-01-06 17:13:58 +00:00
Keith Au
3b80f63cb9 modified audio output frequency as a variable 2019-12-31 10:34:32 +08:00
mbanth
6eb30c5646 Replace the HID Report descriptor with one that uses the Usage values
specified by Reliance in their Reliance Jio Infocomm Limited, RJIL Devices,
VoicePoD, Technical Requirements Document, Rev. No. 2.0, Date 18-12-2019.
2019-12-20 13:37:54 +00:00
Michael Banther
edb020da9d Merge pull request #111 from mbanth/feature/hid_4bit_reliance_jan_demo
Feature/hid 4bit reliance jan demo
2019-12-19 15:16:01 +00:00
mbanth
d81af18d1f Revert "Modify the interface to the User HID functionality."
This reverts commit 538f2be5b4.

On branch feature/hid_4bit_reliance_jan_demo
Changes to be committed:
modified:   lib_xua/src/core/buffer/ep/ep_buffer.xc
modified:   lib_xua/src/core/user/hid/user_hid.h
2019-12-19 09:52:13 +00:00
mbanth
538f2be5b4 Modify the interface to the User HID functionality.
Setting the HID data use to occur through a global variable.  It now occurs
through a function call.  A list of general HID events has been provided as
well.
2019-12-18 12:09:11 +00:00
mbanth
02185f6701 Merge branch 'feature/hid_4bit_reliance_jan_demo' into experiment/hid_boot_time_config
# Conflicts:
#	lib_xua/src/core/user/hid/user_hid.h -- Manually resolved
2019-12-16 15:34:44 +00:00
mbanth
8b6f6bc8e1 Revert "Remove unnecessary Input statements."
This reverts commit 9f1e9735b8.
2019-12-16 15:13:53 +00:00
mbanth
9f1e9735b8 Remove unnecessary Input statements. 2019-12-16 14:53:38 +00:00
mbanth
1ee146ef60 Define each active bit field separately. 2019-12-16 12:33:59 +00:00
mbanth
e5389e4348 Added support for AC Stop (End Call), Volume Increment and Volume
Decrement bit fields in the HID report.
2019-12-13 18:17:36 +00:00
Michael Banther
31bb86c161 First changes to move to a USB HID design that allows some degree of boot-time configurability.
These changes are far from complete.  They build successfully, but have received very little bench testing.
2019-12-11 16:02:16 +00:00
oscarbailey-xmos
d8f34aa64d Merge pull request #109 from mbanth/feature/pendragon_merge_cleanup
Feature/pendragon merge cleanup
2019-12-06 10:09:36 +00:00
Michael Banther
746635b2eb Update change log. 2019-12-05 18:01:14 +00:00
Michael Banther
83284620cc Explain the need for using the assembler gettime operation instead of an XC timer more fully. 2019-12-05 16:45:49 +00:00
Michael Banther
255e9f75b5 Add missing header file guards. 2019-12-05 16:45:11 +00:00
oscarbailey-xmos
3a5b982774 Merge pull request #107 from mbanth/feature/pendragon
Add missing definition of MIC_DUAL_FRAME_SIZE
2019-11-27 09:27:26 +00:00
Michael Banther
daf378e4a5 Add in the code to call HidInterfaceClassRequests(). It was inadvertently removed during the removal of the XUA_Endpoint0_lite_loop() function. 2019-11-26 11:37:38 +00:00
Michael Banther
471ab4548a Move the override of MIC_ARRAY_FRAME_SIZE from mic_array_conf.h in lib_xua to ap_conf.h in sw_xvf3510/app_xk/xvf3510_l71.
This constant is only used in the audio pipelines, hence does not belong in the configuration of XUA.
2019-11-25 13:48:58 +00:00
Michael Banther
f22027564d Use the XUA-specific microphone frame size constant instead of directly overriding the microphone frame size constant from lib_mic_array.
Multiple constants may be derived from XUA_MIC_FRAME_SIZE.  The override of MIC_ARRAY_FRAME_SIZE occurs in mic_array_conf.h.
2019-11-25 12:10:26 +00:00
Michael Banther
82404f539c Merge commit 'a85cbc06b80dcd1ba2c8dd80644871e5579b9fa9' into feature/pendragon 2019-11-22 11:59:29 +00:00
oscarbailey-xmos
a85cbc06b8 Update CHANGELOG.rst 2019-11-22 11:27:59 +00:00
oscarbailey-xmos
6d01aa5cb8 Merge pull request #108 from xmos/feature/adaptive-fix
Fix descriptors for XUA_ADAPTIVE
2019-11-22 11:25:30 +00:00
Michael Banther
82d364a25d Disable single-threaded mic array processing for these examples. Remove the unnecessary definition of MIC_ARRAY_FRAME_SIZE. 2019-11-22 11:19:07 +00:00
Michael Banther
3a1c1b0265 Only override the value of MIC_DUAL_FRAME_SIZE if MIC_DUAL_ENABLED is set to true. 2019-11-22 10:08:36 +00:00
Michael Banther
eeca5fdd60 Move the default definition of MIC_ARRAY_MAX_FRAME_SIZE_LOG2 to mic_array_conf.h so that an assembler file can pick it up using a #include. 2019-11-21 17:32:39 +00:00
Michael Banther
241afbe7e6 Establish a default value for XUA_MIC_FRAME_SIZE. 2019-11-21 16:58:24 +00:00
Michael Banther
2aaa12e60b Remove the default definition of MIC_ARRAY_MAX_FRAME_SIZE_LOG2. It has been moved to mic_array_frame.h. Establish a value for MIC_ARRAY_FRAME_SIZE and MIC_DUAL_FRAME_SIZE if they have not already been defined. Give them the value of XUA_MIC_FRAME_SIZE in this case. 2019-11-21 16:57:56 +00:00
Oscar Bailey
6b454b0ebe Fix descriptors for XUA_ADAPTIVE 2019-11-20 11:43:32 +00:00
Michael Banther
4ff6815d07 Add missing #define and switch to using the single-threaded, dual PDM microphone design. 2019-11-19 10:35:22 +00:00
Michael Banther
e097b5dc3d Update copyright date range. 2019-11-19 09:59:37 +00:00
Michael Banther
f594d1d423 Add missing #define and update copyright date range. 2019-11-19 09:59:18 +00:00
Michael Banther
c8299998c8 Update copyright date range. 2019-11-18 13:16:05 +00:00
Michael Banther
f91728485c Add missing constant 2019-11-18 13:08:44 +00:00
Michael Banther
9674ae3328 Update copyright date range. 2019-11-18 11:36:41 +00:00
Michael Banther
192d8f54d7 Update copyright date range. 2019-11-18 11:28:42 +00:00
Michael Banther
3b6f6b6a10 Added comment to change log. 2019-11-18 11:18:46 +00:00
Michael Banther
5c3cff6a91 Add missing #defines.
The XUA library code now depends on these constants.
2019-11-18 11:15:00 +00:00
Michael Banther
fecc01d203 Update the copyright date. 2019-11-15 17:19:44 +00:00
Michael Banther
e0c7272190 Add missing definition of MIC_DUAL_FRAME_SIZE. Use the MIC_ARRAY_FRAME_SIZE value from lib_xua. 2019-11-15 14:29:49 +00:00
Michael Banther
23e5094e50 Merge pull request #103 from mbanth/feature/pendragon
Feature/pendragon
2019-11-15 12:30:22 +00:00
Michael Banther
ec396961be Remove XUA_Endpoint0_lite_init() and XUA_Endpoint0_lite_loop() functions which are not used. 2019-11-14 14:19:51 +00:00
Michael Banther
b0a26351ce Update copyright notices. 2019-11-11 13:41:07 +00:00
Michael Banther
3f03dae23d Add missing copyright notices. 2019-11-11 13:40:47 +00:00
Michael Banther
c7cce77fb2 Added empty line demanded by Jenkins checks. 2019-11-11 11:28:13 +00:00
Michael Banther
41654b17a9 Fixed bad formatting. 2019-11-11 11:17:48 +00:00
Michael Banther
861d20827b Change version to 0.3.0 to match change log. 2019-11-11 11:09:30 +00:00
Michael Banther
94afffe517 Corrected change log information and version numbering. 2019-11-11 09:59:02 +00:00
Michael Banther
c640829d9f Merge commit '955301ca76948185b7297709906c08cca37b6862' into feature/pendragon 2019-11-08 16:21:33 +00:00
Michael Banther
a865f4bc51 Add src/hid to the list of source directories. 2019-11-08 14:50:01 +00:00
oscarbailey-xmos
0ef1fe81a1 Merge pull request #106 from xmos/remove_triggers_master
Remove upstream triggers
2019-11-08 14:12:26 +00:00
oscarbailey-xmos
bc6a0cbcd8 Remove upstream triggers 2019-11-08 12:44:07 +00:00
oscarbailey-xmos
955301ca76 Merge pull request #105 from xmos/remove_triggers
Remove upstream triggers
2019-11-08 12:34:45 +00:00
oscarbailey-xmos
a2094e8953 Remove upstream triggers 2019-11-08 12:08:11 +00:00
Michael Banther
5bb5998788 Merge branch 'develop' into feature/pendragon 2019-11-06 15:20:36 +00:00
Michael Banther
28cce8b51c Remove xua_ep0_wrapper.h and xua_ep0_wrapper.xc.
Requested by Oscar Bailey as part of github.com/xmos/lib_xua Pull Request #103.
2019-11-06 15:12:21 +00:00
Michael Banther
92019d851a Remove xua_lite examples.
Requested by Oscar Bailey as part of github.com/xmos/lib_xua Pull Request #103.
2019-11-06 14:58:34 +00:00
oscarbailey-xmos
6dd1853094 Add missing line break in ep0_descriptors 2019-11-06 11:47:25 +00:00
oscarbailey-xmos
7fce471fd9 Merge pull request #102 from xmos/master
Update develop with v0.2.1
2019-11-05 14:31:56 +00:00
Michael Banther
75abc71cd7 Cleaning up a previous merge conflict. 2019-10-29 16:45:03 +00:00
Michael Banther
aea89a4cd6 Merge branch 'develop' into feature/pendragon
1st attempt
2019-10-29 16:40:47 +00:00
Larry Snizek
102d1b4e3a Tidy up HID 2019-10-23 15:05:10 +01:00
larry
9fb073a2b0 Merge pull request #3 from michaelb/pendragon_hid_add_requests
Pendragon hid add requests
2019-10-17 14:10:09 +01:00
Michael Banther
a6f3daf581 Update change log. 2019-10-16 16:03:52 +01:00
Michael Banther
a7c0ac6234 Protect configurations that do not include HID functionality from HID code. 2019-10-16 15:58:06 +01:00
Michael Banther
024c0304f1 Reverse the order of operands in an equals comparison to allow the compiler to catch a mistaken use of '=' instead of '=='. 2019-10-16 14:57:33 +01:00
Michael Banther
21ec3cf7bd Put the processing of the Set Idle request in a static function.
This reorganisation prepares this file for adding other HID Class-specific requests without the
2019-10-16 12:18:50 +01:00
Michael Banther
9a7c2d85b2 Reorganise file layout for easier maintenance and reading. 2019-10-16 11:47:32 +01:00
Michael Banther
8820ddf269 Add documentation. 2019-10-16 11:37:27 +01:00
Michael Banther
6afb4ab7e4 Remove debugging print. 2019-10-15 15:43:05 +01:00
Michael Banther
5caca37177 Change the representation, but not the logic, of a multi-part conditional expression to make it easier to understand. 2019-10-15 15:40:26 +01:00
Michael Banther
a5f17c46fc Use a variable large enough to hold the Set Idle duration in ms without overflow. 2019-10-15 15:39:14 +01:00
Michael Banther
e4f0b73a88 Explicitly label assignment of zero as unsigned when used with unsigned variables. 2019-10-15 15:38:16 +01:00
Michael Banther
3331c9e97b Add handling for an indefinite duration. 2019-10-15 10:45:20 +01:00
Michael Banther
aeb1d58bf3 The interface number occupies the entire sp.wIndex field. 2019-10-15 10:44:34 +01:00
Michael Banther
97e3233120 Rename parameter to a less ambiguous name. 2019-10-15 10:42:33 +01:00
Michael Banther
962e91adec Include xua.h to pick up the NUM_USB_CHAN_IN and NUM_USB_CHAN_OUT pre-processor symbols.
They're used further down in the file.  If not present through an #include of xua_h outside of and before the #include of descriptor_defs.h or through definition in the Make file, the enumeration of interface numbers silently mis-assigns values.
2019-10-14 16:47:59 +01:00
Michael Banther
9f98e13342 Use the HID_CONTROLS pre-processor symbol consistently. 2019-10-14 16:42:34 +01:00
Michael Banther
1808d7affa Initial implementation of the USB HID Set_Idle Request.
This code builds successfully.  It has not been tested even a little.
2019-10-10 17:21:21 +01:00
Larry Snizek
8ba9a0064c Cosmetic 2019-10-09 16:45:57 +01:00
Larry Snizek
b592c943f8 Set_Idle request handled (incomplete reports sent instead of NAK) 2019-10-08 21:18:08 +01:00
Michael Banther
2a960700c5 Remove the duplicate USB HID Report Descriptor that Git, for some unknown reason, produced at the last merge. 2019-10-08 13:54:16 +01:00
Michael Banther
f08e79197d Merge branch 'pendragon_hid_usage_investigation' into pendragon 2019-10-08 13:50:23 +01:00
Michael Banther
1690c4eff6 Remove the USB HID Report descriptor with the Voice Command Usage.
This commit also contains a small amount of whitespace clean-up.
2019-10-08 13:45:20 +01:00
Michael Banther
75fea9ed84 Change the simulated interrupt pulse width from 100 us to 100 ms. 2019-10-08 13:44:04 +01:00
Michael Banther
34ebbc8509 Change the HID Report Descriptor to use the AC Search Usage instead of Voice Command. 2019-10-07 16:50:27 +01:00
Michael Banther
5b87efb5a7 Change the HID Report Descriptor to use the AC Search Usage instead of Voice Command. 2019-10-07 12:35:23 +01:00
larry
22323daa5f Merge pull request #2 from michaelb/pendragon
HID -- Interrupt integration
2019-10-02 17:10:16 +01:00
Michael Banther
211a49f26f Remove unnecessary port parameters passed through XUA Buffer (whether the traditional one or the Lite version). 2019-10-02 16:57:42 +01:00
Michael Banther
74564edde8 Add HID trigger function. 2019-10-02 16:55:42 +01:00
Michael Banther
e7e8b58275 Move user_hid.xc from lib_xua to the application (sw_xvf3510). 2019-10-02 16:54:38 +01:00
Michael Banther
ce24c73dc0 Change pre-processor symbol names to make them generic. 2019-10-02 16:51:46 +01:00
Michael Banther
0440020c2f Change pre-processor symbol names to make them generic. 2019-10-02 15:24:28 +01:00
Michael Banther
17317093d5 Rework HID data processing.
Move port handling up into XUA_Buffer_lite2() to take advantage of its select operator.  Add functions to initialise and set the HID data.
2019-10-01 17:04:13 +01:00
Michael Banther
2fb0bdfcc2 A slightly different way of saying the same thing.
I've changed to an if - else construct to make it easy to add in debugging print statements if needed.
2019-10-01 13:52:08 +01:00
Michael Banther
d32235d0f0 Final clean-up of HID -- NDP10x Interrupt integration. 2019-10-01 11:57:54 +01:00
Michael Banther
e1b72c47bc Add a version of UserReadHIDData() which uses a signal on a port to set the Voice Command bit in the HID Report data.
This commit preserves the ability to simulate the NDP100 entirely, i.e. without using a port for input.
2019-09-30 16:14:16 +01:00
Michael Banther
660b483d1e Clean up whitespace, no functional change. 2019-09-30 16:12:16 +01:00
Michael Banther
d7be8419d8 Add a 1b port for receiving the NDP10x interrupt. 2019-09-30 13:52:22 +01:00
Michael Banther
b68c192ad9 Updated change log 2019-09-26 16:29:53 +01:00
larry
0b30ba0cb7 Merge pull request #1 from michaelb/pendragon
Add UAC1 HID support for Voice Command detection
2019-09-26 15:32:02 +01:00
Michael Banther
37bbea3726 Use a consistent method to interpret the HID_CONTROLS pre-processor symbol throughout the code base. 2019-09-26 14:45:17 +01:00
Michael Banther
ba666fb314 Add a 100 ms assertion period when this demonstration code signals an NDP100 interrupt.
When testing with the Play/Pause Usage (0xCD) with a Mac as USB Host, adding in this assertion period produced reliable playing and pausing of the iTunes app every 10 seconds.  Without an explicit assertion period, i.e. sending only one report with the lsb set to 1b followed by many reports with the lsb set to 0b, the iTunes app behaved as though it did not see many of the Play/Pause signals.  The inclusion of an assertion period may or may not help when reporting Voice Command events on Andriod.
2019-09-26 14:27:20 +01:00
Michael Banther
9472bd7dce Change HID usage from Play On-Off Control (OOC) to Voice Command One-Shot Control (OSC).
OSC requires relative data.
2019-09-26 14:22:17 +01:00
Michael Banther
3c86da7c09 Add demo HID code that simulates an interrupt roughly every 10 seconds. 2019-09-25 16:13:46 +01:00
Michael Banther
d491eb2da9 Change HID Report descriptor to contain one variable bit in the lsb position. This bit reports the interrupt. The remaining seven bits are constant at zero. 2019-09-25 16:12:59 +01:00
Michael Banther
960333ca09 Add the missing MSB of the maximum packet size and use hex values instead of decimal. 2019-09-25 14:38:17 +01:00
Michael Banther
3131b89a1d Add HID descriptors for UAC1. 2019-09-25 11:46:16 +01:00
Michael Banther
958d52b5eb Consistently use hex when defining descriptor values. 2019-09-25 11:45:40 +01:00
Michael Banther
35393d3739 Remove duplicate definitions. 2019-09-25 11:44:43 +01:00
Michael Banther
75422de6d1 Replace existing #ifdef HID_CONTROLS with #if( 0 < HID_CONTROLS ) to move to best practice regarding compile-time switches. 2019-09-25 11:42:59 +01:00
Michael Banther
017d937ec7 Add comments to match #endif directives to their corresponding #if or #ifdef directive.
Added to aid reading.
2019-09-25 11:39:48 +01:00
Michael Banther
bb5757e099 Initial implementation of HID. 2019-09-23 17:29:39 +01:00
Michael Banther
8ff44c553c Add the specific directory that contains user_hid.h.
Apparently xwaf doesn't recursively descend directory trees the way xmake does.
2019-09-23 15:36:35 +01:00
oscarbailey-xmos
3987224d50 Merge pull request #2 from ed-xmos/patch-2
Fix build error when USB not enabled
2019-04-29 06:31:55 -04:00
Ed
37ef88a602 Fix build error when USB not enabled
#ifdeffing the whole source as is the way in lib_xua
2019-04-29 11:04:20 +01:00
Oscar Bailey
786ce134c6 Update comments in xua_ep0_descriptors.h 2019-03-28 17:26:04 +00:00
Oscar Bailey
7339ceca19 Fix asynch mode not working on Windows 2019-03-28 17:11:05 +00:00
oscarbailey-xmos
06317b0b17 Merge pull request #1 from xmos/master
Update xua_lite branch with changes in master
2019-02-28 17:00:10 +00:00
Oscar Bailey
0588ea2d18 Fix XUA lite when using VENDOR_REQUESTS_PARAMS 2019-02-27 17:07:36 +00:00
Oscar Bailey
0b926fd907 Refactor: Separate XUA lite and app code 2019-02-27 11:05:25 +00:00
Oscar Bailey
b12aeac264 Whitespace changes 2019-02-26 17:18:02 +00:00
Oscar Bailey
86b4ab89ea Change version of lib_mic_array; Fix synchronous endpoint behaviour
The device now adjusts it's clock to the USB clock when host is not
pushing data to device.
2019-02-26 16:59:29 +00:00
Oscar Bailey
4ff0713e59 Add Windows support to xmosdfu
Needs WinUSB drivers installed on interface 0.
2018-12-12 15:37:31 +00:00
Ed Clarke
a8fa274230 Separate out pdm from rate calc 2018-11-30 14:00:55 +00:00
Ed Clarke
abd3141b0d PID tuning (with gnuplot script to display fifo level printed) 2018-11-30 11:43:55 +00:00
Ed Clarke
45d84a2b84 PID loop development + move rate control to own source files 2018-11-30 10:14:34 +00:00
Ed Clarke
0b2839c9fc Update todo list 2018-11-23 11:45:26 +00:00
Ed Clarke
d7c96c717a Fix saturating logic in PI controller 2018-11-20 15:15:28 +00:00
Ed Clarke
19e6dca445 Initial PID implementation 2018-11-20 14:07:33 +00:00
Ed Clarke
8e7e1bfc51 Make channel preload more clear 2018-11-14 11:40:22 +00:00
Ed Clarke
25f94fe430 reduce deadband on buffer level + debug 2018-11-14 10:36:43 +00:00
Ed Clarke
436e8f4bd4 Reduce backpressure on pll_nudge 2018-11-14 10:36:10 +00:00
Ed Clarke
ad5c2e8583 Underflow now provides zeros 2018-11-14 10:13:50 +00:00
Ed Clarke
d92614ced9 Interface number now passed back to app from EP0 2018-11-14 10:13:29 +00:00
Ed Clarke
6333ca5621 Move pack/unpack to external helper 2018-11-14 10:05:00 +00:00
Ed Clarke
ca7ee58883 Fix buffer level calcs (now locks over & under) 2018-11-14 10:04:39 +00:00
Ed Clarke
8dd33cf33b Unit tests for fifo 2018-11-09 17:32:43 +00:00
Ed Clarke
e93901f0cc Update FIFO to use true shorts + add/use fast block fifo API 2018-11-09 17:32:32 +00:00
Ed Clarke
7af92668f5 Update todo 2018-11-09 17:31:31 +00:00
Ed Clarke
4262cc81ac Remove compiler warning and risk of alignment for EP buffers 2018-11-08 17:13:06 +00:00
Ed Clarke
4d5049a47a Minor tidy 2018-11-08 17:12:38 +00:00
Ed Clarke
1251425ee6 Correct MCLK settings (24.576MHz) solves noise issue 2018-11-08 16:20:34 +00:00
Ed Clarke
f014922e98 Move function prototypes to headers 2018-11-08 14:38:52 +00:00
Ed Clarke
3debc9fef4 combinable ep0 task 2018-11-06 16:15:46 +00:00
Ed Clarke
a72885634d Work around for I2S shift 2018-11-06 14:38:31 +00:00
Ed Clarke
409da256d6 Always parse SP for EP0 2018-11-06 14:38:15 +00:00
Ed Clarke
54f42a37fe Add visual indication for PLL nudge 2018-11-06 14:37:47 +00:00
Ed Clarke
c662acaa3b WIP Adaptive with PLL nudge (demo working) 2018-11-05 13:46:01 +00:00
Ed Clarke
3214d4ea9f Remove magic numbers from endpoint numbers so switch between asynch/adaptive handled 2018-11-05 11:16:21 +00:00
Ed Clarke
0709860f48 Ensure behaviour is correct when UAC_FORCE_FEEDBACK_EP and XUA_ADAPTIVE features defined as 0 2018-11-05 11:14:03 +00:00
Ed Clarke
05f16da222 Minor tidy and todo.txt update 2018-11-05 10:06:13 +00:00
Ed Clarke
a49aad644e Manuallay apply adaptive descriptors from asrc_usb branch 2018-11-05 10:05:39 +00:00
Ed Clarke
c352a08c55 Send fixed number of samples when no output stream (not correct for asynch) 2018-10-31 14:45:16 +00:00
Ed Clarke
90d1a60595 Remove unnecessary arguments 2018-10-31 14:43:58 +00:00
Ed Clarke
9be45c7e89 Add burn threads 2018-10-31 14:43:03 +00:00
Ed Clarke
239f9b9cb7 Enable USB input path (from mics) 2018-10-31 14:10:28 +00:00
Ed Clarke
c0d80b665a Optimisations to xud select cases 2018-10-31 14:09:44 +00:00
Ed Clarke
5643d2b675 Add ddr pdm mics 2018-10-31 13:25:46 +00:00
Ed Clarke
35468c7d77 Streaming channels to audio 2018-10-30 11:48:17 +00:00
Ed Clarke
40ea575589 Fix class 1 noise by using channel buffering 2018-10-29 13:29:19 +00:00
Ed Clarke
12327505e5 Class 1 FS - noise + occasional overflow 2018-10-29 13:09:10 +00:00
Ed Clarke
fc68acae6e Merge branch 'xua_lite' of github.com:ed-xmos/lib_xua into xua_lite
* 'xua_lite' of github.com:ed-xmos/lib_xua:
  Light tidy of single thread EP buffer

# Conflicts:
#	examples/xua_lite_example/src/xua_buffer.xc
2018-10-29 12:43:09 +00:00
Ed Clarke
3f1e612d67 Light tidy of single thread EP buffer 2018-10-29 11:19:19 +00:00
Ed Clarke
eaf190b485 Light tidy of single thread EP buffer 2018-10-29 11:12:54 +00:00
Ed Clarke
4b73f17997 First pass combine ep0 into buffer 2018-10-29 08:50:04 +00:00
Ed Clarke
f0c6b22ddc Restrict sample app to single data format 2018-10-29 07:37:23 +00:00
Ed Clarke
44ea92e229 Make c_Audiocontrol nullable 2018-10-29 07:27:53 +00:00
Ed Clarke
5cfbd550fe Add initial lit ep0 cutdown versions 2018-10-29 07:20:12 +00:00
Ed Clarke
6046dc905e Update todo 2018-10-29 07:19:47 +00:00
Ed Clarke
b3fe0cb172 FB calc move to fn 2018-10-28 17:40:23 +00:00
Ed Clarke
f097e0a016 Add todo list 2018-10-28 17:22:20 +00:00
Ed Clarke
491b3936ac WIP feedback calc refactor 2018-10-28 08:59:27 +00:00
Ed Clarke
35b43c0762 Use select for EP0 handling + split ep0 into init and loop 2018-10-28 08:29:39 +00:00
Ed Clarke
78f9e890d6 Output FIFO - sounds great! 2018-10-26 16:24:50 +01:00
Ed Clarke
2405b2f4f1 Basic hook up of audio to buffer (without FIFO) - output audible! 2018-10-26 14:16:17 +01:00
Ed Clarke
1db927601a Basic feedback endpoint working for class 2 2018-10-26 13:44:30 +01:00
Ed Clarke
6fbbbedc28 Loopback audio working (no feedback calc yet) 2018-10-26 12:20:38 +01:00
Ed Clarke
35042e742f Put USB on tile[1] - builds + I2S looping 2018-10-26 11:46:51 +01:00
Ed Clarke
161b934b8f WIP + get DAC config running 2018-10-26 11:25:39 +01:00
Ed Clarke
770c11b3f0 Very early cut of xua_lite app. Builds (4 threads + I2C) but not functional 2018-10-25 17:52:13 +01:00
145 changed files with 4645 additions and 1855 deletions

1
.gitignore vendored
View File

@@ -27,3 +27,4 @@ _build*
build/
.build*
*.pyc
xscope.xmt

View File

@@ -1,6 +1,61 @@
lib_xua Change Log
==================
1.2.0
-----
* ADDED: Updates for xcore.ai/XS3 compatibility
* ADDED: Makefile.Win32 for xmosdfu on Windows
* FIXED: Bump default BCD device number to v1.2.0
* FIXED: xmosdfu now fails with an error when given a directory (#119)
* FIXED: Compilation errors related to HID code
* FIXED: Runtime error when using mic array interface
* CHANGED: Use XMOS Public Licence Version 1
* FIXED: Automate HID Report Descriptor length in AC1 HID Descriptor
1.1.1
-----
* RESOLVED: Zero length input packets generated before enumeration causing I2S
timing pushout at startup
* CHANGED: Pin Python package versions
* REMOVED: not necessary cpanfile
1.1.0
-----
* ADDED: Ability to read or modify serial number string
1.0.1
-----
* FIXED: Wrong size of vendor and product strings
1.0.0
-----
* ADDED: UAC1 HID support with simulated Voice Command detection reported
every 10 seconds
* ADDED: Support for USB HID Set Idle request
* ADDED: Pre-processor symbols to enable single-threaded, dual-PDM
microphone operation
* FIXED: Descriptors for XUA_ADAPTIVE incorrectly defined for IN endpoint
* ADDED: Guards to user_hid.h and xua_hid.h
* ADDED: UAC1 HID support for AC Stop (End Call), Volume Increment and
Volume Decrement
* CHANGE: UAC1 HID to report function keys f21 through f24 as specified by
customer
* CHANGE: HID interface for user to set and clear events from global
variable to function
* CHANGE HID report descriptor to use generic events instead of GPI
events, to report Key-phrase detection as AC Search, and to report end-call
detection as AC Stop
* ADDED: Ability to read or modify vendor and product IDs and strings
* ADDED: Ability to read or modify bcdDevice
* ADDED: Override USB descriptor with sampling frequency and
bit-resolution set at boot time.
* ADDED: Global pointer to allow external access to masterClockFreq
0.2.1
-----

78
Jenkinsfile vendored
View File

@@ -1,4 +1,4 @@
@Library('xmos_jenkins_shared_library@develop') _
@Library('xmos_jenkins_shared_library@v0.16.2') _
getApproval()
@@ -6,45 +6,7 @@ pipeline {
agent none
environment {
REPO = 'lib_xua'
VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}"
}
triggers {
/* Trigger this Pipeline on changes to the repos dependencies
*
* If this Pipeline is running in a pull request, the triggers are set
* on the base branch the PR is set to merge in to.
*
* Otherwise the triggers are set on the branch of a matching name to the
* one this Pipeline is on.
*/
upstream(
upstreamProjects:
(env.JOB_NAME.contains('PR-') ?
"../lib_device_control/${env.CHANGE_TARGET}," +
"../lib_dsp/${env.CHANGE_TARGET}," +
"../lib_i2c/${env.CHANGE_TARGET}," +
"../lib_logging/${env.CHANGE_TARGET}," +
"../lib_mic_array/${env.CHANGE_TARGET}," +
"../lib_spdif/${env.CHANGE_TARGET}," +
"../lib_xassert/${env.CHANGE_TARGET}," +
"../lib_xud/${env.CHANGE_TARGET}," +
"../tools_released/${env.CHANGE_TARGET}," +
"../tools_xmostest/${env.CHANGE_TARGET}," +
"../xdoc_released/${env.CHANGE_TARGET}"
:
"../lib_device_control/${env.BRANCH_NAME}," +
"../lib_dsp/${env.BRANCH_NAME}," +
"../lib_i2c/${env.BRANCH_NAME}," +
"../lib_logging/${env.BRANCH_NAME}," +
"../lib_mic_array/${env.BRANCH_NAME}," +
"../lib_spdif/${env.BRANCH_NAME}," +
"../lib_xassert/${env.BRANCH_NAME}," +
"../lib_xud/${env.BRANCH_NAME}," +
"../tools_released/${env.BRANCH_NAME}," +
"../tools_xmostest/${env.BRANCH_NAME}," +
"../xdoc_released/${env.BRANCH_NAME}"),
threshold: hudson.model.Result.SUCCESS
)
VIEW = getViewName(REPO)
}
options {
skipDefaultCheckout()
@@ -122,6 +84,42 @@ pipeline {
}
}
}
stage('Build Pi host app') {
agent {
label 'pi'
}
steps {
dir("${REPO}") {
checkout scm
dir("${REPO}/host/xmosdfu") {
sh 'make -f Makefile.Pi'
}
}
}
post {
cleanup {
xcoreCleanSandbox()
}
}
}
stage('Build Windows host app') {
agent {
label 'x86_64&&windows'
}
steps {
dir("${REPO}") {
checkout scm
dir("${REPO}/host/xmosdfu") {
runVS('nmake /f Makefile.Win32')
}
}
}
post {
cleanup {
xcoreCleanSandbox()
}
}
}
}
}
stage('Update') {

84
LICENSE.rst Normal file
View File

@@ -0,0 +1,84 @@
*******************************
XMOS PUBLIC LICENCE: Version 1
*******************************
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
**1. Definitions**
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
**2. Licence**
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
2.1.1 for personal or academic, non-commercial purposes; or
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
2.2.1 for personal or academic, non-commercial purposes; or
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
(b) you must copy (to the extent it doesnt already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOSs licence under clause 2.2 above.
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
**7. IPR and Ownership**
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
**8. Termination**
8.1 This Licence will automatically terminate immediately, without notice to you, if:
(a) you fail to comply with the terms of this Licence; and/or
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOSs TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.

View File

@@ -1,135 +0,0 @@
Software Release License Agreement
Copyright (c) 2011-2019, XMOS, All rights reserved.
BY ACCESSING, USING, INSTALLING OR DOWNLOADING THE XMOS SOFTWARE, YOU AGREE TO BE BOUND BY THE FOLLOWING TERMS. IF YOU DO NOT AGREE TO THESE, DO NOT ATTEMPT TO DOWNLOAD, ACCESS OR USE THE XMOS Software.
Parties:
(1) XMOS Limited, incorporated and registered in England and Wales with company number 5494985 whose registered office is 107 Cheapside, London, EC2V 6DN (XMOS).
(2) An individual or legal entity exercising permissions granted by this License (Customer).
If you are entering into this Agreement on behalf of another legal entity such as a company, partnership, university, college etc. (for example, as an employee, student or consultant), you warrant that you have authority to bind that entity.
1. Definitions
"License" means this Software License and any schedules or annexes to it.
"License Fee" means the fee for the XMOS Software as detailed in any schedules or annexes to this Software License
"Licensee Modifications" means all developments and modifications of the XMOS Software developed independently by the Customer.
"XMOS Modifications" means all developments and modifications of the XMOS Software developed or co-developed by XMOS.
"XMOS Hardware" means any XMOS hardware devices supplied by XMOS from time to time and/or the particular XMOS devices detailed in any schedules or annexes to this Software License.
"XMOS Software" comprises the XMOS owned circuit designs, schematics, source code, object code, reference designs, (including related programmer comments and documentation, if any), error corrections, improvements, modifications (including XMOS Modifications) and updates.
The headings in this License do not affect its interpretation. Save where the context otherwise requires, references to clauses and schedules are to clauses and schedules of this License.
Unless the context otherwise requires:
- references to XMOS and the Customer include their permitted successors and assigns;
- references to statutory provisions include those statutory provisions as amended or re-enacted; and
- references to any gender include all genders.
Words in the singular include the plural and in the plural include the singular.
2. License
XMOS grants the Customer a non-exclusive license to use, develop, modify and distribute the XMOS Software with, or for the purpose of being used with, XMOS Hardware.
Open Source Software (OSS) must be used and dealt with in accordance with any license terms under which OSS is distributed.
3. Consideration
In consideration of the mutual obligations contained in this License, the parties agree to its terms.
4. Term
Subject to clause 12 below, this License shall be perpetual.
5. Restrictions on Use
The Customer will adhere to all applicable import and export laws and regulations of the country in which it resides and of the United States and United Kingdom, without limitation. The Customer agrees that it is its responsibility to obtain copies of and to familiarise itself fully with these laws and regulations to avoid violation.
6. Modifications
The Customer will own all intellectual property rights in the Licensee Modifications but will undertake to provide XMOS with any fixes made to correct any bugs found in the XMOS Software on a non-exclusive, perpetual and royalty free license basis.
XMOS will own all intellectual property rights in the XMOS Modifications.
The Customer may only use the Licensee Modifications and XMOS Modifications on, or in relation to, XMOS Hardware.
7. Support
Support of the XMOS Software may be provided by XMOS pursuant to a separate support agreement.
8. Warranty and Disclaimer
The XMOS Software is provided "AS IS" without a warranty of any kind. XMOS and its licensors' entire liability and Customer's exclusive remedy under this warranty to be determined in XMOS's sole and absolute discretion, will be either (a) the corrections of defects in media or replacement of the media, or (b) the refund of the license fee paid (if any).
Whilst XMOS gives the Customer the ability to load their own software and applications onto XMOS devices, the security of such software and applications when on the XMOS devices is the Customer's own responsibility and any breach of security shall not be deemed a defect or failure of the hardware. XMOS shall have no liability whatsoever in relation to any costs, damages or other losses Customer may incur as a result of any breaches of security in relation to your software or applications.
XMOS AND ITS LICENSORS DISCLAIM ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY/ SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID UNDER APPLICABLE LAW.
9. High Risk Activities
The XMOS Software is not designed or intended for use in conjunction with on-line control equipment in hazardous environments requiring fail-safe performance, including without limitation the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, life support machines, or weapons systems (collectively "High Risk Activities") in which the failure of the XMOS Software could lead directly to death, personal injury, or severe physical or environmental damage. XMOS and its licensors specifically disclaim any express or implied warranties relating to use of the XMOS Software in connection with High Risk Activities.
10. Liability
TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, NEITHER XMOS NOR ITS LICENSORS SHALL BE LIABLE FOR ANY LOST REVENUE, BUSINESS, PROFIT, CONTRACTS OR DATA, ADMINISTRATIVE OR OVERHEAD EXPENSES, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF THIS LICENSE, EVEN IF XMOS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall XMOS's liability to the Customer whether in contract, tort (including negligence), or otherwise exceed the License Fee.
Customer agrees to indemnify, hold harmless, and defend XMOS and its licensors from and against any claims or lawsuits, including attorneys' fees and any other liabilities, demands, proceedings, damages, losses, costs, expenses fines and charges which are made or brought against or incurred by XMOS as a result of your use or distribution of the Licensee Modifications or your use or distribution of XMOS Software, or any development of it, other than in accordance with the terms of this License.
11. Ownership
The copyrights and all other intellectual and industrial property rights for the protection of information with respect to the XMOS Software (including the methods and techniques on which they are based) are retained by XMOS and/or its licensors. Nothing in this Agreement serves to transfer such rights. Customer may not sell, mortgage, underlet, sublease, sublicense, lend or transfer possession of the XMOS Software in any way whatsoever to any third party who is not bound by this Agreement.
12. Termination
Either party may terminate this License at any time on written notice to the other if the other:
- is in material or persistent breach of any of the terms of this License and either that breach is incapable of remedy, or the other party fails to remedy that breach within 30 days after receiving written notice requiring it to remedy that breach; or
- is unable to pay its debts (within the meaning of section 123 of the Insolvency Act 1986), or becomes insolvent, or is subject to an order or a resolution for its liquidation, administration, winding-up or dissolution (otherwise than for the purposes of a solvent amalgamation or reconstruction), or has an administrative or other receiver, manager, trustee, liquidator, administrator or similar officer appointed over all or any substantial part of its assets, or enters into or proposes any composition or arrangement with its creditors generally, or is subject to any analogous event or proceeding in any applicable jurisdiction.
Termination by either party in accordance with the rights contained in clause 12 shall be without prejudice to any other rights or remedies of that party accrued prior to termination.
On termination for any reason:
- all rights granted to the Customer under this License shall cease;
- the Customer shall cease all activities authorised by this License;
- the Customer shall immediately pay any sums due to XMOS under this License; and
- the Customer shall immediately destroy or return to the XMOS (at the XMOS's option) all copies of the XMOS Software then in its possession, custody or control and, in the case of destruction, certify to XMOS that it has done so.
Clauses 5, 8, 9, 10 and 11 shall survive any effective termination of this Agreement.
13. Third party rights
No term of this License is intended to confer a benefit on, or to be enforceable by, any person who is not a party to this license.
14. Confidentiality and publicity
Each party shall, during the term of this License and thereafter, keep confidential all, and shall not use for its own purposes nor without the prior written consent of the other disclose to any third party any, information of a confidential nature (including, without limitation, trade secrets and information of commercial value) which may become known to such party from the other party and which relates to the other party, unless such information is public knowledge or already known to such party at the time of disclosure, or subsequently becomes public knowledge other than by breach of this license, or subsequently comes lawfully into the possession of such party from a third party.
The terms of this license are confidential and may not be disclosed by the Customer without the prior written consent of XMOS.
The provisions of clause 14 shall remain in full force and effect notwithstanding termination of this license for any reason.
15. Entire agreement
This License and the documents annexed as appendices to this License or otherwise referred to herein contain the whole agreement between the parties relating to the subject matter hereof and supersede all prior agreements, arrangements and understandings between the parties relating to that subject matter.
16. Assignment
The Customer shall not assign this License or any of the rights granted under it without XMOS's prior written consent.
17. Governing law and jurisdiction
This License shall be governed by and construed in accordance with English law and each party hereby submits to the non-exclusive jurisdiction of the English courts.
This License has been entered into on the date stated at the beginning of it.
Schedule
XMOS lib_xua software

View File

@@ -1,7 +0,0 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
flake8 = "*"

View File

@@ -49,7 +49,8 @@ Note, not all features may be supported at all sample frequencies, simultaneousl
Software version and dependencies
.................................
.. libdeps::
The CHANGELOG contains information about the current and previous versions.
For a list of direct dependencies, look for DEPENDENT_MODULES in lib_xua/module_build_info.
Related Application Notes
.........................

View File

@@ -1,2 +0,0 @@
requires 'File::Copy::Recursive';
requires 'LWP::Simple'

84
doc_dfu/LICENSE.rst Normal file
View File

@@ -0,0 +1,84 @@
*******************************
XMOS PUBLIC LICENCE: Version 1
*******************************
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
**1. Definitions**
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
**2. Licence**
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
2.1.1 for personal or academic, non-commercial purposes; or
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
2.2.1 for personal or academic, non-commercial purposes; or
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
(b) you must copy (to the extent it doesnt already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOSs licence under clause 2.2 above.
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
**7. IPR and Ownership**
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
**8. Termination**
8.1 This Licence will automatically terminate immediately, without notice to you, if:
(a) you fail to comply with the terms of this Licence; and/or
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOSs TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.

View File

@@ -1,135 +0,0 @@
Software Release License Agreement
Copyright (c) 2017-2018, XMOS, All rights reserved.
BY ACCESSING, USING, INSTALLING OR DOWNLOADING THE XMOS SOFTWARE, YOU AGREE TO BE BOUND BY THE FOLLOWING TERMS. IF YOU DO NOT AGREE TO THESE, DO NOT ATTEMPT TO DOWNLOAD, ACCESS OR USE THE XMOS Software.
Parties:
(1) XMOS Limited, incorporated and registered in England and Wales with company number 5494985 whose registered office is 107 Cheapside, London, EC2V 6DN (XMOS).
(2) An individual or legal entity exercising permissions granted by this License (Customer).
If you are entering into this Agreement on behalf of another legal entity such as a company, partnership, university, college etc. (for example, as an employee, student or consultant), you warrant that you have authority to bind that entity.
1. Definitions
"License" means this Software License and any schedules or annexes to it.
"License Fee" means the fee for the XMOS Software as detailed in any schedules or annexes to this Software License
"Licensee Modifications" means all developments and modifications of the XMOS Software developed independently by the Customer.
"XMOS Modifications" means all developments and modifications of the XMOS Software developed or co-developed by XMOS.
"XMOS Hardware" means any XMOS hardware devices supplied by XMOS from time to time and/or the particular XMOS devices detailed in any schedules or annexes to this Software License.
"XMOS Software" comprises the XMOS owned circuit designs, schematics, source code, object code, reference designs, (including related programmer comments and documentation, if any), error corrections, improvements, modifications (including XMOS Modifications) and updates.
The headings in this License do not affect its interpretation. Save where the context otherwise requires, references to clauses and schedules are to clauses and schedules of this License.
Unless the context otherwise requires:
- references to XMOS and the Customer include their permitted successors and assigns;
- references to statutory provisions include those statutory provisions as amended or re-enacted; and
- references to any gender include all genders.
Words in the singular include the plural and in the plural include the singular.
2. License
XMOS grants the Customer a non-exclusive license to use, develop, modify and distribute the XMOS Software with, or for the purpose of being used with, XMOS Hardware.
Open Source Software (OSS) must be used and dealt with in accordance with any license terms under which OSS is distributed.
3. Consideration
In consideration of the mutual obligations contained in this License, the parties agree to its terms.
4. Term
Subject to clause 12 below, this License shall be perpetual.
5. Restrictions on Use
The Customer will adhere to all applicable import and export laws and regulations of the country in which it resides and of the United States and United Kingdom, without limitation. The Customer agrees that it is its responsibility to obtain copies of and to familiarise itself fully with these laws and regulations to avoid violation.
6. Modifications
The Customer will own all intellectual property rights in the Licensee Modifications but will undertake to provide XMOS with any fixes made to correct any bugs found in the XMOS Software on a non-exclusive, perpetual and royalty free license basis.
XMOS will own all intellectual property rights in the XMOS Modifications.
The Customer may only use the Licensee Modifications and XMOS Modifications on, or in relation to, XMOS Hardware.
7. Support
Support of the XMOS Software may be provided by XMOS pursuant to a separate support agreement.
8. Warranty and Disclaimer
The XMOS Software is provided "AS IS" without a warranty of any kind. XMOS and its licensors' entire liability and Customer's exclusive remedy under this warranty to be determined in XMOS's sole and absolute discretion, will be either (a) the corrections of defects in media or replacement of the media, or (b) the refund of the license fee paid (if any).
Whilst XMOS gives the Customer the ability to load their own software and applications onto XMOS devices, the security of such software and applications when on the XMOS devices is the Customer's own responsibility and any breach of security shall not be deemed a defect or failure of the hardware. XMOS shall have no liability whatsoever in relation to any costs, damages or other losses Customer may incur as a result of any breaches of security in relation to your software or applications.
XMOS AND ITS LICENSORS DISCLAIM ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY/ SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID UNDER APPLICABLE LAW.
9. High Risk Activities
The XMOS Software is not designed or intended for use in conjunction with on-line control equipment in hazardous environments requiring fail-safe performance, including without limitation the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, life support machines, or weapons systems (collectively "High Risk Activities") in which the failure of the XMOS Software could lead directly to death, personal injury, or severe physical or environmental damage. XMOS and its licensors specifically disclaim any express or implied warranties relating to use of the XMOS Software in connection with High Risk Activities.
10. Liability
TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, NEITHER XMOS NOR ITS LICENSORS SHALL BE LIABLE FOR ANY LOST REVENUE, BUSINESS, PROFIT, CONTRACTS OR DATA, ADMINISTRATIVE OR OVERHEAD EXPENSES, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF THIS LICENSE, EVEN IF XMOS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall XMOS's liability to the Customer whether in contract, tort (including negligence), or otherwise exceed the License Fee.
Customer agrees to indemnify, hold harmless, and defend XMOS and its licensors from and against any claims or lawsuits, including attorneys' fees and any other liabilities, demands, proceedings, damages, losses, costs, expenses fines and charges which are made or brought against or incurred by XMOS as a result of your use or distribution of the Licensee Modifications or your use or distribution of XMOS Software, or any development of it, other than in accordance with the terms of this License.
11. Ownership
The copyrights and all other intellectual and industrial property rights for the protection of information with respect to the XMOS Software (including the methods and techniques on which they are based) are retained by XMOS and/or its licensors. Nothing in this Agreement serves to transfer such rights. Customer may not sell, mortgage, underlet, sublease, sublicense, lend or transfer possession of the XMOS Software in any way whatsoever to any third party who is not bound by this Agreement.
12. Termination
Either party may terminate this License at any time on written notice to the other if the other:
- is in material or persistent breach of any of the terms of this License and either that breach is incapable of remedy, or the other party fails to remedy that breach within 30 days after receiving written notice requiring it to remedy that breach; or
- is unable to pay its debts (within the meaning of section 123 of the Insolvency Act 1986), or becomes insolvent, or is subject to an order or a resolution for its liquidation, administration, winding-up or dissolution (otherwise than for the purposes of a solvent amalgamation or reconstruction), or has an administrative or other receiver, manager, trustee, liquidator, administrator or similar officer appointed over all or any substantial part of its assets, or enters into or proposes any composition or arrangement with its creditors generally, or is subject to any analogous event or proceeding in any applicable jurisdiction.
Termination by either party in accordance with the rights contained in clause 12 shall be without prejudice to any other rights or remedies of that party accrued prior to termination.
On termination for any reason:
- all rights granted to the Customer under this License shall cease;
- the Customer shall cease all activities authorised by this License;
- the Customer shall immediately pay any sums due to XMOS under this License; and
- the Customer shall immediately destroy or return to the XMOS (at the XMOS's option) all copies of the XMOS Software then in its possession, custody or control and, in the case of destruction, certify to XMOS that it has done so.
Clauses 5, 8, 9, 10 and 11 shall survive any effective termination of this Agreement.
13. Third party rights
No term of this License is intended to confer a benefit on, or to be enforceable by, any person who is not a party to this license.
14. Confidentiality and publicity
Each party shall, during the term of this License and thereafter, keep confidential all, and shall not use for its own purposes nor without the prior written consent of the other disclose to any third party any, information of a confidential nature (including, without limitation, trade secrets and information of commercial value) which may become known to such party from the other party and which relates to the other party, unless such information is public knowledge or already known to such party at the time of disclosure, or subsequently becomes public knowledge other than by breach of this license, or subsequently comes lawfully into the possession of such party from a third party.
The terms of this license are confidential and may not be disclosed by the Customer without the prior written consent of XMOS.
The provisions of clause 14 shall remain in full force and effect notwithstanding termination of this license for any reason.
15. Entire agreement
This License and the documents annexed as appendices to this License or otherwise referred to herein contain the whole agreement between the parties relating to the subject matter hereof and supersede all prior agreements, arrangements and understandings between the parties relating to that subject matter.
16. Assignment
The Customer shall not assign this License or any of the rights granted under it without XMOS's prior written consent.
17. Governing law and jurisdiction
This License shall be governed by and construed in accordance with English law and each party hereby submits to the non-exclusive jurisdiction of the English courts.
This License has been entered into on the date stated at the beginning of it.
Schedule
XMOS lib_xua software

View File

@@ -39,3 +39,18 @@ Raspberry Pi
A makefile is provided for Raspbian. libusb is required and can be installed using the ``apt-get`` command from previous Linux section.
.. literalinclude:: Makefile.Pi
Windows
-------
To build on Windows, you must first install Visual Studio 2019 Build Tools with
C++ support. `This is available from Microsoft's website. <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019>`_
To build, open a Developer Command Prompt via the start menu and navigate to the
xmosdfu folder. The command to build is as follows:
``nmake /f Makefile.Win32``
This Makefile contains the following:
.. literalinclude:: Makefile.Win32

View File

@@ -4,6 +4,9 @@ Using the DFU loader - macOS (via the XMOS DFU loader)
The XMOS DFU loader is provided as source as part of the XMOS USB Audio software
framework, see :ref:`usb_audiosec_building_xmos_dfu`.
NOTE: Windows requires the installation of libusbK drivers on the DFU endpoint.
We recommend using `Zadig <https://zadig.akeo.ie/>`_.
Set up the image loader
-----------------------
@@ -18,7 +21,7 @@ Download new firmware
To program the new firmware run the command:
``./xmosdfu XMOS_L2_AUDIO2_PID --download new_firmware.bin``
``./bin/xmosdfu XMOS_L2_AUDIO2_PID --download new_firmware.bin``
Replace ``XMOS_L2_AUDIO2_PID`` with product ID of your target device. Invoke
``xmosdfu`` with no arguments to get a list of all supported product IDs.
@@ -35,7 +38,7 @@ present.
Run the command:
``./xmosdfu XMOS_L2_AUDIO2_PID --upload currentfirmware.bin``
``./bin/xmosdfu XMOS_L2_AUDIO2_PID --upload currentfirmware.bin``
The file ``currentfirmware.bin`` contains the latest upgrade image. This file is
an exact copy of the data from the flash and can be downloaded to the device
@@ -47,6 +50,6 @@ Reverting firmware to factory image
To revert the device back to its factory (i.e XFLASH) installed state from the
new firmware, run the command:
``./xmosdfu XMOS_L2_AUDIO2_PID --revertfactory``
``./bin/xmosdfu XMOS_L2_AUDIO2_PID --revertfactory``
The device will now be running, and only contain the factory firmware.

View File

@@ -0,0 +1,84 @@
*******************************
XMOS PUBLIC LICENCE: Version 1
*******************************
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
**1. Definitions**
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
**2. Licence**
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
2.1.1 for personal or academic, non-commercial purposes; or
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
2.2.1 for personal or academic, non-commercial purposes; or
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
(b) you must copy (to the extent it doesnt already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOSs licence under clause 2.2 above.
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
**7. IPR and Ownership**
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
**8. Termination**
8.1 This Licence will automatically terminate immediately, without notice to you, if:
(a) you fail to comply with the terms of this Licence; and/or
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOSs TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.

View File

@@ -1,135 +0,0 @@
Software Release License Agreement
Copyright (c) 2018, XMOS, All rights reserved.
BY ACCESSING, USING, INSTALLING OR DOWNLOADING THE XMOS SOFTWARE, YOU AGREE TO BE BOUND BY THE FOLLOWING TERMS. IF YOU DO NOT AGREE TO THESE, DO NOT ATTEMPT TO DOWNLOAD, ACCESS OR USE THE XMOS Software.
Parties:
(1) XMOS Limited, incorporated and registered in England and Wales with company number 5494985 whose registered office is 107 Cheapside, London, EC2V 6DN (XMOS).
(2) An individual or legal entity exercising permissions granted by this License (Customer).
If you are entering into this Agreement on behalf of another legal entity such as a company, partnership, university, college etc. (for example, as an employee, student or consultant), you warrant that you have authority to bind that entity.
1. Definitions
"License" means this Software License and any schedules or annexes to it.
"License Fee" means the fee for the XMOS Software as detailed in any schedules or annexes to this Software License
"Licensee Modifications" means all developments and modifications of the XMOS Software developed independently by the Customer.
"XMOS Modifications" means all developments and modifications of the XMOS Software developed or co-developed by XMOS.
"XMOS Hardware" means any XMOS hardware devices supplied by XMOS from time to time and/or the particular XMOS devices detailed in any schedules or annexes to this Software License.
"XMOS Software" comprises the XMOS owned circuit designs, schematics, source code, object code, reference designs, (including related programmer comments and documentation, if any), error corrections, improvements, modifications (including XMOS Modifications) and updates.
The headings in this License do not affect its interpretation. Save where the context otherwise requires, references to clauses and schedules are to clauses and schedules of this License.
Unless the context otherwise requires:
- references to XMOS and the Customer include their permitted successors and assigns;
- references to statutory provisions include those statutory provisions as amended or re-enacted; and
- references to any gender include all genders.
Words in the singular include the plural and in the plural include the singular.
2. License
XMOS grants the Customer a non-exclusive license to use, develop, modify and distribute the XMOS Software with, or for the purpose of being used with, XMOS Hardware.
Open Source Software (OSS) must be used and dealt with in accordance with any license terms under which OSS is distributed.
3. Consideration
In consideration of the mutual obligations contained in this License, the parties agree to its terms.
4. Term
Subject to clause 12 below, this License shall be perpetual.
5. Restrictions on Use
The Customer will adhere to all applicable import and export laws and regulations of the country in which it resides and of the United States and United Kingdom, without limitation. The Customer agrees that it is its responsibility to obtain copies of and to familiarise itself fully with these laws and regulations to avoid violation.
6. Modifications
The Customer will own all intellectual property rights in the Licensee Modifications but will undertake to provide XMOS with any fixes made to correct any bugs found in the XMOS Software on a non-exclusive, perpetual and royalty free license basis.
XMOS will own all intellectual property rights in the XMOS Modifications.
The Customer may only use the Licensee Modifications and XMOS Modifications on, or in relation to, XMOS Hardware.
7. Support
Support of the XMOS Software may be provided by XMOS pursuant to a separate support agreement.
8. Warranty and Disclaimer
The XMOS Software is provided "AS IS" without a warranty of any kind. XMOS and its licensors' entire liability and Customer's exclusive remedy under this warranty to be determined in XMOS's sole and absolute discretion, will be either (a) the corrections of defects in media or replacement of the media, or (b) the refund of the license fee paid (if any).
Whilst XMOS gives the Customer the ability to load their own software and applications onto XMOS devices, the security of such software and applications when on the XMOS devices is the Customer's own responsibility and any breach of security shall not be deemed a defect or failure of the hardware. XMOS shall have no liability whatsoever in relation to any costs, damages or other losses Customer may incur as a result of any breaches of security in relation to your software or applications.
XMOS AND ITS LICENSORS DISCLAIM ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY/ SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID UNDER APPLICABLE LAW.
9. High Risk Activities
The XMOS Software is not designed or intended for use in conjunction with on-line control equipment in hazardous environments requiring fail-safe performance, including without limitation the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, life support machines, or weapons systems (collectively "High Risk Activities") in which the failure of the XMOS Software could lead directly to death, personal injury, or severe physical or environmental damage. XMOS and its licensors specifically disclaim any express or implied warranties relating to use of the XMOS Software in connection with High Risk Activities.
10. Liability
TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, NEITHER XMOS NOR ITS LICENSORS SHALL BE LIABLE FOR ANY LOST REVENUE, BUSINESS, PROFIT, CONTRACTS OR DATA, ADMINISTRATIVE OR OVERHEAD EXPENSES, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF THIS LICENSE, EVEN IF XMOS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall XMOS's liability to the Customer whether in contract, tort (including negligence), or otherwise exceed the License Fee.
Customer agrees to indemnify, hold harmless, and defend XMOS and its licensors from and against any claims or lawsuits, including attorneys' fees and any other liabilities, demands, proceedings, damages, losses, costs, expenses fines and charges which are made or brought against or incurred by XMOS as a result of your use or distribution of the Licensee Modifications or your use or distribution of XMOS Software, or any development of it, other than in accordance with the terms of this License.
11. Ownership
The copyrights and all other intellectual and industrial property rights for the protection of information with respect to the XMOS Software (including the methods and techniques on which they are based) are retained by XMOS and/or its licensors. Nothing in this Agreement serves to transfer such rights. Customer may not sell, mortgage, underlet, sublease, sublicense, lend or transfer possession of the XMOS Software in any way whatsoever to any third party who is not bound by this Agreement.
12. Termination
Either party may terminate this License at any time on written notice to the other if the other:
- is in material or persistent breach of any of the terms of this License and either that breach is incapable of remedy, or the other party fails to remedy that breach within 30 days after receiving written notice requiring it to remedy that breach; or
- is unable to pay its debts (within the meaning of section 123 of the Insolvency Act 1986), or becomes insolvent, or is subject to an order or a resolution for its liquidation, administration, winding-up or dissolution (otherwise than for the purposes of a solvent amalgamation or reconstruction), or has an administrative or other receiver, manager, trustee, liquidator, administrator or similar officer appointed over all or any substantial part of its assets, or enters into or proposes any composition or arrangement with its creditors generally, or is subject to any analogous event or proceeding in any applicable jurisdiction.
Termination by either party in accordance with the rights contained in clause 12 shall be without prejudice to any other rights or remedies of that party accrued prior to termination.
On termination for any reason:
- all rights granted to the Customer under this License shall cease;
- the Customer shall cease all activities authorised by this License;
- the Customer shall immediately pay any sums due to XMOS under this License; and
- the Customer shall immediately destroy or return to the XMOS (at the XMOS's option) all copies of the XMOS Software then in its possession, custody or control and, in the case of destruction, certify to XMOS that it has done so.
Clauses 5, 8, 9, 10 and 11 shall survive any effective termination of this Agreement.
13. Third party rights
No term of this License is intended to confer a benefit on, or to be enforceable by, any person who is not a party to this license.
14. Confidentiality and publicity
Each party shall, during the term of this License and thereafter, keep confidential all, and shall not use for its own purposes nor without the prior written consent of the other disclose to any third party any, information of a confidential nature (including, without limitation, trade secrets and information of commercial value) which may become known to such party from the other party and which relates to the other party, unless such information is public knowledge or already known to such party at the time of disclosure, or subsequently becomes public knowledge other than by breach of this license, or subsequently comes lawfully into the possession of such party from a third party.
The terms of this license are confidential and may not be disclosed by the Customer without the prior written consent of XMOS.
The provisions of clause 14 shall remain in full force and effect notwithstanding termination of this license for any reason.
15. Entire agreement
This License and the documents annexed as appendices to this License or otherwise referred to herein contain the whole agreement between the parties relating to the subject matter hereof and supersede all prior agreements, arrangements and understandings between the parties relating to that subject matter.
16. Assignment
The Customer shall not assign this License or any of the rights granted under it without XMOS's prior written consent.
17. Governing law and jurisdiction
This License shall be governed by and construed in accordance with English law and each party hereby submits to the non-exclusive jurisdiction of the English courts.
This License has been entered into on the date stated at the beginning of it.
Schedule
XMOS application note AN00246 software

View File

@@ -2,15 +2,13 @@
Simple USB Audio Device using lib_xua
=====================================
.. version:: 0.1.0
Summary
-------
Required tools and libraries
............................
Software dependencies
.....................
.. appdeps::
For a list of direct dependencies, look for USED_MODULES in the Makefile.
Required hardware
.................

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/* A very simple *example* of a USB audio application (and as such is un-verified for production)
*

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef CS4384_H_
#define CS4384_H_

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _CS5368_H_
#define _CS5368_H_

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2016-2018, XMOS Ltd, All rights reserved
// Copyright 2016-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <platform.h>
#include <timer.h>

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _XUA_CONF_H_
#define _XUA_CONF_H_
@@ -21,5 +22,6 @@
#define PID_AUDIO_1 1
#define PID_AUDIO_2 2
#define XUA_DFU_EN 0 /* Disable DFU (for simplicity of example */
#define MIC_DUAL_ENABLED 0 // Use multi-threaded design
#endif

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua_conf.h"

View File

@@ -0,0 +1,84 @@
*******************************
XMOS PUBLIC LICENCE: Version 1
*******************************
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
**1. Definitions**
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
**2. Licence**
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
2.1.1 for personal or academic, non-commercial purposes; or
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
2.2.1 for personal or academic, non-commercial purposes; or
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
(b) you must copy (to the extent it doesnt already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOSs licence under clause 2.2 above.
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
**7. IPR and Ownership**
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
**8. Termination**
8.1 This Licence will automatically terminate immediately, without notice to you, if:
(a) you fail to comply with the terms of this Licence; and/or
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOSs TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.

View File

@@ -1,135 +0,0 @@
Software Release License Agreement
Copyright (c) 2018, XMOS, All rights reserved.
BY ACCESSING, USING, INSTALLING OR DOWNLOADING THE XMOS SOFTWARE, YOU AGREE TO BE BOUND BY THE FOLLOWING TERMS. IF YOU DO NOT AGREE TO THESE, DO NOT ATTEMPT TO DOWNLOAD, ACCESS OR USE THE XMOS Software.
Parties:
(1) XMOS Limited, incorporated and registered in England and Wales with company number 5494985 whose registered office is 107 Cheapside, London, EC2V 6DN (XMOS).
(2) An individual or legal entity exercising permissions granted by this License (Customer).
If you are entering into this Agreement on behalf of another legal entity such as a company, partnership, university, college etc. (for example, as an employee, student or consultant), you warrant that you have authority to bind that entity.
1. Definitions
"License" means this Software License and any schedules or annexes to it.
"License Fee" means the fee for the XMOS Software as detailed in any schedules or annexes to this Software License
"Licensee Modifications" means all developments and modifications of the XMOS Software developed independently by the Customer.
"XMOS Modifications" means all developments and modifications of the XMOS Software developed or co-developed by XMOS.
"XMOS Hardware" means any XMOS hardware devices supplied by XMOS from time to time and/or the particular XMOS devices detailed in any schedules or annexes to this Software License.
"XMOS Software" comprises the XMOS owned circuit designs, schematics, source code, object code, reference designs, (including related programmer comments and documentation, if any), error corrections, improvements, modifications (including XMOS Modifications) and updates.
The headings in this License do not affect its interpretation. Save where the context otherwise requires, references to clauses and schedules are to clauses and schedules of this License.
Unless the context otherwise requires:
- references to XMOS and the Customer include their permitted successors and assigns;
- references to statutory provisions include those statutory provisions as amended or re-enacted; and
- references to any gender include all genders.
Words in the singular include the plural and in the plural include the singular.
2. License
XMOS grants the Customer a non-exclusive license to use, develop, modify and distribute the XMOS Software with, or for the purpose of being used with, XMOS Hardware.
Open Source Software (OSS) must be used and dealt with in accordance with any license terms under which OSS is distributed.
3. Consideration
In consideration of the mutual obligations contained in this License, the parties agree to its terms.
4. Term
Subject to clause 12 below, this License shall be perpetual.
5. Restrictions on Use
The Customer will adhere to all applicable import and export laws and regulations of the country in which it resides and of the United States and United Kingdom, without limitation. The Customer agrees that it is its responsibility to obtain copies of and to familiarise itself fully with these laws and regulations to avoid violation.
6. Modifications
The Customer will own all intellectual property rights in the Licensee Modifications but will undertake to provide XMOS with any fixes made to correct any bugs found in the XMOS Software on a non-exclusive, perpetual and royalty free license basis.
XMOS will own all intellectual property rights in the XMOS Modifications.
The Customer may only use the Licensee Modifications and XMOS Modifications on, or in relation to, XMOS Hardware.
7. Support
Support of the XMOS Software may be provided by XMOS pursuant to a separate support agreement.
8. Warranty and Disclaimer
The XMOS Software is provided "AS IS" without a warranty of any kind. XMOS and its licensors' entire liability and Customer's exclusive remedy under this warranty to be determined in XMOS's sole and absolute discretion, will be either (a) the corrections of defects in media or replacement of the media, or (b) the refund of the license fee paid (if any).
Whilst XMOS gives the Customer the ability to load their own software and applications onto XMOS devices, the security of such software and applications when on the XMOS devices is the Customer's own responsibility and any breach of security shall not be deemed a defect or failure of the hardware. XMOS shall have no liability whatsoever in relation to any costs, damages or other losses Customer may incur as a result of any breaches of security in relation to your software or applications.
XMOS AND ITS LICENSORS DISCLAIM ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY/ SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID UNDER APPLICABLE LAW.
9. High Risk Activities
The XMOS Software is not designed or intended for use in conjunction with on-line control equipment in hazardous environments requiring fail-safe performance, including without limitation the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, life support machines, or weapons systems (collectively "High Risk Activities") in which the failure of the XMOS Software could lead directly to death, personal injury, or severe physical or environmental damage. XMOS and its licensors specifically disclaim any express or implied warranties relating to use of the XMOS Software in connection with High Risk Activities.
10. Liability
TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, NEITHER XMOS NOR ITS LICENSORS SHALL BE LIABLE FOR ANY LOST REVENUE, BUSINESS, PROFIT, CONTRACTS OR DATA, ADMINISTRATIVE OR OVERHEAD EXPENSES, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF THIS LICENSE, EVEN IF XMOS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall XMOS's liability to the Customer whether in contract, tort (including negligence), or otherwise exceed the License Fee.
Customer agrees to indemnify, hold harmless, and defend XMOS and its licensors from and against any claims or lawsuits, including attorneys' fees and any other liabilities, demands, proceedings, damages, losses, costs, expenses fines and charges which are made or brought against or incurred by XMOS as a result of your use or distribution of the Licensee Modifications or your use or distribution of XMOS Software, or any development of it, other than in accordance with the terms of this License.
11. Ownership
The copyrights and all other intellectual and industrial property rights for the protection of information with respect to the XMOS Software (including the methods and techniques on which they are based) are retained by XMOS and/or its licensors. Nothing in this Agreement serves to transfer such rights. Customer may not sell, mortgage, underlet, sublease, sublicense, lend or transfer possession of the XMOS Software in any way whatsoever to any third party who is not bound by this Agreement.
12. Termination
Either party may terminate this License at any time on written notice to the other if the other:
- is in material or persistent breach of any of the terms of this License and either that breach is incapable of remedy, or the other party fails to remedy that breach within 30 days after receiving written notice requiring it to remedy that breach; or
- is unable to pay its debts (within the meaning of section 123 of the Insolvency Act 1986), or becomes insolvent, or is subject to an order or a resolution for its liquidation, administration, winding-up or dissolution (otherwise than for the purposes of a solvent amalgamation or reconstruction), or has an administrative or other receiver, manager, trustee, liquidator, administrator or similar officer appointed over all or any substantial part of its assets, or enters into or proposes any composition or arrangement with its creditors generally, or is subject to any analogous event or proceeding in any applicable jurisdiction.
Termination by either party in accordance with the rights contained in clause 12 shall be without prejudice to any other rights or remedies of that party accrued prior to termination.
On termination for any reason:
- all rights granted to the Customer under this License shall cease;
- the Customer shall cease all activities authorised by this License;
- the Customer shall immediately pay any sums due to XMOS under this License; and
- the Customer shall immediately destroy or return to the XMOS (at the XMOS's option) all copies of the XMOS Software then in its possession, custody or control and, in the case of destruction, certify to XMOS that it has done so.
Clauses 5, 8, 9, 10 and 11 shall survive any effective termination of this Agreement.
13. Third party rights
No term of this License is intended to confer a benefit on, or to be enforceable by, any person who is not a party to this license.
14. Confidentiality and publicity
Each party shall, during the term of this License and thereafter, keep confidential all, and shall not use for its own purposes nor without the prior written consent of the other disclose to any third party any, information of a confidential nature (including, without limitation, trade secrets and information of commercial value) which may become known to such party from the other party and which relates to the other party, unless such information is public knowledge or already known to such party at the time of disclosure, or subsequently becomes public knowledge other than by breach of this license, or subsequently comes lawfully into the possession of such party from a third party.
The terms of this license are confidential and may not be disclosed by the Customer without the prior written consent of XMOS.
The provisions of clause 14 shall remain in full force and effect notwithstanding termination of this license for any reason.
15. Entire agreement
This License and the documents annexed as appendices to this License or otherwise referred to herein contain the whole agreement between the parties relating to the subject matter hereof and supersede all prior agreements, arrangements and understandings between the parties relating to that subject matter.
16. Assignment
The Customer shall not assign this License or any of the rights granted under it without XMOS's prior written consent.
17. Governing law and jurisdiction
This License shall be governed by and construed in accordance with English law and each party hereby submits to the non-exclusive jurisdiction of the English courts.
This License has been entered into on the date stated at the beginning of it.
Schedule
XMOS application note AN00247 software

View File

@@ -2,15 +2,13 @@
Using lib_xua with lib_spdif (transmit)
=======================================
.. version:: 0.1.0
Summary
-------
Required tools and libraries
............................
Software dependencies
.....................
.. appdeps::
For a list of direct dependencies, look for USED_MODULES in the Makefile.
Required hardware
.................

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/* A very simple *example* of a USB audio application (and as such is un-verified for production)
*

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2016-2018, XMOS Ltd, All rights reserved
// Copyright 2016-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <platform.h>
#include <timer.h>

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _XUA_CONF_H_
#define _XUA_CONF_H_
@@ -26,5 +27,6 @@
#define AUDIO_CLASS_FALLBACK 0
#define BCD_DEVICE 0x1234
#define XUA_DFU_EN 0
#define MIC_DUAL_ENABLED 0 // Use multi-threaded design
#endif

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua_conf.h"

View File

@@ -0,0 +1,84 @@
*******************************
XMOS PUBLIC LICENCE: Version 1
*******************************
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
**1. Definitions**
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
**2. Licence**
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
2.1.1 for personal or academic, non-commercial purposes; or
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
2.2.1 for personal or academic, non-commercial purposes; or
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
(b) you must copy (to the extent it doesnt already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOSs licence under clause 2.2 above.
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
**7. IPR and Ownership**
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
**8. Termination**
8.1 This Licence will automatically terminate immediately, without notice to you, if:
(a) you fail to comply with the terms of this Licence; and/or
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOSs TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.

View File

@@ -1,135 +0,0 @@
Software Release License Agreement
Copyright (c) 2018, XMOS, All rights reserved.
BY ACCESSING, USING, INSTALLING OR DOWNLOADING THE XMOS SOFTWARE, YOU AGREE TO BE BOUND BY THE FOLLOWING TERMS. IF YOU DO NOT AGREE TO THESE, DO NOT ATTEMPT TO DOWNLOAD, ACCESS OR USE THE XMOS Software.
Parties:
(1) XMOS Limited, incorporated and registered in England and Wales with company number 5494985 whose registered office is 107 Cheapside, London, EC2V 6DN (XMOS).
(2) An individual or legal entity exercising permissions granted by this License (Customer).
If you are entering into this Agreement on behalf of another legal entity such as a company, partnership, university, college etc. (for example, as an employee, student or consultant), you warrant that you have authority to bind that entity.
1. Definitions
"License" means this Software License and any schedules or annexes to it.
"License Fee" means the fee for the XMOS Software as detailed in any schedules or annexes to this Software License
"Licensee Modifications" means all developments and modifications of the XMOS Software developed independently by the Customer.
"XMOS Modifications" means all developments and modifications of the XMOS Software developed or co-developed by XMOS.
"XMOS Hardware" means any XMOS hardware devices supplied by XMOS from time to time and/or the particular XMOS devices detailed in any schedules or annexes to this Software License.
"XMOS Software" comprises the XMOS owned circuit designs, schematics, source code, object code, reference designs, (including related programmer comments and documentation, if any), error corrections, improvements, modifications (including XMOS Modifications) and updates.
The headings in this License do not affect its interpretation. Save where the context otherwise requires, references to clauses and schedules are to clauses and schedules of this License.
Unless the context otherwise requires:
- references to XMOS and the Customer include their permitted successors and assigns;
- references to statutory provisions include those statutory provisions as amended or re-enacted; and
- references to any gender include all genders.
Words in the singular include the plural and in the plural include the singular.
2. License
XMOS grants the Customer a non-exclusive license to use, develop, modify and distribute the XMOS Software with, or for the purpose of being used with, XMOS Hardware.
Open Source Software (OSS) must be used and dealt with in accordance with any license terms under which OSS is distributed.
3. Consideration
In consideration of the mutual obligations contained in this License, the parties agree to its terms.
4. Term
Subject to clause 12 below, this License shall be perpetual.
5. Restrictions on Use
The Customer will adhere to all applicable import and export laws and regulations of the country in which it resides and of the United States and United Kingdom, without limitation. The Customer agrees that it is its responsibility to obtain copies of and to familiarise itself fully with these laws and regulations to avoid violation.
6. Modifications
The Customer will own all intellectual property rights in the Licensee Modifications but will undertake to provide XMOS with any fixes made to correct any bugs found in the XMOS Software on a non-exclusive, perpetual and royalty free license basis.
XMOS will own all intellectual property rights in the XMOS Modifications.
The Customer may only use the Licensee Modifications and XMOS Modifications on, or in relation to, XMOS Hardware.
7. Support
Support of the XMOS Software may be provided by XMOS pursuant to a separate support agreement.
8. Warranty and Disclaimer
The XMOS Software is provided "AS IS" without a warranty of any kind. XMOS and its licensors' entire liability and Customer's exclusive remedy under this warranty to be determined in XMOS's sole and absolute discretion, will be either (a) the corrections of defects in media or replacement of the media, or (b) the refund of the license fee paid (if any).
Whilst XMOS gives the Customer the ability to load their own software and applications onto XMOS devices, the security of such software and applications when on the XMOS devices is the Customer's own responsibility and any breach of security shall not be deemed a defect or failure of the hardware. XMOS shall have no liability whatsoever in relation to any costs, damages or other losses Customer may incur as a result of any breaches of security in relation to your software or applications.
XMOS AND ITS LICENSORS DISCLAIM ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY/ SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID UNDER APPLICABLE LAW.
9. High Risk Activities
The XMOS Software is not designed or intended for use in conjunction with on-line control equipment in hazardous environments requiring fail-safe performance, including without limitation the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, life support machines, or weapons systems (collectively "High Risk Activities") in which the failure of the XMOS Software could lead directly to death, personal injury, or severe physical or environmental damage. XMOS and its licensors specifically disclaim any express or implied warranties relating to use of the XMOS Software in connection with High Risk Activities.
10. Liability
TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, NEITHER XMOS NOR ITS LICENSORS SHALL BE LIABLE FOR ANY LOST REVENUE, BUSINESS, PROFIT, CONTRACTS OR DATA, ADMINISTRATIVE OR OVERHEAD EXPENSES, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF THIS LICENSE, EVEN IF XMOS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall XMOS's liability to the Customer whether in contract, tort (including negligence), or otherwise exceed the License Fee.
Customer agrees to indemnify, hold harmless, and defend XMOS and its licensors from and against any claims or lawsuits, including attorneys' fees and any other liabilities, demands, proceedings, damages, losses, costs, expenses fines and charges which are made or brought against or incurred by XMOS as a result of your use or distribution of the Licensee Modifications or your use or distribution of XMOS Software, or any development of it, other than in accordance with the terms of this License.
11. Ownership
The copyrights and all other intellectual and industrial property rights for the protection of information with respect to the XMOS Software (including the methods and techniques on which they are based) are retained by XMOS and/or its licensors. Nothing in this Agreement serves to transfer such rights. Customer may not sell, mortgage, underlet, sublease, sublicense, lend or transfer possession of the XMOS Software in any way whatsoever to any third party who is not bound by this Agreement.
12. Termination
Either party may terminate this License at any time on written notice to the other if the other:
- is in material or persistent breach of any of the terms of this License and either that breach is incapable of remedy, or the other party fails to remedy that breach within 30 days after receiving written notice requiring it to remedy that breach; or
- is unable to pay its debts (within the meaning of section 123 of the Insolvency Act 1986), or becomes insolvent, or is subject to an order or a resolution for its liquidation, administration, winding-up or dissolution (otherwise than for the purposes of a solvent amalgamation or reconstruction), or has an administrative or other receiver, manager, trustee, liquidator, administrator or similar officer appointed over all or any substantial part of its assets, or enters into or proposes any composition or arrangement with its creditors generally, or is subject to any analogous event or proceeding in any applicable jurisdiction.
Termination by either party in accordance with the rights contained in clause 12 shall be without prejudice to any other rights or remedies of that party accrued prior to termination.
On termination for any reason:
- all rights granted to the Customer under this License shall cease;
- the Customer shall cease all activities authorised by this License;
- the Customer shall immediately pay any sums due to XMOS under this License; and
- the Customer shall immediately destroy or return to the XMOS (at the XMOS's option) all copies of the XMOS Software then in its possession, custody or control and, in the case of destruction, certify to XMOS that it has done so.
Clauses 5, 8, 9, 10 and 11 shall survive any effective termination of this Agreement.
13. Third party rights
No term of this License is intended to confer a benefit on, or to be enforceable by, any person who is not a party to this license.
14. Confidentiality and publicity
Each party shall, during the term of this License and thereafter, keep confidential all, and shall not use for its own purposes nor without the prior written consent of the other disclose to any third party any, information of a confidential nature (including, without limitation, trade secrets and information of commercial value) which may become known to such party from the other party and which relates to the other party, unless such information is public knowledge or already known to such party at the time of disclosure, or subsequently becomes public knowledge other than by breach of this license, or subsequently comes lawfully into the possession of such party from a third party.
The terms of this license are confidential and may not be disclosed by the Customer without the prior written consent of XMOS.
The provisions of clause 14 shall remain in full force and effect notwithstanding termination of this license for any reason.
15. Entire agreement
This License and the documents annexed as appendices to this License or otherwise referred to herein contain the whole agreement between the parties relating to the subject matter hereof and supersede all prior agreements, arrangements and understandings between the parties relating to that subject matter.
16. Assignment
The Customer shall not assign this License or any of the rights granted under it without XMOS's prior written consent.
17. Governing law and jurisdiction
This License shall be governed by and construed in accordance with English law and each party hereby submits to the non-exclusive jurisdiction of the English courts.
This License has been entered into on the date stated at the beginning of it.
Schedule
XMOS application note AN00248 software

View File

@@ -2,18 +2,16 @@
Using lib_xua with lib_mic_array
================================
.. version:: 0.1.0
Summary
-------
This applicaition note describes how to use ``lib_mic_array`` in conjunction with ``lib_xua``
to implement a USB Audio device with the ability to record from multiple PDM microphones.
Required tools and libraries
............................
Software dependencies
.....................
.. appdeps::
For a list of direct dependencies, look for USED_MODULES in the Makefile.
Required hardware
.................

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/* A very simple *example* of a USB audio application (and as such is un-verified for production)
*

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <xs1.h>
#include <assert.h>

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _XUA_CONF_H_
#define _XUA_CONF_H_
@@ -25,5 +26,6 @@
#define AUDIO_CLASS_FALLBACK 0
#define BCD_DEVICE 0x1234
#define XUA_DFU_EN 0
#define MIC_DUAL_ENABLED 0 // Use multi-threaded design
#endif

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua_conf.h"

84
lib_xua/LICENSE.rst Normal file
View File

@@ -0,0 +1,84 @@
*******************************
XMOS PUBLIC LICENCE: Version 1
*******************************
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
**1. Definitions**
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
**2. Licence**
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
2.1.1 for personal or academic, non-commercial purposes; or
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
2.2.1 for personal or academic, non-commercial purposes; or
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
(b) you must copy (to the extent it doesnt already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOSs licence under clause 2.2 above.
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
**7. IPR and Ownership**
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
**8. Termination**
8.1 This Licence will automatically terminate immediately, without notice to you, if:
(a) you fail to comply with the terms of this Licence; and/or
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOSs TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.

View File

@@ -1,135 +0,0 @@
Software Release License Agreement
Copyright (c) 2017-2019, XMOS, All rights reserved.
BY ACCESSING, USING, INSTALLING OR DOWNLOADING THE XMOS SOFTWARE, YOU AGREE TO BE BOUND BY THE FOLLOWING TERMS. IF YOU DO NOT AGREE TO THESE, DO NOT ATTEMPT TO DOWNLOAD, ACCESS OR USE THE XMOS Software.
Parties:
(1) XMOS Limited, incorporated and registered in England and Wales with company number 5494985 whose registered office is 107 Cheapside, London, EC2V 6DN (XMOS).
(2) An individual or legal entity exercising permissions granted by this License (Customer).
If you are entering into this Agreement on behalf of another legal entity such as a company, partnership, university, college etc. (for example, as an employee, student or consultant), you warrant that you have authority to bind that entity.
1. Definitions
"License" means this Software License and any schedules or annexes to it.
"License Fee" means the fee for the XMOS Software as detailed in any schedules or annexes to this Software License
"Licensee Modifications" means all developments and modifications of the XMOS Software developed independently by the Customer.
"XMOS Modifications" means all developments and modifications of the XMOS Software developed or co-developed by XMOS.
"XMOS Hardware" means any XMOS hardware devices supplied by XMOS from time to time and/or the particular XMOS devices detailed in any schedules or annexes to this Software License.
"XMOS Software" comprises the XMOS owned circuit designs, schematics, source code, object code, reference designs, (including related programmer comments and documentation, if any), error corrections, improvements, modifications (including XMOS Modifications) and updates.
The headings in this License do not affect its interpretation. Save where the context otherwise requires, references to clauses and schedules are to clauses and schedules of this License.
Unless the context otherwise requires:
- references to XMOS and the Customer include their permitted successors and assigns;
- references to statutory provisions include those statutory provisions as amended or re-enacted; and
- references to any gender include all genders.
Words in the singular include the plural and in the plural include the singular.
2. License
XMOS grants the Customer a non-exclusive license to use, develop, modify and distribute the XMOS Software with, or for the purpose of being used with, XMOS Hardware.
Open Source Software (OSS) must be used and dealt with in accordance with any license terms under which OSS is distributed.
3. Consideration
In consideration of the mutual obligations contained in this License, the parties agree to its terms.
4. Term
Subject to clause 12 below, this License shall be perpetual.
5. Restrictions on Use
The Customer will adhere to all applicable import and export laws and regulations of the country in which it resides and of the United States and United Kingdom, without limitation. The Customer agrees that it is its responsibility to obtain copies of and to familiarise itself fully with these laws and regulations to avoid violation.
6. Modifications
The Customer will own all intellectual property rights in the Licensee Modifications but will undertake to provide XMOS with any fixes made to correct any bugs found in the XMOS Software on a non-exclusive, perpetual and royalty free license basis.
XMOS will own all intellectual property rights in the XMOS Modifications.
The Customer may only use the Licensee Modifications and XMOS Modifications on, or in relation to, XMOS Hardware.
7. Support
Support of the XMOS Software may be provided by XMOS pursuant to a separate support agreement.
8. Warranty and Disclaimer
The XMOS Software is provided "AS IS" without a warranty of any kind. XMOS and its licensors' entire liability and Customer's exclusive remedy under this warranty to be determined in XMOS's sole and absolute discretion, will be either (a) the corrections of defects in media or replacement of the media, or (b) the refund of the license fee paid (if any).
Whilst XMOS gives the Customer the ability to load their own software and applications onto XMOS devices, the security of such software and applications when on the XMOS devices is the Customer's own responsibility and any breach of security shall not be deemed a defect or failure of the hardware. XMOS shall have no liability whatsoever in relation to any costs, damages or other losses Customer may incur as a result of any breaches of security in relation to your software or applications.
XMOS AND ITS LICENSORS DISCLAIM ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY/ SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID UNDER APPLICABLE LAW.
9. High Risk Activities
The XMOS Software is not designed or intended for use in conjunction with on-line control equipment in hazardous environments requiring fail-safe performance, including without limitation the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, life support machines, or weapons systems (collectively "High Risk Activities") in which the failure of the XMOS Software could lead directly to death, personal injury, or severe physical or environmental damage. XMOS and its licensors specifically disclaim any express or implied warranties relating to use of the XMOS Software in connection with High Risk Activities.
10. Liability
TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, NEITHER XMOS NOR ITS LICENSORS SHALL BE LIABLE FOR ANY LOST REVENUE, BUSINESS, PROFIT, CONTRACTS OR DATA, ADMINISTRATIVE OR OVERHEAD EXPENSES, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THEORY OF LIABILITY ARISING OUT OF THIS LICENSE, EVEN IF XMOS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall XMOS's liability to the Customer whether in contract, tort (including negligence), or otherwise exceed the License Fee.
Customer agrees to indemnify, hold harmless, and defend XMOS and its licensors from and against any claims or lawsuits, including attorneys' fees and any other liabilities, demands, proceedings, damages, losses, costs, expenses fines and charges which are made or brought against or incurred by XMOS as a result of your use or distribution of the Licensee Modifications or your use or distribution of XMOS Software, or any development of it, other than in accordance with the terms of this License.
11. Ownership
The copyrights and all other intellectual and industrial property rights for the protection of information with respect to the XMOS Software (including the methods and techniques on which they are based) are retained by XMOS and/or its licensors. Nothing in this Agreement serves to transfer such rights. Customer may not sell, mortgage, underlet, sublease, sublicense, lend or transfer possession of the XMOS Software in any way whatsoever to any third party who is not bound by this Agreement.
12. Termination
Either party may terminate this License at any time on written notice to the other if the other:
- is in material or persistent breach of any of the terms of this License and either that breach is incapable of remedy, or the other party fails to remedy that breach within 30 days after receiving written notice requiring it to remedy that breach; or
- is unable to pay its debts (within the meaning of section 123 of the Insolvency Act 1986), or becomes insolvent, or is subject to an order or a resolution for its liquidation, administration, winding-up or dissolution (otherwise than for the purposes of a solvent amalgamation or reconstruction), or has an administrative or other receiver, manager, trustee, liquidator, administrator or similar officer appointed over all or any substantial part of its assets, or enters into or proposes any composition or arrangement with its creditors generally, or is subject to any analogous event or proceeding in any applicable jurisdiction.
Termination by either party in accordance with the rights contained in clause 12 shall be without prejudice to any other rights or remedies of that party accrued prior to termination.
On termination for any reason:
- all rights granted to the Customer under this License shall cease;
- the Customer shall cease all activities authorised by this License;
- the Customer shall immediately pay any sums due to XMOS under this License; and
- the Customer shall immediately destroy or return to the XMOS (at the XMOS's option) all copies of the XMOS Software then in its possession, custody or control and, in the case of destruction, certify to XMOS that it has done so.
Clauses 5, 8, 9, 10 and 11 shall survive any effective termination of this Agreement.
13. Third party rights
No term of this License is intended to confer a benefit on, or to be enforceable by, any person who is not a party to this license.
14. Confidentiality and publicity
Each party shall, during the term of this License and thereafter, keep confidential all, and shall not use for its own purposes nor without the prior written consent of the other disclose to any third party any, information of a confidential nature (including, without limitation, trade secrets and information of commercial value) which may become known to such party from the other party and which relates to the other party, unless such information is public knowledge or already known to such party at the time of disclosure, or subsequently becomes public knowledge other than by breach of this license, or subsequently comes lawfully into the possession of such party from a third party.
The terms of this license are confidential and may not be disclosed by the Customer without the prior written consent of XMOS.
The provisions of clause 14 shall remain in full force and effect notwithstanding termination of this license for any reason.
15. Entire agreement
This License and the documents annexed as appendices to this License or otherwise referred to herein contain the whole agreement between the parties relating to the subject matter hereof and supersede all prior agreements, arrangements and understandings between the parties relating to that subject matter.
16. Assignment
The Customer shall not assign this License or any of the rights granted under it without XMOS's prior written consent.
17. Governing law and jurisdiction
This License shall be governed by and construed in accordance with English law and each party hereby submits to the non-exclusive jurisdiction of the English courts.
This License has been entered into on the date stated at the beginning of it.
Schedule
XMOS lib_xua software

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __XUA_H__
#define __XUA_H__

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __XUA_AUDIOHUB_H__
#define __XUA_AUDIOHUB_H__

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __XUA_BUFFER_H__
#define __XUA_BUFFER_H__
@@ -58,7 +59,7 @@ void XUA_Buffer(
chanend c_sof,
chanend c_aud_ctl,
in port p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, chanend c_hid
#endif
, chanend c_aud
@@ -97,7 +98,7 @@ void XUA_Buffer_Ep(chanend c_aud_out,
chanend c_sof,
chanend c_aud_ctl,
in port p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, chanend c_hid
#endif
#ifdef CHAN_BUFF_CTRL

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/*
* @brief Defines relating to device configuration and customisation of lib_xua
* @author Ross Owen, XMOS Limited
@@ -288,6 +289,13 @@
#define PDM_MIC_INDEX (0)
#endif
/**
* @brief Size of a frame of microphone data samples. Default: 1
*/
#ifndef XUA_MIC_FRAME_SIZE
#define XUA_MIC_FRAME_SIZE (1)
#endif
/**
* @brief Enable MIDI functionality including buffering, descriptors etc. Default: DISABLED
*/
@@ -425,10 +433,6 @@
#define HID_CONTROLS (0)
#endif
#if defined(HID_CONTROLS) && (HID_CONTROLS == 0)
#undef HID_CONTROLS
#endif
/* @brief Defines whether XMOS device runs as master (i.e. drives LR and Bit clocks)
*
* 0: XMOS is I2S master. 1: CODEC is I2s master.
@@ -439,6 +443,16 @@
#define CODEC_MASTER (0)
#endif
/**
* @brief Serial Number String used by the device
*
* Default: ""
*/
#ifndef SERIAL_STR
#define SERIAL_STR ""
#endif
/**
* @brief Vendor String used by the device. This is also pre-pended to various strings used by the design.
*
@@ -513,21 +527,21 @@
* @brief Device firmware version number in Binary Coded Decimal format: 0xJJMN where JJ: major, M: minor, N: sub-minor version number.
*/
#ifndef BCD_DEVICE_J
#define BCD_DEVICE_J (0)
#define BCD_DEVICE_J (1)
#endif
/**
* @brief Device firmware version number in Binary Coded Decimal format: 0xJJMN where JJ: major, M: minor, N: sub-minor version number.
*/
#ifndef BCD_DEVICE_M
#define BCD_DEVICE_M (1)
#define BCD_DEVICE_M (2)
#endif
/**
* @brief Device firmware version number in Binary Coded Decimal format: 0xJJMN where JJ: major, M: minor, N: sub-minor version number.
*/
#ifndef BCD_DEVICE_N
#define BCD_DEVICE_N (1)
#define BCD_DEVICE_N (0)
#endif
/**
@@ -1158,6 +1172,10 @@
#endif
#if (defined(UAC_FORCE_FEEDBACK_EP) && UAC_FORCE_FEEDBACK_EP == 0)
#undef UAC_FORCE_FEEDBACK_EP
#endif
#ifndef __ASSEMBLER__
/* Endpoint addresses enums */
enum USBEndpointNumber_In
@@ -1173,7 +1191,7 @@ enum USBEndpointNumber_In
#ifdef MIDI
ENDPOINT_NUMBER_IN_MIDI,
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
ENDPOINT_NUMBER_IN_HID,
#endif
#ifdef IAP
@@ -1438,6 +1456,12 @@ enum USBEndpointNumber_Out
#error Bad DEFAULT_MCLK_FREQ
#endif
/* DFU functional descriptor wDetachTimeOut field (milliseconds)
* Time for device to wait for bus reset after DETACH request before reverting to idle state */
#ifndef DFU_DETACH_TIME_OUT
#define DFU_DETACH_TIME_OUT 250
#endif
#if ((MCLK_441 % MIN_FREQ) == 0)
#define MIN_FREQ_44 MIN_FREQ
#define MIN_FREQ_48 ((48000 * 512)/((44100 * 512)/MIN_FREQ))
@@ -1459,4 +1483,3 @@ enum USBEndpointNumber_Out
#if (CODEC_MASTER == 1) && (DSD_CHANS_DAC != 0)
#error CODEC_MASTER with DSD is currently unsupported
#endif

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __XUA_CONF_FULL_H__
#define __XUA_CONF_FULL_H__

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _XUA_ENDPOINT0_H_
#define _XUA_ENDPOINT0_H_
@@ -28,5 +29,105 @@ void XUA_Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioCtrl,
chanend ?c_mix_ctl,chanend ?c_clk_ctl, chanend ?c_EANativeTransport_ctr, client interface i_dfu ?dfuInterface
VENDOR_REQUESTS_PARAMS_DEC_);
/** Function to set the Vendor ID value
*
* \param vid vendor ID value to set
*/
void XUA_Endpoint0_setVendorId(unsigned short vid);
/** Function to set the Product ID value
*
* \param pid Product ID value to set
*/
void XUA_Endpoint0_setProductId(unsigned short pid);
/** Function to set the Vendor string
*
* \param vendor_str Vendor string to set
*/
#ifdef __XC__
void XUA_Endpoint0_setVendorStr(char * unsafe vendor_str);
#else
void XUA_Endpoint0_setVendorStr(char * vendor_str);
#endif
/** Function to set the Product string
*
* \param product_str Product string to set
*/
#ifdef __XC__
void XUA_Endpoint0_setProductStr(char * unsafe product_str);
#else
void XUA_Endpoint0_setProductStr(char * product_str);
#endif
/** Function to set the Serial string
*
* \param serial_str Serial string to set
*/
#ifdef __XC__
void XUA_Endpoint0_setSerialStr(char * unsafe serial_str);
#else
void XUA_Endpoint0_setSerialStr(char * serial_str);
#endif
/** Function to set the BCD device
*
* \param bcdDevice BCD device to set
*/
void XUA_Endpoint0_setBcdDevice(unsigned short bcdDevice);
/** Function to get the Vendor string
*
* \return vendor string
*/
#ifdef __XC__
char * unsafe XUA_Endpoint0_getVendorStr();
#else
char * XUA_Endpoint0_getVendorStr();
#endif
/** Function to get the Product string
*
* \return Product string
*/
#ifdef __XC__
char * unsafe XUA_Endpoint0_getProductStr();
#else
char * XUA_Endpoint0_getProductStr();
#endif
/** Function to get the Serial Number string
*
* \return Serial string
*/
#ifdef __XC__
char * unsafe XUA_Endpoint0_getSerialStr();
#else
char * XUA_Endpoint0_getSerialStr();
#endif
/** Function to get the Vendor ID
*
* \return Vendor ID
*/
unsigned short XUA_Endpoint0_getVendorId();
/** Function to get the Product ID
*
* \return Product ID
*/
unsigned short XUA_Endpoint0_getProductId();
/** Function to get the BCD device
*
* \return BCD device
*/
unsigned short XUA_Endpoint0_getBcdDevice();
#endif
#endif

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
// Copyright 2015-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef XUA_PDM_MIC_H
#define XUA_PDM_MIC_H

View File

@@ -0,0 +1,19 @@
// Copyright 2017-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __XUA_API_H__
#define __XUA_API_H__
#include <stdint.h>
void set_usb_to_device_rate(uint32_t rate);
void set_device_to_usb_rate(uint32_t rate);
void set_usb_to_device_bit_res(uint32_t rate);
void set_device_to_usb_bit_res(uint32_t rate);
uint32_t get_usb_to_device_rate();
uint32_t get_device_to_usb_rate();
uint32_t get_usb_to_device_bit_res();
uint32_t get_device_to_usb_bit_res();
#endif //__XUA_API_H__

View File

@@ -1,2 +1,3 @@
all:
g++ -m32 -Wall -g -o xmosdfu xmosdfu.cpp -Ilibusb/Linux32 -lusb-1.0
mkdir -p bin
g++ -m32 -Wall -g -o bin/xmosdfu xmosdfu.cpp -Ilibusb/Linux32 -lusb-1.0

View File

@@ -1,2 +1,3 @@
all:
g++ -Wall -g -o xmosdfu xmosdfu.cpp -Ilibusb/Linux32 -lusb-1.0
mkdir -p bin
g++ -Wall -g -o bin/xmosdfu xmosdfu.cpp -Ilibusb/Linux32 -lusb-1.0

View File

@@ -1,2 +1,3 @@
all:
g++ -g -o xmosdfu xmosdfu.cpp -Ilibusb/OSX32 libusb/OSX32/libusb-1.0.0.dylib -m32 -Wall
mkdir -p bin
g++ -g -o bin/xmosdfu xmosdfu.cpp -Ilibusb/OSX32 libusb/OSX32/libusb-1.0.0.dylib -m32 -Wall

View File

@@ -1,2 +1,3 @@
all:
g++ -g -o xmosdfu xmosdfu.cpp -Ilibusb/OSX64 libusb/OSX64/libusb-1.0.0.dylib -Wall
mkdir -p bin
g++ -g -o bin/xmosdfu xmosdfu.cpp -Ilibusb/OSX64 libusb/OSX64/libusb-1.0.0.dylib -Wall

View File

@@ -5,4 +5,5 @@
# vendor and product IDs
xmosdfu: xmosdfu.cpp
g++ -D_GNU_SOURCE -Wall -g -o xmosdfu -Ilibusb/Rasp -lusb-1.0 -x c xmosdfu.cpp -std=c99
mkdir -p bin
g++ -D_GNU_SOURCE -Wall -g -o bin/xmosdfu -Ilibusb/Rasp -lusb-1.0 -x c xmosdfu.cpp -std=c99

View File

@@ -0,0 +1,31 @@
# Build tested with Visual Studio 2017 command prompt
#
# Run: nmake /f Makefile.Win32
#
# NOTE: To run xmosdfu on Windows, libusbK drivers must be installed on the DFU endpoint
# We recommend using the third-party Zadig tool for this.
COMMON_FLAGS = \
/D BECLEAR_HOST=1 \
/I libusb\Win32 \
/nologo \
/W4 \
/WX- \
/O2 \
/EHa \
/D _CRT_SECURE_NO_WARNINGS \
xmosdfu.cpp \
all: xmosdfu
xmosdfu:
if not exist bin mkdir bin
CL.exe \
$(COMMON_FLAGS) \
/Fe"bin\xmosdfu.exe" \
/link "libusb\Win32\libusb-1.0.lib""
copy libusb-1.0.dll bin
del *.obj
clean:
rmdir /s /q bin

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -73,42 +73,42 @@ system_profiler SPUSBDataType|grep -A10 "$device_grep_string" |grep Version
echo ""
echo "*** DFU download new firmware 1 ***"
$PROGDIR/xmosdfu $device_pid --download $update1
$PROGDIR/bin/xmosdfu $device_pid --download $update1
sleep 2
echo "Version Read:"
system_profiler SPUSBDataType|grep -A10 "$device_grep_string" |grep Version
echo ""
echo "*** DFU download new firmware 2 ***"
$PROGDIR/xmosdfu $device_pid --download $update2
$PROGDIR/bin/xmosdfu $device_pid --download $update2
sleep 2
echo "Version Read:"
system_profiler SPUSBDataType|grep -A10 "$device_grep_string" |grep Version
echo ""
echo "*** DFU upload existing firmware ***"
$PROGDIR/xmosdfu $device_pid --upload upload.bin
$PROGDIR/bin/xmosdfu $device_pid --upload upload.bin
sleep 2
echo "Version Read:"
system_profiler SPUSBDataType|grep -A10 "$device_grep_string" |grep Version
echo ""
echo "*** DFU revert to factory ***"
$PROGDIR/xmosdfu $device_pid --revertfactory
$PROGDIR/bin/xmosdfu $device_pid --revertfactory
sleep 2
echo "Version Read:"
system_profiler SPUSBDataType|grep -A10 "$device_grep_string" |grep Version
echo ""
echo "*** DFU download uploaded firmware ***"
$PROGDIR/xmosdfu $device_pid --download upload.bin
$PROGDIR/bin/xmosdfu $device_pid --download upload.bin
sleep 2
echo "Version Read:"
system_profiler SPUSBDataType|grep -A10 "$device_grep_string" |grep Version
echo ""
echo "*** DFU revert to factory ***"
$PROGDIR/xmosdfu $device_pid --revertfactory
$PROGDIR/bin/xmosdfu $device_pid --revertfactory
sleep 2
echo "Version Read:"
system_profiler SPUSBDataType|grep -A10 "$device_grep_string" |grep Version

View File

@@ -1,7 +1,29 @@
// Copyright (c) 2012-2018, XMOS Ltd, All rights reserved
// Copyright 2012-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#ifdef _WIN32
#include <windows.h>
// Used for checking if a file is a directory
#ifndef S_ISDIR
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#endif
// Aliases for Windows
#define stat _stat
#define fstat _fstat
#define fileno _fileno
#else
#include <unistd.h>
void Sleep(unsigned milliseconds) {
usleep(milliseconds * 1000);
}
#endif
#include "libusb.h"
/* the device's vendor and product id */
@@ -51,7 +73,7 @@ static int find_xmos_device(unsigned int id, unsigned int pid, unsigned int list
libusb_device *dev;
libusb_device **devs;
int i = 0;
int found = 0;
unsigned int found = 0;
size_t count = libusb_get_device_list(NULL, &devs);
if ((int)count < 0)
@@ -195,7 +217,7 @@ int xmos_dfu_restore_state(unsigned int interface)
return 0;
}
int dfu_download(unsigned int interface, unsigned int block_num, unsigned int size, unsigned char *data)
unsigned int dfu_download(unsigned int interface, unsigned int block_num, unsigned int size, unsigned char *data)
{
//printf("... Downloading block number %d size %d\r", block_num, size);
/* Returns actual data size transferred */
@@ -212,7 +234,7 @@ int dfu_upload(unsigned int interface, unsigned int block_num, unsigned int size
int write_dfu_image(char *file)
{
int i = 0;
unsigned int i = 0;
FILE* inFile = NULL;
int image_size = 0;
unsigned int num_blocks = 0;
@@ -225,6 +247,7 @@ int write_dfu_image(char *file)
unsigned int timeout = 0;
unsigned char strIndex = 0;
unsigned int dfuBlockCount = 0;
struct stat statbuf;
inFile = fopen( file, "rb" );
if( inFile == NULL )
@@ -233,6 +256,19 @@ int write_dfu_image(char *file)
return -1;
}
/* Check if file is a directory */
int status = fstat(fileno(inFile), &statbuf);
if (status != 0)
{
fprintf(stderr,"Error: Failed to get info on file.\n");
return -1;
}
if ( S_ISDIR(statbuf.st_mode) )
{
fprintf(stderr,"Error: Specified path is a directory.\n");
return -1;
}
/* Discover the size of the image. */
if( 0 != fseek( inFile, 0, SEEK_END ) )
{
@@ -259,7 +295,7 @@ int write_dfu_image(char *file)
{
memset(block_data, 0x0, block_size);
fread(block_data, 1, block_size, inFile);
int transferred = dfu_download(0, dfuBlockCount, block_size, block_data);
unsigned int transferred = dfu_download(0, dfuBlockCount, block_size, block_data);
if(transferred != block_size)
{
/* Error */
@@ -334,7 +370,7 @@ int read_dfu_image(char *file)
static void print_device_list(FILE *file, const char *indent)
{
for (int i = 0; i < sizeof(pidList)/sizeof(pidList[0]); i++)
for (long unsigned int i = 0; i < sizeof(pidList)/sizeof(pidList[0]); i++)
{
fprintf(file, "%s%-30s (0x%0x)\n", indent, pidList[i].device_name, pidList[i].pid);
}
@@ -371,7 +407,7 @@ static unsigned int select_pid(char *device_pid)
}
// Otherwise do a lookup of names
for (int i = 0; i < sizeof(pidList)/sizeof(pidList[0]); i++)
for (long unsigned int i = 0; i < sizeof(pidList)/sizeof(pidList[0]); i++)
{
if (strcmp(device_pid, pidList[i].device_name) == 0)
{
@@ -501,7 +537,7 @@ int main(int argc, char **argv)
printf("Waiting for device to restart and enter DFU mode...\n");
// Wait for device to enter dfu mode and restart
system("sleep 20");
Sleep(20 * 1000);
#endif
// NOW IN DFU APPLICATION MODE
@@ -556,7 +592,7 @@ int main(int argc, char **argv)
printf("... Reverting device to factory image\n");
xmos_dfu_revertfactory();
// Give device time to revert firmware
system("sleep 2");
Sleep(2 * 1000);
xmos_dfu_resetfromdfu(XMOS_DFU_IF);
}
else
@@ -572,5 +608,5 @@ int main(int argc, char **argv)
libusb_close(devh);
libusb_exit(NULL);
return 1;
return 0;
}

View File

@@ -1,8 +1,8 @@
VERSION = 0.2.1
VERSION = 1.2.0
DEPENDENT_MODULES = lib_logging(>=3.0.0) \
lib_xassert(>=4.0.0) \
lib_xud(>=0.2.0) \
lib_xud(>=1.0.0) \
lib_spdif(>=4.0.0) \
lib_mic_array(>=4.0.0)
@@ -43,7 +43,9 @@ INCLUDE_DIRS = $(EXPORT_INCLUDE_DIRS) \
src/core/support/powersave \
src/core/user \
src/core/user/audiostream \
src/core/user/hid \
src/core/user/hostactive \
src/hid \
src/midi
SOURCE_DIRS = src/core \
@@ -61,6 +63,7 @@ SOURCE_DIRS = src/core \
src/core/user/hostactive \
src/core/xuduser \
src/dfu \
src/hid \
src/midi
EXCLUDE_FILES += descriptors_2.rst

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2018, XMOS Ltd, All rights reserved
// Copyright 2018-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
unsigned adatCounter = 0;
unsigned adatSamples[8];

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2018, XMOS Ltd, All rights reserved
// Copyright 2018-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#if (DSD_CHANS_DAC != 0)
extern buffered out port:32 p_dsd_dac[DSD_CHANS_DAC];

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2018, XMOS Ltd, All rights reserved
// Copyright 2018-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua.h"
#include "dsd_support.h"

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2013-2018, XMOS Ltd, All rights reserved
// Copyright 2013-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _DSD_H_
#define _DSD_H_

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/**
* @file xua_audiohub.xc
* @brief XMOS USB 2.0 Audio Reference Design. Audio Functions.

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2016-2018, XMOS Ltd, All rights reserved
// Copyright 2016-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xccompat.h"
#include "xua_audiohub.h"

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua.h"
#if XUA_USB_EN
@@ -7,16 +8,18 @@
#include "interrupt.h"
#include "xua_commands.h"
#include "xud.h"
#include "xua_usb_params_funcs.h"
#ifdef NATIVE_DSD
#include "usbaudio20.h" /* Defines from the USB Audio 2.0 Specifications */
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
#include "user_hid.h"
#endif
#define MAX(x,y) ((x)>(y) ? (x) : (y))
/* TODO use SLOTSIZE to potentially save memory */
/* Note we could improve on this, for one subslot is set to 4 */
/* The *4 is conversion to bytes, note we're assuming a slotsize of 4 here whic is potentially as waste */
@@ -136,6 +139,7 @@ unsigned unpackData = 0;
unsigned packState = 0;
unsigned packData = 0;
/* Default to something sensible but the following are setup at stream start (unless UAC1 only..) */
#if (AUDIO_CLASS == 2)
unsigned g_curSubSlot_Out = HS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES;
@@ -145,7 +149,6 @@ unsigned g_curSubSlot_Out = FS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES;
unsigned g_curSubSlot_In = FS_STREAM_FORMAT_INPUT_1_SUBSLOT_BYTES;
#endif
/* IN packet size. Init to something sensible, but expect to be re-set before stream start */
#if (AUDIO_CLASS==2)
int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_IN_HS;
@@ -158,6 +161,10 @@ int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_IN_FS;
void handle_audio_request(chanend c_mix_out)
{
int space_left;
#if(defined XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES)
g_curSubSlot_Out = get_usb_to_device_bit_res() >> 3;
g_curSubSlot_In = get_device_to_usb_bit_res() >> 3;
#endif
/* Input word that triggered interrupt and handshake back */
unsigned underflowSample = inuint(c_mix_out);

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
// Copyright 2015-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua.h"
#if XUA_USB_EN
#include "interrupt.h"

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua.h"
#if XUA_USB_EN
#include "xud.h"

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __interrupt_h__
#define __interrupt_h__
@@ -71,7 +72,7 @@
//int ksp_enter, ksp_exit, r11_store;
#ifdef __XS2A__
#if defined(__XS2A__) || defined(__XS3A__)
#define ISSUE_MODE_SINGLE ".issue_mode single\n"
#define ISSUE_MODE_DUAL ".issue_mode dual\n"
#else

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua.h"
#if XUA_USB_EN
#include <xs1.h>
@@ -19,9 +20,9 @@
#include "xud.h"
#include "testct_byref.h"
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
#include "user_hid.h"
unsigned char g_hidData[1] = {0};
unsigned char g_hidData[HID_DATA_BYTES] = {0};
#endif
void GetADCCounts(unsigned samFreq, int &min, int &mid, int &max);
@@ -36,9 +37,10 @@ extern unsigned int g_curSamFreqMultiplier;
#define SET_SHARED_GLOBAL0(x,y) SET_SHARED_GLOBAL(x,y)
#endif
/* Global var for speed. Related to feedback. Used by input stream to determine IN packet size */
unsigned g_speed;
/* Initialise g_speed now so we get a sensible packet size until we start properly calculating feedback in the SoF case */
/* Without this, zero size input packets fill the input FIFO and it takes a long time to clear out when feedback starts */
/* This can cause a delay to the decouple ISR being serviced pushing our I2S timing. Initialising solves this */
unsigned g_speed = (AUDIO_CLASS == 2) ? (DEFAULT_FREQ/8000) << 16 : (DEFAULT_FREQ/1000) << 16;
unsigned g_freqChange = 0;
unsigned feedbackValid = 0;
@@ -120,7 +122,7 @@ void XUA_Buffer(
chanend c_sof,
chanend c_aud_ctl,
in port p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, chanend c_hid
#endif
, chanend c_aud
@@ -164,7 +166,7 @@ void XUA_Buffer(
c_clk_int,
#endif
c_sof, c_aud_ctl, p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, c_hid
#endif
#ifdef CHAN_BUFF_CTRL
@@ -182,6 +184,8 @@ void XUA_Buffer(
}
}
// Allows us to externally modify masterClockFreq
unsafe{volatile unsigned * unsafe masterClockFreq_ptr;}
/**
* Buffers data from audio endpoints
@@ -223,7 +227,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
chanend c_sof,
chanend c_aud_ctl,
in port p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, chanend c_hid
#endif
#ifdef CHAN_BUFF_CTRL
@@ -260,7 +264,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
XUD_ep ep_int = XUD_InitEp(c_ep_int);
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
XUD_ep ep_hid = XUD_InitEp(c_hid);
#endif
unsigned u_tmp;
@@ -268,6 +272,8 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
unsigned masterClockFreq = DEFAULT_MCLK_FREQ;
unsigned lastClock = 0;
unsafe{masterClockFreq_ptr = &masterClockFreq;}
unsigned clocks = 0;
long long clockcounter = 0;
@@ -364,7 +370,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
#endif
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
XUD_SetReady_In(ep_hid, g_hidData, 1);
#endif
@@ -875,12 +881,12 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
#endif
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
/* HID Report Data */
case XUD_SetData_Select(c_hid, ep_hid, result):
{
g_hidData[0]=0;
UserReadHIDButtons(g_hidData);
UserHIDGetData(g_hidData);
XUD_SetReady_In(ep_hid, g_hidData, 1);
}
break;

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
//#pragma select handler
#include <xs1.h>

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <xs1.h>
/* TODO Currently complier does not support inline select functions, hense this is in a seperate file to ensure this is not the case */

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <xs1.h>
#include <assert.h>

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _CLOCKING_H_
#define _CLOCKING_H_

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
# Copyright 2015-2021 XMOS LIMITED.
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
def genstrings(outputChanCount, chanString, portString, structureString, adc_dac):

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
// Copyright 2015-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/* AUTOGENERATED using chanstringgen.py */
/* Not very nice looking but the standard preprocessor is not very powerful

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __dbcalc_h__
#define __dbcalc_h__

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <xs1.h>
#include <print.h>
/* The coefficients of the chebychev polynomial to approximate 10^x in the interval [-1,1].

View File

@@ -1,8 +1,14 @@
// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
// Copyright 2015-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __DESCRIPTOR_DEFS_H__
#define __DESCRIPTOR_DEFS_H__
/*
Include xua.h to pick up the #defines of NUM_USB_CHAN_IN and NUM_USB_CHAN_OUT.
*/
#include "xua.h"
#if (NUM_USB_CHAN_IN > 0) && (NUM_USB_CHAN_OUT > 0)
#define AUDIO_INTERFACE_COUNT 3
#elif (NUM_USB_CHAN_IN > 0) || (NUM_USB_CHAN_OUT > 0)
@@ -54,10 +60,14 @@ enum USBInterfaceNumber
INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS,
#endif
#endif
#if defined(HID_CONTROLS) && (HID_CONTROLS != 0)
#if( 0 < HID_CONTROLS )
INTERFACE_NUMBER_HID,
#endif
INTERFACE_COUNT /* End marker */
};
#if( 0 < HID_CONTROLS )
#define ENDPOINT_INT_INTERVAL_IN_HID 0x08
#endif
#endif

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2016-2018, XMOS Ltd, All rights reserved
// Copyright 2016-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua.h"
#if XUA_USB_EN

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _VENDORREQUESTS_H_
#define _VENDORREQUESTS_H_

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2019, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/**
* @file xua_ep0_descriptors.h
* @brief Device Descriptors
@@ -26,7 +27,24 @@
#define APPEND_PRODUCT_STR_A1(x) PRODUCT_STR_A1 " "#x
#define STR_TABLE_ENTRY(name) char *name
#define STR_TABLE_ENTRY(name) char * name
// The empty strings below are used in the g_strTable to set the maximum size of the table entries
// The last char of the strings are different, so that the compiler allocates separate memory spaces
#define XUA_VENDOR_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\01"
#define XUA_PRODUCT_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\02"
#define XUA_CLOCK_SELECTOR_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\03"
#define XUA_INTERNAL_CLOCK_SELECTOR_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\04"
#define XUA_SPDIF_CLOCK_SOURCE_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\05"
#define XUA_ADAT_CLOCK_SOURCE_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\06"
#define XUA_DFU_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\07"
#define XUA_CTRL_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\08"
#define XUA_MIDI_OUT_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\09"
#define XUA_MIDI_IN_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0a"
#define XUA_SERIAL_EMPTY_STRING "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0b"
// The value below must match the length of XUA_DESCR_EMPTY_STRING.
#define XUA_MAX_STR_LEN (32)
#define ISO_EP_ATTRIBUTES_ASYNCH 0x05 //ISO, ASYNCH, DATA EP
#define ISO_EP_ATTRIBUTES_ADAPTIVE 0x09 //ISO, ADAPTIVE, DATA EP
@@ -69,7 +87,7 @@ typedef struct
#if ADAT_RX
STR_TABLE_ENTRY(adatClockSourceStr); /* iClockSource for external S/PDIF clock */
#endif
#endif
#endif // AUDIO_CLASS == 2
#if (XUA_DFU_EN == 1)
STR_TABLE_ENTRY(dfuStr); /* iInterface for DFU interface */
#endif
@@ -317,41 +335,42 @@ typedef struct
StringDescTable_t g_strTable =
{
.langID = "\x09\x04", /* US English */
.vendorStr = VENDOR_STR,
.serialStr = "",
.vendorStr = XUA_VENDOR_EMPTY_STRING,
.serialStr = XUA_SERIAL_EMPTY_STRING,
#if (AUDIO_CLASS == 2)
.productStr_Audio2 = PRODUCT_STR_A2,
.outputInterfaceStr_Audio2 = APPEND_PRODUCT_STR_A2(),
.inputInterfaceStr_Audio2 = APPEND_PRODUCT_STR_A2(),
.usbInputTermStr_Audio2 = APPEND_PRODUCT_STR_A2(),
.usbOutputTermStr_Audio2 = APPEND_PRODUCT_STR_A2(),
.productStr_Audio2 = XUA_PRODUCT_EMPTY_STRING,
.outputInterfaceStr_Audio2 = XUA_PRODUCT_EMPTY_STRING,
.inputInterfaceStr_Audio2 = XUA_PRODUCT_EMPTY_STRING,
.usbInputTermStr_Audio2 = XUA_PRODUCT_EMPTY_STRING,
.usbOutputTermStr_Audio2 = XUA_PRODUCT_EMPTY_STRING,
#endif
#if (AUDIO_CLASS_FALLBACK) || (AUDIO_CLASS == 1)
.productStr_Audio1 = PRODUCT_STR_A1,
.outputInterfaceStr_Audio1 = APPEND_PRODUCT_STR_A1(),
.inputInterfaceStr_Audio1 = APPEND_PRODUCT_STR_A1(),
.usbInputTermStr_Audio1 = APPEND_PRODUCT_STR_A1(),
.usbOutputTermStr_Audio1 = APPEND_PRODUCT_STR_A1(),
.productStr_Audio1 = XUA_PRODUCT_EMPTY_STRING,
.outputInterfaceStr_Audio1 = XUA_PRODUCT_EMPTY_STRING,
.inputInterfaceStr_Audio1 = XUA_PRODUCT_EMPTY_STRING,
.usbInputTermStr_Audio1 = XUA_PRODUCT_EMPTY_STRING,
.usbOutputTermStr_Audio1 = XUA_PRODUCT_EMPTY_STRING,
#endif
#if (AUDIO_CLASS == 2)
.clockSelectorStr = APPEND_VENDOR_STR(Clock Selector),
.internalClockSourceStr = APPEND_VENDOR_STR(Internal Clock),
.clockSelectorStr = XUA_CLOCK_SELECTOR_EMPTY_STRING,
.internalClockSourceStr = XUA_INTERNAL_CLOCK_SELECTOR_EMPTY_STRING,
#if SPDIF_RX
.spdifClockSourceStr = APPEND_VENDOR_STR(S/PDIF Clock),
.spdifClockSourceStr = XUA_SPDIF_CLOCK_SOURCE_EMPTY_STRING,
#endif
#if ADAT_RX
.adatClockSourceStr = APPEND_VENDOR_STR(ADAT Clock),
#endif
.adatClockSourceStr = XUA_ADAT_CLOCK_SOURCE_EMPTY_STRING,
#endif
#endif // AUDIO_CLASS == 2
#if (XUA_DFU_EN == 1)
.dfuStr = APPEND_VENDOR_STR(DFU),
.dfuStr = XUA_DFU_EMPTY_STRING,
#endif
#ifdef USB_CONTROL_DESCS
.ctrlStr = APPEND_VENDOR_STR(Control),
.ctrlStr = XUA_CTRL_EMPTY_STRING,
#endif
#ifdef MIDI
.midiOutStr = APPEND_VENDOR_STR(MIDI Out),
.midiInStr = APPEND_VENDOR_STR(MIDI In),
.midiOutStr = XUA_MIDI_OUT_EMPTY_STRING,
.midiInStr = XUA_MIDI_IN_EMPTY_STRING,
#endif
#include "chanstrings.h"
@@ -417,7 +436,7 @@ USB_Descriptor_Device_t devDesc_Audio1 =
.bcdDevice = BCD_DEVICE,
.iManufacturer = offsetof(StringDescTable_t, vendorStr)/sizeof(char *),
.iProduct = offsetof(StringDescTable_t, productStr_Audio1)/sizeof(char *),
.iSerialNumber = 0,
.iSerialNumber = offsetof(StringDescTable_t, serialStr)/sizeof(char *),
.bNumConfigurations = 1
};
#endif
@@ -453,7 +472,7 @@ USB_Descriptor_Device_t devDesc_Audio2 =
.bcdDevice = BCD_DEVICE,
.iManufacturer = offsetof(StringDescTable_t, vendorStr)/sizeof(char *),
.iProduct = offsetof(StringDescTable_t, productStr_Audio2)/sizeof(char *),
.iSerialNumber = 0,
.iSerialNumber = offsetof(StringDescTable_t, serialStr)/sizeof(char *),
.bNumConfigurations = 0x02 /* Set to 2 such that windows does not load composite driver */
};
@@ -476,7 +495,7 @@ unsigned char devDesc_Null[] =
(BCD_DEVICE >> 8), /* 13 bcdDevice : Device release number */
offsetof(StringDescTable_t, vendorStr)/sizeof(char *),
offsetof(StringDescTable_t, productStr_Audio2)/sizeof(char *),
0, /* 16 iSerialNumber : Index of serial number decriptor */
offsetof(StringDescTable_t, serialStr)/sizeof(char *), /* 16 iSerialNumber : Index of serial number decriptor */
0x01 /* 17 bNumConfigurations : Number of possible configs */
};
#endif
@@ -561,27 +580,30 @@ unsigned char devQualDesc_Null[] =
#define MIXER_LENGTH (0)
#endif
#ifdef HID_CONTROLS
unsigned char hidReportDescriptor[] =
#if( 0 < HID_CONTROLS )
unsigned char hidReportDescriptor[] = /* Voice Command usage as per request #HUTRR45 */
{
0x05, 0x0c, /* Usage Page (Consumer Device) */
0x09, 0x01, /* Usage (Consumer Control) */
0xa1, 0x01, /* Collection (Application) */
0x15, 0x00, /* Logical Minimum (0) */
0x25, 0x01, /* Logical Maximum (1) */
0x09, 0xb0, /* Usage (Play) */
0x09, 0xb5, /* Usage (Scan Next Track) */
0x09, 0xb6, /* Usage (Scan Previous Track) */
0x09, 0xe9, /* Usage (Volume Up) */
0x09, 0xea, /* Usage (Volume Down) */
0x09, 0xe2, /* Usage (Mute) */
0x75, 0x01, /* Report Size (1) */
0x95, 0x06, /* Report Count (6) */
0x81, 0x02, /* Input (Data, Var, Abs) */
0x95, 0x02, /* Report Count (2) */
0x81, 0x01, /* Input (Cnst, Ary, Abs) */
0xc0 /* End collection */
0x05, 0x01, /* Usage Page (Generic Desktop) */
0x09, 0x06, /* Usage (Keyboard) */
0xa1, 0x01, /* Collection (Application) */
0x75, 0x01, /* Report Size (1) */
0x95, 0x04, /* Report Count (4) */
0x15, 0x00, /* Logical Minimum (0) */
0x25, 0x00, /* Logical Maximum (0) */
0x81, 0x01, /* Input (Cnst, Ary, Abs, No Wrap, Lin, Pref, No Nul) */
0x95, 0x01, /* Report Count (1) */
0x25, 0x01, /* Logical Maximum (1) */
0x05, 0x0C, /* Usage Page (Consumer) */
0x0a, 0x21, 0x02, /* Usage (AC Search) */
0x81, 0x02, /* Input (Data, Var, Abs, No Wrap, Lin, Pref, No Nul) */
0x0a, 0x26, 0x02, /* Usage (AC Stop) */
0x81, 0x02, /* Input (Data, Var, Abs, No Wrap, Lin, Pref, No Nul) */
0x95, 0x02, /* Report Count (2) */
0x05, 0x07, /* Usage Page (Key Codes) */
0x19, 0x72, /* Usage Minimum (Keyboard F23) */
0x29, 0x73, /* Usage Maximum (Keyboard F24) */
0x81, 0x02, /* Input (Data, Var, Abs, No Wrap, Lin, Pref, No Nul) */
0xc0 /* End collection (Application) */
};
#endif
@@ -724,7 +746,7 @@ typedef struct
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
USB_Descriptor_Endpoint_t Audio_Out_Fb_Endpoint_2;
#endif
#endif
#endif // OUTPUT_FORMAT_COUNT > 1
#if (OUTPUT_FORMAT_COUNT > 2)
USB_Descriptor_Interface_t Audio_Out_StreamInterface_Alt3;
USB_Descriptor_Audio_Interface_AS_t Audio_Out_ClassStreamInterface_3;
@@ -734,8 +756,8 @@ typedef struct
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
USB_Descriptor_Endpoint_t Audio_Out_Fb_Endpoint_3;
#endif
#endif
#endif
#endif // OUTPUT_FORMAT_COUNT > 2
#endif // NUM_USB_CHAN_OUT > 0
#if (NUM_USB_CHAN_IN > 0)
/* Audio Streaming: Input stream */
USB_Descriptor_Interface_t Audio_In_StreamInterface_Alt0; /* Zero bandwith alternative */
@@ -758,7 +780,7 @@ typedef struct
USB_Descriptor_Endpoint_t Audio_In_Endpoint_3;
USB_Descriptor_Audio_Class_AS_Endpoint_t Audio_In_ClassEndpoint_3;
#endif
#endif
#endif // NUM_USB_CHAN_IN > 0
#ifdef MIDI
/* MIDI descriptors currently handled as a single block */
unsigned char configDesc_Midi[MIDI_LENGTH];
@@ -782,9 +804,9 @@ typedef struct
USB_Descriptor_Endpoint_t iAP_EANativeTransport_Out_Endpoint;
USB_Descriptor_Endpoint_t iAP_EANativeTransport_In_Endpoint;
#endif
#endif
#endif // IAP
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
USB_Descriptor_Interface_t HID_Interface;
unsigned char hidDesc[9]; //TODO ideally we would have a struct for this.
USB_Descriptor_Endpoint_t HID_In_Endpoint;
@@ -1099,7 +1121,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
},
0, /* 60 iFeature */
},
#endif
#endif /* (OUTPUT_VOLUME_CONTROL == 1) */
/* Output Terminal Descriptor (Audio) */
.Audio_Out_OutputTerminal =
@@ -1119,7 +1141,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
0x0000, /* 9 bmControls */
0, /* 11 iTerminal */
},
#endif
#endif /* (NUM_USB_CHAN_OUT > 0) */
@@ -1274,7 +1296,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
},
0, /* 60 iFeature */
},
#endif
#endif /* (INPUT_VOLUME_CONTROL == 1) */
.Audio_In_OutputTerminal =
{
@@ -1295,7 +1317,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bmControls = 0x0000,
.iTerminal = offsetof(StringDescTable_t, usbOutputTermStr_Audio2)/sizeof(char *)
},
#endif
#endif /* (NUM_USB_CHAN_IN > 0) */
#if defined(MIXER) && (MAX_MIX_COUNT > 0)
/* Extension Unit Descriptor (4.7.2.12) */
@@ -1389,7 +1411,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
0x00, /* bmControls */
0 /* Mixer unit string descriptor index */
},
#endif
#endif /* defined(MIXER) && (MAX_MIX_COUNT > 0) */
#if (SPDIF_RX) || (ADAT_RX)
/* Standard AS Interrupt Endpoint Descriptor (4.8.2.1): */
@@ -1473,9 +1495,13 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
.bEndpointAddress = ENDPOINT_ADDRESS_OUT_AUDIO,
#ifdef XUA_ADAPTIVE
.bmAttributes = ISO_EP_ATTRIBUTES_ADAPTIVE, /* (bitmap) */
.bmAttributes = ISO_EP_ATTRIBUTES_ADAPTIVE,
#else
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* (bitmap) */
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
.bmAttributes = ISO_EP_IMPL_ATTRIBUTES_ASYNCH, /* Feedback data endpoint */
#endif
#endif
.wMaxPacketSize = HS_STREAM_FORMAT_OUTPUT_1_MAXPACKETSIZE,
.bInterval = 1,
@@ -1555,9 +1581,13 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
.bEndpointAddress = ENDPOINT_ADDRESS_OUT_AUDIO,
#ifdef XUA_ADAPTIVE
.bmAttributes = ISO_EP_ATTRIBUTES_ADAPTIVE, /* (bitmap) */
.bmAttributes = ISO_EP_ATTRIBUTES_ADAPTIVE,
#else
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* (bitmap) */
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
.bmAttributes = ISO_EP_IMPL_ATTRIBUTES_ASYNCH, /* Feedback data endpoint */
#endif
#endif
.wMaxPacketSize = HS_STREAM_FORMAT_OUTPUT_2_MAXPACKETSIZE,
.bInterval = 1,
@@ -1586,7 +1616,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
4, /* 6 bInterval. Only values <= 1 frame (4) supported by MS */
},
#endif
#endif
#endif /* OUTPUT_FORMAT_COUNT > 1 */
#if (OUTPUT_FORMAT_COUNT > 2)
/* Standard AS Interface Descriptor (4.9.1) (Alt) */
.Audio_Out_StreamInterface_Alt3 =
@@ -1639,10 +1669,15 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
.bEndpointAddress = ENDPOINT_ADDRESS_OUT_AUDIO,
#ifdef XUA_ADAPTIVE
.bmAttributes = ISO_EP_ATTRIBUTES_ADAPTIVE, /* (bitmap) */
.bmAttributes = ISO_EP_ATTRIBUTES_ADAPTIVE,
#else
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* (bitmap) */
#endif .wMaxPacketSize = HS_STREAM_FORMAT_OUTPUT_3_MAXPACKETSIZE,
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
.bmAttributes = ISO_EP_IMPL_ATTRIBUTES_ASYNCH, /* Feedback data endpoint */
#endif
#endif
.wMaxPacketSize = HS_STREAM_FORMAT_OUTPUT_3_MAXPACKETSIZE,
.bInterval = 1,
},
@@ -1734,11 +1769,11 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bLength = 0x07,
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
.bEndpointAddress = ENDPOINT_ADDRESS_IN_AUDIO,
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
#ifdef XUA_ADAPTIVE
#ifdef XUA_ADAPTIVE
.bmAttributes = ISO_EP_ATTRIBUTES_ADAPTIVE,
#else
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
.bmAttributes = ISO_EP_IMPL_ATTRIBUTES_ASYNCH, /* Feedback data endpoint */
#endif
@@ -1806,11 +1841,11 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bLength = 0x07,
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
.bEndpointAddress = ENDPOINT_ADDRESS_IN_AUDIO,
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
#ifdef XUA_ADAPTIVE
#ifdef XUA_ADAPTIVE
.bmAttributes = ISO_EP_ATTRIBUTES_ADAPTIVE,
#else
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
.bmAttributes = ISO_EP_IMPL_ATTRIBUTES_ASYNCH, /* Feedback data endpoint */
#endif
@@ -1830,7 +1865,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bLockDelayUnits = 0x02,
.wLockDelay = 0x0008,
},
#endif
#endif /* (INPUT_FORMAT_COUNT > 1) */
#if (INPUT_FORMAT_COUNT > 2)
/* Alternative 3 */
/* Standard AS Interface Descriptor (4.9.1) (Alt) */
@@ -1879,11 +1914,11 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bLength = 0x07,
.bDescriptorType = USB_DESCTYPE_ENDPOINT,
.bEndpointAddress = ENDPOINT_ADDRESS_IN_AUDIO,
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
#ifdef XUA_ADAPTIVE
#ifdef XUA_ADAPTIVE
.bmAttributes = ISO_EP_ATTRIBUTES_ADAPTIVE,
#else
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
.bmAttributes = ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
.bmAttributes = ISO_EP_IMPL_ATTRIBUTES_ASYNCH, /* Feedback data endpoint */
#endif
@@ -1903,9 +1938,9 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bLockDelayUnits = 0x02,
.wLockDelay = 0x0008,
},
#endif
#endif /* (INPUT_FORMAT_COUNT > 2) */
#endif /* #if(NUM_USB_CHAN_IN > 0) */
#ifdef MIDI
/* MIDI Descriptors */
/* Table B-3: MIDI Adapter Standard AC Interface Descriptor */
@@ -2024,7 +2059,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
0x01, /* 3 bNumEmbMIDIJack : Number of embedded MIDI OUT Jacks. (field size 1 bytes) */
0x03, /* 4 BaAssocJackID(1) : ID of the Embedded MIDI OUT Jack. (field size 1 bytes) */
},
#endif
#endif // MIDI
#if (XUA_DFU_EN == 1)
/* Standard DFU class Interface descriptor */
@@ -2052,14 +2087,14 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
0x09, /* 0 Size */
0x21, /* 1 bDescriptorType : DFU FUNCTIONAL */
0x07, /* 2 bmAttributes */
0xFA, /* 3 wDetachTimeOut */
0x00, /* 4 wDetachTimeOut */
DFU_DETACH_TIME_OUT & 0xFF, /* 3 wDetachTimeOut */
(DFU_DETACH_TIME_OUT >> 8) & 0xFF, /* 4 wDetachTimeOut */
0x40, /* 5 wTransferSize */
0x00, /* 6 wTransferSize */
0x10, /* 7 bcdDFUVersion */
0x01}, /* 7 bcdDFUVersion */
#endif
#endif
#endif /* (XUA_DFU_EN == 1) */
#ifdef IAP
/* Interface descriptor */
@@ -2168,7 +2203,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
#endif
#endif /* IAP */
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
.HID_Interface =
{
9, /* 0 bLength : Size of descriptor in Bytes */
@@ -2202,22 +2237,22 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
ENDPOINT_ADDRESS_IN_HID, /* 2 bEndpointAddress */
3, /* 3 bmAttributes (INTERRUPT) */
64, /* 4 wMaxPacketSize */
8, /* 6 bInterval */
ENDPOINT_INT_INTERVAL_IN_HID, /* 6 bInterval */
}
#endif
};
#endif
#endif /* (AUDIO_CLASS == 2) */
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
unsigned char hidDescriptor[] =
{
9, /* 0 bLength : Size of descriptor in Bytes */
0x09, /* 0 bLength : Size of descriptor in Bytes */
0x21, /* 1 bDescriptorType (HID) */
0x10, /* 2 bcdHID */
0x01, /* 3 bcdHID */
0, /* 4 bCountryCode */
1, /* 5 bNumDescriptors */
0x00, /* 4 bCountryCode */
0x01, /* 5 bNumDescriptors */
0x22, /* 6 bDescriptorType[0] (Report) */
sizeof(hidReportDescriptor) & 0xff, /* 7 wDescriptorLength[0] */
sizeof(hidReportDescriptor) >> 8, /* 8 wDescriptorLength[0] */
@@ -2277,6 +2312,8 @@ unsigned char cfgDesc_Null[] =
* To work around this we repeat MAX_FREQ_FS multiple times in some cases */
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
const unsigned num_freqs_a1 = MAX(3, (0
#if(MIN_FREQ <= 8000) && (MAX_FREQ_FS >= 8000)
+ 1
@@ -2324,18 +2361,13 @@ const unsigned num_freqs_a1 = MAX(3, (0
#define DFU_INTERFACES_A1 0
#endif
/* Total number of bytes returned for the class-specific AudioControl interface descriptor.
* Includes the combined length of this descriptor header and all Unit and Terminal descriptors
* For us this is IT -> FU -> OT * 2 and a header */
#define AC_TOTAL_LENGTH (AC_LENGTH + \
(INPUT_INTERFACES_A1 * (12 + ( (8 + NUM_USB_CHAN_IN_FS) * INPUT_VOLUME_CONTROL) + 9)) +\
(OUTPUT_INTERFACES_A1 * (12 + ( (8 + NUM_USB_CHAN_OUT_FS) * OUTPUT_VOLUME_CONTROL) + 9)))
#define STREAMING_INTERFACES (INPUT_INTERFACES_A1 + OUTPUT_INTERFACES_A1)
//#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
//#define CFG_TOTAL_LENGTH_A1 (18 + AC_TOTAL_LENGTH + (INPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (OUTPUT_INTERFACES_A1 * (58 + num_freqs_a1 * 3)) + CONTROL_INTERFACE_BYTES + DFU_INTERFACE_BYTES)
//#endif
#if( 0 < HID_CONTROLS )
#define HID_INTERFACE_BYTES ( 9 + 9 + 7 )
#define HID_INTERFACES_A1 1
#else
#define HID_INTERFACE_BYTES 0
#define HID_INTERFACES_A1 0
#endif
/* Total number of bytes returned for the class-specific AudioControl interface descriptor.
* Includes the combined length of this descriptor header and all Unit and Terminal descriptors
@@ -2348,12 +2380,27 @@ const unsigned num_freqs_a1 = MAX(3, (0
/* Number of interfaces for Audio 1.0 (+1 for control ) */
/* Note, this is different that INTERFACE_COUNT since we dont support items such as MIDI, iAP etc in UAC1 mode */
#define NUM_INTERFACES_A1 (1+INPUT_INTERFACES_A1 + OUTPUT_INTERFACES_A1+NUM_CONTROL_USB_INTERFACES+DFU_INTERFACES_A1)
#define NUM_INTERFACES_A1 (1 + INPUT_INTERFACES_A1 + OUTPUT_INTERFACES_A1 + NUM_CONTROL_USB_INTERFACES + DFU_INTERFACES_A1 + HID_INTERFACES_A1)
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
#define CFG_TOTAL_LENGTH_A1 (18 + AC_TOTAL_LENGTH + (INPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (OUTPUT_INTERFACES_A1 * (58 + num_freqs_a1 * 3)) + CONTROL_INTERFACE_BYTES + DFU_INTERFACE_BYTES)
#if ((NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP))
#define CFG_TOTAL_LENGTH_A1 (18 + AC_TOTAL_LENGTH + (INPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (OUTPUT_INTERFACES_A1 * (58 + num_freqs_a1 * 3)) + CONTROL_INTERFACE_BYTES + DFU_INTERFACE_BYTES + HID_INTERFACE_BYTES)
#else
#define CFG_TOTAL_LENGTH_A1 (18 + AC_TOTAL_LENGTH + (INPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (OUTPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + CONTROL_INTERFACE_BYTES + DFU_INTERFACE_BYTES)
#define CFG_TOTAL_LENGTH_A1 (18 + AC_TOTAL_LENGTH + (INPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (OUTPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + CONTROL_INTERFACE_BYTES + DFU_INTERFACE_BYTES + HID_INTERFACE_BYTES)
#endif
#ifdef XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES
#define AS_INTERFACE_BYTES (7)
#define INTERFACE_DESCRIPTOR_BYTES (9)
#define AS_FORMAT_TYPE_BYTES (17)
#define USB_AS_IN_INTERFACE_DESCRIPTOR_OFFSET_SUB_FRAME (18 + AC_TOTAL_LENGTH + (OUTPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (2*INTERFACE_DESCRIPTOR_BYTES) + (AS_INTERFACE_BYTES) + 5)
#define USB_AS_OUT_INTERFACE_DESCRIPTOR_OFFSET_SUB_FRAME (18 + AC_TOTAL_LENGTH + (2*INTERFACE_DESCRIPTOR_BYTES) + (AS_INTERFACE_BYTES) + 5)
#define USB_AS_IN_INTERFACE_DESCRIPTOR_OFFSET_FREQ (18 + AC_TOTAL_LENGTH + (OUTPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (2*INTERFACE_DESCRIPTOR_BYTES) + (AS_INTERFACE_BYTES) + 8)
#define USB_AS_OUT_INTERFACE_DESCRIPTOR_OFFSET_FREQ (18 + AC_TOTAL_LENGTH + (2*INTERFACE_DESCRIPTOR_BYTES) + (AS_INTERFACE_BYTES) + 8)
#define USB_AS_IN_EP_DESCRIPTOR_OFFSET_MAXPACKETSIZE (18 + AC_TOTAL_LENGTH + (OUTPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (2*INTERFACE_DESCRIPTOR_BYTES) + (AS_INTERFACE_BYTES) + (AS_FORMAT_TYPE_BYTES) + 4)
#define USB_AS_OUT_EP_DESCRIPTOR_OFFSET_MAXPACKETSIZE (18 + AC_TOTAL_LENGTH + (2*INTERFACE_DESCRIPTOR_BYTES) + (AS_INTERFACE_BYTES) + (AS_FORMAT_TYPE_BYTES) + 4)
#endif
#define CHARIFY_SR(x) (x & 0xff),((x & 0xff00)>> 8),((x & 0xff0000)>> 16)
@@ -2459,7 +2506,7 @@ unsigned char cfgDesc_Audio1[] =
#error NUM_USB_CHAN_OUT_FS > 8 currently supported
#endif
0x00, /* String table index */
#endif
#endif // OUTPUT_VOLUME_CONTROL == 1
/* CS_Interface Output Terminal Descriptor - Analogue out to speaker */
0x09,
@@ -2474,7 +2521,7 @@ unsigned char cfgDesc_Audio1[] =
0x01, /* sourceID - IT */
#endif
0x00, /* Unused */
#endif
#endif // NUM_USB_CHAN_OUT > 0
#if (NUM_USB_CHAN_IN > 0)
#define CHANNEL_CONFIG_IN (0xFF >> (8 - NUM_USB_CHAN_IN_FS))
@@ -2542,8 +2589,8 @@ unsigned char cfgDesc_Audio1[] =
#error NUM_USB_CHAN_IN_FS > 8 currently supported
#endif
0x00, /* String table index */
#endif
#endif
#endif // INPUT_VOLUME_CONTROL == 1
#endif // NUM_USB_CHAN_IN > 0
#if (NUM_USB_CHAN_OUT > 0)
/* Standard AS Interface Descriptor (4.5.1) */
@@ -2588,7 +2635,6 @@ unsigned char cfgDesc_Audio1[] =
NUM_USB_CHAN_OUT_FS, /* nrChannels */
FS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES, /* subFrameSize */
FS_STREAM_FORMAT_OUTPUT_1_RESOLUTION_BITS, /* bitResolution */
num_freqs_a1, /* SamFreqType - sample freq count */
/* Windows enum issue with <= two sample rates work around */
@@ -2645,16 +2691,20 @@ unsigned char cfgDesc_Audio1[] =
/* Standard AS Isochronous Audio Data Endpoint Descriptor 4.6.1.1 */
0x09,
0x05, /* ENDPOINT */
0x01, /* endpointAddress - D7, direction (0 OUT, 1 IN). D6..4 reserved (0). D3..0 endpoint no. */
ENDPOINT_ADDRESS_OUT_AUDIO, /* endpointAddress - D7, direction (0 OUT, 1 IN). D6..4 reserved (0). D3..0 endpoint no. */
#ifdef XUA_ADAPTIVE
ISO_EP_ATTRIBUTES_ADAPTIVE,
#else
ISO_EP_ATTRIBUTES_ASYNCH,
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
ISO_EP_IMPL_ATTRIBUTES_ASYNCH, /* Feedback data endpoint */
#endif
#endif
(FS_STREAM_FORMAT_OUTPUT_1_MAXPACKETSIZE&0xff), /* 4 wMaxPacketSize (Typically 294 bytes)*/
(FS_STREAM_FORMAT_OUTPUT_1_MAXPACKETSIZE&0xff00)>>8, /* 5 wMaxPacketSize */
0x01, /* bInterval */
0x00, /* bRefresh */
0x00, /* bRefresh */
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
ENDPOINT_ADDRESS_IN_FEEDBACK, /* bSynchAdddress - address of EP used to communicate sync info */
#else /* Bi-directional in/out device */
@@ -2688,7 +2738,7 @@ unsigned char cfgDesc_Audio1[] =
0x04, /* bRefresh 2^x */
0x0, /* bSynchAddress */
#endif
#endif
#endif // NUM_USB_CHAN_OUT > 0
#if (NUM_USB_CHAN_IN > 0)
/* Standard Interface Descriptor - Audio streaming IN */
@@ -2786,11 +2836,11 @@ unsigned char cfgDesc_Audio1[] =
0x09,
0x05, /* ENDPOINT */
ENDPOINT_ADDRESS_IN_AUDIO, /* EndpointAddress */
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
#ifdef XUA_ADAPTIVE
#ifdef XUA_ADAPTIVE
ISO_EP_ATTRIBUTES_ADAPTIVE,
#else
#if (NUM_USB_CHAN_IN == 0) || defined(UAC_FORCE_FEEDBACK_EP)
ISO_EP_ATTRIBUTES_ASYNCH, /* Iso, async, data endpoint */
#else
ISO_EP_IMPL_ATTRIBUTES_ASYNCH, /* Feedback data endpoint */
#endif
@@ -2813,7 +2863,7 @@ unsigned char cfgDesc_Audio1[] =
0x00, /* Undefined */
0x00, 0x00, /* Not used */
#endif // XUA_ADAPTIVE
#endif
#endif // NUM_USB_CHAN_IN > 0
#if (XUA_DFU_EN == 1) && (FORCE_UAC1_DFU == 1)
@@ -2834,8 +2884,8 @@ unsigned char cfgDesc_Audio1[] =
0x09, /* 0 Size */
0x21, /* 1 bDescriptorType : DFU FUNCTIONAL */
0x07, /* 2 bmAttributes */
0xFA, /* 3 wDetachTimeOut */
0x00, /* 4 wDetachTimeOut */
DFU_DETACH_TIME_OUT & 0xFF, /* 3 wDetachTimeOut */
(DFU_DETACH_TIME_OUT >> 8) & 0xFF, /* 4 wDetachTimeOut */
0x40, /* 5 wTransferSize */
0x00, /* 6 wTransferSize */
0x10, /* 7 bcdDFUVersion */
@@ -2855,7 +2905,40 @@ unsigned char cfgDesc_Audio1[] =
offsetof(StringDescTable_t, ctrlStr)/sizeof(char *), /* 8 iInterface */
#endif
#if( 0 < HID_CONTROLS )
/* HID interface descriptor */
0x09, /* 0 bLength : Size of descriptor in Bytes */
0x04, /* 1 bDescriptorType (Interface: 0x04)*/
INTERFACE_NUMBER_HID, /* 2 bInterfaceNumber : Number of interface */
0x00, /* 3 bAlternateSetting : Value used alternate interfaces using SetInterface Request */
0x01, /* 4: bNumEndpoints : Number of endpoitns for this interface (excluding 0) */
0x03, /* 5: bInterfaceClass */
0x00, /* 6: bInterfaceSubClass - no boot device */
0x00, /* 7: bInterfaceProtocol*/
0x00, /* 8 iInterface */
/* HID descriptor */
0x09, /* 0 bLength : Size of descriptor in Bytes */
0x21, /* 1 bDescriptorType (HID) */
0x10, /* 2 bcdHID */
0x01, /* 3 bcdHID */
0x00, /* 4 bCountryCode */
0x01, /* 5 bNumDescriptors */
0x22, /* 6 bDescriptorType[0] (Report) */
sizeof(hidReportDescriptor) & 0xff, /* 7 wDescriptorLength[0] */
sizeof(hidReportDescriptor) >> 8, /* 8 wDescriptorLength[0] */
/* HID Endpoint descriptor (IN) */
0x07, /* 0 bLength */
0x05, /* 1 bDescriptorType */
ENDPOINT_ADDRESS_IN_HID, /* 2 bEndpointAddress */
0x03, /* 3 bmAttributes (INTERRUPT) */
0x40, /* 4 wMaxPacketSize */
0x00, /* 5 wMaxPacketSize */
ENDPOINT_INT_INTERVAL_IN_HID, /* 6 bInterval */
#endif
};
#endif // (AUDIO_CLASS_FALLBACK) || (AUDIO_CLASS == 1)
#endif
#endif
#endif
#endif // _DEVICE_DESCRIPTORS_

View File

@@ -1,17 +1,18 @@
// Copyright (c) 2014-2018, XMOS Ltd, All rights reserved
// Copyright 2014-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _AUDIOREQUESTS_H_
#define _AUDIOREQUESTS_H_
#include <xccompat.h>
int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, REFERENCE_PARAM(USB_SetupPacket_t, sp), chanend c_audioControl,
int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, REFERENCE_PARAM(USB_SetupPacket_t, sp), NULLABLE_RESOURCE(chanend, c_audioControl),
NULLABLE_RESOURCE(chanend, c_mix_ctl), NULLABLE_RESOURCE(chanend, c_clk_ctl));
XUD_Result_t AudioClassRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, REFERENCE_PARAM(USB_SetupPacket_t, sp), chanend c_audioControl,
XUD_Result_t AudioClassRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, REFERENCE_PARAM(USB_SetupPacket_t, sp), NULLABLE_RESOURCE(chanend, c_audioControl),
NULLABLE_RESOURCE(chanend, c_mix_ctl), NULLABLE_RESOURCE(chanend, c_clk_ctl));
int AudioEndpointRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, REFERENCE_PARAM(USB_SetupPacket_t, sp), chanend c_audioControl,
int AudioEndpointRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, REFERENCE_PARAM(USB_SetupPacket_t, sp), NULLABLE_RESOURCE(chanend, c_audioControl),
NULLABLE_RESOURCE(chanend, c_mix_ctl), NULLABLE_RESOURCE(chanend, c_clk_ctl));

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
/**
* @brief Implements relevant requests from the USB Audio 2.0 Specification
* @author Ross Owen, XMOS Semiconductor
@@ -273,7 +274,7 @@ static void updateVol(int unitID, int channel, chanend ?c_mix_ctl)
* XUD_RES_RST for device reset
* else XUD_RES_ERR
*/
int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, chanend c_audioControl, chanend ?c_mix_ctl, chanend ?c_clk_ctl
int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, chanend ?c_audioControl, chanend ?c_mix_ctl, chanend ?c_clk_ctl
)
{
unsigned int buffer[32];
@@ -1071,7 +1072,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
#if (AUDIO_CLASS_FALLBACK != 0) || (AUDIO_CLASS == 1)
int AudioEndpointRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, chanend c_audioControl, chanend ?c_mix_ctl, chanend ?c_clk_ctl)
int AudioEndpointRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, chanend ?c_audioControl, chanend ?c_mix_ctl, chanend ?c_clk_ctl)
{
/* At this point we know:
* bmRequestType.Recipient = Endpoint
@@ -1159,7 +1160,7 @@ int AudioEndpointRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp
/* Handles the Audio Class 1.0 specific requests */
XUD_Result_t AudioClassRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, chanend c_audioControl, chanend ?c_mix_ctl, chanend ?c_clk_ctl
XUD_Result_t AudioClassRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, chanend ?c_audioControl, chanend ?c_mix_ctl, chanend ?c_clk_ctl
)
{
#if (OUTPUT_VOLUME_CONTROL == 1) || (INPUT_VOLUME_CONTROL == 1)

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2012-2018, XMOS Ltd, All rights reserved
// Copyright 2012-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua.h" /* Device specific defines */
#ifndef EXCLUDE_USB_AUDIO_MAIN
@@ -259,7 +260,7 @@ XUD_EpType epTypeTableIn[ENDPOINT_COUNT_IN] = { XUD_EPTYPE_CTL | XUD_STATUS_ENAB
#ifdef MIDI
XUD_EPTYPE_BUL,
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
XUD_EPTYPE_INT,
#endif
#ifdef IAP
@@ -400,7 +401,7 @@ VENDOR_REQUESTS_PARAMS_DEC_
c_clk_int,
#endif
c_sof, c_aud_ctl, p_for_mclk_count
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, c_xud_in[ENDPOINT_NUMBER_IN_HID]
#endif
#ifdef CHAN_BUFF_CTRL

View File

@@ -1,11 +1,12 @@
// Copyright (c) 2018, XMOS Ltd, All rights reserved
// Copyright 2018-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
//#include "devicedefines.h"
#define MAX_MIX_COUNT 8
#define MIX_INPUTS 18
#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
#define DOMIX_TOP(i) \
.cc_top doMix##i.function,doMix##i; \

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __mixer_h__
#define __mixer_h__

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <xs1.h>

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef N
#error "N must be defined before including repeat.h"
#endif

View File

@@ -1,15 +1,27 @@
// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
// Copyright 2015-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef MIC_ARRAY_CONF_H_
#define MIC_ARRAY_CONF_H_
#include "xua_conf_full.h"
// The default definition of MIC_ARRAY_MAX_FRAME_SIZE_LOG2 must appear in this file
// because an assembler file #includes it.
// The assembler does not understand C language syntax, only C pre-processor syntax.
#ifndef MIC_ARRAY_MAX_FRAME_SIZE_LOG2
#define MIC_ARRAY_MAX_FRAME_SIZE_LOG2 0
#define MIC_ARRAY_MAX_FRAME_SIZE_LOG2 (0)
#endif
#ifndef MIC_ARRAY_NUM_MICS
#define MIC_ARRAY_NUM_MICS (XUA_NUM_PDM_MICS)
#endif
// MIC_DUAL_FRAME_SIZE has no meaning if MIC_DUAL_ENABLED is false.
// Only define MIC_DUAL_FRAME_SIZE if MIC_DUAL_ENABLED is true.
#if defined(MIC_DUAL_ENABLED) && (MIC_DUAL_ENABLED != 0)
#ifndef MIC_DUAL_FRAME_SIZE
#define MIC_DUAL_FRAME_SIZE (XUA_MIC_FRAME_SIZE)
#endif
#endif
#endif /* MIC_ARRAY_CONF_H_ */

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2015-2019, XMOS Ltd, All rights reserved
// Copyright 2015-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua.h"
@@ -115,7 +116,7 @@ void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio)
dc[1].mic_gain_compensation[2]=0;
dc[1].mic_gain_compensation[3]=0;
dc[1].channel_count = 4;
dc[0].async_interface_enabled = 0;
dc[1].async_interface_enabled = 0;
mic_array_decimator_configure(c_ds_output, decimatorCount, dc);

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2016-2018, XMOS Ltd, All rights reserved
// Copyright 2016-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xua.h"

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2013-2018, XMOS Ltd, All rights reserved
// Copyright 2013-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <xs1.h>
#define __ASSEMBLER__ // Work around for bug #14118

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _AUDIOPORTS_H_
#define _AUDIOPORTS_H_

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <xs1.h>
#include <platform.h>
#include <print.h>
@@ -61,7 +62,7 @@ unsigned int divide, unsigned curSamFreq)
}
#endif
#if defined(__XS2A__)
#if defined(__XS2A__) || defined(__XS3A__)
unsafe
{
/* Clock bitclock clock block from master clock pin (divided) */

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2013-2018, XMOS Ltd, All rights reserved
// Copyright 2013-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef ARCH_U_POWER_SAVING_
#define ARCH_U_POWER_SAVING_

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2013-2018, XMOS Ltd, All rights reserved
// Copyright 2013-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#if (XUD_SERIES_SUPPORT==1)
#include "archU_powerSaving.h"

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2019, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include <xs1.h>
#include <platform.h>
#include <print.h>
@@ -74,7 +75,7 @@ void device_reboot(void)
}
}
#ifdef __XS2A__
#if defined(__XS2A__) || defined(__XS3A__)
/* Reset all even tiles, starting from the remote ones */
for(int tileNum = tileArrayLength-2; tileNum>=0; tileNum-=2)
#else
@@ -86,7 +87,7 @@ void device_reboot(void)
tileId = get_tile_id(tile[tileNum]);
/* Do not reboot local tile (or tiles residing on the same node) yet */
#ifdef __XS2A__
#if defined(__XS2A__) || defined(__XS3A__)
if((localTileNum | 1) != (tileNum | 1))
#else

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright 2011-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef __xc_ptr__
#define __xc_ptr__

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2012-2018, XMOS Ltd, All rights reserved
// Copyright 2012-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#include "xc_ptr.h"
extern inline xc_ptr array_to_xc_ptr(const unsigned a[]);

View File

@@ -1,4 +1,5 @@
// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
// Copyright 2015-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
#ifndef _UAC_HWRESOURCES_H_
#define _UAC_HWRESOURCES_H_

Some files were not shown because too many files have changed in this diff Show More