diff options
author | Tobias Jahnke <tobias.jahnke@microchip.com> | 2018-10-10 15:52:57 +0200 |
---|---|---|
committer | Tobias Jahnke <tobias.jahnke@microchip.com> | 2018-10-12 12:32:24 +0000 |
commit | 178a830b8ad85813b7bf0b271be79f3a8d3a6277 (patch) | |
tree | 8d31174db1ff79796c91588c2fc47fe1fbdad648 /MOST_UNICENS/ucs2-vol/inc | |
parent | f938776e3cdeba1375a866e12f66a5b9c4151627 (diff) |
4a-hal-unicens: add Fiberdyne Master Volumeflounder_6.0.3flounder_6.0.2flounder/6.0.3flounder/6.0.26.0.36.0.2
Bug-AGL: SPEC-1758
As preparation before introducing UNICENS 4a plugin:
- Init volume library at first
- Add fiberdyne master volume
- Introduce commands sent by control messages
- Removes outdated controls
- Known issue: turn ALSA volume above "93" to hear some sound
Change-Id: I591c6b109a51c9da602ad08514b67c2ec573e09c
Signed-off-by: Tobias Jahnke <tobias.jahnke@microchip.com>
Diffstat (limited to 'MOST_UNICENS/ucs2-vol/inc')
-rw-r--r-- | MOST_UNICENS/ucs2-vol/inc/device_value.h | 7 | ||||
-rw-r--r-- | MOST_UNICENS/ucs2-vol/inc/libmostvolume.h | 3 | ||||
-rw-r--r-- | MOST_UNICENS/ucs2-vol/inc/setup.h | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/MOST_UNICENS/ucs2-vol/inc/device_value.h b/MOST_UNICENS/ucs2-vol/inc/device_value.h index bc8f142..c2fe0b1 100644 --- a/MOST_UNICENS/ucs2-vol/inc/device_value.h +++ b/MOST_UNICENS/ucs2-vol/inc/device_value.h @@ -53,13 +53,14 @@ struct STxMessage { enum DeviceValueType { DEVICE_VAL_MASTER = 0, DEVICE_VAL_LEFT = 1, - DEVICE_VAL_RIGHT = 2 + DEVICE_VAL_RIGHT = 2, + DEVICE_VAL_FIBERDYNE_MASTER = 3 }; class CDeviceValue { public: - CDeviceValue(uint16_t address, DeviceValueType type, uint16_t key); + CDeviceValue(uint16_t address, DeviceValueType type, uint16_t key, bool is_i2c); virtual ~CDeviceValue(); uint16_t GetKey(){return _key;} @@ -72,6 +73,7 @@ public: bool FireUpdateMessage(lib_most_volume_writei2c_cb_t writei2c_fptr, lib_most_volume_writei2c_result_cb_t result_fptr, void *result_user_ptr);// fires message & updates actual value + bool FireControlMessage(lib_most_volume_sendmessage_cb_t sendmsg_fptr); void SetAvailable(bool active){this->_is_available = active; _actual_value = 0x01u;} bool IsAvailable() {return this->_is_available;} @@ -84,6 +86,7 @@ private: bool _is_available; // related node is available bool _is_busy; // do not update while busy + bool _is_i2c; DeviceValueType _type; // determines the remote i2c command uint16_t _key; // lookup key uint16_t _address; // target node/group address diff --git a/MOST_UNICENS/ucs2-vol/inc/libmostvolume.h b/MOST_UNICENS/ucs2-vol/inc/libmostvolume.h index 1147993..5335754 100644 --- a/MOST_UNICENS/ucs2-vol/inc/libmostvolume.h +++ b/MOST_UNICENS/ucs2-vol/inc/libmostvolume.h @@ -63,9 +63,12 @@ typedef int (*lib_most_volume_writei2c_cb_t)(uint16_t node, uint8_t *data_ptr, u lib_most_volume_writei2c_result_cb_t result_fptr, void *result_user_ptr); +typedef int (*lib_most_volume_sendmessage_cb_t)(uint16_t node, uint16_t msgid, uint8_t *data_ptr, uint8_t data_sz); + typedef struct lib_most_volume_init_ { lib_most_volume_service_cb_t service_cb; lib_most_volume_writei2c_cb_t writei2c_cb; + lib_most_volume_sendmessage_cb_t sendmsg_cb; } lib_most_volume_init_t; diff --git a/MOST_UNICENS/ucs2-vol/inc/setup.h b/MOST_UNICENS/ucs2-vol/inc/setup.h index e7cda01..3be8bf4 100644 --- a/MOST_UNICENS/ucs2-vol/inc/setup.h +++ b/MOST_UNICENS/ucs2-vol/inc/setup.h @@ -51,6 +51,8 @@ private: CDeviceValue _volume_amp_272_m; CDeviceValue _volume_amp_272_l; CDeviceValue _volume_amp_272_r; + + CDeviceValue _volume_amp_510_m; CDeviceContainer _value_container; lib_most_volume_init_t init_data; |