Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LE Audio: Replace Kconfig selects with depends on #72559

Open
Thalley opened this issue May 10, 2024 · 0 comments
Open

LE Audio: Replace Kconfig selects with depends on #72559

Thalley opened this issue May 10, 2024 · 0 comments
Assignees
Labels
area: Bluetooth Audio area: Bluetooth Enhancement Changes/Updates/Additions to existing features

Comments

@Thalley
Copy link
Collaborator

Thalley commented May 10, 2024

Is your enhancement proposal related to a problem? Please describe.
A lot of the Kconfig options in LE Audio use select rather than depends on to handle dependencies. This was originally done to make 3rd party GUIs like menuconfig work better (as it hides Kconfig options that does not have it dependencies enabled), but 3rd party tools should not decide how we best configure Zephyr. This also better follows the best practices for Kconfig as per https://docs.zephyrproject.org/latest/build/kconfig/tips.html#select-pitfalls and why select should not be used that much.

Describe the solution you'd like
Replace select X with depends on X for all Kconfig options where it's possible. There may be exceptions where select is still needed, such as enabling promptless options like config BT_BAP_UNICAST.

In those cases, we should replace the select <promptless> with def_bool so that

config BT_BAP_UNICAST
	bool
	depends on BT_CONN
	select BT_SMP
	select BT_ISO_UNICAST

config BT_BAP_UNICAST_SERVER
	bool "Bluetooth Unicast Audio Server Support"
	select BT_BAP_UNICAST
	select BT_GATT_DYNAMIC_DB
	select BT_GATT_CACHING
	depends on BT_PERIPHERAL
	depends on BT_ISO_PERIPHERAL
	depends on BT_ASCS
	depends on BT_PACS
	help
	  This option enables support for Bluetooth Unicast Audio Server
	  using Isochronous channels.

becomes

config BT_BAP_UNICAST
	def_bool BT_BAP_UNICAST_SERVER

config BT_BAP_UNICAST_SERVER
	bool "Bluetooth Unicast Audio Server Support"
	depends on BT_GATT_DYNAMIC_DB
	depends on BT_GATT_CACHING
	depends on BT_SMP
	depends on BT_PERIPHERAL
	depends on BT_PERIPHERAL
	depends on BT_ISO_PERIPHERAL
	depends on BT_ASCS
	depends on BT_PACS
	help
	  This option enables support for Bluetooth Unicast Audio Server
	  using Isochronous channels.

Describe alternatives you've considered
N/A

Additional context
N/A

@Thalley Thalley added Enhancement Changes/Updates/Additions to existing features area: Bluetooth area: Bluetooth Audio labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Audio area: Bluetooth Enhancement Changes/Updates/Additions to existing features
Projects
Status: To do
Development

No branches or pull requests

1 participant