All of lore.kernel.org
 help / color / mirror / Atom feed
From: Silviu Florian Barbulescu <silviu.barbulescu@nxp.com>
To: linux-bluetooth@vger.kernel.org
Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com,
	silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com,
	andrei.istodorescu@nxp.com, iulia.tanasescu@nxp.com
Subject: [PATCH 2/2] Set the device temp false when sync with a bcast source
Date: Wed, 30 Aug 2023 16:29:15 +0300	[thread overview]
Message-ID: <20230830132915.72153-3-silviu.barbulescu@nxp.com> (raw)
In-Reply-To: <20230830132915.72153-1-silviu.barbulescu@nxp.com>

Set the device temporarily false when sync is done with a broadcast
source so the device will not be removed on the temporary timer

---
 profiles/audio/bap.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index dfc71edf6..ab0b2c22b 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -658,6 +658,9 @@ static void bap_io_close(struct bap_ep *ep)
 	g_io_channel_unref(ep->io);
 	ep->io = NULL;
 	ep->cig_active = false;
+
+	if (bt_bap_pac_get_type(ep->lpac) == BT_BAP_BCAST_SINK)
+		btd_device_set_temporary(ep->data->device, true);
 }
 
 static DBusMessage *set_configuration(DBusConnection *conn, DBusMessage *msg,
@@ -797,6 +800,8 @@ static void iso_bcast_confirm_cb(GIOChannel *io, GError *err, void *user_data)
 		goto drop;
 	}
 
+	btd_device_set_temporary(data->device, false);
+
 	g_io_channel_ref(io);
 	btd_service_connecting_complete(data->service, 0);
 	DBG("BCAST ISO: sync with %s (BIG 0x%02x BIS 0x%02x)",
-- 
2.34.1


      parent reply	other threads:[~2023-08-30 18:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30 13:29 [PATCH 0/2] Set device non temp when synchronized with bcast source Silviu Florian Barbulescu
2023-08-30 13:29 ` [PATCH 1/2] Set temp if device is bcast source even if addr is private Silviu Florian Barbulescu
2023-08-30 20:51   ` Set device non temp when synchronized with bcast source bluez.test.bot
2023-08-30 13:29 ` Silviu Florian Barbulescu [this message]

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=20230830132915.72153-3-silviu.barbulescu@nxp.com \
    --to=silviu.barbulescu@nxp.com \
    --cc=andrei.istodorescu@nxp.com \
    --cc=claudia.rosu@nxp.com \
    --cc=iulia.tanasescu@nxp.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=mihai-octavian.urzica@nxp.com \
    --cc=vlad.pruteanu@nxp.com \
    /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 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.