You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -7,153 +7,170 @@ Configuring the nRF5340 Audio applications
7
7
:local:
8
8
:depth: 2
9
9
10
-
|config|
11
-
12
-
.. _nrf53_audio_app_kconfigs:
13
-
14
-
Configuration options
15
-
*********************
16
-
17
-
The application comes with the following application-specific Kconfig options:
18
-
19
-
.. _CONFIG_STREAM_BIDIRECTIONAL:
20
10
21
-
CONFIG_STREAM_BIDIRECTIONAL
22
-
Enables bidirectional communication mode for CIS streams.
11
+
The nRF5340 Audio applications introduce Kconfig options that you can use to configure audio functionality, device roles, and transport modes.
12
+
You can use these options to select between gateway and headset roles, choose between CIS (unicast) and BIS (broadcast) transport modes, and configure audio-specific features.
23
13
24
-
.. _CONFIG_WALKIE_TALKIE_DEMO:
14
+
The nRF5340 Audio applications align the configuration with the nRF5340 Audio use case by overlaying Kconfig defaults and selecting or implying the required Kconfig options.
15
+
Among others, the Kconfig options for Bluetooth, Zephyr's audio subsystems, and hardware peripherals are selected to ensure they are enabled.
25
16
26
-
CONFIG_WALKIE_TALKIE_DEMO
27
-
Enables the walkie-talkie demo functionality using bidirectional streams.
17
+
The :option:`CONFIG_NRF5340_AUDIO` option is the main Kconfig option that activates all nRF5340 Audio functionality.
18
+
See the :file:`Kconfig.defaults` file for details related to the default common configuration.
28
19
29
-
.. _CONFIG_TRANSPORT_BIS:
20
+
.. note::
21
+
Part of the default configuration is applied by modifying the default values of Kconfig options.
22
+
Changing configuration in menuconfig does not automatically adjust user-configurable values to the new defaults.
23
+
So, you must update those values manually.
24
+
For more information, see the Stuck symbols in menuconfig and guiconfig section on the :ref:`kconfig_tips_and_tricks` in the Zephyr documentation.
30
25
31
-
CONFIG_TRANSPORT_BIS
32
-
Enables Auracast™ (broadcast) mode for working with broadcast sources and sinks.
26
+
The default Kconfig option values are automatically updated if configuration changes are applied directly in the configuration files.
33
27
34
-
.. _CONFIG_BT_AUDIO_USE_BROADCAST_NAME_ALT:
28
+
The application-specific Kconfig options mentioned on this page are listed in :ref:`nRF5340 Audio: Application-specific Kconfig options <config_audio_app_options>`.
35
29
36
-
CONFIG_BT_AUDIO_USE_BROADCAST_NAME_ALT
37
-
Enables BIS mode with two gateways, allowing headsets to switch between gateways.
38
-
39
-
.. _CONFIG_BT_AUDIO_BROADCAST_NAME_ALT:
40
-
41
-
CONFIG_BT_AUDIO_BROADCAST_NAME_ALT
42
-
Provides an alternative name for the second gateway in BIS mode.
30
+
|config|
43
31
44
-
.. _CONFIG_BT_AUDIO_SCAN_DELEGATOR:
32
+
.. _nrf53_audio_device_role_configuration:
45
33
46
-
CONFIG_BT_AUDIO_SCAN_DELEGATOR
47
-
Enables scan delegator.
48
-
When the scan delegator feature is enabled, the broadcast sink will not search for a predefined broadcast source.
49
-
Instead, it will wait for a broadcast assistant to connect and control it.
34
+
Configuring the device role
35
+
***************************
50
36
51
-
.. _CONFIG_AUDIO_SOURCE_I2S:
37
+
The nRF5340 Audio application supports two device roles: gateway and headset.
38
+
See :ref:`nrf53_audio_app_overview_gateway_headsets` for more information about these roles.
52
39
53
-
CONFIG_AUDIO_SOURCE_I2S
54
-
Switches from USB audio source to 3.5 mm jack analog input using I2S.
40
+
You can :ref:`select gateway or headset build <nrf53_audio_app_configuration_select_build>` when :ref:`nrf53_audio_app_building`.
55
41
56
-
.. _CONFIG_NRF5340_AUDIO_SD_CARD_MODULE:
42
+
The :option:`CONFIG_AUDIO_DEV` Kconfig option defines the nRF5340 Audio device role.
43
+
The device role can be either a gateway (:option:`CONFIG_AUDIO_DEV` set to ``2``) or a headset (:option:`CONFIG_AUDIO_DEV` set to ``1``).
57
44
58
-
CONFIG_NRF5340_AUDIO_SD_CARD_MODULE
59
-
Enables the SD card module (enabled by default on the nRF5340 Audio DK).
45
+
Each role automatically implies the nRF5340 Audio modules needed for the role.
46
+
For example, the gateway role automatically enables USB audio source support, while the headset role enables I2S audio output.
60
47
61
-
.. _CONFIG_SD_CARD_PLAYBACK:
48
+
.. _nrf53_audio_transport_mode_configuration:
62
49
63
-
CONFIG_SD_CARD_PLAYBACK
64
-
Enables SD card playback functionality.
50
+
Configuring the transport mode
51
+
******************************
65
52
66
-
.. _CONFIG_SD_CARD_PLAYBACK_STACK_SIZE:
53
+
The nRF5340 Audio application supports two transport modes for LE Audio:
67
54
68
-
CONFIG_SD_CARD_PLAYBACK_STACK_SIZE
69
-
Sets the stack size for the SD card playback thread (default: 4096).
55
+
* Connected Isochronous Stream (CIS) - for unicast communication
56
+
* Broadcast Isochronous Stream (BIS) - for broadcast communication
70
57
71
-
.. _CONFIG_SD_CARD_PLAYBACK_RING_BUF_SIZE:
58
+
See :ref:`nrf53_audio_app_overview_modes` for detailed information about these modes.
72
59
73
-
CONFIG_SD_CARD_PLAYBACK_RING_BUF_SIZE
74
-
Sets the size of the ring buffer for audio data (default: 960).
60
+
The transport mode is selected using the following Kconfig options:
75
61
76
-
.. _CONFIG_SD_CARD_PLAYBACK_THREAD_PRIO:
62
+
* (Default mode) :option:`CONFIG_TRANSPORT_CIS` - Enables CIS mode for clients and servers (unicast applications).
63
+
With this option enabled, you can configure application Kconfig options specific to unicast communication (see :file:`applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/Kconfig`).
64
+
* :option:`CONFIG_TRANSPORT_BIS` - Enables BIS mode for `Auracast™`_ sources and sinks (broadcast applications).
65
+
With this option enabled, you can configure application Kconfig options specific to broadcast communication (see :file:`applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/Kconfig`).
77
66
78
-
CONFIG_SD_CARD_PLAYBACK_THREAD_PRIO
79
-
Sets the priority for the SD card playback thread (default: 7).
67
+
The transport mode selection automatically configures the appropriate Bluetooth stack components and audio processing modules.
To switch to the bidirectional mode, set the :ref:`CONFIG_STREAM_BIDIRECTIONAL<nrf53_audio_app_kconfigs>` Kconfig option to ``y`` in the :file:`applications/nrf5340_audio/prj.conf` file (for the debug version) or in the :file:`applications/nrf5340_audio/prj_release.conf` file (for the release version).
74
+
To switch to the bidirectional mode, set the :option:`CONFIG_STREAM_BIDIRECTIONAL` Kconfig option to ``y`` in the :file:`applications/nrf5340_audio/prj.conf` file (for the debug version) or in the :file:`applications/nrf5340_audio/prj_release.conf` file (for the release version).
The walkie-talkie demo uses one or two bidirectional streams from the gateway to one or two headsets.
94
82
The PDM microphone is used as input on both the gateway and headset device.
95
-
To switch to using the walkie-talkie, set the :ref:`CONFIG_WALKIE_TALKIE_DEMO<nrf53_audio_app_kconfigs>` Kconfig option to ``y`` in the :file:`applications/nrf5340_audio/prj.conf` file (for the debug version) or in the :file:`applications/nrf5340_audio/prj_release.conf` file (for the release version).
83
+
To switch to using the walkie-talkie, set the :option:`CONFIG_WALKIE_TALKIE_DEMO` Kconfig option to ``y`` in the :file:`applications/nrf5340_audio/prj.conf` file (for the debug version) or in the :file:`applications/nrf5340_audio/prj_release.conf` file (for the release version).
96
84
97
85
Enabling the Auracast™ (broadcast) mode
98
86
=======================================
99
87
100
-
If you want to work with `Auracast™`_ (broadcast) sources and sinks, set the :kconfig:option:`CONFIG_TRANSPORT_BIS` Kconfig option to ``y`` in the :file:`applications/nrf5340_audio/prj.conf` file.
88
+
If you want to work with `Auracast™`_ (broadcast) sources and sinks, set the :option:`CONFIG_TRANSPORT_BIS` Kconfig option to ``y`` in the :file:`applications/nrf5340_audio/prj.conf` file.
In addition to the standard BIS mode with one gateway, you can also add a second gateway device.
108
96
The BIS headsets can then switch between the two gateways and receive audio stream from one of the two gateways.
109
97
110
-
To configure the second gateway, add both the :ref:`CONFIG_TRANSPORT_BIS<nrf53_audio_app_kconfigs>` and the :ref:`CONFIG_BT_AUDIO_USE_BROADCAST_NAME_ALT<nrf53_audio_app_kconfigs>` Kconfig options set to ``y`` to the :file:`applications/nrf5340_audio/prj.conf` file for the debug version and to the :file:`applications/nrf5340_audio/prj_release.conf` file for the release version.
111
-
You can provide an alternative name to the second gateway using the :ref:`CONFIG_BT_AUDIO_BROADCAST_NAME_ALT<nrf53_audio_app_kconfigs>` or use the default alternative name.
98
+
To configure the second gateway, add both the :option:`CONFIG_TRANSPORT_BIS` and the :option:`CONFIG_BT_AUDIO_USE_BROADCAST_NAME_ALT` Kconfig options set to ``y`` to the :file:`applications/nrf5340_audio/prj.conf` file for the debug version and to the :file:`applications/nrf5340_audio/prj_release.conf` file for the release version.
99
+
You can provide an alternative name to the second gateway using the :option:`CONFIG_BT_AUDIO_BROADCAST_NAME_ALT` or use the default alternative name.
112
100
113
101
You build each BIS gateway separately using the normal procedures from :ref:`nrf53_audio_app_building`.
114
102
After building the first gateway, configure the required Kconfig options for the second gateway and build the second gateway firmware.
115
103
Remember to program the two firmware versions to two separate gateway devices.
116
104
117
-
.. _nrf53_audio_app_configuration_select_i2s:
105
+
.. _nrf53_audio_source_configuration:
118
106
119
-
Selecting the analog jack input using I2S
120
-
*****************************************
107
+
Configuring the audio source
108
+
****************************
109
+
110
+
The nRF5340 Audio application supports multiple audio sources for gateway devices.
111
+
See :ref:`nrf53_audio_app_overview_architecture_usb` and :ref:`nrf53_audio_app_overview_architecture_i2s` for information about the firmware architecture differences.
112
+
113
+
The audio source is selected using the following Kconfig options:
114
+
115
+
* USB audio source (:option:`CONFIG_AUDIO_SOURCE_USB`) - Uses USB as the audio source (default for gateway)
116
+
* I2S audio source (:option:`CONFIG_AUDIO_SOURCE_I2S`) - Uses 3.5 mm jack analog input using I2S
121
117
122
118
In the default configuration, the gateway application uses USB as the audio source.
123
119
The :ref:`nrf53_audio_app_building` and the testing steps also refer to using the USB serial connection.
124
120
125
-
To switch to using the 3.5 mm jack analog input, set the :ref:`CONFIG_AUDIO_SOURCE_I2S<nrf53_audio_app_kconfigs>` Kconfig option to ``y`` in the :file:`applications/nrf5340_audio/prj.conf` file for the debug version and in the :file:`applications/nrf5340_audio/prj_release.conf` file for the release version.
121
+
The audio source selection affects the firmware architecture and available features.
122
+
USB audio source is limited to unidirectional streams due to CPU load considerations, while I2S supports bidirectional communication.
123
+
124
+
.. _nrf53_audio_app_configuration_select_i2s:
125
+
126
+
Selecting the analog jack input using I2S
127
+
=========================================
128
+
129
+
To switch to using the 3.5 mm jack analog input, set the :option:`CONFIG_AUDIO_SOURCE_I2S` Kconfig option to ``y`` in the :file:`applications/nrf5340_audio/prj.conf` file for the debug version and in the :file:`applications/nrf5340_audio/prj_release.conf` file for the release version.
126
130
127
131
When testing the application, an additional audio jack cable is required to use I2S.
128
132
Use this cable to connect the audio source (PC) to the analog **LINE IN** on the development kit.
129
133
130
-
.. _nrf53_audio_app_adding_FEM_support:
134
+
.. _nrf53_audio_codec_configuration:
131
135
132
-
Adding FEM support
136
+
Configuring codecs
133
137
******************
134
138
135
-
You can add support for the nRF21540 front-end module (FEM) to the following nRF5340 Audio applications:
139
+
The nRF5340 Audio application uses both software and hardware codecs.
140
+
The software codec is responsible for encoding and decoding, while the hardware codec is responsible for DAC/ADC and other audio processing.
141
+
See :ref:`nrf53_audio_app_overview_architecture` for information about how both codecs are integrated into the firmware architecture.
* :ref:`Unicast server <nrf53_audio_unicast_server_app>`
143
+
You can enable the software codec using the :option:`CONFIG_SW_CODEC_LC3` Kconfig option.
144
+
This codec is mandatory for LE Audio.
140
145
141
-
The :ref:`broadcast sink application <nrf53_audio_broadcast_sink_app>` does not need FEM support as it only receives data.
146
+
You can enable the CS47L63 hardware codec using the :option:`CONFIG_NRF5340_AUDIO_CS47L63_DRIVER` Kconfig option.
142
147
143
-
Adding FEM support happens when :ref:`nrf53_audio_app_building`.
144
-
You can use one of the following options, depending on how you decide to build the application:
148
+
The codec selection affects audio quality, processing requirements, and power consumption.
145
149
146
-
* If you opt for :ref:`nrf53_audio_app_building_script`, add the ``--nrf21540`` to the script's building command.
147
-
* If you opt for :ref:`nrf53_audio_app_building_standard`, add the ``-Dnrf5340_audio_SHIELD=nrf21540ek -Dipc_radio_SHIELD=nrf21540ek`` to the ``west build`` command.
148
-
For example:
150
+
.. _nrf53_audio_quality_configuration:
149
151
150
-
.. code-block:: console
152
+
Configuring audio quality
153
+
*************************
151
154
152
-
west build -b nrf5340_audio_dk/nrf5340/cpuapp --pristine -- -DEXTRA_CONF_FILE=".\unicast_server\overlay-unicast_server.conf" -Dnrf5340_audio_SHIELD=nrf21540ek -Dipc_radio_SHIELD=nrf21540ek
155
+
The nRF5340 Audio application provides extensive configuration options for audio quality.
156
+
These settings affect the :ref:`nrf53_audio_app_overview_architecture_sync_module` and overall audio performance.
153
157
154
-
To set the TX power output, use the :kconfig:option:`CONFIG_BT_CTLR_TX_PWR_ANTENNA` and :kconfig:option:`CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB` Kconfig options in :file:`applications/nrf5340_audio/sysbuild/ipc_radio/prj.conf`.
158
+
See :ref:`config_audio_app_options` for the list of options to configure the following audio quality settings:
155
159
156
-
See :ref:`ug_radio_fem` for more information about FEM in the |NCS|.
To enable SD card playback functionality, you need to set the following Kconfig options to ``y``:
187
205
188
-
* :ref:`CONFIG_NRF5340_AUDIO_SD_CARD_MODULE<nrf53_audio_app_kconfigs>` - to enable the SD card module; this option is enabled by default on nRF5340 Audio DK
189
-
* :ref:`CONFIG_SD_CARD_PLAYBACK<nrf53_audio_app_kconfigs>` - to enable the playback functionality
206
+
* :option:`CONFIG_NRF5340_AUDIO_SD_CARD_MODULE` - to enable the SD card module; this option is enabled by default on nRF5340 Audio DK
207
+
* :option:`CONFIG_SD_CARD_PLAYBACK` - to enable the playback functionality
190
208
191
209
Optionally, you can also set the following Kconfig options:
* :ref:`Unicast server <nrf53_audio_unicast_server_app>`
282
+
283
+
The :ref:`broadcast sink application <nrf53_audio_broadcast_sink_app>` does not need FEM support as it only receives data.
284
+
285
+
Adding FEM support happens when :ref:`nrf53_audio_app_building`.
286
+
You can use one of the following options, depending on how you decide to build the application:
287
+
288
+
* If you opt for :ref:`nrf53_audio_app_building_script`, add the ``--nrf21540`` to the script's building command.
289
+
* If you opt for :ref:`nrf53_audio_app_building_standard`, add the ``-Dnrf5340_audio_SHIELD=nrf21540ek -Dipc_radio_SHIELD=nrf21540ek`` to the ``west build`` command.
290
+
For example:
291
+
292
+
.. code-block:: console
293
+
294
+
west build -b nrf5340_audio_dk/nrf5340/cpuapp --pristine -- -DEXTRA_CONF_FILE=".\unicast_server\overlay-unicast_server.conf" -Dnrf5340_audio_SHIELD=nrf21540ek -Dipc_radio_SHIELD=nrf21540ek
295
+
296
+
To set the TX power output, use the :kconfig:option:`CONFIG_BT_CTLR_TX_PWR_ANTENNA` and :kconfig:option:`CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB` Kconfig options in :file:`applications/nrf5340_audio/sysbuild/ipc_radio/prj.conf`.
297
+
298
+
See :ref:`ug_radio_fem` for more information about FEM in the |NCS|.
0 commit comments