diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-06-09 19:21:38 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-10-08 15:52:51 +0200 |
commit | a550e2a53728559a20b16dcd2a5eabf447340e6f (patch) | |
tree | f117cf73a568617e1db38e8217d66c3e2c4227e9 | |
parent | 22069b25c077945dce04cc4ed37b0ab9581b204d (diff) |
Remove test cfg files and add community cfg file
Now, the configuration files should be into these 2 directories :
- 4a-hal-cfg-community/
- 4a-hal-cfg-reference/
A configuration file has been added for 'CSL CM106 8ch USB' audio device
in community directory.
The test configuration files has been removed.
The README.md has been updated accordingly to these modifications.
Change-Id: I03d197a534b2a36bacea8e09d3098b5b92c8d3b7
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
-rw-r--r-- | 4a-hal-cfg-community/CMakeLists.txt (renamed from 4a-hal-references-boards-cfg/CMakeLists.txt) | 2 | ||||
-rw-r--r-- | 4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json (renamed from 4a-hal-references-boards-cfg/hal-4a-jon-home-usb-card.json) | 42 | ||||
-rw-r--r-- | 4a-hal-cfg-reference/CMakeLists.txt | 31 | ||||
-rw-r--r-- | 4a-hal-references-boards-cfg/hal-4a-jon-office-usb-headset.json | 199 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | conf.d/cmake/config.cmake | 2 |
6 files changed, 62 insertions, 216 deletions
diff --git a/4a-hal-references-boards-cfg/CMakeLists.txt b/4a-hal-cfg-community/CMakeLists.txt index f47201d..46b866e 100644 --- a/4a-hal-references-boards-cfg/CMakeLists.txt +++ b/4a-hal-cfg-community/CMakeLists.txt @@ -19,7 +19,7 @@ ################################################## # Control Policy Config file ################################################## -PROJECT_TARGET_ADD(4a-hal-references-boards-cfg) +PROJECT_TARGET_ADD(4a-hal-cfg-community) file(GLOB CONF_FILES "*.json") diff --git a/4a-hal-references-boards-cfg/hal-4a-jon-home-usb-card.json b/4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json index 802d11e..95274eb 100644 --- a/4a-hal-references-boards-cfg/hal-4a-jon-home-usb-card.json +++ b/4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json @@ -1,13 +1,13 @@ { "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", "metadata": { - "uid": "/dev/snd/by-id/usb-C-Media_Electronics_Inc._USB_Audio_Device-00", + "uid": "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00", "version": "0.9", - "api": "4a-hal-jon-home-usb-card", + "api": "4a-hal-csl-cm106-8ch-usb", "require": [ "alsacore", "softmixer" ], - "info": "4a hal for Jon's Home USB Card Audio", + "info": "4a hal for Jon's CSL CM106 8ch USB device", "author": "Jonathan Aillet", - "date": "2018-05-18" + "date": "2018-06-09" }, "onload": [ { @@ -31,17 +31,17 @@ ], "halmap": [ { - "uid": "agl-speaker-playback-switch", + "uid": "agl-mic-capture-volume", "alsa": { - "name": "Speaker Playback Switch", - "value": 12 + "name": "Mic Capture Volume", + "value": 60 } }, { "uid": "agl-speaker-playback-volume", "alsa": { - "numid": 6, - "value": 34 + "numid": 8, + "value": 80 } }, { @@ -59,15 +59,15 @@ "step": 1 } }, - "action": "api://4a-hal-jon-home-usb-card#ping" + "action": "api://4a-hal-csl-cm106-8ch-usb#ping" } ], "halmixer": { - "uid": "jon-home-usb-card-mixer", + "uid": "csl-cm106-8ch-usb", "mixerapi": "softmixer", "backend": { - "uid": "Jon-Home-USB-Card-Audio", - "devpath": "/dev/snd/by-id/usb-C-Media_Electronics_Inc._USB_Audio_Device-00", + "uid": "CSL-CM106-8CH-USB", + "devpath": "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00", "sink": [ { "uid": "front-right", @@ -146,6 +146,20 @@ }, "zones": [ { + "uid": "full-stereo", + "type": "playback", + "mapping": [ + { + "target": "front-right", + "channel": 0 + }, + { + "target": "front-left", + "channel": 1 + } + ] + }, + { "uid": "front-seats", "type": "playback", "mapping": [ @@ -163,7 +177,7 @@ "streams": [ { "uid": "multimedia", - "zone": "front-seats", + "zone": "full-stereo", "ramp": "ramp-slow", "volume": 60, "mute": false diff --git a/4a-hal-cfg-reference/CMakeLists.txt b/4a-hal-cfg-reference/CMakeLists.txt new file mode 100644 index 0000000..c9eb28d --- /dev/null +++ b/4a-hal-cfg-reference/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-reference) +# +# 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-references-boards-cfg/hal-4a-jon-office-usb-headset.json b/4a-hal-references-boards-cfg/hal-4a-jon-office-usb-headset.json deleted file mode 100644 index 1ab8324..0000000 --- a/4a-hal-references-boards-cfg/hal-4a-jon-office-usb-headset.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", - "metadata": { - "uid": "/dev/snd/by-id/usb-Plantronics_Plantronics_.Audio_655_DSP-00", - "version": "0.9", - "api": "4a-hal-jon-office-usb-headset", - "require": [ "alsacore", "softmixer" ], - "info": "4a hal for Jon's Office USB Headset Audio", - "author": "Jonathan Aillet", - "date": "2018-05-18" - }, - "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-speaker-playback-switch", - "alsa": { - "name": "Speaker Playback Switch", - "value": 12 - } - }, - { - "uid": "agl-speaker-playback-volume", - "alsa": { - "numid": 7, - "value": 34 - } - }, - { - "uid": "hal-ping", - "info": "ping this hal through alsa", - "alsa": { - "name": "Hal-Ping", - "value": 20, - "create": - { - "type": "INTEGER", - "count": 1, - "minval": 0, - "maxval": 20, - "step": 1 - } - }, - "action": "api://4a-hal-jon-home-usb-card#ping" - } - ], - "halmixer": { - "uid": "jon-office-usb-headset-mixer", - "mixerapi": "softmixer", - "backend": { - "uid": "Jon-Office-USB-Headset-Audio", - "devpath": "/dev/snd/by-id/usb-Plantronics_Plantronics_.Audio_655_DSP-00", - "sink": [ - { - "uid": "front-right", - "port": 0 - }, - { - "uid": "front-left", - "port": 1 - } - ], - "params": { - "rate": 44100 - } - }, - "frontend" : { - "uid": "Alsa-Loop", - "devpath": "/dev/snd/by-path/platform-snd_aloop.0", - "params": { - "rate": 44100 - }, - "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": "front-seats", - "type": "playback", - "mapping": [ - { - "target": "front-right", - "channel": 0 - }, - { - "target": "front-left", - "channel": 1 - } - ] - } - ], - "streams": [ - { - "uid": "multimedia", - "zone": "front-seats", - "ramp": "ramp-slow", - "volume": 60, - "mute": false, - "params": { - "rate": 44100 - } - }, - { - "uid": "navigation", - "zone": "front-seats", - "ramp": "ramp-normal", - "volume": 70, - "mute": false, - "params": { - "rate": 44100 - } - }, - { - "uid": "emergency", - "zone": "front-seats", - "ramp": "ramp-fast", - "volume": 80, - "mute": false, - "params": { - "rate": 44100 - } - } - ] - } -} @@ -56,7 +56,7 @@ sudo modprobe snd-aloop #### Information about audio json configuration files * All audio hardware configuration files are a json description of your audio devices. -* They all must be in ./4a-hal-references-boards-cfg/ and must begin with 'hal-4a'. +* They all must be in ./4a-hal-cfg-reference or ./4a-hal-cfg-community and must begin with 'hal-4a'. * You can found some examples of these configurations in this directory. * Each configuration file found at startup will create a new hal with its own api. * At 'init-mixer' hal command, your mixer configuration will be sent. diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index db6d912..eb64358 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -130,7 +130,7 @@ set(CONTROL_SUPPORT_LUA 1 CACHE BOOL "Active or not LUA Support") # CACHE STRING "Compilation flags for RELEASE build type.") add_definitions(-DCTL_PLUGIN_MAGIC=7053042648) -add_definitions(-DCONTROL_CONFIG_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/4a-hal-references-boards-cfg:${CMAKE_BINARY_DIR}/package/etc") +add_definitions(-DCONTROL_CONFIG_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/4a-hal-cfg-community:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/4a-hal-cfg-reference:${CMAKE_BINARY_DIR}/package/etc") add_definitions(-DCONTROL_PLUGIN_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/plugins/lib:${CMAKE_BINARY_DIR}/package/lib/plugins") add_definitions(-DCONTROL_LUA_PATH="${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/plugins/lua:${CMAKE_BINARY_DIR}/package/data") |