# Copyright (c) 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

mainmenu "Bluetooth: Broadcast Audio Sink"

config SCAN_OFFLOAD
	bool "Whether to wait for a Broadcast Assistant"
	default y
	# enable PAST support if we can
	select BT_PER_ADV_SYNC_TRANSFER_RECEIVER if (!HAS_BT_CTLR || \
						     BT_CTLR_SYNC_TRANSFER_RECEIVER_SUPPORT)
	help
	  If set to true, the sample will start advertising connectable for
	  Broadcast Assistants.

config SCAN_SELF
	bool "Whether to scan for Broadcast Sources without Broadcast Assistant"
	default y
	help
	  If set to true, the sample will start scanning for Broadcast Sources
	  without waiting for a Broadcast Assistant to connect.

config SCAN_DELAY
	int "Delay before starting scan (in seconds)"
	range 0 255
	default 10
	depends on SCAN_SELF
	help
	  Time to advertise connectable for a Broadcast Assistant to connect
	  before starting scanning for Broadcast Sources.

config TARGET_BROADCAST_NAME
	string "Target Broadcast Device Name"
	default ""
	help
	  Name of target broadcast device. If not empty string, sink device
	  will only listen to the specified broadcast source. Not case sensitive.

config MAX_CODEC_FRAMES_PER_SDU
	int "The maximum number of codec frame per SDU supported"
	default 1
	range 1 255
	help
	  Maximum number of codec frames per SDU supported by this device. Increasing this value
	  allows support for a greater variety of broadcasts, but also increases memory usage.

config ENABLE_LC3
	bool "Enable the LC3 codec"
	# By default let's enable it in the platforms we know are capable of supporting it
	default y
	depends on CPU_HAS_FPU && \
		(ARCH_POSIX || SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF5340_CPUAPP || SOC_MIMXRT1062)
	select LIBLC3
	select FPU

config USE_USB_AUDIO_OUTPUT
	bool "Use USB Audio as output"
	depends on ENABLE_LC3
	select USB_DEVICE_STACK_NEXT
	select USBD_AUDIO2_CLASS
	select RING_BUFFER
	help
	  Enables USB audio as output as a USB peripheral. This does not support providing USB
	  audio to e.g. speakers that are also USB peripherals, but can be connected to e.g. a
	  phone or PC as a USB-in device (such as a USB microphone).
	  USB audio only supports a single audio channel.

config USE_SPECIFIC_BROADCAST_CHANNEL
	bool "Use specific Broadcast Channel Audio Location"
	default y
	depends on USE_USB_AUDIO_OUTPUT
	help
	  Enables the use of a specific Channel Audio Location (see config TARGET_BROADCAST_CHANNEL).

config TARGET_BROADCAST_CHANNEL
	int "Broadcast Channel Audio Location to sync to"
	range 0 3
	default 1
	depends on USE_SPECIFIC_BROADCAST_CHANNEL
	help
	  Channel Audio Location to sync to. These corresponds to the bt_audio_location,
	  supporting mono, left and right channels

config INFO_REPORTING_INTERVAL
	int "Number of SDUs received between each information report"
	default 1000
	help
	  Determines how often information about received data is logged.
	  Set to 0 to disable reporting.

# Source common USB sample options used to initialize new experimental USB device stack.
# The scope of these options is limited to USB samples in project tree,
# you cannot use them in your own application.
source "samples/subsys/usb/common/Kconfig.sample_usbd"

source "Kconfig.zephyr"
