diff mbox series

[BlueZ,v2,1/3] audio/transport: add media_transport_get_stream method for transports

Message ID f973ae1e4b2c07902f98a6e7776b44bef25670be.1676499415.git.pav@iki.fi
State New
Headers show
Series [BlueZ,v2,1/3] audio/transport: add media_transport_get_stream method for transports | expand

Commit Message

Pauli Virtanen Feb. 15, 2023, 10:26 p.m. UTC
Add a method for getting the audio stream associated with a media
transport.
---

Notes:
    v2: make generic and split out to separate patch

 profiles/audio/transport.c | 18 ++++++++++++++++++
 profiles/audio/transport.h |  1 +
 2 files changed, 19 insertions(+)

Comments

bluez.test.bot@gmail.com Feb. 15, 2023, 11:52 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=722269

---Test result---

Test Summary:
CheckPatch                    FAIL      1.41 seconds
GitLint                       FAIL      0.98 seconds
BuildEll                      PASS      26.48 seconds
BluezMake                     PASS      754.93 seconds
MakeCheck                     PASS      11.39 seconds
MakeDistcheck                 PASS      147.58 seconds
CheckValgrind                 PASS      241.93 seconds
CheckSmatch                   PASS      318.98 seconds
bluezmakeextell               PASS      96.52 seconds
IncrementalBuild              PASS      1841.66 seconds
ScanBuild                     PASS      962.98 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v2,2/3] media: look up BAP transports by their associated stream
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#80: 
    #0 0x7f16708b9388 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xb9388)

/github/workspace/src/src/13142251.patch total: 0 errors, 1 warnings, 78 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13142251.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


[BlueZ,v2,3/3] media: fix ASAN crash in pac_config_cb
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#67: 
    #0 0x7eff644b9388 in __interceptor_free.part.0 (/lib64/libasan.so.8+0xb9388)

/github/workspace/src/src/13142252.patch total: 0 errors, 1 warnings, 12 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13142252.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v2,1/3] audio/transport: add media_transport_get_stream method for transports

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T1 Title exceeds max length (84>80): "[BlueZ,v2,1/3] audio/transport: add media_transport_get_stream method for transports"
[BlueZ,v2,2/3] media: look up BAP transports by their associated stream

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
48: B2 Line has trailing whitespace: "    "
53: B2 Line has trailing whitespace: "    "
[BlueZ,v2,3/3] media: fix ASAN crash in pac_config_cb

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
34: B2 Line has trailing whitespace: "    "


---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Feb. 16, 2023, 12:51 a.m. UTC | #2
Hello:

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

On Wed, 15 Feb 2023 22:26:00 +0000 you wrote:
> Add a method for getting the audio stream associated with a media
> transport.
> ---
> 
> Notes:
>     v2: make generic and split out to separate patch
> 
> [...]

Here is the summary with links:
  - [BlueZ,v2,1/3] audio/transport: add media_transport_get_stream method for transports
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f7d0599afe9b
  - [BlueZ,v2,2/3] media: look up BAP transports by their associated stream
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e9163b09a3df
  - [BlueZ,v2,3/3] media: fix ASAN crash in pac_config_cb
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=5d347b54714e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 5e057e2a5..912f404e8 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -116,6 +116,8 @@  struct media_transport {
 								guint id);
 	void			(*set_state) (struct media_transport *transport,
 						transport_state_t state);
+	void			*(*get_stream)
+					(struct media_transport *transport);
 	GDestroyNotify		destroy;
 	void			*data;
 };
@@ -1380,6 +1382,13 @@  static void bap_connecting(struct bt_bap_stream *stream, bool state, int fd,
 	bap_update_links(transport);
 }
 
+static void *get_stream_bap(struct media_transport *transport)
+{
+	struct bap_transport *bap = transport->data;
+
+	return bap->stream;
+}
+
 static void free_bap(void *data)
 {
 	struct bap_transport *bap = data;
@@ -1415,6 +1424,7 @@  static int media_transport_init_bap(struct media_transport *transport,
 	transport->suspend = suspend_bap;
 	transport->cancel = cancel_bap;
 	transport->set_state = set_state_bap;
+	transport->get_stream = get_stream_bap;
 	transport->destroy = free_bap;
 
 	return 0;
@@ -1483,6 +1493,14 @@  const char *media_transport_get_path(struct media_transport *transport)
 	return transport->path;
 }
 
+void *media_transport_get_stream(struct media_transport *transport)
+{
+	if (transport->get_stream)
+		return transport->get_stream(transport);
+
+	return NULL;
+}
+
 void media_transport_update_delay(struct media_transport *transport,
 							uint16_t delay)
 {
diff --git a/profiles/audio/transport.h b/profiles/audio/transport.h
index 102fc3cf1..5ca9b8f9e 100644
--- a/profiles/audio/transport.h
+++ b/profiles/audio/transport.h
@@ -19,6 +19,7 @@  struct media_transport *media_transport_create(struct btd_device *device,
 
 void media_transport_destroy(struct media_transport *transport);
 const char *media_transport_get_path(struct media_transport *transport);
+void *media_transport_get_stream(struct media_transport *transport);
 struct btd_device *media_transport_get_dev(struct media_transport *transport);
 int8_t media_transport_get_volume(struct media_transport *transport);
 void media_transport_update_delay(struct media_transport *transport,