From f83d651392b8556248600f2b1360b9306b845c3d Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Sun, 29 Apr 2018 20:52:58 +0200 Subject: Initial push work in progress --- conf.d/project/CMakeLists.txt | 22 ++ conf.d/project/etc/CMakeLists.txt | 31 +++ conf.d/project/etc/config-softmixer-4a.json | 81 ++++++++ conf.d/project/etc/fiberdyme_hal_sample.json | 287 +++++++++++++++++++++++++++ 4 files changed, 421 insertions(+) create mode 100644 conf.d/project/CMakeLists.txt create mode 100644 conf.d/project/etc/CMakeLists.txt create mode 100644 conf.d/project/etc/config-softmixer-4a.json create mode 100644 conf.d/project/etc/fiberdyme_hal_sample.json (limited to 'conf.d/project') diff --git a/conf.d/project/CMakeLists.txt b/conf.d/project/CMakeLists.txt new file mode 100644 index 0000000..28a0609 --- /dev/null +++ b/conf.d/project/CMakeLists.txt @@ -0,0 +1,22 @@ +########################################################################### +# Copyright 2015, 2016, 2017 IoT.bzh +# +# author: Fulup Ar Foll +# +# 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. +########################################################################### + + +# Include any directory not starting with _ +# ----------------------------------------------------- +PROJECT_SUBDIRS_ADD(${PROJECT_SRC_DIR_PATTERN}) diff --git a/conf.d/project/etc/CMakeLists.txt b/conf.d/project/etc/CMakeLists.txt new file mode 100644 index 0000000..378effc --- /dev/null +++ b/conf.d/project/etc/CMakeLists.txt @@ -0,0 +1,31 @@ +########################################################################### +# Copyright 2017 IoT.bzh +# +# author: Fulup Ar Foll +# +# 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(soft-mixer-config) + + 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/conf.d/project/etc/config-softmixer-4a.json b/conf.d/project/etc/config-softmixer-4a.json new file mode 100644 index 0000000..345dde4 --- /dev/null +++ b/conf.d/project/etc/config-softmixer-4a.json @@ -0,0 +1,81 @@ +{ + "schema": "To Be Defined", + "metadata": { + "uid": "Soft Mixer", + "version": "1.0", + "api": "soft-mixer", + "info": "Soft Mixer emulating hardware mixer", + "require": ["alsa-core"] + }, + "plugins": [ + { + "uid": "alsa-router", + "info": "Map alsa-loop subdevices to 4A HAL streams" + } + ], + + "sndcards": [ + { + "uid": "Focusrite_Scarlett_18i8", + "info": "Focusrite 18i8", + "device": "/dev/snd/by-id/usb-Focusrite_Scarlett_18i8_USB_10004EE6-00", + "action": { + "uid": "init-snd-card", + "function": "lua://init-focusrite" + }, + "channels": { + "sink": [ + { + "type": "FrontLeftFullRange", + "port": 0 + }, + { + "type": "FrontRightFullRange", + "port": 1 + }, + { + "type": "RearLeftFullRange", + "port": 2 + }, + { + "type": "FrontRightFullRange", + "port": 3 + }, + { + "type": "Center", + "port": 4 + }, + { + "type": "LFE", + "port": 5 + } + ], + "source": [ + { + "uid": "FrontRightMic", + "type": "Directional", + "port": 0 + } + ] + } + } + ], + + "streams": [{ + "uid": "alsa-loop", + "dev": "/dev/snd/by-path/platform-snd_aloop.0", + "subdev": 0, + "count": 8 + }], + + "controls": [ + { + "uid": "stream", + "function": "plugin://alsa-router/stream_ctl" + }, + { + "uid": "zone", + "function": "plugin://alsa-router/zone_ctl" + } + ] +} diff --git a/conf.d/project/etc/fiberdyme_hal_sample.json b/conf.d/project/etc/fiberdyme_hal_sample.json new file mode 100644 index 0000000..2614163 --- /dev/null +++ b/conf.d/project/etc/fiberdyme_hal_sample.json @@ -0,0 +1,287 @@ +{ + "$schema": "ToBeDone", + "metadata": { + "api": "fd-dsp", + "uid": "fiberdyne_dsp", + "info": "Fiberdyne DSP HAL for Xtensa HiFi2", + "version": "1.0", + "require": "alsacore" + }, + "plugins": [ + { + "uid": "fd-dsp-hifi2", + "info": "Fiberdyne DSP client library for HiFi2", + "basename": "fd-dsp-hifi2", + "ldpath": "./fd-dsp-hifi2" + } + ], + "comment": "These are per-stream, could look at alsa byte stream?", + "control": [ + { + "uid": "Volume", + "alsa": { + "name": "PCM Playback Volume", + "value": 50 + } + }, + { + "uid": "Mute", + "alsa": { + "name": "PCM Playback Switch", + "value": false + } + }, + { + "uid": "Bass", + "alsa": { + "name": "PCM Playback Bass", + "value": 50 + } + }, + { + "uid": "Mid", + "alsa": { + "name": "PCM Playback Mid", + "value": 50 + } + }, + { + "uid": "Treble", + "alsa": { + "name": "PCM Playback Treble", + "value": 50 + } + }, + { + "uid": "Balance", + "alsa": { + "name": "PCM Playback Balance", + "value": 50 + } + }, + { + "uid": "Fade", + "alsa": { + "name": "PCM Playback Fade", + "value": 50 + } + } + ], + "eqpoint": { + "action": [ + { + "uid": "eq-add-point", + "function": "plugin://fd-dsp-hifi2/eq_add_point" + }, + { + "uid": "eq-remove-point", + "function": "plugin://fd-dsp-hifi2/eq_remove_point" + } + ] + }, + "filter": { + "plugin": "fd-dsp-hifi2", + "action": [ + { + "uid": "filter-hip", + "function": "plugin://fd-dsp-hifi2/filter_hip" + } + ] + }, + "cards": { + "uid": "A", + "alsa": "xf-dsp-alsa:0,1", + "desc": "Xtensa R-Car HiFi2 DSP", + "action": { + "uid": "init-snd-card", + "function": "plugin://fd-dsp-hifi2/init-stereo" + }, + "channels": { + "sink": [ + { + "type": "FrontLeftFullRange", + "port": 0 + }, + { + "type": "FrontRightFullRange", + "port": 1 + }, + { + "type": "RearLeftFullRange", + "port": 2 + }, + { + "type": "FrontRightFullRange", + "port": 3 + }, + { + "type": "Center", + "port": 4 + }, + { + "type": "LFE", + "port": 5 + } + ], + "source": [ + { + "uid": "FrontRightMic", + "type": "Directional", + "port": 0 + } + ] + } + }, + "info": "This is totally an abstraction", + "zone": [ + { + "uid": "FrontSeat", + "type": "sink", + "mapping": [ + [ + "FrontRightMain", + "FrontRightHigh" + ], + [ + "FrontLeftMain", + "FrontLeftHigh" + ] + ] + }, + { + "uid": "RearSeat", + "type": "sink", + "mapping": [ + [ + "RearRightMain", + "RearRightHigh" + ], + [ + "RearLeftMain", + "RearLeftHigh" + ] + ] + }, + { + "uid": "DriverMic", + "type": "source", + "mapping": [ + [ + "FrontRightMic" + ] + ] + }, + { + "uid": "FullMicSetup", + "type":"source", + "mapping": + [ + [ "FrontLeftMic"], + [ "FrontRightMic"], + [ "RearLeftMic"], + [ "RearLeftMic"] + ] + } + { + "uid": "FiveOne", + "type": "sink", + "mapping": [ + [ + "FrontRightMain", + "FrontRightHigh" + ], + [ + "FrontLeftMain", + "FrontLeftHigh" + ], + [ + "RearRightMain", + "RearRightHigh" + ], + [ + "RearLeftMain", + "RearLeftHigh" + ], + [ + "Center" + ], + [ + "LFE" + ] + ] + }, + { + "uid": "StereoFour", + "type": "sink", + "mapping": [ + [ + "FrontRightMain", + "FrontRightHigh", + "RearRightMain", + "RearRightHigh" + ], + [ + "FrontLeftMain", + "FrontLeftHigh", + "RearLeftMain", + "RearLeftHigh" + ] + ] + } + ], + "streams": [ + { + "name": "speech-engine", + "profile": "profile-speech", + "source": { + "zone":"DriverMic", + "defaultconfig":{ + "mute": true + } + }, + "sink": { + "zone": "FrontSeat", + "defaultconfig": { + "volume": 50, + "mute": false, + "bass": 50, + "mid": 50, + "treble": 50, + "balance": 50, + "fade": 50 + } + } + }, + { + "name": "phone", + "profile": "test", + "source": { + "channels": 1, + "zone": "DriverMic", + "defaultconfig":{ + "volume":"25" + } + }, + "sink": { + "channels": 2, + "zone": "FrontSeat" + } + }, + { + "name": "stereo", + "profile": "profile-dynamic", + "sink": { + "channels": 2, + "zone": "StereoFour" + } + }, + { + "name": "5_1", + "profile": "profile-dynamic", + "sink": { + "channels": 6, + "zone": "FiveOne" + } + } + ] +} \ No newline at end of file -- cgit 1.2.3-korg