asha: allow LE 2M PHY on the audio channel
PATCH v3 1/1 asha: allow LE 2M PHY on the audio channel
Allow LE 2M alongside LE 1M on the connected audio socket before starting ASHA. Keep streaming if the kernel cannot set the PHY preference.
---
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(+)
profiles/audio/asha.c +11 -0
@@ -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
Signature · 1 line
2.56.0
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
Hi,
Following up on this patch, is there anything else needed to move it forward?
Thanks,
Kyle
Quoted 51 lines · Kyle Pepper
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-solAssisted-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(+)profiles/audio/asha.c +11
-0@@ -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:
82667d713949447d7c94725432c61b33689ae68aSignature · 1 line
2.56.0
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 11 lines · On Thu, 29 Oct 2026 03:00:53 +0000 you wrote:
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-solAssisted-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.[...]
Here is the summary with links:
- [v3] asha: allow LE 2M PHY on the audio channel
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=9659adb6819d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html