/device/lge/mako/conn_init/ |
D | wfc_util_fctrl.c | 55 static void wfc_util_finsert_new_string(int fd, char **ppReadedBuff, char *pNewStringValue, char *p… in wfc_util_finsert_new_string() argument 62 if( 0 == fd || NULL == pNewStringValue || 0 == strlen(pNewStringValue) ) { in wfc_util_finsert_new_string() 83 sz_file = lseek( fd, 0, SEEK_END ); in wfc_util_finsert_new_string() 101 lseek( fd, (int)(pSPointer-pReadBuff), SEEK_SET ); in wfc_util_finsert_new_string() 102 write( fd, pNewStringValue, strlen(pNewStringValue)); in wfc_util_finsert_new_string() 112 lseek( fd, (int)(pETagPointer-pReadBuff), SEEK_SET ); in wfc_util_finsert_new_string() 113 write( fd, pBackupBuff, sz_backupBuff ); in wfc_util_finsert_new_string() 115 …ftruncate(fd, sz_file + strlen(pNewStringValue) - 1); /* we use "-1" becasue of "pSPointer = pETag… in wfc_util_finsert_new_string() 132 static void wfc_util_fupdate_string(int fd, char **ppReadedBuff, in wfc_util_fupdate_string() argument 139 if( 0 == fd ) { in wfc_util_fupdate_string() [all …]
|
/device/asus/flo/conn_init/ |
D | wfc_util_fctrl.c | 55 static void wfc_util_finsert_new_string(int fd, char **ppReadedBuff, char *pNewStringValue, char *p… in wfc_util_finsert_new_string() argument 62 if( 0 == fd || NULL == pNewStringValue || 0 == strlen(pNewStringValue) ) { in wfc_util_finsert_new_string() 83 sz_file = lseek( fd, 0, SEEK_END ); in wfc_util_finsert_new_string() 101 lseek( fd, (int)(pSPointer-pReadBuff), SEEK_SET ); in wfc_util_finsert_new_string() 102 write( fd, pNewStringValue, strlen(pNewStringValue)); in wfc_util_finsert_new_string() 112 lseek( fd, (int)(pETagPointer-pReadBuff), SEEK_SET ); in wfc_util_finsert_new_string() 113 write( fd, pBackupBuff, sz_backupBuff ); in wfc_util_finsert_new_string() 115 …ftruncate(fd, sz_file + strlen(pNewStringValue) - 1); /* we use "-1" becasue of "pSPointer = pETag… in wfc_util_finsert_new_string() 132 static void wfc_util_fupdate_string(int fd, char **ppReadedBuff, in wfc_util_fupdate_string() argument 139 if( 0 == fd ) { in wfc_util_fupdate_string() [all …]
|
/device/generic/goldfish/qemud/ |
D | qemud.c | 208 fd_read(int fd, void* to, int len) in fd_read() argument 213 ret = read(fd, to, len); in fd_read() 220 fd_write(int fd, const void* from, int len) in fd_write() argument 225 ret = write(fd, from, len); in fd_write() 232 fd_setnonblock(int fd) in fd_setnonblock() argument 237 flags = fcntl(fd, F_GETFD); in fd_setnonblock() 242 __FUNCTION__, fd, strerror(errno) ); in fd_setnonblock() 246 ret = fcntl(fd, F_SETFD, flags | O_NONBLOCK); in fd_setnonblock() 251 __FUNCTION__, fd, strerror(errno) ); in fd_setnonblock() 257 fd_accept(int fd) in fd_accept() argument [all …]
|
/device/moto/shamu/camera/QCamera2/stack/mm-camera-test/inc/ |
D | mm_qcamera_socket.h | 53 #define __FD_SET(fd, fdsetp) \ argument 54 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31))) 57 #define __FD_CLR(fd, fdsetp) \ argument 58 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31))) 61 #define __FD_ISSET(fd, fdsetp) \ argument 62 ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
|
/device/lge/mako/charger_touch/ |
D | charger_touch.c | 37 int fd = open(path, O_RDONLY, 0); in read_path() local 40 if (fd < 0) { in read_path() 44 count = read(fd, buf, size); in read_path() 46 close(fd); in read_path() 51 int fd = open(TOUCH_PATH, O_RDWR, 0); in write_path() local 54 if (fd < 0) { in write_path() 60 write(fd, buf, 1); in write_path() 62 close(fd); in write_path()
|
/device/asus/flo/charger_touch/ |
D | charger_touch.c | 37 int fd = open(path, O_RDONLY, 0); in read_path() local 40 if (fd < 0) { in read_path() 44 count = read(fd, buf, size); in read_path() 46 close(fd); in read_path() 51 int fd = open(TOUCH_PATH, O_RDWR, 0); in write_path() local 54 if (fd < 0) { in write_path() 60 write(fd, buf, 1); in write_path() 62 close(fd); in write_path()
|
/device/lge/mako/camera/QCamera/stack/mm-camera-test/inc/ |
D | mm_qcamera_main_menu.h | 384 int8_t (*getPicture)(int fd, struct crop_info *cropInfo ); 389 int8_t (*getMaxZoom)(int fd, void *pZm); 401 int8_t (*sethjr) (int fd, int8_t hjr_status); 402 int8_t (*setLensShading) (int fd, int8_t rolloff_status); 403 int8_t (*setLedMode) (int fd, led_mode_t led_mode); 404 int8_t (*getSharpness_AF) (int fd, int32_t *sharpness); 405 int8_t (*setMotionIso) (int fd, motion_iso_t motion_iso); 406 int8_t (*setHue) (int fd, int32_t hue); 407 int8_t (*cancelAF) (int fd); 408 int8_t (*getAfStep) (int fd, int32_t *afStep); [all …]
|
/device/moto/shamu/camera/QCamera/stack/mm-camera-test/inc/ |
D | mm_qcamera_main_menu.h | 377 int8_t (*getPicture)(int fd, struct crop_info *cropInfo ); 382 int8_t (*getMaxZoom)(int fd, void *pZm); 394 int8_t (*sethjr) (int fd, int8_t hjr_status); 395 int8_t (*setLensShading) (int fd, int8_t rolloff_status); 396 int8_t (*setLedMode) (int fd, led_mode_t led_mode); 397 int8_t (*getSharpness_AF) (int fd, int32_t *sharpness); 398 int8_t (*setMotionIso) (int fd, motion_iso_t motion_iso); 399 int8_t (*setHue) (int fd, int32_t hue); 400 int8_t (*cancelAF) (int fd); 401 int8_t (*getAfStep) (int fd, int32_t *afStep); [all …]
|
/device/lge/hammerhead/libsensors/ |
D | LightSensor.cpp | 54 int fd; in setDelay() local 60 fd = open(sysfs, O_RDWR); in setDelay() 61 if (fd >= 0) { in setDelay() 64 write(fd, buf, sizeof(buf)); in setDelay() 65 close(fd); in setDelay() 88 int fd = open(sysfs, O_RDWR); in enable() local 89 if (fd < 0) { in enable() 98 write(fd, buf, sizeof(buf)); in enable() 99 close(fd); in enable()
|
/device/lge/mako/camera/mm-camera-interface/ |
D | mm_camera_stream.c | 172 if(stream->fd > 0) close(stream->fd); in mm_camera_stream_release() 187 __func__, stream->fd, stream->stream_type, stream->state, state); in mm_camera_stream_util_set_state() 206 rc = ioctl(stream->fd, VIDIOC_DQBUF, &vb); in mm_camera_read_msm_frame() 238 rc = ioctl(stream->fd, VIDIOC_G_CROP, &crop); in mm_camera_stream_util_proc_get_crop() 248 int32_t mm_camera_util_s_ctrl( int32_t fd, uint32_t id, int32_t value) in mm_camera_util_s_ctrl() argument 256 rc = ioctl (fd, VIDIOC_S_CTRL, &control); in mm_camera_util_s_ctrl() 260 __func__, fd, id, (uint32_t)value, rc); in mm_camera_util_s_ctrl() 266 int32_t mm_camera_util_private_s_ctrl(int32_t fd, uint32_t id, int32_t value) in mm_camera_util_private_s_ctrl() argument 274 rc = ioctl (fd, MSM_CAM_V4L2_IOCTL_PRIVATE_S_CTRL, &v4l2_ioctl); in mm_camera_util_private_s_ctrl() 278 __func__, fd, id, (uint32_t)value, rc); in mm_camera_util_private_s_ctrl() [all …]
|
/device/samsung/manta/libsensors/ |
D | IioSensorBase.cpp | 127 int fd; in enable() local 128 fd = open(mInputSysfsEnable, O_RDWR); in enable() 129 if (fd >= 0) { in enable() 130 err = write(fd, en ? "1" : "0", 2); in enable() 131 close(fd); in enable() 148 int fd; in setDelay() local 156 fd = open(mInputSysfsSamplingFrequency, O_RDWR); in setDelay() 157 if (fd < 0) { in setDelay() 163 write(fd, buf, strlen(buf)+1); in setDelay() 164 close(fd); in setDelay()
|
/device/moto/shamu/camera/QCamera/stack/mm-camera-interface/src/ |
D | mm_camera_stream.c | 129 rc = ioctl(my_obj->fd, MSM_CAM_V4L2_IOCTL_PRIVATE_G_CTRL, &v4l2_ioctl); in get_stream_inst_handle() 139 my_obj->ext_image_mode, my_obj->fd, my_obj->state, rc); in get_stream_inst_handle() 151 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_handle_rcvd_buf() 215 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_data_notify() 270 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_buf_notify() 325 my_obj->ext_image_mode, my_obj->fd, my_obj->state); in mm_stream_dispatch_app_data() 377 my_obj->ext_image_mode, my_obj->fd, my_obj->state, evt); in mm_stream_fsm_fn() 422 my_obj->ext_image_mode, my_obj->fd, my_obj->state, evt); in mm_stream_fsm_inited() 434 my_obj->fd = open(dev_name, O_RDWR | O_NONBLOCK); in mm_stream_fsm_inited() 435 if (my_obj->fd <= 0) { in mm_stream_fsm_inited() [all …]
|
D | mm_camera_thread.c | 122 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->pfds[0]; in mm_camera_poll_proc_pipe() 127 if (poll_cb->poll_entries[0].fd > 0) { in mm_camera_poll_proc_pipe() 129 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->poll_entries[0].fd; in mm_camera_poll_proc_pipe() 135 if(poll_cb->poll_entries[i].fd > 0) { in mm_camera_poll_proc_pipe() 137 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->poll_entries[i].fd; in mm_camera_poll_proc_pipe() 148 poll_cb->poll_fds[poll_cb->num_fds].fd = -1; in mm_camera_poll_proc_pipe() 221 poll_cb->poll_fds[poll_cb->num_fds++].fd = poll_cb->pfds[0]; in mm_camera_poll_thread() 239 int32_t fd, in mm_camera_poll_thread_add_poll_fd() argument 255 poll_cb->poll_entries[idx].fd = fd; in mm_camera_poll_thread_add_poll_fd() 285 poll_cb->poll_entries[idx].fd = -1; /* set fd to invalid */ in mm_camera_poll_thread_del_poll_fd()
|
/device/generic/goldfish/sensors/ |
D | sensors_qemu.c | 128 int fd; member 141 if (ctl->fd < 0) { in control__open_data_source() 142 ctl->fd = qemud_channel_open(SENSORS_SERVICE_NAME); in control__open_data_source() 144 D("%s: fd=%d", __FUNCTION__, ctl->fd); in control__open_data_source() 146 handle->data[0] = dup(ctl->fd); in control__open_data_source() 161 _sensorIdToName(handle), handle, ctl->fd, enabled); in control__activate() 181 if (ctl->fd < 0) { in control__activate() 182 ctl->fd = qemud_channel_open(SENSORS_SERVICE_NAME); in control__activate() 185 ret = qemud_channel_send(ctl->fd, command, -1); in control__activate() 205 return qemud_channel_send(ctl->fd, command, -1); in control__set_delay() [all …]
|
/device/lge/hammerhead/liblight/ |
D | lights.c | 61 int fd; in write_int() local 64 fd = open(path, O_RDWR); in write_int() 65 if (fd >= 0) { in write_int() 68 int amt = write(fd, buffer, bytes); in write_int() 69 close(fd); in write_int() 82 int fd; in write_on_off() local 85 fd = open(path, O_RDWR); in write_on_off() 86 if (fd >= 0) { in write_on_off() 89 int amt = write(fd, buffer, bytes); in write_on_off() 90 close(fd); in write_on_off()
|
/device/moto/shamu/camera/QCamera2/HAL3/ |
D | QCamera3Mem.cpp | 64 mMemInfo[i].fd = 0; in QCamera3Memory() 112 cache_inv_data.fd = mMemInfo[index].fd; in cacheOpsInternal() 119 __func__, cache_inv_data.vaddr, cache_inv_data.fd, in cacheOpsInternal() 144 return mMemInfo[index].fd; in getFd() 201 bufDef.fd = mMemInfo[index].fd; in getBufDef() 210 bufDef.planes[0].m.userptr = mMemInfo[index].fd; in getBufDef() 215 bufDef.planes[i].m.userptr = mMemInfo[i].fd; in getBufDef() 358 memInfo.fd = ion_info_fd.fd; in allocOneBuffer() 387 if (memInfo.fd > 0) { in deallocOneBuffer() 388 close(memInfo.fd); in deallocOneBuffer() [all …]
|
/device/lge/hammerhead/camera/QCamera2/HAL3/ |
D | QCamera3Mem.cpp | 63 mMemInfo[i].fd = 0; in QCamera3Memory() 111 cache_inv_data.fd = mMemInfo[index].fd; in cacheOpsInternal() 118 __func__, cache_inv_data.vaddr, cache_inv_data.fd, in cacheOpsInternal() 143 return mMemInfo[index].fd; in getFd() 200 bufDef.fd = mMemInfo[index].fd; in getBufDef() 209 bufDef.planes[0].m.userptr = mMemInfo[index].fd; in getBufDef() 214 bufDef.planes[i].m.userptr = mMemInfo[i].fd; in getBufDef() 357 memInfo.fd = ion_info_fd.fd; in allocOneBuffer() 386 if (memInfo.fd > 0) { in deallocOneBuffer() 387 close(memInfo.fd); in deallocOneBuffer() [all …]
|
/device/asus/flo/camera/QCamera2/HAL3/ |
D | QCamera3Mem.cpp | 63 mMemInfo[i].fd = 0; in QCamera3Memory() 111 cache_inv_data.fd = mMemInfo[index].fd; in cacheOpsInternal() 118 __func__, cache_inv_data.vaddr, cache_inv_data.fd, in cacheOpsInternal() 143 return mMemInfo[index].fd; in getFd() 197 bufDef.fd = mMemInfo[index].fd; in getBufDef() 206 bufDef.planes[0].m.userptr = mMemInfo[index].fd; in getBufDef() 211 bufDef.planes[i].m.userptr = mMemInfo[i].fd; in getBufDef() 352 memInfo.fd = ion_info_fd.fd; in allocOneBuffer() 381 if (memInfo.fd > 0) { in deallocOneBuffer() 382 close(memInfo.fd); in deallocOneBuffer() [all …]
|
/device/htc/flounder/sensor_hub/libsensors/ |
D | CwMcuSensor.cpp | 73 int fd; in sysfs_set_input_attr() local 79 fd = open(fname, O_WRONLY); in sysfs_set_input_attr() 80 if (fd < 0) { in sysfs_set_input_attr() 81 ALOGE("%s: fname = %s, fd = %d, failed: %s\n", __func__, fname, fd, strerror(errno)); in sysfs_set_input_attr() 85 rc = write(fd, value, (size_t)len); in sysfs_set_input_attr() 87 … ALOGE("%s: write failed: fd = %d, rc = %d, strerr = %s\n", __func__, fd, rc, strerror(errno)); in sysfs_set_input_attr() 88 close(fd); in sysfs_set_input_attr() 92 close(fd); in sysfs_set_input_attr() 148 int fd = open(filename, O_RDONLY); in find_type_by_name() local 150 if (fd < 0) { in find_type_by_name() [all …]
|
/device/asus/fugu/power/ |
D | power.c | 44 int fd = open(path, O_WRONLY); in sysfs_write() local 46 if (fd < 0) { in sysfs_write() 52 if ((len = write(fd, s, strlen(s))) < 0) { in sysfs_write() 57 close(fd); in sysfs_write() 67 int fd = open(path, O_RDONLY); in sysfs_read() local 69 if (fd < 0) { in sysfs_read() 75 if ((count = read(fd, s, (num_bytes - 1))) < 0) { in sysfs_read() 86 close(fd); in sysfs_read()
|
/device/generic/goldfish/libqemu/ |
D | test_util.c | 47 static int fd; in pipe_openSocket() local 52 fd = socket( AF_INET, SOCK_STREAM, 0 ); in pipe_openSocket() 53 if (fd < 0) { in pipe_openSocket() 63 if ( connect(fd, (struct sockaddr*)&addr, sizeof(addr)) < 0 ) { in pipe_openSocket() 66 close(fd); in pipe_openSocket() 70 pipe->socket = fd; in pipe_openSocket()
|
/device/moto/shamu/camera/QCamera/HAL/usbcamcore/inc/ |
D | QCameraUsbPriv.h | 101 camHal->fd = open(camHal->dev_name, O_RDWR | O_NONBLOCK, 0);\ 102 if(!camHal->fd)\ 113 if(camHal->fd){\ 114 rc = close(camHal->fd);\ 119 camHal->fd = 0;\ 156 int fd; member
|
/device/lge/mako/camera/QCamera/stack/mm-camera-interface/src/ |
D | mm_camera_thread.c | 123 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->pfds[0]; in mm_camera_poll_proc_pipe() 128 if (poll_cb->poll_entries[0].fd > 0) { in mm_camera_poll_proc_pipe() 130 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->poll_entries[0].fd; in mm_camera_poll_proc_pipe() 136 if(poll_cb->poll_entries[i].fd > 0) { in mm_camera_poll_proc_pipe() 138 poll_cb->poll_fds[poll_cb->num_fds].fd = poll_cb->poll_entries[i].fd; in mm_camera_poll_proc_pipe() 149 poll_cb->poll_fds[poll_cb->num_fds].fd = -1; in mm_camera_poll_proc_pipe() 222 poll_cb->poll_fds[poll_cb->num_fds++].fd = poll_cb->pfds[0]; in mm_camera_poll_thread() 240 int32_t fd, in mm_camera_poll_thread_add_poll_fd() argument 256 poll_cb->poll_entries[idx].fd = fd; in mm_camera_poll_thread_add_poll_fd() 286 poll_cb->poll_entries[idx].fd = -1; /* set fd to invalid */ in mm_camera_poll_thread_del_poll_fd()
|
/device/samsung/manta/voicefx/ |
D | eS305VoiceProcessing.cpp | 133 int fd[ES305_NUM_CTRL]; member 704 if (eS305_ctrl.fd[i] >= 0) { in AdncBundle_Release_l() 705 close(eS305_ctrl.fd[i]); in AdncBundle_Release_l() 707 eS305_ctrl.fd[i] = -1; in AdncBundle_Release_l() 1077 if (eS305_ctrl.fd[ES305_CTRL_TX_AGC_ENABLE] < 0) { in Adnc_SetAutomaticGainControlInt_l() 1079 eS305_ctrl.fd[ES305_CTRL_TX_AGC_ENABLE] = open(ES305_TX_AGC_ENABLE_PATH, O_RDWR); in Adnc_SetAutomaticGainControlInt_l() 1080 if (eS305_ctrl.fd[ES305_CTRL_TX_AGC_ENABLE] < 0) { in Adnc_SetAutomaticGainControlInt_l() 1087 write(eS305_ctrl.fd[ES305_CTRL_TX_AGC_ENABLE], ES305_AGC_ON, strlen(ES305_AGC_ON)); in Adnc_SetAutomaticGainControlInt_l() 1089 write(eS305_ctrl.fd[ES305_CTRL_TX_AGC_ENABLE], ES305_AEC_OFF, strlen(ES305_AGC_OFF)); in Adnc_SetAutomaticGainControlInt_l() 1098 if (eS305_ctrl.fd[ES305_CTRL_AEC_ENABLE] < 0) { in Adnc_SetEchoCancellationInt_l() [all …]
|
/device/generic/goldfish/audio/ |
D | audio_hw.c | 48 int fd; member 102 static int out_dump(const struct audio_stream *stream, int fd) in out_dump() argument 106 dprintf(fd, "\tout_dump:\n" in out_dump() 190 if (adev->fd >= 0) in out_write() 191 bytes = write(adev->fd, buffer, bytes); in out_write() 258 static int in_dump(const struct audio_stream *stream, int fd) in in_dump() argument 262 dprintf(fd, "\tin_dump:\n" in in_dump() 342 if (adev->fd >= 0) in in_read() 343 bytes = read(adev->fd, buffer, bytes); in in_read() 458 if (adev->fd >= 0) in adev_init_check() [all …]
|