diff options
author | Tobias Jahnke <tobias.jahnke@microchip.com> | 2018-11-05 16:47:45 +0100 |
---|---|---|
committer | Tobias Jahnke <tobias.jahnke@microchip.com> | 2018-12-18 10:24:00 +0100 |
commit | c87208345f2f2943676cc2f336fe758e138278c2 (patch) | |
tree | 767319650470284f7a1cb453c10f0ab022641584 | |
parent | 6219b13241ce4476660bb87b548d88d417021192 (diff) |
4a-hal-unicens: updated json and removed conc acc.
- updated also app templates
- removed concurrent access for debugging
- removed interfacing for agl-service unicens for debugging
Signed-off-by: Tobias Jahnke <tobias.jahnke@microchip.com>
-rw-r--r-- | .gitignore | 1 | ||||
m--------- | app-controller | 0 | ||||
-rw-r--r-- | cfg/hal-4a-unicens-118.json | 38 | ||||
-rw-r--r-- | cfg/hal-4a-unicens-210.json | 38 | ||||
m--------- | conf.d/app-templates | 0 | ||||
-rw-r--r-- | plugin/most_unicens.c | 27 |
6 files changed, 87 insertions, 17 deletions
@@ -1,2 +1,3 @@ build/ nbproject/private/ +.vscode/ diff --git a/app-controller b/app-controller -Subproject 8d5398494b7ad3e6f20144513a82ba3afcae26e +Subproject ce075383309a30bb7084309014c7f1c2f699bf0 diff --git a/cfg/hal-4a-unicens-118.json b/cfg/hal-4a-unicens-118.json index 1a7e8e9..a45867e 100644 --- a/cfg/hal-4a-unicens-118.json +++ b/cfg/hal-4a-unicens-118.json @@ -5,7 +5,7 @@ "version": "0.9", "api": "4a-hal-unicens", "require": [ "alsacore", "UNICENS", "smixer" ], - "info": "4a HAL for UNICENS INICnet OS81118", + "info": "4a HAL for UNICENS for OS81118", "author": "Jonathan Aillet", "date": "2018-06-15" }, @@ -76,6 +76,7 @@ "halmixer": { "uid": "unicens", "mixerapi": "smixer", + "prefix": "ucs", "ramps": [ { "uid": "ramp-fast", @@ -100,7 +101,8 @@ "uid": "UNICENS", "path": "/dev/snd/by-id/usb-Microchip-SMSC_OS81118_0000-0000004C-02", "params": { - "rate": 48000 + "rate": 48000, + "format": "S16_LE" }, "sink": { "channels": [ @@ -209,7 +211,8 @@ "volume": 60, "mute": false, "params": { - "rate": 48000 + "rate": 48000, + "format": "S16_LE" } }, { @@ -219,7 +222,8 @@ "volume": 70, "mute": false, "params": { - "rate": 48000 + "rate": 48000, + "format": "S16_LE" } }, { @@ -229,7 +233,31 @@ "volume": 60, "mute": false, "params": { - "rate": 48000 + "rate": 48000, + "format": "S16_LE" + } + }, + { + "uid": "legacy", + "verb": "legacy", + "zone": "back-seats", + "source": "loop-legacy", + "volume": 50, + "mute": false, + "params": { + "rate": 48000, + "format": "S16_LE" + } + }, + { + "uid": "radio_stream", + "verb": "radio_stream", + "zone": "full-stereo", + "volume": 70, + "mute": true, + "params": { + "rate" : 48000, + "format": "S16_LE" } } ] diff --git a/cfg/hal-4a-unicens-210.json b/cfg/hal-4a-unicens-210.json index da5b647..1782aad 100644 --- a/cfg/hal-4a-unicens-210.json +++ b/cfg/hal-4a-unicens-210.json @@ -5,7 +5,7 @@ "version": "0.9", "api": "4a-hal-unicens", "require": [ "alsacore", "UNICENS", "smixer" ], - "info": "4a HAL for UNICENS INICnet OS81210", + "info": "4a HAL for UNICENS for OS81210", "author": "Jonathan Aillet", "date": "2018-06-15" }, @@ -76,6 +76,7 @@ "halmixer": { "uid": "unicens", "mixerapi": "smixer", + "prefix": "ucs", "ramps": [ { "uid": "ramp-fast", @@ -100,7 +101,8 @@ "uid": "UNICENS", "path": "/dev/snd/by-id/usb-Microchip-SMSC_OS81210_0200-0000000C-02", "params": { - "rate": 48000 + "rate": 48000, + "format": "S16_LE" }, "sink": { "channels": [ @@ -209,7 +211,8 @@ "volume": 60, "mute": false, "params": { - "rate": 48000 + "rate": 48000, + "format": "S16_LE" } }, { @@ -219,7 +222,8 @@ "volume": 70, "mute": false, "params": { - "rate": 48000 + "rate": 48000, + "format": "S16_LE" } }, { @@ -229,7 +233,31 @@ "volume": 60, "mute": false, "params": { - "rate": 48000 + "rate": 48000, + "format": "S16_LE" + } + }, + { + "uid": "legacy", + "verb": "legacy", + "zone": "back-seats", + "source": "loop-legacy", + "volume": 50, + "mute": false, + "params": { + "rate": 48000, + "format": "S16_LE" + } + }, + { + "uid": "radio_stream", + "verb": "radio_stream", + "zone": "full-stereo", + "volume": 70, + "mute": true, + "params": { + "rate" : 48000, + "format": "S16_LE" } } ] diff --git a/conf.d/app-templates b/conf.d/app-templates -Subproject 3dc85ecc9693a3a4af6d1143507f56b6800d523 +Subproject 35065ca3a59d327e68b18b5cf2080fb940b6ee4 diff --git a/plugin/most_unicens.c b/plugin/most_unicens.c index a99ce9e..2a36954 100644 --- a/plugin/most_unicens.c +++ b/plugin/most_unicens.c @@ -41,11 +41,10 @@ static uint8_t initialized = 0; // Call at initialisation time CTLP_ONLOAD(plugin, callbacks) -{ - AFB_ApiNotice(plugin->api, "4A-HAL-UNICENS: Plugin Register: uid='%s' 'info='%s'", plugin->uid, plugin->info); - - unicensHalApiHandle = plugin->api; - +{ + unicensHalApiHandle = plugin->api; + AFB_ApiNotice(unicensHalApiHandle, "4A-HAL-UNICENS: Plugin Register: uid='%s' 'info='%s'", plugin->uid, plugin->info); + return 0; } @@ -56,6 +55,9 @@ CTLP_CAPI(MasterVol, source, argsJ, queryJ) json_object *valueJ; AFB_ApiNotice(source->api, "4A-HAL-UNICENS: MasterVolume=%s", json_object_to_json_string(queryJ)); + + //debug + return 0; if(! initialized) { AFB_ApiWarning(source->api, "%s: Link to unicens binder is not initialized, can't set master volume, value=%s", __func__, json_object_get_string(queryJ)); @@ -85,6 +87,9 @@ CTLP_CAPI(MasterSwitch, source, argsJ, queryJ) json_object *valueJ; AFB_ApiNotice(source->api, "4A-HAL-UNICENS: MasterSwitch=%s", json_object_to_json_string(queryJ)); + + //debug + return 0; if(! initialized) { AFB_ApiWarning(source->api, "%s: Link to unicens binder is not initialized, can't set master switch, value=%s", __func__, json_object_get_string(queryJ)); @@ -126,6 +131,9 @@ CTLP_CAPI(PCMVol, source, argsJ, queryJ) json_object *valueJ; AFB_ApiNotice(source->api, "4A-HAL-UNICENS: PCMVolume=%s", json_object_to_json_string(queryJ)); + + //debug + return 0; if(! initialized) { AFB_ApiWarning(source->api, "%s: Link to unicens binder is not initialized, can't set PCM volume, value=%s", __func__, json_object_get_string(queryJ)); @@ -164,6 +172,9 @@ CTLP_CAPI(Init, source, argsJ, queryJ) AFB_ApiNotice(source->api, "4A-HAL-UNICENS: Initializing 4a plugin"); + // debug + return 0; +#if 1 if((err = wrap_volume_init())) { AFB_ApiError(source->api, "Failed to initialize wrapper for volume library"); return err; @@ -178,9 +189,8 @@ CTLP_CAPI(Init, source, argsJ, queryJ) // avoid muted volume to be persistent after boot. //wrap_volume_master(source->api, 80); //wrap_volume_pcm(source->api, pcm_volume, PCM_MAX_CHANNELS); - +#endif AFB_ApiNotice(source->api, "4A-HAL-UNICENS: Initializing plugin done.."); - initialized = 1; return 0; @@ -194,6 +204,9 @@ CTLP_CAPI(Events, source, argsJ, queryJ) int error = false; json_object *j_tmp = NULL; + //debug + return 0; + if (initialized == 0) { AFB_ApiError(source->api, "4A-HAL-UNICENS: Not initialized while receiving event query=%s", json_object_to_json_string(queryJ)); return 0; |