Bluetooth: audio: ascs: Increase the number of supported ASEs
This increases the number of supported audio stream endpoints. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
a5bd666f4e
commit
9dae352007
|
@ -15,7 +15,7 @@ if BT_ASCS
|
|||
config BT_ASCS_ASE_SNK_COUNT
|
||||
int "Number of Audio Stream Endpoint Sink Characteristics"
|
||||
default 2
|
||||
range 0 2
|
||||
range 0 255
|
||||
help
|
||||
An ASE Sink characteristic represents the state of an ASE, which is
|
||||
coupled to a single direction of a unicast Audio Stream.
|
||||
|
@ -23,7 +23,7 @@ config BT_ASCS_ASE_SNK_COUNT
|
|||
config BT_ASCS_ASE_SRC_COUNT
|
||||
int "Number of Audio Stream Endpoint Source Characteristics"
|
||||
default 2
|
||||
range 0 2
|
||||
range 0 255
|
||||
help
|
||||
An ASE Source characteristic represents the state of an ASE, which is
|
||||
coupled to a single direction of a unicast Audio Stream.
|
||||
|
|
|
@ -2324,36 +2324,20 @@ respond:
|
|||
return len;
|
||||
}
|
||||
|
||||
#define BT_ASCS_ASE_DEFINE(_uuid, _id) \
|
||||
BT_AUDIO_CHRC(_uuid, \
|
||||
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, \
|
||||
BT_GATT_PERM_READ_ENCRYPT, \
|
||||
ascs_ase_read, NULL, UINT_TO_POINTER(_id)), \
|
||||
BT_AUDIO_CCC(ascs_ase_cfg_changed)
|
||||
#define BT_ASCS_ASE_SNK_DEFINE(_n, ...) BT_ASCS_ASE_DEFINE(BT_UUID_ASCS_ASE_SNK, (_n) + 1)
|
||||
#define BT_ASCS_ASE_SRC_DEFINE(_n, ...) BT_ASCS_ASE_DEFINE(BT_UUID_ASCS_ASE_SRC, (_n) + 1 + \
|
||||
CONFIG_BT_ASCS_ASE_SNK_COUNT)
|
||||
|
||||
BT_GATT_SERVICE_DEFINE(ascs_svc,
|
||||
BT_GATT_PRIMARY_SERVICE(BT_UUID_ASCS),
|
||||
#if CONFIG_BT_ASCS_ASE_SNK_COUNT > 0
|
||||
BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_SNK,
|
||||
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY,
|
||||
BT_GATT_PERM_READ_ENCRYPT,
|
||||
ascs_ase_read, NULL, UINT_TO_POINTER(1)),
|
||||
BT_AUDIO_CCC(ascs_ase_cfg_changed),
|
||||
#endif
|
||||
#if CONFIG_BT_ASCS_ASE_SNK_COUNT > 1
|
||||
BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_SNK,
|
||||
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY,
|
||||
BT_GATT_PERM_READ_ENCRYPT,
|
||||
ascs_ase_read, NULL, UINT_TO_POINTER(2)),
|
||||
BT_AUDIO_CCC(ascs_ase_cfg_changed),
|
||||
#endif
|
||||
#if CONFIG_BT_ASCS_ASE_SRC_COUNT > 0
|
||||
BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_SRC,
|
||||
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY,
|
||||
BT_GATT_PERM_READ_ENCRYPT,
|
||||
ascs_ase_read, NULL, UINT_TO_POINTER(CONFIG_BT_ASCS_ASE_SNK_COUNT + 1)),
|
||||
BT_AUDIO_CCC(ascs_ase_cfg_changed),
|
||||
#endif
|
||||
#if CONFIG_BT_ASCS_ASE_SRC_COUNT > 1
|
||||
BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_SRC,
|
||||
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY,
|
||||
BT_GATT_PERM_READ_ENCRYPT,
|
||||
ascs_ase_read, NULL, UINT_TO_POINTER(CONFIG_BT_ASCS_ASE_SNK_COUNT + 2)),
|
||||
BT_AUDIO_CCC(ascs_ase_cfg_changed),
|
||||
#endif
|
||||
LISTIFY(CONFIG_BT_ASCS_ASE_SNK_COUNT, BT_ASCS_ASE_SNK_DEFINE, (,)),
|
||||
LISTIFY(CONFIG_BT_ASCS_ASE_SRC_COUNT, BT_ASCS_ASE_SRC_DEFINE, (,)),
|
||||
BT_AUDIO_CHRC(BT_UUID_ASCS_ASE_CP,
|
||||
BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP | BT_GATT_CHRC_NOTIFY,
|
||||
BT_GATT_PERM_WRITE_ENCRYPT,
|
||||
|
|
Loading…
Reference in a new issue