{ "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json", "metadata": { "uid": "EXAMPLE-4A-HAL", "version": "0.99", "api": "4a-hal-example", "require": [ "alsacore", "smixer" ], "info": "4a hal design to show all 4a-hal binding functionalities related to json configuration files", "author": "Jonathan Aillet", "date": "2019-07-17" }, "resources": [ { "uid": "hal-bluealsa", "info": "Bluealsa hal plugin", "params": { "sco": { "mic": "CSL-CM106-8CH-USB", "zone": "full-stereo", "delayms": 800 }, "a2dp": { "zone": "full-stereo", "delayms": 500 } }, "libs": ["hal-bluealsa.ctlso"] } ], "haldependencies" : [ { "uid" : "generic-usb", "class" : "dynamic", "cardPath" : "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00", "cardLongName" : "USB Sound Device" }, { "uid" : "m3kf-radio", "class" : "static", "cardPath" : "/dev/snd/by-path/platform-sound@2", "cardId" : "radio" }, { "uid" : "m3-jack-output", "class" : "mandatory", "cardPath" : [ "/dev/snd/by-path/platform-sound@1", "/dev/snd/by-path/platform-sound" ], "cardShortName" : "ak4613" }, { "uid" : "minnow-hdmi-output", "AnyOf" : { "cardPath" : "/dev/snd/by-path/pci-0000:00:1b.0", "cardMixerName" : "example" }, "cardLongName" : "HDA Intel PCH", "playbackDeviceId" : "HDMI 0" } ], "halmap": [ { "uid" : "halmap-generic-usb", "info" : "HalMap for a generic usb audio device", "target" : "generic-usb", "controls" : [ { "uid": "agl-master-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-example#ping" } ] }, { "uid" : "halmap-m3-jack", "target" : "m3-jack-output", "controls" : [ { "uid": "agl-master-capture-volume", "alsa": { "name": "DVC In Capture Volume" } } ] }, { "uid" : "halmap-minnow-hdmi", "target" : "minnow-hdmi-output", "controls" : [ { "uid": "agl-master-playback-switch", "alsa": { "name": "IEC958 Playback Switch", "value": 1 } } ] } ], "halmixer": { "uid": "example", "mixerapi": "smixer", "prefix": "example", "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": "2CH-GENERIC-USB", "path": "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00", "params": { "rate": 48000 }, "sink": { "channels": [ { "uid": "front-right", "port": 0 }, { "uid": "front-left", "port": 1 } ] } }, "captures": { "uid": "2CH-GENERIC-USB", "path": "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00", "params": { "rate": 48000 }, "source": { "channels": [ { "uid": "mic-right", "port": 0 }, { "uid": "mic-left", "port": 1 } ] } }, "zones": [ { "uid": "full-stereo", "sink": [ { "target": "front-right", "channel": 0 }, { "target": "front-left", "channel": 1 } ] }, { "uid": "front-seats", "sink": [ { "target": "front-right", "channel": 0 }, { "target": "front-left", "channel": 1 } ] } ], "streams": [ { "uid": "multimedia", "verb": "multimedia", "zone": "full-stereo", "volume": 60, "mute": false, "params": { "rate": 48000 } }, { "uid": "navigation", "verb": "navigation", "zone": "front-seats", "volume": 70, "mute": false, "params": { "rate": 48000 } }, { "uid": "emergency", "verb": "emergency", "zone": "front-seats", "volume": 60, "mute": false, "params": { "rate": 48000 } }, { "uid": "radio_stream", "verb": "radio_stream", "zone": "full-stereo", "volume": 70, "mute": true, "params": { "rate" : 48000 } } ] } }