From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v3 5/5] client/player: Add presets from GMAP
Date: Wed, 22 Nov 2023 16:07:27 -0500 [thread overview]
Message-ID: <20231122210727.893872-5-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20231122210727.893872-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds the following presets from GMAP:
16_1_gs
16_2_gs
32_1_gs
32_2_gs
48_1_gs
48_2_gs
32_1_gr
32_2_gr
48_1_gr
48_2_gr
48_3_gr
48_4_gr
32_1_gr_l+r
32_2_gr_l+r
48_1_gr_l+r
48_2_gr_l+r
48_3_gr_l+r
48_4_gr_l+r
---
client/player.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/client/player.c b/client/player.c
index 715598aa9405..4673d2efece8 100644
--- a/client/player.c
+++ b/client/player.c
@@ -1314,6 +1314,13 @@ static struct codec_preset sbc_presets[] = {
0x02, LC3_CONFIG_DURATION, _duration, \
0x03, LC3_CONFIG_FRAME_LEN, _len, _len >> 8)
+#define LC3_PRESET_DATA_ALL(_freq, _duration, _alloc, _len) \
+ CODEC_DATA(0x02, LC3_CONFIG_FREQ, _freq, \
+ 0x02, LC3_CONFIG_DURATION, _duration, \
+ 0x05, LC3_CONFIG_CHAN_ALLOC, _alloc, _alloc >> 8, \
+ _alloc >> 16, _alloc >> 24, \
+ 0x03, LC3_CONFIG_FRAME_LEN, _len, _len >> 8)
+
#define LC3_PRESET_8KHZ(_duration, _len) \
LC3_PRESET_DATA(LC3_CONFIG_FREQ_8KHZ, _duration, _len)
@@ -1332,18 +1339,24 @@ static struct codec_preset sbc_presets[] = {
#define LC3_PRESET_32KHZ(_duration, _len) \
LC3_PRESET_DATA(LC3_CONFIG_FREQ_32KHZ, _duration, _len)
+#define LC3_PRESET_32KHZ_ALL(_duration, _len, _alloc) \
+ LC3_PRESET_DATA_ALL(LC3_CONFIG_FREQ_48KHZ, _duration, _alloc, _len)
+
#define LC3_PRESET_44KHZ(_duration, _len) \
LC3_PRESET_DATA(LC3_CONFIG_FREQ_44KHZ, _duration, _len)
#define LC3_PRESET_48KHZ(_duration, _len) \
LC3_PRESET_DATA(LC3_CONFIG_FREQ_48KHZ, _duration, _len)
+#define LC3_PRESET_48KHZ_ALL(_duration, _len, _alloc) \
+ LC3_PRESET_DATA_ALL(LC3_CONFIG_FREQ_48KHZ, _duration, _alloc, _len)
+
#define LC3_PRESET_LL(_name, _data, _qos) \
{ \
.name = _name, \
.data = _data, \
.qos = _qos, \
- .latency = 0x01, \
+ .target_latency = 0x01, \
}
#define LC3_PRESET(_name, _data, _qos) \
@@ -1461,6 +1474,67 @@ static struct codec_preset lc3_presets[] = {
LC3_PRESET_HR("48_6_2",
LC3_PRESET_48KHZ(LC3_CONFIG_DURATION_10, 155u),
LC3_10_UNFRAMED(155u, 13u, 100u, 40000u)),
+ /* QoS configuration support setting requirements for the UGG and UGT */
+ LC3_PRESET_LL("16_1_gs",
+ LC3_PRESET_16KHZ(LC3_CONFIG_DURATION_7_5, 30u),
+ LC3_7_5_UNFRAMED(30u, 1u, 15u, 60000u)),
+ LC3_PRESET_LL("16_2_gs",
+ LC3_PRESET_16KHZ(LC3_CONFIG_DURATION_10, 40u),
+ LC3_10_UNFRAMED(40u, 1u, 20u, 60000u)),
+ LC3_PRESET_LL("32_1_gs",
+ LC3_PRESET_32KHZ(LC3_CONFIG_DURATION_7_5, 60u),
+ LC3_7_5_UNFRAMED(60u, 1u, 15u, 60000u)),
+ LC3_PRESET_LL("32_2_gs",
+ LC3_PRESET_32KHZ(LC3_CONFIG_DURATION_10, 80u),
+ LC3_10_UNFRAMED(80u, 1u, 20u, 60000u)),
+ LC3_PRESET_LL("48_1_gs",
+ LC3_PRESET_48KHZ(LC3_CONFIG_DURATION_7_5, 75u),
+ LC3_7_5_UNFRAMED(75u, 1u, 15u, 60000u)),
+ LC3_PRESET_LL("48_2_gs",
+ LC3_PRESET_48KHZ(LC3_CONFIG_DURATION_10, 100u),
+ LC3_10_UNFRAMED(100u, 1u, 20u, 60000u)),
+ LC3_PRESET_LL("32_1_gr",
+ LC3_PRESET_32KHZ(LC3_CONFIG_DURATION_7_5, 60u),
+ LC3_7_5_UNFRAMED(60u, 1u, 15u, 10000u)),
+ LC3_PRESET_LL("32_2_gr",
+ LC3_PRESET_32KHZ(LC3_CONFIG_DURATION_10, 80u),
+ LC3_10_UNFRAMED(80u, 1u, 20u, 10000u)),
+ LC3_PRESET_LL("48_1_gr",
+ LC3_PRESET_48KHZ(LC3_CONFIG_DURATION_7_5, 75u),
+ LC3_7_5_UNFRAMED(75u, 1u, 15u, 10000u)),
+ LC3_PRESET_LL("48_2_gr",
+ LC3_PRESET_48KHZ(LC3_CONFIG_DURATION_10, 100u),
+ LC3_10_UNFRAMED(100u, 1u, 20u, 10000u)),
+ LC3_PRESET_LL("48_3_gr",
+ LC3_PRESET_48KHZ(LC3_CONFIG_DURATION_7_5, 90u),
+ LC3_7_5_UNFRAMED(90u, 1u, 15u, 10000u)),
+ LC3_PRESET_LL("48_4_gr",
+ LC3_PRESET_48KHZ(LC3_CONFIG_DURATION_10, 120u),
+ LC3_10_UNFRAMED(120u, 1u, 20u, 10000u)),
+ LC3_PRESET_LL("32_1_gr_l+r",
+ LC3_PRESET_32KHZ_ALL(LC3_CONFIG_DURATION_7_5, 60u,
+ 0x00000003),
+ LC3_7_5_UNFRAMED(2 * 60u, 1u, 15u, 10000u)),
+ LC3_PRESET_LL("32_2_gr_l+r",
+ LC3_PRESET_32KHZ_ALL(LC3_CONFIG_DURATION_10, 80u,
+ 0x00000003),
+ LC3_10_UNFRAMED(2 * 80u, 1u, 20u, 10000u)),
+ LC3_PRESET_LL("48_1_gr_l+r",
+ LC3_PRESET_48KHZ_ALL(LC3_CONFIG_DURATION_7_5, 75u,
+ 0x00000003),
+ LC3_7_5_UNFRAMED(2 * 75u, 1u, 15u, 10000u)),
+ LC3_PRESET_LL("48_2_gr_l+r",
+ LC3_PRESET_48KHZ_ALL(LC3_CONFIG_DURATION_10, 100u,
+ 0x00000003),
+ LC3_10_UNFRAMED(2 * 100u, 1u, 20u, 10000u)),
+ LC3_PRESET_LL("48_3_gr_l+r",
+ LC3_PRESET_48KHZ_ALL(LC3_CONFIG_DURATION_7_5, 90u,
+ 0x00000003),
+ LC3_7_5_UNFRAMED(2 * 90u, 1u, 15u, 10000u)),
+ LC3_PRESET_LL("48_4_gr_l+r",
+ LC3_PRESET_48KHZ_ALL(LC3_CONFIG_DURATION_10, 120u,
+ 0x00000003),
+ LC3_10_UNFRAMED(2 * 120u, 1u, 20u, 10000u)),
};
static void print_ltv(const char *str, void *user_data)
--
2.42.0
next prev parent reply other threads:[~2023-11-22 21:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 21:07 [PATCH BlueZ v3 1/5] shared/util: Add GMAP related UUIDs Luiz Augusto von Dentz
2023-11-22 21:07 ` [PATCH BlueZ v3 2/5] monitor/att: Add GMAS attribute decoders Luiz Augusto von Dentz
2023-11-22 21:07 ` [PATCH BlueZ v3 3/5] iso-tester: Add presets from GMAP Luiz Augusto von Dentz
2023-11-22 21:07 ` [PATCH BlueZ v3 4/5] isotest: " Luiz Augusto von Dentz
2023-11-22 21:07 ` Luiz Augusto von Dentz [this message]
2023-11-22 22:57 ` [BlueZ,v3,1/5] shared/util: Add GMAP related UUIDs bluez.test.bot
2023-11-27 15:20 ` [PATCH BlueZ v3 1/5] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231122210727.893872-5-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox