Message ID | 20221202005051.2401504-1-luiz.dentz@gmail.com |
---|---|
State | New |
Headers | show |
Series | [BlueZ,v2,1/8] shared/bap: Fix not reading all instances of PAC Sinks/Sources | expand |
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=701027 ---Test result--- Test Summary: CheckPatch PASS 4.54 seconds GitLint PASS 2.60 seconds BuildEll PASS 32.50 seconds BluezMake PASS 1144.47 seconds MakeCheck PASS 12.70 seconds MakeDistcheck PASS 173.32 seconds CheckValgrind PASS 287.56 seconds bluezmakeextell PASS 114.48 seconds IncrementalBuild PASS 7628.72 seconds ScanBuild PASS 1199.21 seconds --- Regards, Linux Bluetooth
diff --git a/src/shared/bap.c b/src/shared/bap.c index 21aa8aa6c5ca..7a24824a71fc 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -2908,10 +2908,12 @@ static void foreach_pacs_char(struct gatt_db_attribute *attr, void *user_data) DBG(bap, "Sink PAC found: handle 0x%04x", value_handle); pacs = bap_get_pacs(bap); - if (!pacs || pacs->sink) + if (!pacs) return; - pacs->sink = attr; + if (!pacs->sink) + pacs->sink = attr; + bap_read_value(bap, value_handle, read_sink_pac, bap); } @@ -2919,10 +2921,12 @@ static void foreach_pacs_char(struct gatt_db_attribute *attr, void *user_data) DBG(bap, "Source PAC found: handle 0x%04x", value_handle); pacs = bap_get_pacs(bap); - if (!pacs || pacs->source) + if (!pacs) return; - pacs->source = attr; + if (!pacs->source) + pacs->source = attr; + bap_read_value(bap, value_handle, read_source_pac, NULL); }
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Both PAC Sink and Source are allowed to have multiple instances: - The server wanted to support a smaller maximum transmission unit (ATT_MTU, as defined in Volume 3, Part F, Section 3.2.8 in [2]) size. Exposing all supported PAC records in a single Sink PAC characteristic would require the server to increase its supported Maximum Transmission Unit (MTU) size to a value the server considered excessive. - The server wanted to expose support for proprietary audio capabilities (such as vendor-specific audio codecs, as denoted by the Codec_ID parameter value) separately from support for non-vendor-specific audio capabilities and used separate Sink PAC characteristics to expose such support. - The server wanted to minimize the amount of data to be transferred, when sending notifications to a client that the Sink PAC characteristic value changed, by exposing the audio capabilities likely to change quicker than others in separate Sink PAC characteristics. --- src/shared/bap.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)