Bluetooth: Audio: Shell: Fix chan alloc print for mono

The print_codec_cfg_chan_allocation did not take the case where
chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO into account,
in which case it should print "Mono".

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2024-03-26 11:45:06 +01:00 committed by Alberto Escolar
commit 24f0a83326

View file

@ -784,6 +784,10 @@ static inline void print_codec_cfg_chan_allocation(const struct shell *sh, size_
shell_print(sh, "%*sChannel allocation:", indent, ""); shell_print(sh, "%*sChannel allocation:", indent, "");
indent += SHELL_PRINT_INDENT_LEVEL_SIZE; indent += SHELL_PRINT_INDENT_LEVEL_SIZE;
if (chan_allocation == BT_AUDIO_LOCATION_MONO_AUDIO) {
shell_print(sh, "%*s Mono", indent, "");
} else {
/* There can be up to 32 bits set in the field */ /* There can be up to 32 bits set in the field */
for (size_t i = 0; i < 32; i++) { for (size_t i = 0; i < 32; i++) {
const uint8_t bit_val = BIT(i); const uint8_t bit_val = BIT(i);
@ -794,6 +798,7 @@ static inline void print_codec_cfg_chan_allocation(const struct shell *sh, size_
} }
} }
} }
}
static inline void print_codec_cfg_octets_per_frame(const struct shell *sh, size_t indent, static inline void print_codec_cfg_octets_per_frame(const struct shell *sh, size_t indent,
uint16_t octets_per_frame) uint16_t octets_per_frame)