Parent: 638774f603c2a216b8ec4a2866e1dfa37059918a
Author: Vlad Pruteanu <vlad.pruteanu@nxp.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-04-24 17:32:43
Tree: 3f28546f599b0b37582826d9e8cbae24d332184d
bap: Replace adapter in bap_data with bap_adapter This patch introduces the bap_adapter structure. In addition to btd_adapter it also holds the pa_timer_id and the bcast_pa_requests queue associated with that adapter. This enables convenient access to these variables since the functions that need them already utilize bap_data. For each adapter a new instance of bap_adapter is created and inserted into the global queue, bap_adapters. For each scanned source bap_bcast_probe searches the bap_adapters queue based on the adapter and stores the result in the bap_data associated with the source. Operations made on the old global queue are now made on bap_data->bap_adapter->bcast_pa_requests queue. While this commit sought to utilize the already existing bap_data in order to avoid searching in queues, a lookup was still necessary in bap_bcast_probe. Here, the bap_data for the scanned devices is created and the bap_adapter field must be set to the appropriate value. There is no way of getting the correct bap_adapter refference without searching the bap_adapters queue.
Diffstat
| M | profiles/audio/bap.c | | | 100 | ++++++++++++++++++++++++++++++++++++++++- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
1 files changed, 66 insertions(+), 34 deletions(-)