aboutsummaryrefslogtreecommitdiffstats
path: root/4a-hal-cfg-example
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-06-24 14:38:39 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-06-26 16:52:39 +0200
commitc6cb9e4064c05ded2c52f833d5e26ab42a03d1de (patch)
tree1af5e72f45b631f4cfe534d2f70b323d81f8fafc /4a-hal-cfg-example
parente62be7bd8ee0ad8fcd0c5a9f7c1f5831d789c5b4 (diff)
Use haldependencies to process and handle halmap
Use haldependencies section definition to process and to handle halmap section. That means that each 'halmap' control can use its own probed audio device card number using a targeted dependencies. Also, change halmap section definition to be able to handle several halmap defined with the same dependencies. Update example hal to match new json file format. BUG-AGL: SPEC-2329 Change-Id: I31997a037ee8f0e727e0a67866d651b988b85260 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal-cfg-example')
-rw-r--r--4a-hal-cfg-example/hal-4a-2ch-generic-usb.json75
1 files changed, 43 insertions, 32 deletions
diff --git a/4a-hal-cfg-example/hal-4a-2ch-generic-usb.json b/4a-hal-cfg-example/hal-4a-2ch-generic-usb.json
index ea7c00f..9fe4c1d 100644
--- a/4a-hal-cfg-example/hal-4a-2ch-generic-usb.json
+++ b/4a-hal-cfg-example/hal-4a-2ch-generic-usb.json
@@ -1,13 +1,13 @@
{
"$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json",
"metadata": {
- "uid": "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00",
- "version": "0.9",
+ "uid": "GENERIC-USB-4A-HAL",
+ "version": "0.99",
"api": "4a-hal-2ch-generic-usb",
"require": [ "alsacore", "smixer" ],
"info": "4a hal for 2ch generic USB device",
"author": "Jonathan Aillet",
- "date": "2018-06-13"
+ "date": "2019-06-25"
},
"resources": [
{
@@ -15,13 +15,13 @@
"info": "Bluealsa hal plugin",
"params": {
"sco": {
- "mic": "2CH-GENERIC-USB",
+ "mic": "CSL-CM106-8CH-USB",
"zone": "full-stereo",
"delayms": 800
},
"a2dp": {
- "zone": "full-stereo",
- "delayms": 500
+ "zone": "full-stereo",
+ "delayms": 500
}
},
"libs": ["hal-bluealsa.ctlso"]
@@ -34,34 +34,45 @@
"action": "api://4a-hal-manager#ping"
}
],
+ "haldependencies" : {
+ "uid" : "generic-usb",
+ "class" : "mandatory",
+ "cardPath" : "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00"
+ },
"halmap": [
{
- "uid": "agl-master-playback-volume",
- "alsa": {
- "name": "Speaker Playback Volume",
- "value": 80
- }
- },
- {
- "uid": "agl-master-playback-switch",
- "alsa": {
- "name": "Speaker Playback Switch",
- "value": 1
- }
- },
- {
- "uid": "agl-mic-capture-volume",
- "alsa": {
- "name": "Mic Capture Volume",
- "value": 80
- }
- },
- {
- "uid": "agl-mic-capture-switch",
- "alsa": {
- "name": "Mic Capture Switch",
- "value": 1
- }
+ "uid" : "halmap-generic-usb",
+ "target" : "generic-usb",
+ "controls" : [
+ {
+ "uid": "agl-master-playback-volume",
+ "alsa": {
+ "name": "Speaker Playback Volume",
+ "value": 80
+ }
+ },
+ {
+ "uid": "agl-master-playback-switch",
+ "alsa": {
+ "name": "Speaker Playback Switch",
+ "value": 1
+ }
+ },
+ {
+ "uid": "agl-master-capture-volume",
+ "alsa": {
+ "name": "Mic Capture Volume",
+ "value": 80
+ }
+ },
+ {
+ "uid": "agl-mic-capture-switch",
+ "alsa": {
+ "name": "Mic Capture Switch",
+ "value": 1
+ }
+ }
+ ]
}
],
"halmixer": {