All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ bluez] bass: Clear the temporary flag of the BIS source device
@ 2025-04-02  7:32 ` Yang Li via B4 Relay
  0 siblings, 0 replies; 6+ messages in thread
From: Yang Li @ 2025-04-02  7:32 UTC (permalink / raw)
  To: Linux Bluetooth; +Cc: Yang Li

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@amlogic.com>
---
 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);
+
 	/* Update Broadcast Receive State characteristic value and notify
 	 * peers.
 	 */

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

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


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

* [PATCH BlueZ bluez] bass: Clear the temporary flag of the BIS source device
@ 2025-04-02  7:32 ` Yang Li via B4 Relay
  0 siblings, 0 replies; 6+ messages in thread
From: Yang Li via B4 Relay @ 2025-04-02  7:32 UTC (permalink / raw)
  To: Linux Bluetooth; +Cc: Yang Li

From: Yang Li <yang.li@amlogic.com>

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@amlogic.com>
---
 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);
+
 	/* Update Broadcast Receive State characteristic value and notify
 	 * peers.
 	 */

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

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



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

* RE: [BlueZ,bluez] bass: Clear the temporary flag of the BIS source device
  2025-04-02  7:32 ` Yang Li via B4 Relay
  (?)
@ 2025-04-02  8:30 ` bluez.test.bot
  -1 siblings, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2025-04-02  8:30 UTC (permalink / raw)
  To: linux-bluetooth, yang.li

[-- Attachment #1: Type: text/plain, Size: 1261 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/project/bluetooth/list/?series=949188

---Test result---

Test Summary:
CheckPatch                    PENDING   0.21 seconds
GitLint                       PENDING   0.19 seconds
BuildEll                      PASS      20.61 seconds
BluezMake                     PASS      1437.28 seconds
MakeCheck                     PASS      13.58 seconds
MakeDistcheck                 PASS      158.20 seconds
CheckValgrind                 PASS      213.87 seconds
CheckSmatch                   PASS      286.08 seconds
bluezmakeextell               PASS      107.94 seconds
IncrementalBuild              PENDING   0.29 seconds
ScanBuild                     PASS      861.42 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ bluez] bass: Clear the temporary flag of the BIS source device
  2025-04-02  7:32 ` Yang Li via B4 Relay
  (?)
  (?)
@ 2025-04-02 14:34 ` Luiz Augusto von Dentz
  2025-04-03  3:33   ` Yang Li
  -1 siblings, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2025-04-02 14:34 UTC (permalink / raw)
  To: yang.li; +Cc: Linux Bluetooth

Hi Yang,

On Wed, Apr 2, 2025 at 3:33 AM Yang Li via B4 Relay
<devnull+yang.li.amlogic.com@kernel.org> wrote:
>
> From: Yang Li <yang.li@amlogic.com>
>
> 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@amlogic.com>
> ---
>  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.


>         /* Update Broadcast Receive State characteristic value and notify
>          * peers.
>          */
>
> ---
> base-commit: 6d20a300642f312290af0bc9869a0e1b416c58dc
> change-id: 20250402-bass-66200bb7eba1
>
> Best regards,
> --
> Yang Li <yang.li@amlogic.com>
>
>
>


-- 
Luiz Augusto von Dentz

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

* Re: [PATCH BlueZ bluez] bass: Clear the temporary flag of the BIS source device
  2025-04-02 14:34 ` [PATCH BlueZ bluez] " Luiz Augusto von Dentz
@ 2025-04-03  3:33   ` Yang Li
  0 siblings, 0 replies; 6+ messages in thread
From: Yang Li @ 2025-04-03  3:33 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Linux Bluetooth

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@kernel.org> wrote:
>> From: Yang Li <yang.li@amlogic.com>
>>
>> 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@amlogic.com>
>> ---
>>   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@amlogic.com>
>>
>>
>>
>
> --
> Luiz Augusto von Dentz

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

* RE: [BlueZ,bluez] bass: Clear the temporary flag of the BIS source device
  2025-04-02  7:32 ` Yang Li via B4 Relay
                   ` (2 preceding siblings ...)
  (?)
@ 2025-04-24 17:00 ` bluez.test.bot
  -1 siblings, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2025-04-24 17:00 UTC (permalink / raw)
  To: linux-bluetooth, yang.li

[-- Attachment #1: Type: text/plain, Size: 1261 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/project/bluetooth/list/?series=949188

---Test result---

Test Summary:
CheckPatch                    PENDING   0.37 seconds
GitLint                       PENDING   0.42 seconds
BuildEll                      PASS      20.65 seconds
BluezMake                     PASS      2636.26 seconds
MakeCheck                     PASS      20.25 seconds
MakeDistcheck                 PASS      198.39 seconds
CheckValgrind                 PASS      277.29 seconds
CheckSmatch                   PASS      304.45 seconds
bluezmakeextell               PASS      128.04 seconds
IncrementalBuild              PENDING   0.34 seconds
ScanBuild                     PASS      901.60 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2025-04-24 17:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-02  7:32 [PATCH BlueZ bluez] bass: Clear the temporary flag of the BIS source device Yang Li
2025-04-02  7:32 ` Yang Li via B4 Relay
2025-04-02  8:30 ` [BlueZ,bluez] " bluez.test.bot
2025-04-02 14:34 ` [PATCH BlueZ bluez] " Luiz Augusto von Dentz
2025-04-03  3:33   ` Yang Li
2025-04-24 17:00 ` [BlueZ,bluez] " bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.