#
# Copyright (c) 2018 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

menuconfig NRF5340_AUDIO
	 bool "nRF5340 Audio [EXPERIMENTAL]"
	 select EXPERIMENTAL

if NRF5340_AUDIO

config CUSTOM_BROADCASTER
	bool "Allow custom broadcasters"
	default n
	help
	  Incomplete feature for now, but will introduce support for multiple BIGs and subgroups.

config AUDIO_DEV
	int "Select which device type to compile for. 1=HEADSET or 2=GATEWAY"
	range 1 2
	default 1
	help
	  Setting this variable to 1 selects that the project is compiled
	  as a HEADSET device.
	  Setting to 2 will compile as a GATEWAY.

choice NRF5340_AUDIO_TRANSPORT_MODE
	prompt "Choose BIS or CIS for ISO transport"
	default TRANSPORT_CIS if WALKIE_TALKIE_DEMO
	default TRANSPORT_CIS

config TRANSPORT_BIS
	bool "Use BIS (Broadcast Isochronous Stream)"

config TRANSPORT_CIS
	bool "Use CIS (Connected Isochronous Stream)"

endchoice

#----------------------------------------------------------------------------#
if (TRANSPORT_BIS && AUDIO_DEV = 1)
rsource "broadcast_sink/Kconfig.defaults"
endif # TRANSPORT_BIS && AUDIO_DEV = 1

if (TRANSPORT_BIS && AUDIO_DEV = 2)
rsource "broadcast_source/Kconfig.defaults"
endif # TRANSPORT_BIS && AUDIO_DEV = 2

if (TRANSPORT_CIS && AUDIO_DEV = 1)
rsource "unicast_server/Kconfig.defaults"
endif # TRANSPORT_CIS && AUDIO_DEV = 1

if (TRANSPORT_CIS && AUDIO_DEV = 2)
rsource "unicast_client/Kconfig.defaults"
endif # TRANSPORT_CIS && AUDIO_DEV = 2



rsource "Kconfig.defaults"
rsource "src/audio/Kconfig"
rsource "src/bluetooth/Kconfig"
rsource "src/drivers/Kconfig"
rsource "src/modules/Kconfig"
rsource "src/utils/Kconfig"

#----------------------------------------------------------------------------#
menu "Logging"

module = MAIN
module-str = main
source "subsys/logging/Kconfig.template.log_config"

config PRINT_STACK_USAGE_MS
	depends on THREAD_ANALYZER && INIT_STACKS
	int "Print stack usage every x milliseconds"
	default 5000

endmenu # Log levels

#----------------------------------------------------------------------------#
endif # NRF5340_AUDIO

source "Kconfig.zephyr"

menu "Nordic UART BLE GATT service sample"

config BT_NUS_THREAD_STACK_SIZE
	int "Thread stack size"
	default 1024
	help
	  Stack size used in each of the two threads

config BT_NUS_UART_BUFFER_SIZE
	int "UART payload buffer element size"
	default 40
	help
	  Size of the payload buffer in each RX and TX FIFO element

config BT_NUS_SECURITY_ENABLED
	bool "Enable security"
	default y
	select BT_SMP
	help
	  "Enable BLE security for the UART service"

config BT_NUS_UART_RX_WAIT_TIME
	int "Timeout for UART RX complete event"
	default 50000
	help
	  Wait for RX complete event time in microseconds

config SETTINGS
	default y

config ZMS
	default y if SOC_FLASH_NRF_RRAM

config NVS
	default y if !SOC_FLASH_NRF_RRAM

endmenu

menu "littlefs sample"

config APP_WIPE_STORAGE
	bool "Option to clear the flash area before mounting"
	help
	  Use this to force an existing file system to be created.

choice
	prompt "Storage backend type used by the application"
	default APP_LITTLEFS_STORAGE_FLASH
	help
	  Specify the type of storage backend.

config APP_LITTLEFS_STORAGE_FLASH
	bool "Use flash memory backend"

config APP_LITTLEFS_STORAGE_BLK_SDMMC
	bool "Use block device (e.g. SD MMC) backend"
endchoice

endmenu
