diff mbox series

[BlueZ,1/2] shared/bap: add function to get location from PAC

Message ID 3cc705b0fa000b4cfc5071ae13f4c0fcb31bfc25.1682182441.git.pav@iki.fi (mailing list archive)
State Accepted
Commit 5910b78528010b654a82367bb2e95f70dd7877ce
Headers show
Series [BlueZ,1/2] shared/bap: add function to get location from PAC | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Pauli Virtanen April 22, 2023, 5:05 p.m. UTC
Add function to get the PACS Sink/Source Audio Locations field relevant
for a given PAC.
---
 src/shared/bap.c | 14 ++++++++++++++
 src/shared/bap.h |  2 ++
 2 files changed, 16 insertions(+)

Comments

bluez.test.bot@gmail.com April 22, 2023, 6:30 p.m. UTC | #1
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=742421

---Test result---

Test Summary:
CheckPatch                    PASS      1.05 seconds
GitLint                       PASS      0.69 seconds
BuildEll                      PASS      27.20 seconds
BluezMake                     PASS      988.66 seconds
MakeCheck                     PASS      11.58 seconds
MakeDistcheck                 PASS      152.08 seconds
CheckValgrind                 PASS      248.73 seconds
CheckSmatch                   PASS      336.25 seconds
bluezmakeextell               PASS      99.69 seconds
IncrementalBuild              PASS      1748.36 seconds
ScanBuild                     PASS      1055.93 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org April 25, 2023, 9:10 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Sat, 22 Apr 2023 17:05:56 +0000 you wrote:
> Add function to get the PACS Sink/Source Audio Locations field relevant
> for a given PAC.
> ---
>  src/shared/bap.c | 14 ++++++++++++++
>  src/shared/bap.h |  2 ++
>  2 files changed, 16 insertions(+)

Here is the summary with links:
  - [BlueZ,1/2] shared/bap: add function to get location from PAC
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=5910b7852801
  - [BlueZ,2/2] bap: add Location parameter to SelectProperties
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2f88c59391b8

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 1fff7e0fd..5a12a64d2 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2442,6 +2442,20 @@  uint8_t bt_bap_pac_get_type(struct bt_bap_pac *pac)
 	return pac->type;
 }
 
+uint32_t bt_bap_pac_get_locations(struct bt_bap_pac *pac)
+{
+	struct bt_pacs *pacs = pac->bdb->pacs;
+
+	switch (pac->type) {
+	case BT_BAP_SOURCE:
+		return pacs->source_loc_value;
+	case BT_BAP_SINK:
+		return pacs->sink_loc_value;
+	default:
+		return 0;
+	}
+}
+
 static void notify_pac_removed(void *data, void *user_data)
 {
 	struct bt_bap_pac_changed *changed = data;
diff --git a/src/shared/bap.h b/src/shared/bap.h
index bd13abef9..0d419aa74 100644
--- a/src/shared/bap.h
+++ b/src/shared/bap.h
@@ -128,6 +128,8 @@  bool bt_bap_remove_pac(struct bt_bap_pac *pac);
 
 uint8_t bt_bap_pac_get_type(struct bt_bap_pac *pac);
 
+uint32_t bt_bap_pac_get_locations(struct bt_bap_pac *pac);
+
 struct bt_bap_stream *bt_bap_pac_get_stream(struct bt_bap_pac *pac);
 
 /* Session related function */