aboutsummaryrefslogtreecommitdiffstats
path: root/4a-hal-references-boards-cfg/hal-4a-jon-home-usb-card.json
blob: e9fafa546aad0790c3f81c431cef16341846be04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
{
    "$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",
        "version": "0.9",
        "api": "4a-hal-jon-home-usb-card",
        "require": [ "alsacore", "softmixer" ],
        "info": "4a hal for Jon's Home USB Card 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": [
        {
            "label": "Master_Playback_Volume",
            "alsa": {
                "name": "PCM Playback Volume",
                "value": 12
            }
        },
        {
            "label": "Master_Playback_Ramp_70",
            "info": "ramp volume linearly to 70 according to current ramp setting",
            "alsa": {
                "name": "Hal-VolRamp",
                "numid": -1,
                "type": "INTEGER",
                "count": 1,
                "minval": 0,
                "maxval": 100,
                "step": 1
            },
            "action": {
                "label": "ramp-slow",
                "callback": "api://4a-hal-jon-home-usb-card#master { ramp : 70 }"
            }
        }
    ],
    "halmixer": {
        "uid": "jon-home-usb-card-mixer",
        "mixerapi": "softmixer",
        "backend": {
            "uid": "Jon-Home-USB-Card-Audio",
            "devpath": "/dev/snd/by-id/usb-C-Media_Electronics_Inc._USB_Audio_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",
            "params": {
                "rate": 48000,
            },
            "ramps": [
                {
                    "uid": "ramp-fast",
                    "delay": 050,
                    "up": 10,
                    "down": 3
                },
                {
                    "uid": "ramp-slow",
                    "delay": 250,
                    "up": 03,
                    "down": 1
                },
                {
                    "uid": "ramp-normal",
                    "delay": 100,
                    "up": 06,
                    "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
            },
            {
                "uid": "navigation",
                "zone": "front-seats",
                "ramp": "ramp-normal",
                "volume": 70,
                "mute": false
            },
            {
                "uid": "emergency",
                "zone": "front-seats",
                "ramp": "ramp-fast",
                "volume": 80,
                "mute": false
            }
        ]
    }
}