Skip to content

Commit

Permalink
Bluetooth: BAP: Shell: Minor refactor of LC3 encoder
Browse files Browse the repository at this point in the history
This commit renames a few variables and changes the
type and adds some additional checks.

It moves stream specific data to the shell stream
struct, but still keeps the global values that were used
to initialize the LC3 encoder

The purpose of this is to better allow for a future LC3 decoder
without any clashes in names or the like.

Signed-off-by: Emil Gydesen <[email protected]>
  • Loading branch information
Thalley authored and fabiobaltieri committed Feb 26, 2024
1 parent 11f69be commit f4c8020
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 91 deletions.
6 changes: 6 additions & 0 deletions subsys/bluetooth/audio/shell/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ struct shell_stream {
struct bt_cap_stream stream;
struct bt_audio_codec_cfg codec_cfg;
struct bt_audio_codec_qos qos;
#if defined(CONFIG_LIBLC3)
uint32_t lc3_freq_hz;
uint32_t lc3_frame_duration_us;
uint16_t lc3_octets_per_frame;
uint8_t lc3_frames_per_sdu;
#endif /* CONFIG_LIBLC3 */
#if defined(CONFIG_BT_AUDIO_TX)
int64_t connected_at_ticks; /* The uptime tick measured when stream was connected */
uint16_t seq_num;
Expand Down
Loading

0 comments on commit f4c8020

Please sign in to comment.