1 /* 2 * Copyright 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include "btm_iso_api.h" 18 #include "osi/include/allocator.h" 19 #include "stack/include/bt_hdr.h" 20 #include "stack/include/bt_types.h" 21 #include "stack/include/btu_hcif.h" 22 23 using bluetooth::hci::IsoManager; 24 btu_hci_msg_process(BT_HDR * p_msg)25void btu_hci_msg_process(BT_HDR* p_msg) { 26 /* Determine the input message type. */ 27 switch (p_msg->event & BT_EVT_MASK) { 28 case BT_EVT_TO_BTU_HCI_EVT: 29 btu_hcif_process_event((uint8_t)(p_msg->event & BT_SUB_EVT_MASK), p_msg); 30 osi_free(p_msg); 31 break; 32 33 case BT_EVT_TO_BTU_HCI_ISO: 34 IsoManager::GetInstance()->HandleIsoData(p_msg); 35 osi_free(p_msg); 36 break; 37 38 default: 39 osi_free(p_msg); 40 break; 41 } 42 } 43