summaryrefslogtreecommitdiffstats
path: root/4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-11 01:45:57 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-10-08 15:52:51 +0200
commit757c9b407938b65b1e31ccc62217910d4f942dcb (patch)
treee64b7259dcd1ac8cc3f5b00b16e4dd2294495af1 /4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json
parent611de9da40615bc5092eca407e399db3f3a2eaa6 (diff)
Update 4a-hal to work with new 4a-softmixer
Update 4a-hal to work with new 4a-softmixer version : - Update audio configuration files to match the configuration format expected by the mixer. - Parse mixer attach response to get information about 'streams', 'playbacks', and 'captures'. store them in new field of controller hal data structure. - Create verb for each returned stream, but only one playback/capture verb even if threre are multiple playbacks/captures returned by the mixer attch verb. - Return 'streams', 'playbacks', and 'captures' when info verb is called. - If info verb is called with a json request, the request is transfered to the mixer. Change-Id: I65593281c34aa91ad87afbf8bebff755cc5cc6d0 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json')
-rw-r--r--4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json255
1 files changed, 168 insertions, 87 deletions
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
index 95274eb..dde69d6 100644
--- a/4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json
+++ b/4a-hal-cfg-community/hal-4a-csl-cm106-8ch-usb.json
@@ -4,7 +4,7 @@
"uid": "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00",
"version": "0.9",
"api": "4a-hal-csl-cm106-8ch-usb",
- "require": [ "alsacore", "softmixer" ],
+ "require": [ "alsacore", "smixer" ],
"info": "4a hal for Jon's CSL CM106 8ch USB device",
"author": "Jonathan Aillet",
"date": "2018-06-09"
@@ -64,91 +64,111 @@
],
"halmixer": {
"uid": "csl-cm106-8ch-usb",
- "mixerapi": "softmixer",
- "backend": {
+ "mixerapi": "smixer",
+ "prefix": "cm106",
+ "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
+ }
+ ],
+ "playbacks" : {
"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",
+ "path": "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00",
"params": {
"rate": 48000
},
- "ramps": [
- {
- "uid": "ramp-fast",
- "delay": 50,
- "up": 10,
- "down": 3
- },
- {
- "uid": "ramp-slow",
- "delay": 250,
- "up": 3,
- "down": 1
+ "sink": {
+ "controls": {
+ "volume": {
+ "name": "Speaker Playback Volume",
+ "value": 80
+ },
+ "mute": {
+ "name": "Speaker Playback Switch"
+ }
},
- {
- "uid": "ramp-normal",
- "delay": 100,
- "up": 6,
- "down": 2
- }
- ],
- "devices": {
- "playback": 0,
- "capture": 1
+ "channels": [
+ {
+ "uid": "front-right",
+ "port": 0
+ },
+ {
+ "uid": "front-left",
+ "port": 1
+ },
+ {
+ "uid": "middle-right",
+ "port": 2
+ },
+ {
+ "uid": "middle-left",
+ "port": 3
+ },
+ {
+ "uid": "back-right",
+ "port": 4
+ },
+ {
+ "uid": "back-left",
+ "port": 5
+ },
+ {
+ "uid": "center-right",
+ "port": 6
+ },
+ {
+ "uid": "center-left",
+ "port": 7
+ }
+ ]
+ }
+ },
+ "captures": {
+ "uid": "CSL-CM106-8CH-USB",
+ "path": "/dev/snd/by-id/usb-0d8c_USB_Sound_Device-00",
+ "params": {
+ "rate": 48000
},
- "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
+ "source": {
+ "controls": {
+ "volume": {
+ "name": "Capture Volume"
+ },
+ "mute": {
+ "name": "Capture Switch"
+ }
},
- {
- "subdev": 7,
- "numid": 93
- }
- ]
+ "channels": [
+ {
+ "uid": "mic-right",
+ "port": 0
+ },
+ {
+ "uid": "mic-left",
+ "port": 1
+ }
+ ]
+ }
},
"zones": [
{
"uid": "full-stereo",
- "type": "playback",
- "mapping": [
+ "sink": [
{
"target": "front-right",
"channel": 0
@@ -156,13 +176,28 @@
{
"target": "front-left",
"channel": 1
+ },
+ {
+ "target": "middle-right",
+ "channel": 0
+ },
+ {
+ "target": "middle-left",
+ "channel": 1
+ },
+ {
+ "target": "back-right",
+ "channel": 0
+ },
+ {
+ "target": "back-left",
+ "channel": 1
}
]
},
{
"uid": "front-seats",
- "type": "playback",
- "mapping": [
+ "sink": [
{
"target": "front-right",
"channel": 0
@@ -172,29 +207,75 @@
"channel": 1
}
]
+ },
+ {
+ "uid": "middle-seats",
+ "sink": [
+ {
+ "target": "middle-right",
+ "channel": 0
+ },
+ {
+ "target": "middle-left",
+ "channel": 1
+ }
+ ]
+ },
+ {
+ "uid": "back-seats",
+ "sink": [
+ {
+ "target": "back-right",
+ "channel": 0
+ },
+ {
+ "target": "back-left",
+ "channel": 1
+ }
+ ]
}
],
"streams": [
{
- "uid": "multimedia",
+ "uid": "stream-multimedia",
+ "verb": "multimedia",
"zone": "full-stereo",
- "ramp": "ramp-slow",
"volume": 60,
- "mute": false
+ "mute": false,
+ "params": {
+ "rate": 48000
+ }
},
{
- "uid": "navigation",
+ "uid": "stream-navigation",
+ "verb": "navigation",
"zone": "front-seats",
- "ramp": "ramp-normal",
"volume": 70,
- "mute": false
+ "mute": false,
+ "params": {
+ "rate": 48000
+ }
},
{
- "uid": "emergency",
+ "uid": "stream-emergency",
+ "verb": "emergency",
"zone": "front-seats",
- "ramp": "ramp-fast",
- "volume": 80,
- "mute": false
+ "volume": 60,
+ "mute": false,
+ "params": {
+ "rate": 48000
+ }
+ },
+ {
+ "uid": "stream-pulseaudio",
+ "verb": "legacy",
+ "zone": "back-seats",
+ "source": "loop-legacy",
+ "volume": 50,
+ "mute": false,
+ "params": {
+ "rate": 48000
+ }
}
]
}