summaryrefslogtreecommitdiffstats
path: root/4a-hal-cfg-reference/hal-4a-m3ulcbkf-radio-to-2ch.json
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-07-11 15:00:39 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-10-08 15:55:56 +0200
commitd8144cde8fb4c3d33fef46b47406074b94915cad (patch)
tree3e6ddd7f9457b1a012eb59d10dde237905aa25bc /4a-hal-cfg-reference/hal-4a-m3ulcbkf-radio-to-2ch.json
parentfffa3ac6d94a091ba8a0d3af6f69ceda8e782bcf (diff)
Added a radio to 2 channels playback .json example
This files is an example on how to make the softmixer directly read from a capture device. In that particular example, the capture is the radio capture of the kingfisher board, and the playback is the ak4613 codecs. The stream rate and format must match the capture capablities. Change-Id: Id9796f73299a83822bb80878db6517cadf8001b6 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to '4a-hal-cfg-reference/hal-4a-m3ulcbkf-radio-to-2ch.json')
-rw-r--r--4a-hal-cfg-reference/hal-4a-m3ulcbkf-radio-to-2ch.json167
1 files changed, 167 insertions, 0 deletions
diff --git a/4a-hal-cfg-reference/hal-4a-m3ulcbkf-radio-to-2ch.json b/4a-hal-cfg-reference/hal-4a-m3ulcbkf-radio-to-2ch.json
new file mode 100644
index 0000000..d520d02
--- /dev/null
+++ b/4a-hal-cfg-reference/hal-4a-m3ulcbkf-radio-to-2ch.json
@@ -0,0 +1,167 @@
+{
+ "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json",
+ "metadata": {
+ "uid": "/dev/snd/by-path/platform-sound@1",
+ "version": "0.9",
+ "api": "4a-hal-m3ulcb-radio-to-2ch",
+ "require": [ "alsacore", "smixer" ],
+ "info": "4a hal for Rcar M3 device",
+ "author": "Thierry Bultel",
+ "date": "2018-07-11"
+ },
+ "controls": [
+ {
+ "uid": "ping",
+ "info": "Ping hal",
+ "action": "api://4a-hal-manager#ping"
+ }
+ ],
+ "halmap": [
+ {
+ "uid": "agl-master-playback-volume",
+ "alsa": {
+ "name": "Digital Playback Volume1",
+ "value": 80
+ }
+ },
+ {
+ "uid": "agl-pcm-playback-volume",
+ "alsa": {
+ "name": "Digital Playback Volume1",
+ "value": 80
+ }
+ },
+ {
+ "uid": "agl-pcm-playback-switch",
+ "alsa": {
+ "name": "SRC Out Rate Switch",
+ "value": 1
+ }
+ },
+ {
+ "uid": "agl-capture-volume",
+ "alsa": {
+ "name": "DVC In Capture Volume"
+ }
+ }
+ ],
+ "halmixer": {
+ "uid": "rcar-m3",
+ "mixerapi": "smixer",
+ "ramps": [
+ {
+ "uid": "ramp-very-fast",
+ "delay": 50,
+ "up": 6,
+ "down": 10
+ },
+ {
+ "uid": "ramp-fast",
+ "delay": 50,
+ "up": 2,
+ "down": 10
+ },
+ {
+ "uid": "ramp-normal",
+ "delay": 50,
+ "up": 2,
+ "down": 4
+ },
+ {
+ "uid": "ramp-slow",
+ "delay": 50,
+ "up": 2,
+ "down": 2
+ },
+ {
+ "uid": "ramp-very-slow",
+ "delay": 100,
+ "up": 1,
+ "down": 1
+ }
+ ],
+ "playbacks" : [
+ {
+ "uid": "AK4613",
+ "path": "/dev/snd/by-path/platform-sound@1",
+ "params": {
+ "rate": 48000,
+ "format": "S24_LE"
+ },
+ "sink": {
+ "controls": {
+ "volume": {
+ "name": "DVC Out Playback Volume",
+ "value": 81
+ },
+ "mute": {
+ "name": "SRC Out Rate Switch"
+ }
+ },
+ "channels": [
+ {
+ "uid": "front-right-m3",
+ "port": 0
+ },
+ {
+ "uid": "front-left-m3",
+ "port": 1
+ }
+ ]
+ }
+ }
+ ],
+ "captures": [
+ {
+ "uid": "radio",
+ "path": "/dev/snd/by-path/platform-sound@2",
+ "params": {
+
+ "channels": 2
+ },
+ "source": {
+ "channels": [
+ {
+ "uid": "radio-right",
+ "port": 0
+ },
+ {
+ "uid": "radio-left",
+ "port": 1
+ }
+ ]
+ }
+ }
+ ],
+ "zones": [
+ {
+ "uid": "stereo-2",
+ "sink": [
+ {
+ "target": "front-right-m3",
+ "channel": 0
+ },
+ {
+ "target": "front-left-m3",
+ "channel": 1
+ }
+ ]
+ }
+ ],
+ "streams": [
+ {
+ "uid": "radio_stream",
+ "verb": "radio_stream",
+ "zone": "stereo-2",
+ "source" : "radio",
+ "volume": 40,
+ "mute": true,
+ "params": {
+ "rate" : 48000,
+ "format": "S16_LE",
+ "channels": 2
+ }
+ }
+ ]
+ }
+}