Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v3] asha: allow LE 2M PHY on the audio channel
@ 2026-10-29  3:00 Kyle Pepper
  2026-10-29  6:31 ` [v3] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Kyle Pepper @ 2026-10-29  3:00 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Luiz Augusto von Dentz

Allow LE 2M alongside LE 1M on the connected audio socket before starting
ASHA. Keep streaming if the kernel cannot set the PHY preference.

Assisted-by: OpenCode:gpt-6.1-sol
Assisted-by: Codex:GPT-6
---
Changes since v2:
- Drop the standalone PHY unit test and its build/ignore entries.
- Reuse the existing test/simple-asha playback script.

Validation: builds without warnings, 35/35 native unit binaries,
and checkpatch pass.

 profiles/audio/asha.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/profiles/audio/asha.c b/profiles/audio/asha.c
index 8e625fd..d862247 100644
--- a/profiles/audio/asha.c
+++ b/profiles/audio/asha.c
@@ -88,6 +88,8 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data)
 	struct connect_data *conn_data = user_data;
 	struct bt_asha_device *asha_dev = conn_data->asha_dev;
 	GError *gerr = NULL;
+	uint32_t phys;
+	int fd;
 
 	if (err) {
 		error("%s", err->message);
@@ -105,6 +107,15 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data)
 		g_error_free(gerr);
 	}
 
+	/*
+	 * Allow LE 2M with LE 1M fallback. Older kernels may lack BT_PHY.
+	 */
+	phys = BT_PHY_LE_1M_TX | BT_PHY_LE_1M_RX |
+			BT_PHY_LE_2M_TX | BT_PHY_LE_2M_RX;
+	fd = g_io_channel_unix_get_fd(io);
+	if (setsockopt(fd, SOL_BLUETOOTH, BT_PHY, &phys, sizeof(phys)) < 0)
+		DBG("Could not set LE 2M PHY preference: %s", strerror(errno));
+
 	asha_dev->io = io;
 
 	bt_asha_start(asha_dev->asha, conn_data->cb,

base-commit: 82667d713949447d7c94725432c61b33689ae68a
-- 
2.56.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [v3] asha: allow LE 2M PHY on the audio channel
  2026-10-29  3:00 [PATCH v3] asha: allow LE 2M PHY on the audio channel Kyle Pepper
@ 2026-10-29  6:31 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-10-29  6:31 UTC (permalink / raw)
  To: linux-bluetooth, cochcoder

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1195855/

---Test result---

Test Summary:
CheckPatch                    PASS      0.34 seconds
GitLint                       PASS      0.24 seconds
BuildEll                      PASS      16.84 seconds
BluezMake                     PASS      235.93 seconds
MakeCheck                     PASS      3.36 seconds
MakeDistcheck                 PASS      122.53 seconds
CheckValgrind                 PASS      124.41 seconds
CheckSmatch                   PASS      229.54 seconds
bluezmakeextell               PASS      77.72 seconds
TestFunctional                PASS      971.42 seconds
IncrementalBuild              PASS      239.67 seconds
ScanBuild                     PASS      869.28 seconds



https://github.com/bluez/bluez/pull/2734

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-29  6:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29  3:00 [PATCH v3] asha: allow LE 2M PHY on the audio channel Kyle Pepper
2026-10-29  6:31 ` [v3] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox