Skip to content

Commit d9b0a05

Browse files
committed
Bluetooth: Audio: Audio Input Control Service and client
This commit implements the secondary service Audio Input Control Service (AICS) server and client. Signed-off-by: Emil Gydesen <[email protected]>
1 parent f6f951c commit d9b0a05

File tree

9 files changed

+2485
-2
lines changed

9 files changed

+2485
-2
lines changed

include/bluetooth/audio/aics.h

Lines changed: 451 additions & 0 deletions
Large diffs are not rendered by default.

include/bluetooth/uuid.h

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,15 @@ struct bt_uuid_128 {
410410
*/
411411
#define BT_UUID_MESH_PROXY \
412412
BT_UUID_DECLARE_16(BT_UUID_MESH_PROXY_VAL)
413+
/** @def BT_UUID_AICS_VAL
414+
* @brief Audio Input Control Service value
415+
*/
416+
#define BT_UUID_AICS_VAL 0x1843
417+
/** @def BT_UUID_AICS
418+
* @brief Audio Input Control Service
419+
*/
420+
#define BT_UUID_AICS \
421+
BT_UUID_DECLARE_16(BT_UUID_AICS_VAL)
413422
/** @def BT_UUID_VOCS_VAL
414423
* @brief Volume Offset Control Service value
415424
*/
@@ -1313,6 +1322,60 @@ struct bt_uuid_128 {
13131322
#define BT_UUID_GATT_SERVER_FEATURES \
13141323
BT_UUID_DECLARE_16(BT_UUID_GATT_SERVER_FEATURES_VAL)
13151324

1325+
/** @def BT_UUID_AICS_STATE_VAL
1326+
* @brief Audio Input Control Service State value
1327+
*/
1328+
#define BT_UUID_AICS_STATE_VAL 0x2B77
1329+
/** @def BT_UUID_AICS_STATE
1330+
* @brief Audio Input Control Service State
1331+
*/
1332+
#define BT_UUID_AICS_STATE \
1333+
BT_UUID_DECLARE_16(BT_UUID_AICS_STATE_VAL)
1334+
/** @def BT_UUID_AICS_GAIN_SETTINGS_VAL
1335+
* @brief Audio Input Control Service Gain Settings Properties value
1336+
*/
1337+
#define BT_UUID_AICS_GAIN_SETTINGS_VAL 0x2B78
1338+
/** @def BT_UUID_AICS_GAIN_SETTINGS
1339+
* @brief Audio Input Control Service Gain Settings Properties
1340+
*/
1341+
#define BT_UUID_AICS_GAIN_SETTINGS \
1342+
BT_UUID_DECLARE_16(BT_UUID_AICS_GAIN_SETTINGS_VAL)
1343+
/** @def BT_UUID_AICS_INPUT_TYPE_VAL
1344+
* @brief Audio Input Control Service Input Type value
1345+
*/
1346+
#define BT_UUID_AICS_INPUT_TYPE_VAL 0x2B79
1347+
/** @def BT_UUID_AICS_INPUT_TYPE
1348+
* @brief Audio Input Control Service Input Type
1349+
*/
1350+
#define BT_UUID_AICS_INPUT_TYPE \
1351+
BT_UUID_DECLARE_16(BT_UUID_AICS_INPUT_TYPE_VAL)
1352+
/** @def BT_UUID_AICS_INPUT_STATUS_VAL
1353+
* @brief Audio Input Control Service Input Status value
1354+
*/
1355+
#define BT_UUID_AICS_INPUT_STATUS_VAL 0x2B7A
1356+
/** @def BT_UUID_AICS_INPUT_STATUS
1357+
* @brief Audio Input Control Service Input Status
1358+
*/
1359+
#define BT_UUID_AICS_INPUT_STATUS \
1360+
BT_UUID_DECLARE_16(BT_UUID_AICS_INPUT_STATUS_VAL)
1361+
/** @def BT_UUID_AICS_CONTROL_VAL
1362+
* @brief Audio Input Control Service Control Point value
1363+
*/
1364+
#define BT_UUID_AICS_CONTROL_VAL 0x2B7B
1365+
/** @def BT_UUID_AICS_CONTROL
1366+
* @brief Audio Input Control Service Control Point
1367+
*/
1368+
#define BT_UUID_AICS_CONTROL \
1369+
BT_UUID_DECLARE_16(BT_UUID_AICS_CONTROL_VAL)
1370+
/** @def BT_UUID_AICS_DESCRIPTION_VAL
1371+
* @brief Audio Input Control Service Input Description value
1372+
*/
1373+
#define BT_UUID_AICS_DESCRIPTION_VAL 0x2B7C
1374+
/** @def BT_UUID_AICS_DESCRIPTION
1375+
* @brief Audio Input Control Service Input Description
1376+
*/
1377+
#define BT_UUID_AICS_DESCRIPTION \
1378+
BT_UUID_DECLARE_16(BT_UUID_AICS_DESCRIPTION_VAL)
13161379
/** @def BT_UUID_VOCS_STATE_VAL
13171380
* @brief Volume Offset State value
13181381
*/
@@ -1349,7 +1412,6 @@ struct bt_uuid_128 {
13491412
*/
13501413
#define BT_UUID_VOCS_DESCRIPTION \
13511414
BT_UUID_DECLARE_16(BT_UUID_VOCS_DESCRIPTION_VAL)
1352-
13531415
/*
13541416
* Protocol UUIDs
13551417
*/

subsys/bluetooth/audio/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ if (CONFIG_BT_VOCS OR CONFIG_BT_VOCS_CLIENT)
44
zephyr_library_sources(vocs.c)
55
endif()
66
zephyr_library_sources_ifdef(CONFIG_BT_VOCS_CLIENT vocs_client.c)
7+
8+
if (CONFIG_BT_AICS OR CONFIG_BT_AICS_CLIENT)
9+
zephyr_library_sources(aics.c)
10+
endif()
11+
zephyr_library_sources_ifdef(CONFIG_BT_AICS_CLIENT aics_client.c)

subsys/bluetooth/audio/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ config BT_AUDIO_DEBUG
5050
Use this option to enable debug logs for the Bluetooth
5151
Audio functionality.
5252

53-
5453
source "subsys/bluetooth/audio/Kconfig.vocs"
54+
source "subsys/bluetooth/audio/Kconfig.aics"
5555

5656
endif # BT_AUDIO
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Bluetooth Audio - Audio Input Control Service options
2+
#
3+
# Copyright (c) 2020 Bose Corporation
4+
# Copyright (c) 2020 Nordic Semiconductor ASA
5+
#
6+
# SPDX-License-Identifier: Apache-2.0
7+
#
8+
9+
if BT_AUDIO
10+
11+
##################### Audio Input Control Service #####################
12+
13+
config BT_AICS_MAX_INSTANCE_COUNT
14+
int "Audio Input Control Service max instance count"
15+
default 0
16+
range 0 15
17+
help
18+
This option sets the maximum number of instances of Audio Input
19+
Control Services.
20+
21+
config BT_AICS
22+
bool # hidden
23+
default y if BT_AICS_MAX_INSTANCE_COUNT > 0
24+
help
25+
This hidden option enables support for Audio Input Control Service.
26+
27+
if BT_AICS
28+
29+
config BT_AICS_MAX_INPUT_DESCRIPTION_SIZE
30+
int "Audio Input Control Service max input description size"
31+
default 32
32+
range 0 512
33+
help
34+
This option sets the maximum input description size in octets.
35+
############# DEBUG #############
36+
37+
config BT_DEBUG_AICS
38+
bool "Audio Input Control Service debug"
39+
depends on BT_AUDIO_DEBUG
40+
help
41+
Use this option to enable Audio Input Control Service debug logs for
42+
the Bluetooth Audio functionality.
43+
44+
endif # BT_AICS
45+
46+
##################### Audio Input Control Service Client #####################
47+
48+
config BT_AICS_CLIENT_MAX_INSTANCE_COUNT
49+
int "Audio Input Control Service client max instance count"
50+
default 0
51+
range 0 15
52+
help
53+
This option sets the maximum number of instances of Audio Input
54+
Control Services.
55+
56+
config BT_AICS_CLIENT
57+
bool # hidden
58+
default y if BT_AICS_CLIENT_MAX_INSTANCE_COUNT > 0
59+
help
60+
This hidden option enables support for Audio Input Control Service.
61+
62+
63+
if BT_AICS_CLIENT
64+
65+
############# DEBUG #############
66+
67+
config BT_DEBUG_AICS_CLIENT
68+
bool "Audio Input Control Service client debug"
69+
depends on BT_AUDIO_DEBUG
70+
help
71+
Use this option to enable Audio Input Control Service client debug
72+
logs for the Bluetooth Audio functionality.
73+
74+
endif # BT_AICS_CLIENT
75+
76+
endif # BT_AUDIO

0 commit comments

Comments
 (0)