37 Commits

Author SHA1 Message Date
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
82f651d930 Mixer update for XS3 compat 2020-05-05 16:35:22 +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
13 changed files with 155 additions and 42 deletions

View File

@@ -1,6 +1,24 @@
lib_xua Change Log
==================
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
-----

4
Jenkinsfile vendored
View File

@@ -1,4 +1,4 @@
@Library('xmos_jenkins_shared_library@develop') _
@Library('xmos_jenkins_shared_library@v0.14.2') _
getApproval()
@@ -6,7 +6,7 @@ pipeline {
agent none
environment {
REPO = 'lib_xua'
VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}"
VIEW = getViewName(REPO)
}
options {
skipDefaultCheckout()

View File

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

View File

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

View File

@@ -442,6 +442,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.
*

View File

@@ -62,6 +62,16 @@ void XUA_Endpoint0_setProductStr(char * unsafe product_str);
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
@@ -72,34 +82,44 @@ void XUA_Endpoint0_setBcdDevice(unsigned short bcdDevice);
/** Function to get the Vendor string
*
* \param vid vendor string
* \return vendor string
*/
#ifdef __XC__
char * unsafe XUA_Endpoint0_getVendorStr();
#else
char * XUA_Endpoint0_getVendorStr(;
char * XUA_Endpoint0_getVendorStr();
#endif
/** Function to get the Product string
*
* \param pid Product string
*/
#ifdef __XC__
char * unsafe XUA_Endpoint0_getProductStr();
#else
char * XUA_Endpoint0_getProductStr(;
#endif
/** Function to get the Vendor string
*
* \return Vendor string
*/
unsigned short XUA_Endpoint0_getVendorId();
/** 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

View File

@@ -1,8 +1,8 @@
VERSION = 1.0.0
VERSION = 1.1.1
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)

View File

@@ -36,9 +36,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;

View File

@@ -118,6 +118,9 @@ char g_product_str[XUA_MAX_STR_LEN] = PRODUCT_STR_A2;
char g_product_str[XUA_MAX_STR_LEN] = PRODUCT_STR_A1;
#endif
/* Global variable for current USB Serial Number strings */
char g_serial_str[XUA_MAX_STR_LEN] = SERIAL_STR;
/* Subslot */
const unsigned g_subSlot_Out_HS[OUTPUT_FORMAT_COUNT] = {HS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES,
#if(OUTPUT_FORMAT_COUNT > 1)
@@ -234,6 +237,8 @@ void XUA_Endpoint0_setVendorId(unsigned short vid) {
}
void concatenateAndCopyStrings(char* string1, char* string2, char* string_buffer) {
debug_printf("concatenateAndCopyStrings() for \"%s\" and \"%s\"\n", string1, string2);
memset(string_buffer, '\0', strlen(string_buffer));
uint32_t remaining_buffer_size = MIN(strlen(string1), XUA_MAX_STR_LEN-1);
@@ -242,9 +247,11 @@ void concatenateAndCopyStrings(char* string1, char* string2, char* string_buffer
if (total_string_size==XUA_MAX_STR_LEN-1) {
remaining_buffer_size = XUA_MAX_STR_LEN-1-strlen(string1);
} else {
remaining_buffer_size = strlen(string1);
remaining_buffer_size = strlen(string2);
}
strncat(string_buffer, string2, remaining_buffer_size);
debug_printf("concatenateAndCopyStrings() creates \"%s\"\n", string_buffer);
}
void XUA_Endpoint0_setStrTable() {
@@ -285,18 +292,26 @@ void XUA_Endpoint0_setStrTable() {
concatenateAndCopyStrings(g_product_str, "", g_strTable.usbInputTermStr_Audio2);
concatenateAndCopyStrings(g_product_str, "", g_strTable.usbOutputTermStr_Audio2);
#endif
// update Serial strings
concatenateAndCopyStrings(g_serial_str, "", g_strTable.serialStr);
}
void XUA_Endpoint0_setVendorStr(char* vendor_str) {
debug_printf("XUA_Endpoint0_setVendorStr() with string %s", vendor_str);
debug_printf("XUA_Endpoint0_setVendorStr() with string %s\n", vendor_str);
concatenateAndCopyStrings(vendor_str, "", g_vendor_str);
}
void XUA_Endpoint0_setProductStr(char* product_str) {
debug_printf("XUA_Endpoint0_setProductStr() with string %s", product_str);
debug_printf("XUA_Endpoint0_setProductStr() with string %s\n", product_str);
concatenateAndCopyStrings(product_str, "", g_product_str);
}
void XUA_Endpoint0_setSerialStr(char* serial_str) {
debug_printf("XUA_Endpoint0_setSerialStr() with string %s\n", serial_str);
concatenateAndCopyStrings(serial_str, "", g_serial_str);
}
char* XUA_Endpoint0_getVendorStr() {
return g_strTable.vendorStr;
}
@@ -309,6 +324,10 @@ char* XUA_Endpoint0_getProductStr() {
#endif
}
char* XUA_Endpoint0_getSerialStr() {
return g_strTable.serialStr;
}
void XUA_Endpoint0_setProductId(unsigned short pid) {
#if (AUDIO_CLASS == 1)
devDesc_Audio1.idProduct = pid;

View File

@@ -40,6 +40,7 @@
#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)
@@ -334,7 +335,7 @@ StringDescTable_t g_strTable =
{
.langID = "\x09\x04", /* US English */
.vendorStr = XUA_VENDOR_EMPTY_STRING,
.serialStr = "",
.serialStr = XUA_SERIAL_EMPTY_STRING,
#if (AUDIO_CLASS == 2)
.productStr_Audio2 = XUA_PRODUCT_EMPTY_STRING,
.outputInterfaceStr_Audio2 = XUA_PRODUCT_EMPTY_STRING,
@@ -434,7 +435,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
@@ -470,7 +471,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 */
};
@@ -493,7 +494,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

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2018, XMOS Ltd, All rights reserved
// Copyright (c) 2018-2020, XMOS Ltd, All rights reserved
//#include "devicedefines.h"
#define MAX_MIX_COUNT 8

19
python/setup.py Normal file
View File

@@ -0,0 +1,19 @@
# Copyright (c) 2020, XMOS Ltd, All rights reserved
import setuptools
# Another repository might depend on python code defined in this one. The
# procedure to set up a suitable python environment for that repository may
# pip-install this one as editable using this setup.py file. To minimise the
# chance of version conflicts while ensuring a minimal degree of conformity,
# the 3rd-party modules listed here require the same major version and at
# least the same minor version as specified in the requirements.txt file.
# The same modules should appear in the requirements.txt file as given below.
setuptools.setup(
name='lib_xua',
packages=setuptools.find_packages(),
install_requires=[
'flake8~=3.8',
],
dependency_links=[
],
)

34
requirements.txt Normal file
View File

@@ -0,0 +1,34 @@
# python_version 3.7.6
#
# The parse_version_from_requirements() function in the installPipfile.groovy
# file of the Jenkins Shared Library uses the python_version comment to set
# the version of python used.
# Distributed (released) dependencies
#
# The python modules listed below specify a known working combination required
# by the python code in this repository. The procedure used to set up a
# suitable python environment for it installs the version of each module in
# the list. Using a specific version ensures a controlled infrastructure for
# development, testing and release of this repository.
#
# Another repository might depend on python code defined in this one. The
# procedure to set up a suitable python environment for that repository may
# pip-install this one as editable using this repository's setup.py file. The
# same modules should appear in the setup.py list as given below.
flake8==3.8.3
# Development dependencies
#
# Each link listed below specifies the path to a setup.py file which are
# installed in editable mode with '-e $PATH' (without the quotes).
#
# If python code in this repository depends on python code under development
# in another repository, then an entry for that other respository should
# appear in this list instead of the released dependencies list.
#
# If this repository uses the setup functionality (e.g., script entry points)
# of its own setup.py file, then this list must include an entry for that
# setup.py file, e.g., '-e .' or '-e ./python' (without the quotes).
-e ./python