Skip to content

Commit 868b180

Browse files
MariuszSkamracarlescufi
authored andcommitted
Bluetooth: Make use of BT_CODEC_LC3_CHAN_COUNT_SUPPORT macro
Use the BT_CODEC_LC3_CHAN_COUNT_SUPPORT macro to define the supported channel counts. Signed-off-by: Mariusz Skamra <[email protected]>
1 parent 031717a commit 868b180

File tree

2 files changed

+4
-5
lines changed
  • samples/bluetooth/unicast_audio_server/src
  • subsys/bluetooth/shell

2 files changed

+4
-5
lines changed

samples/bluetooth/unicast_audio_server/src/main.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@
2727
BT_AUDIO_CONTEXT_TYPE_MEDIA | \
2828
BT_AUDIO_CONTEXT_TYPE_GAME)
2929

30-
#define CHANNEL_COUNT_1 BIT(0)
31-
3230
NET_BUF_POOL_FIXED_DEFINE(tx_pool, CONFIG_BT_ASCS_ASE_SRC_COUNT,
3331
BT_ISO_SDU_BUF_SIZE(CONFIG_BT_ISO_TX_MTU),
3432
8, NULL);
3533

3634
static struct bt_codec lc3_codec =
37-
BT_CODEC_LC3(BT_CODEC_LC3_FREQ_ANY, BT_CODEC_LC3_DURATION_10, CHANNEL_COUNT_1, 40u, 120u,
38-
1u, (BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL | BT_AUDIO_CONTEXT_TYPE_MEDIA),
35+
BT_CODEC_LC3(BT_CODEC_LC3_FREQ_ANY, BT_CODEC_LC3_DURATION_10,
36+
BT_CODEC_LC3_CHAN_COUNT_SUPPORT(1), 40u, 120u, 1u,
37+
(BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL | BT_AUDIO_CONTEXT_TYPE_MEDIA),
3938
BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
4039

4140
static struct bt_conn *default_conn;

subsys/bluetooth/shell/audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ static int lc3_release(struct bt_audio_stream *stream)
418418

419419
static struct bt_codec lc3_codec = BT_CODEC_LC3(BT_CODEC_LC3_FREQ_ANY,
420420
BT_CODEC_LC3_DURATION_ANY,
421-
0x03, 30, 240, 2,
421+
BT_CODEC_LC3_CHAN_COUNT_SUPPORT(1, 2), 30, 240, 2,
422422
(BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL |
423423
BT_AUDIO_CONTEXT_TYPE_MEDIA),
424424
BT_AUDIO_CONTEXT_TYPE_ANY);

0 commit comments

Comments
 (0)