Re: [PATCH BlueZ bluez] bass: Clear the temporary flag of the BIS source device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz

[ EXTERNAL EMAIL ]

Hi Yang,

On Wed, Apr 2, 2025 at 3:33 AM Yang Li via B4 Relay
<devnull+yang.li.amlogic.com@xxxxxxxxxx> wrote:
From: Yang Li <yang.li@xxxxxxxxxxx>

When BIG sync succeeds, remove the temporary timer. Otherwise,
the device will timeout and be removed, triggering the automatic
termination of BIG.

issue: https://github.com/bluez/bluez/issues/1144

Signed-off-by: Yang Li <yang.li@xxxxxxxxxxx>
---
  profiles/audio/bass.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/profiles/audio/bass.c b/profiles/audio/bass.c
index c36f43277..99f1decce 100644
--- a/profiles/audio/bass.c
+++ b/profiles/audio/bass.c
@@ -565,6 +565,9 @@ static void confirm_cb(GIOChannel *io, void *user_data)
         g_io_channel_ref(io);
         dg->io = io;

+       /* Clear temporary flag*/
+       btd_device_set_temporary(dg->device, false);
This is not quite right, we shall not persist the broadcasters, as
they are likely not pairable/bondable, that said the device shall be
marked as connected which would prevent them to be removed. That said
we should be handling if the service is marked as connected:

static bool device_disappeared(gpointer user_data)
{
     struct btd_device *dev = user_data;

     /* If there are services connected restart the timer to give more time
      * for the service to either complete the connection or disconnect.
      */
     if (device_service_connected(dev))
         return TRUE;

And it looks like that is done in iso_bcast_confirm_cb in bap plugin
which calls btd_service_connecting_complete.

I tested it with a K70 phone as Assistant and another Android device as BIS Source. After the Assistant added the BIS source information, the iso_bcast_confirm_cb function was not called, but the connect_cb(profiles/audio/bass.c) function was executed. In my next patch, I will add btd_service_connecting_complete to the connect_cb function.
         /* Update Broadcast Receive State characteristic value and notify
          * peers.
          */

---
base-commit: 6d20a300642f312290af0bc9869a0e1b416c58dc
change-id: 20250402-bass-66200bb7eba1

Best regards,
--
Yang Li <yang.li@xxxxxxxxxxx>




--
Luiz Augusto von Dentz




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux