Commit 24f0a833 authored by Emil Gydesen's avatar Emil Gydesen Committed by Alberto Escolar
Browse files

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: default avatarEmil Gydesen <emil.gydesen@nordicsemi.no>
parent 06b31aa4
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -784,6 +784,10 @@ static inline void print_codec_cfg_chan_allocation(const struct shell *sh, size_
	shell_print(sh, "%*sChannel allocation:", indent, "");

	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 */
		for (size_t i = 0; i < 32; 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,
						    uint16_t octets_per_frame)