diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-09-19 12:23:59 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-10-08 15:57:27 +0200 |
commit | 04bb36a2bf5eac8d605c9e63b5cc9c1cf79be905 (patch) | |
tree | cd1bb95ecc7afadcbfa892312cf2701e7f958be0 /plugins/lib/bluetooth/hal-bt-mixer-link.h | |
parent | e1b9634b554d91012edef2a564a9dcfb25cae503 (diff) |
hal-bt: Enrich 'halmixer' section in plugin init
Enrich 'halmixer' section with bluetooth specific 'source' and 'stream'
during hal-bt plugin initialization.
Some parameters must be passed to plugin using 'params' key in controller
json plugin section.
This allows to get rid of must of the additional configuration when using
bluetooth in a hal.
Change-Id: I5820e75307a3394eca80cf783e7bc4c31c2d7659
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'plugins/lib/bluetooth/hal-bt-mixer-link.h')
-rw-r--r-- | plugins/lib/bluetooth/hal-bt-mixer-link.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/lib/bluetooth/hal-bt-mixer-link.h b/plugins/lib/bluetooth/hal-bt-mixer-link.h index a1a3ef6..6fc90f6 100644 --- a/plugins/lib/bluetooth/hal-bt-mixer-link.h +++ b/plugins/lib/bluetooth/hal-bt-mixer-link.h @@ -26,6 +26,39 @@ #define MIXER_SET_STREAMED_BT_DEVICE_VERB "bluezalsa_dev" +#define MIXER_BT_CAPTURE_JSON_SECTION "\ +{\ + \"uid\": \"bluetooth\",\ + \"pcmplug_params\": \"bluealsa_proxy\",\ + \"source\": {\ + \"channels\": [\ + {\ + \"uid\": \"bluetooth-right\",\ + \"port\": 0\ + },\ + {\ + \"uid\": \"bluetooth-left\",\ + \"port\": 1\ + }\ + ]\ + }\ +}\ +" +#define MIXER_BT_STREAM_JSON_SECTION "\ +{\ + \"uid\": \"bluetooth_stream\",\ + \"verb\": \"bluetooth_stream\",\ + \"source\" : \"bluetooth\",\ + \"volume\": 80,\ + \"mute\": false,\ + \"params\": {\ + \"rate\" : 48000,\ + \"format\": \"S16_LE\",\ + \"channels\": 2\ + }\ +}\ +" + // HAL controllers handle mixer bt calls functions int HalBtMixerLinkSetBtStreamingSettings(AFB_ApiT apiHandle, char *mixerApiName, unsigned int btStreamStatus, char *hci, char *btAddress); |