diff mbox series

[v1,2/5] bap: Fix update of sink location value

Message ID 20231020142554.486629-2-kiran.k@intel.com
State New
Headers show
Series [v1,1/5] media: Populate location to qos structure | expand

Commit Message

K, Kiran Oct. 20, 2023, 2:25 p.m. UTC
pac->sink_loc needs to be updated only if there is a change.
---
 src/shared/bap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 925501c48d98..2fd21b81b72d 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2491,13 +2491,11 @@  static void pacs_sink_location_changed(struct bt_pacs *pacs)
 
 static void pacs_add_sink_location(struct bt_pacs *pacs, uint32_t location)
 {
-	location |= pacs->sink_loc_value;
-
 	/* Check if location value needs updating */
 	if (location == pacs->sink_loc_value)
 		return;
 
-	pacs->sink_loc_value = location;
+	pacs->sink_loc_value |= location;
 
 	pacs_sink_location_changed(pacs);
 }