Bluetooth: Audio: Disable HAS when unicast_server is disabled
The HAS depends on the unicast server, and should be
disabled in the `no_unicast_server` as well as depend
on the CONFIG_BT_AUDIO_UNICAST_SERVER config.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
diff --git a/subsys/bluetooth/audio/Kconfig.has b/subsys/bluetooth/audio/Kconfig.has
index 45644b9..db63cc9 100644
--- a/subsys/bluetooth/audio/Kconfig.has
+++ b/subsys/bluetooth/audio/Kconfig.has
@@ -10,6 +10,7 @@
select UTF8
depends on BT_SMP_SC_PAIR_ONLY
depends on BT_SMP_MIN_ENC_KEY_SIZE = 16
+ depends on BT_AUDIO_UNICAST_SERVER
help
This option enables support for Hearing Access Service.
diff --git a/tests/bluetooth/shell/testcase.yaml b/tests/bluetooth/shell/testcase.yaml
index e01fe0f..300175d 100644
--- a/tests/bluetooth/shell/testcase.yaml
+++ b/tests/bluetooth/shell/testcase.yaml
@@ -189,6 +189,7 @@
platform_allow: native_posix
extra_configs:
- CONFIG_BT_AUDIO_UNICAST_SERVER=n
+ - CONFIG_BT_HAS=n
bluetooth.audio_shell.no_broadcast_source:
extra_args: CONF_FILE="audio.conf"
build_only: true