From a34c2cd90ac8d6d050f87dfbd031ca6f6649944f Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Mon, 7 Nov 2022 16:02:05 +0100 Subject: [PATCH] Bluetooth: Audio: Fix ASE_{SNK,SRC}_COUNT=0 issues Due to the LISTIFY macro for the counts, the value cannot be 0. Signed-off-by: Emil Gydesen --- subsys/bluetooth/audio/ascs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subsys/bluetooth/audio/ascs.c b/subsys/bluetooth/audio/ascs.c index 8e370ce2ccc..937883c8584 100644 --- a/subsys/bluetooth/audio/ascs.c +++ b/subsys/bluetooth/audio/ascs.c @@ -2351,8 +2351,12 @@ BT_GATT_SERVICE_DEFINE(ascs_svc, BT_GATT_PERM_WRITE_ENCRYPT, NULL, ascs_cp_write, NULL), BT_AUDIO_CCC(ascs_cp_cfg_changed), +#if CONFIG_BT_ASCS_ASE_SNK_COUNT > 0 LISTIFY(CONFIG_BT_ASCS_ASE_SNK_COUNT, BT_ASCS_ASE_SNK_DEFINE, (,)), +#endif /* CONFIG_BT_ASCS_ASE_SNK_COUNT > 0 */ +#if CONFIG_BT_ASCS_ASE_SRC_COUNT > 0 LISTIFY(CONFIG_BT_ASCS_ASE_SRC_COUNT, BT_ASCS_ASE_SRC_DEFINE, (,)), +#endif /* CONFIG_BT_ASCS_ASE_SRC_COUNT > 0 */ ); static int control_point_notify(struct bt_conn *conn, const void *data, uint16_t len)