aboutsummaryrefslogtreecommitdiffstats
path: root/4a-hal-cfg-community
diff options
context:
space:
mode:
Diffstat (limited to '4a-hal-cfg-community')
-rw-r--r--4a-hal-cfg-community/CMakeLists.txt31
-rw-r--r--4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json201
2 files changed, 232 insertions, 0 deletions
diff --git a/4a-hal-cfg-community/CMakeLists.txt b/4a-hal-cfg-community/CMakeLists.txt
new file mode 100644
index 0000000..46b866e
--- /dev/null
+++ b/4a-hal-cfg-community/CMakeLists.txt
@@ -0,0 +1,31 @@
+###########################################################################
+# Copyright 2017, 2018 IoT.bzh
+#
+# author: Fulup Ar Foll <fulup@iot.bzh>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###########################################################################
+
+##################################################
+# Control Policy Config file
+##################################################
+PROJECT_TARGET_ADD(4a-hal-cfg-community)
+
+ file(GLOB CONF_FILES "*.json")
+
+ add_input_files("${CONF_FILES}")
+
+ SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
+ LABELS "BINDING-CONFIG"
+ OUTPUT_NAME ${TARGET_NAME}
+ )
diff --git a/4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json b/4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json
new file mode 100644
index 0000000..95274eb
--- /dev/null
+++ b/4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json
@@ -0,0 +1,201 @@
+{
+ "$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",
+ "api": "4a-hal-csl-cm106-8ch-usb",
+ "require": [ "alsacore", "softmixer" ],
+ "info": "4a hal for Jon's CSL CM106 8ch USB device",
+ "author": "Jonathan Aillet",
+ "date": "2018-06-09"
+ },
+ "onload": [
+ {
+ "uid": "init-audio-hal",
+ "info": "Init current HAL",
+ "action": "api://4a-hal-manager#ping"
+ }
+ ],
+ "controls": [
+ {
+ "uid": "ping",
+ "info": "Ping hal",
+ "action": "api://4a-hal-manager#ping"
+ }
+ ],
+ "events": [
+ {
+ "uid": "api/status_changed",
+ "action": "api://4a-hal-manager#ping"
+ }
+ ],
+ "halmap": [
+ {
+ "uid": "agl-mic-capture-volume",
+ "alsa": {
+ "name": "Mic Capture Volume",
+ "value": 60
+ }
+ },
+ {
+ "uid": "agl-speaker-playback-volume",
+ "alsa": {
+ "numid": 8,
+ "value": 80
+ }
+ },
+ {
+ "uid": "hal-ping",
+ "info": "ping this hal through alsa",
+ "alsa": {
+ "name": "Hal-Ping",
+ "value": 20,
+ "create":
+ {
+ "type": "INTEGER",
+ "count": 1,
+ "minval": 0,
+ "maxval": 100,
+ "step": 1
+ }
+ },
+ "action": "api://4a-hal-csl-cm106-8ch-usb#ping"
+ }
+ ],
+ "halmixer": {
+ "uid": "csl-cm106-8ch-usb",
+ "mixerapi": "softmixer",
+ "backend": {
+ "uid": "CSL-CM106-8CH-USB",
+ "devpath": "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00",
+ "sink": [
+ {
+ "uid": "front-right",
+ "port": 0
+ },
+ {
+ "uid": "front-left",
+ "port": 1
+ }
+ ]
+ },
+ "frontend" : {
+ "uid": "Alsa-Loop",
+ "devpath": "/dev/snd/by-path/platform-snd_aloop.0",
+ "params": {
+ "rate": 48000
+ },
+ "ramps": [
+ {
+ "uid": "ramp-fast",
+ "delay": 50,
+ "up": 10,
+ "down": 3
+ },
+ {
+ "uid": "ramp-slow",
+ "delay": 250,
+ "up": 3,
+ "down": 1
+ },
+ {
+ "uid": "ramp-normal",
+ "delay": 100,
+ "up": 6,
+ "down": 2
+ }
+ ],
+ "devices": {
+ "playback": 0,
+ "capture": 1
+ },
+ "subdevs": [
+ {
+ "subdev": 0,
+ "numid": 51
+ },
+ {
+ "subdev": 1,
+ "numid": 57
+ },
+ {
+ "subdev": 2,
+ "numid": 63
+ },
+ {
+ "subdev": 3,
+ "numid": 69
+ },
+ {
+ "subdev": 4,
+ "numid": 75
+ },
+ {
+ "subdev": 5,
+ "numid": 81
+ },
+ {
+ "subdev": 6,
+ "numid": 87
+ },
+ {
+ "subdev": 7,
+ "numid": 93
+ }
+ ]
+ },
+ "zones": [
+ {
+ "uid": "full-stereo",
+ "type": "playback",
+ "mapping": [
+ {
+ "target": "front-right",
+ "channel": 0
+ },
+ {
+ "target": "front-left",
+ "channel": 1
+ }
+ ]
+ },
+ {
+ "uid": "front-seats",
+ "type": "playback",
+ "mapping": [
+ {
+ "target": "front-right",
+ "channel": 0
+ },
+ {
+ "target": "front-left",
+ "channel": 1
+ }
+ ]
+ }
+ ],
+ "streams": [
+ {
+ "uid": "multimedia",
+ "zone": "full-stereo",
+ "ramp": "ramp-slow",
+ "volume": 60,
+ "mute": false
+ },
+ {
+ "uid": "navigation",
+ "zone": "front-seats",
+ "ramp": "ramp-normal",
+ "volume": 70,
+ "mute": false
+ },
+ {
+ "uid": "emergency",
+ "zone": "front-seats",
+ "ramp": "ramp-fast",
+ "volume": 80,
+ "mute": false
+ }
+ ]
+ }
+}