/system/bt/audio_a2dp_hw/ |
H A D | audio_a2dp_hw.c | 253 INFO("connected to stack fd = %d", skt_fd); 258 static int skt_read(int fd, void *p, size_t len) argument 266 OSI_NO_INTR(read = recv(fd, p, len, MSG_NOSIGNAL)); 273 static int skt_write(int fd, const void *p, size_t len) argument 282 OSI_NO_INTR(sent = send(fd, p, len, MSG_NOSIGNAL)); 293 OSI_NO_INTR(sent = send(fd, p, len - count, MSG_NOSIGNAL | MSG_DONTWAIT)); 313 static int skt_disconnect(int fd) argument 315 INFO("fd %d", fd); 317 if (fd ! 728 out_dump(const struct audio_stream *stream, int fd) argument 952 in_dump(const struct audio_stream *stream, int fd) argument 1379 adev_dump(const audio_hw_device_t *device, int fd) argument [all...] |
/system/bt/bta/gatt/ |
H A D | bta_gattc_cache.c | 1523 FILE *fd = fopen(fname, "rb"); local 1524 if (!fd) { 1534 if (fread(&cache_ver, sizeof(UINT16), 1, fd) != 1) { 1546 if (fread(&num_attr, sizeof(UINT16), 1, fd) != 1) { 1553 if (fread(attr, sizeof(tBTA_GATTC_NV_ATTR), 0xFF, fd) != num_attr) { 1564 fclose(fd); 1587 FILE *fd = fopen(fname, "wb"); local 1588 if (!fd) { 1594 if (fwrite(&cache_ver, sizeof(UINT16), 1, fd) != 1) { 1596 fclose(fd); [all...] |
/system/bt/btif/co/ |
H A D | bta_hh_co.c | 47 void uhid_set_non_blocking(int fd) argument 49 int opts = fcntl(fd, F_GETFL); 55 if (fcntl(fd, F_SETFL, opts) < 0) 60 static int uhid_write(int fd, const struct uhid_event *ev) argument 63 OSI_NO_INTR(ret = write(fd, ev, sizeof(*ev))); 88 OSI_NO_INTR(ret = read(p_dev->fd, &ev, sizeof(ev))); 200 APPL_TRACE_DEBUG("%s: Thread created fd = %d", __func__, p_dev->fd); 203 pfds[0].fd = p_dev->fd; 238 bta_hh_co_destroy(int fd) argument 248 bta_hh_co_write(int fd, UINT8* rpt, UINT16 len) argument [all...] |
/system/bt/btif/include/ |
H A D | btif_hh.h | 66 int fd; member in struct:__anon592
|
H A D | btif_hl.h | 280 int fd; member in struct:__anon616
|
/system/bt/btif/src/ |
H A D | bluetooth.c | 339 static void dump(int fd, const char **arguments) argument 344 metrics_print(fd, true); 349 metrics_write(fd, true); 353 btif_debug_conn_dump(fd); 354 btif_debug_bond_event_dump(fd); 355 btif_debug_a2dp_dump(fd); 356 btif_debug_config_dump(fd); 357 wakelock_debug_dump(fd); 358 alarm_debug_dump(fd); 360 btif_debug_btsnoop_dump(fd); [all...] |
H A D | btif_config.c | 534 void btif_debug_config_dump(int fd) { argument 535 dprintf(fd, "\nBluetooth Config:\n"); 537 dprintf(fd, " Config Source: "); 540 dprintf(fd, "Not loaded\n"); 543 dprintf(fd, "Original file\n"); 546 dprintf(fd, "Backup file\n"); 549 dprintf(fd, "Legacy file\n"); 552 dprintf(fd, "New file\n"); 555 dprintf(fd, "Reset file\n"); 559 dprintf(fd, " Device [all...] |
H A D | btif_debug_btsnoop.c | 165 void btif_debug_btsnoop_dump(int fd) { argument 166 dprintf(fd, "--- BEGIN:BTSNOOP_LOG_SUMMARY (%zu bytes in) ---\n", ringbuffer_size(buffer)); 170 dprintf(fd, "%s Unable to allocate memory for compression", __func__); 185 dprintf(fd, "%s Log compression failed", __func__); 198 dprintf(fd, "\n"); 202 dprintf(fd, "%s", b64_out); 205 dprintf(fd, "\n--- END:BTSNOOP_LOG_SUMMARY ---\n");
|
H A D | btif_debug_conn.c | 79 void btif_debug_conn_dump(int fd) { argument 85 dprintf(fd, "\nConnection Events:\n"); 87 dprintf(fd, " None\n"); 91 dprintf(fd, " %s %s %s", 97 dprintf(fd, " reason=%d", evt->disconnect_reason); 98 dprintf(fd,"\n");
|
H A D | btif_dm.c | 3509 void btif_debug_bond_event_dump(int fd) { argument 3511 dprintf(fd, "\nBond Events: \n"); 3512 dprintf(fd, " Total Number of events: %zu\n", btif_num_bond_events); 3514 dprintf(fd, " Time BD_ADDR Function State\n"); 3561 dprintf(fd, " %s %s %s %s\n", eventtime, bdaddr, func_name, bond_state);
|
H A D | btif_hh.c | 143 extern void bta_hh_co_destroy(int fd); 144 extern void bta_hh_co_write(int fd, UINT8* rpt, UINT16 len); 159 static void toggle_os_keylockstates(int fd, int changedkeystates); 194 static void toggle_os_keylockstates(int fd, int changedlockstates) argument 196 BTIF_TRACE_EVENT("%s: fd = %d, changedlockstates = 0x%x", 197 __FUNCTION__, fd, changedlockstates); 226 bta_hh_co_write(fd , hidreport, sizeof(hidreport)); 237 bta_hh_co_write(fd , hidreport, sizeof(hidreport)); 316 toggle_os_keylockstates(p_dev->fd, keylockstates); 519 BTIF_TRACE_DEBUG("%s: uhid fd [all...] |
H A D | btif_media_task.c | 3252 void btif_debug_a2dp_dump(int fd) argument 3261 dprintf(fd, "\nA2DP State:\n"); 3262 dprintf(fd, " TxQueue:\n"); 3264 dprintf(fd, " Counts (enqueue/dequeue/readbuf) : %zu / %zu / %zu\n", 3269 dprintf(fd, " Last update time ago in ms (enqueue/dequeue/readbuf) : %llu / %llu / %llu\n", 3280 dprintf(fd, " Frames expected (total/max/ave) : %zu / %zu / %zu\n", 3288 dprintf(fd, " Frames limited (total/max/ave) : %zu / %zu / %zu\n", 3293 dprintf(fd, " Counts (expected/limited) : %zu / %zu\n", 3300 dprintf(fd, " Frames per packet (total/max/ave) : %zu / %zu / %zu\n", 3305 dprintf(fd, " Count [all...] |
H A D | btif_pan.c | 101 static void btpan_tap_fd_signaled(int fd, int type, int flags, uint32_t user_id); 404 int fd, err; local 409 if ((fd = open(clonedev, O_RDWR)) < 0) 412 return fd; 421 if ((err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0) 424 close(fd); 429 int flags = fcntl(fd, F_GETFL, 0); 430 fcntl(fd, F_SETFL, flags | O_NONBLOCK); 431 return fd; 434 close(fd); 468 btpan_tap_close(int fd) argument 725 int fd = PTR_TO_INT(p_param); local 814 btpan_tap_fd_signaled(int fd, int type, int flags, uint32_t user_id) argument [all...] |
H A D | btif_rc.c | 208 static int send_event (int fd, uint16_t type, uint16_t code, int32_t value); 209 static void send_key (int fd, uint16_t key, int pressed); 310 int send_event (int fd, uint16_t type, uint16_t code, int32_t value) argument 321 OSI_NO_INTR(ret = write(fd, &event, sizeof(event))); 325 void send_key (int fd, uint16_t key, int pressed) argument 327 BTIF_TRACE_DEBUG("%s fd:%d key:%u pressed:%d", __FUNCTION__, 328 fd, key, pressed); 330 if (fd < 0) 335 LOG_INFO(LOG_TAG, "AVRCP: Send key %s (%d) fd=%d", key_id_to_str(key), pressed, fd); 357 int fd, x = 0; local [all...] |
H A D | btif_sock.c | 40 static void btsock_signaled(int fd, int type, int flags, uint32_t user_id); 178 static void btsock_signaled(int fd, int type, int flags, uint32_t user_id) { argument 181 btsock_rfc_signaled(fd, flags, user_id); 184 btsock_l2cap_signaled(fd, flags, user_id);
|
H A D | btif_sock_l2cap.c | 75 int our_fd; //fd from our side 76 int app_fd; //fd from app's side 393 static BOOLEAN send_app_connect_signal(int fd, const bt_bdaddr_t* addr, argument 404 if (sock_send_fd(fd, (const uint8_t*)&cs, sizeof(cs), send_fd) == sizeof(cs)) 406 else APPL_TRACE_ERROR("sock_send_fd failed, fd:%d, send_fd:%d", fd, send_fd); 407 } else if (sock_send_all(fd, (const uint8_t*)&cs, sizeof(cs)) == sizeof(cs)) { 489 APPL_TRACE_DEBUG("sending connect signal & app fd: %d to app server to accept() the" 491 APPL_TRACE_DEBUG("server fd:%d, scn:%d", sock->our_fd, sock->channel); 494 accept_rs->app_fd = -1; // The fd i 1023 btsock_l2cap_signaled(int fd, int flags, uint32_t user_id) argument [all...] |
H A D | btif_sock_rfc.c | 82 int fd; member in struct:__anon689 118 rfc_slots[i].fd = INVALID_FD; 145 if (rfc_slots[i].fd == INVALID_FD) 207 slot->fd = fds[0]; 300 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller. 308 slot->app_fd = INVALID_FD; // Drop our reference to the fd. 310 btsock_thread_add_fd(pth, slot->fd, BTSOCK_RFCOMM, SOCK_THREAD_FD_EXCEPTION, slot->id); 367 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller. 368 slot->app_fd = INVALID_FD; // Drop our reference to the fd. 370 btsock_thread_add_fd(pth, slot->fd, BTSOCK_RFCOM 440 send_app_connect_signal(int fd, const bt_bdaddr_t* addr, int channel, int status, int send_fd) argument 736 send_data_to_app(int fd, BT_HDR *p_buf) argument 791 btsock_rfc_signaled(UNUSED_ATTR int fd, int flags, uint32_t user_id) argument [all...] |
H A D | btif_sock_thread.c | 103 static inline void add_poll(int h, int fd, int type, int flags, uint32_t user_id); 216 //add the cmd fd for read & write 235 int fd; member in struct:__anon694 240 int btsock_thread_add_fd(int h, int fd, int type, int flags, uint32_t user_id) argument 259 add_poll(h, fd, type, flags, user_id); 264 sock_cmd_t cmd = {CMD_ADD_FD, fd, type, flags, user_id}; 265 APPL_TRACE_DEBUG("adding fd:%d, flags:0x%x", fd, flags); 273 bool btsock_thread_remove_fd_and_close(int thread_handle, int fd) argument 280 if (fd 401 set_poll(poll_slot_t* ps, int fd, int type, int flags, uint32_t user_id) argument 412 add_poll(int h, int fd, int type, int flags, uint32_t user_id) argument 460 int fd = ts[h].cmd_fdr; local [all...] |
/system/bt/hci/src/ |
H A D | btsnoop_net.c | 35 static void safe_close_(int *fd); 147 static void safe_close_(int *fd) { argument 148 assert(fd != NULL); 149 if (*fd != -1) { 150 close(*fd); 151 *fd = -1;
|
H A D | hci_hal_mct.c | 47 static uint16_t transmit_data_on(int fd, uint8_t *data, uint16_t length); 157 static uint16_t transmit_data_on(int fd, uint8_t *data, uint16_t length) { argument 164 OSI_NO_INTR(ret = write(fd, data + transmitted_length, length)); 167 LOG_ERROR(LOG_TAG, "In %s, error writing to the serial port with fd %d: %s", __func__, fd, strerror(errno));
|
/system/bt/osi/include/socket_utils/ |
H A D | sockets.h | 51 int fd = strtol(val, NULL, 10); local 56 return fd; 72 extern int osi_socket_local_client_connect(int fd, const char *name,
|
/system/bt/osi/src/ |
H A D | alarm.c | 717 static void dump_stat(int fd, stat_t *stat, const char *description) argument 723 dprintf(fd, "%-51s: %llu / %llu / %llu\n", 730 void alarm_debug_dump(int fd) argument 732 dprintf(fd, "\nBluetooth Alarms Statistics:\n"); 738 dprintf(fd, " None\n"); 744 dprintf(fd, " Total Alarms: %zu\n\n", list_length(alarms)); 752 dprintf(fd, " Alarm : %s (%s)\n", stats->name, 755 dprintf(fd, "%-51s: %zu / %zu / %zu / %zu\n", 760 dprintf(fd, "%-51s: %zu / %zu\n", 765 dprintf(fd, " [all...] |
H A D | metrics.cpp | 180 void metrics_write(int fd, bool clear) { argument 200 OSI_NO_INTR(ret = write(fd, protoBase64.c_str(), protoBase64.size())); 202 LOG_ERROR(LOG_TAG, "%s: error writing to dumpsys fd: %s (%d)", __func__, 207 void metrics_print(int fd, bool clear) { argument 221 OSI_NO_INTR(ret = write(fd, pretty_output.c_str(), pretty_output.size())); 223 LOG_ERROR(LOG_TAG, "%s: error writing to dumpsys fd: %s (%d)", __func__,
|
H A D | metrics_linux.cpp | 54 void metrics_write(int fd, bool clear) { argument 58 void metrics_print(int fd, bool clear) { argument
|
H A D | reactor.c | 51 int fd; // the file descriptor to monitor for events. member in struct:reactor_object_t 133 int fd, void *context, 137 assert(fd != INVALID_FD); 143 object->fd = fd; 157 if (epoll_ctl(reactor->epoll_fd, EPOLL_CTL_ADD, fd, &event) == -1) { 158 LOG_ERROR(LOG_TAG, "%s unable to register fd %d to epoll set: %s", __func__, fd, strerror(errno)); 180 if (epoll_ctl(object->reactor->epoll_fd, EPOLL_CTL_MOD, object->fd, &event) == -1) { 181 LOG_ERROR(LOG_TAG, "%s unable to modify interest set for fd 132 reactor_register(reactor_t *reactor, int fd, void *context, void (*read_ready)(void *context), void (*write_ready)(void *context)) argument [all...] |