From: Tobias Jahnke Date: Wed, 23 Aug 2017 14:59:36 +0000 (+0200) Subject: initialze muted, improved trace on i2c failure X-Git-Tag: 4.99.3~20 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=81124d50004ee8c0a141771c4b59a79b1a9ec4f1;p=apps%2Fagl-service-unicens.git initialze muted, improved trace on i2c failure --- diff --git a/README.md b/README.md index 109d260..b74a633 100644 --- a/README.md +++ b/README.md @@ -154,4 +154,19 @@ Note: remote-target-populate will Note that Netbeans impose to set debug directory to ./build/pkgout or it won't find binding symbols for source debugging +# Default Volume of Amplifiers +The binding currently supports two use cases for amplifiers. +1. Amplifiers are initialized with a default volume. The head unit uses software volume + to change the volume of streaming data. +2. Amplifiers are initialized muted. The head unit uses hardware volume (e.g. HAL-MOST-UNICENS) + to change the volume of amplifiers remotely. +Use case 2 is the default use case. If you like to use this binding without hardware volume support +please adopt the ```config_multichannel_audio_kit.xml``` as explained below. + +``` + + + + +``` diff --git a/conf.d/app-templates b/conf.d/app-templates index 9c71a76..aa763dd 160000 --- a/conf.d/app-templates +++ b/conf.d/app-templates @@ -1 +1 @@ -Subproject commit 9c71a765f0e4f53a6bbae5f550515b93eb9d7c53 +Subproject commit aa763ddec685dc44bcb5d44718d78f3692d4f0dc diff --git a/data/config_multichannel_audio_kit.xml b/data/config_multichannel_audio_kit.xml index a248607..14da758 100644 --- a/data/config_multichannel_audio_kit.xml +++ b/data/config_multichannel_audio_kit.xml @@ -74,7 +74,9 @@ - + + + diff --git a/ucs2-interface/ucs_lib_interf.c b/ucs2-interface/ucs_lib_interf.c index 9e7167d..ad256e3 100644 --- a/ucs2-interface/ucs_lib_interf.c +++ b/ucs2-interface/ucs_lib_interf.c @@ -174,6 +174,7 @@ bool UCSI_ProcessRxData(UCSI_Data_t *my, void UCSI_Service(UCSI_Data_t *my) { + Ucs_Return_t ret; UnicensCmdEntry_t *e; bool popEntry = true; /*Set to false in specific case, where function will callback asynchrony.*/ assert(MAGIC == my->magic); @@ -218,12 +219,13 @@ void UCSI_Service(UCSI_Data_t *my) UCSI_CB_OnUserMessage(my->tag, true, "UnicensCmd_GpioWritePort failed", 0); break; case UnicensCmd_I2CWrite: - if (UCS_RET_SUCCESS == Ucs_I2c_WritePort(my->unicens, e->val.I2CWrite.destination, 0x0F00, + ret = Ucs_I2c_WritePort(my->unicens, e->val.I2CWrite.destination, 0x0F00, (e->val.I2CWrite.isBurst ? UCS_I2C_BURST_MODE : UCS_I2C_DEFAULT_MODE), e->val.I2CWrite.blockCount, - e->val.I2CWrite.slaveAddr, e->val.I2CWrite.timeout, e->val.I2CWrite.dataLen, e->val.I2CWrite.data, OnUcsI2CWrite)) + e->val.I2CWrite.slaveAddr, e->val.I2CWrite.timeout, e->val.I2CWrite.dataLen, e->val.I2CWrite.data, OnUcsI2CWrite); + if (UCS_RET_SUCCESS == ret) popEntry = false; else { - UCSI_CB_OnUserMessage(my->tag, true, "Ucs_I2c_WritePort failed", 0); + UCSI_CB_OnUserMessage(my->tag, true, "Ucs_I2c_WritePort failed ret=%d", 1, ret); assert(e->val.I2CWrite.result_fptr != NULL); e->val.I2CWrite.result_fptr(NULL /*processing error*/, e->val.I2CWrite.request_ptr); }