Message ID | e15e60d7941eba174cf306b45c80bc53435554b0.1676210275.git.pav@iki.fi (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [BlueZ,v3] media: clear the right transport when clearing BAP endpoint | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | warning | WARNING:LONG_LINE: line length of 81 exceeds 80 columns #138: FILE: profiles/audio/transport.c:1492: + if (strcasecmp(uuid, PAC_SINK_UUID) && strcasecmp(uuid, PAC_SOURCE_UUID)) /github/workspace/src/src/13137447.patch total: 0 errors, 1 warnings, 66 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/13137447.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. |
tedd_an/GitLint | fail | 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 16: B2 Line has trailing whitespace: " " 20: B2 Line has trailing whitespace: " " |
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 |
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=721072 ---Test result--- Test Summary: CheckPatch FAIL 0.76 seconds GitLint FAIL 0.55 seconds BuildEll PASS 32.68 seconds BluezMake PASS 985.96 seconds MakeCheck PASS 12.57 seconds MakeDistcheck PASS 181.92 seconds CheckValgrind PASS 297.79 seconds CheckSmatch PASS 393.37 seconds bluezmakeextell PASS 119.15 seconds IncrementalBuild PASS 797.55 seconds ScanBuild PASS 1244.97 seconds Details ############################## Test: CheckPatch - FAIL Desc: Run checkpatch.pl script Output: [BlueZ,v3] media: clear the right transport when clearing BAP endpoint WARNING:LONG_LINE: line length of 81 exceeds 80 columns #138: FILE: profiles/audio/transport.c:1492: + if (strcasecmp(uuid, PAC_SINK_UUID) && strcasecmp(uuid, PAC_SOURCE_UUID)) /github/workspace/src/src/13137447.patch total: 0 errors, 1 warnings, 66 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/13137447.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,v3] media: clear the right transport when clearing BAP endpoint 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 16: B2 Line has trailing whitespace: " " 20: B2 Line has trailing whitespace: " " --- Regards, Linux Bluetooth
diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 505c4b3a6..8728b69e0 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -86,7 +86,6 @@ struct endpoint_request { struct media_endpoint { struct a2dp_sep *sep; struct bt_bap_pac *pac; - void *stream; char *sender; /* Endpoint DBus bus id */ char *path; /* Endpoint object path */ char *uuid; /* Endpoint property UUID */ @@ -1007,9 +1006,6 @@ static void pac_config_cb(struct media_endpoint *endpoint, void *ret, int size, struct pac_config_data *data = user_data; gboolean *ret_value = ret; - if (ret_value) - endpoint->stream = data->stream; - data->cb(data->stream, ret_value ? 0 : -EINVAL); } @@ -1089,11 +1085,21 @@ static int pac_config(struct bt_bap_stream *stream, struct iovec *cfg, static void pac_clear(struct bt_bap_stream *stream, void *user_data) { struct media_endpoint *endpoint = user_data; + GSList *item; - endpoint->stream = NULL; + DBG("endpoint %p stream %p", endpoint, stream); - while (endpoint->transports != NULL) - clear_configuration(endpoint, endpoint->transports->data); + item = endpoint->transports; + while (item) { + struct media_transport *transport = item->data; + + if (media_transport_get_stream(transport) == stream) { + clear_configuration(endpoint, transport); + item = endpoint->transports; + } else { + item = item->next; + } + } } static struct bt_bap_pac_ops pac_ops = { diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 5e057e2a5..b7aa5107b 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -1483,6 +1483,19 @@ const char *media_transport_get_path(struct media_transport *transport) return transport->path; } +void *media_transport_get_stream(struct media_transport *transport) +{ + struct bap_transport *bap; + const char *uuid; + + uuid = media_endpoint_get_uuid(transport->endpoint); + if (strcasecmp(uuid, PAC_SINK_UUID) && strcasecmp(uuid, PAC_SOURCE_UUID)) + return NULL; + + bap = transport->data; + return bap->stream; +} + 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,