Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 141) sorted by relevance

123456

/device/asus/flo/conn_init/
Dwfc_util_fctrl.c55 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/lge/mako/conn_init/
Dwfc_util_fctrl.c55 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/
Dqemud.c208 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/lge/mako/camera/QCamera/stack/mm-camera-test/inc/
Dmm_qcamera_main_menu.h384 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/lge/mako/charger_touch/
Dcharger_touch.c37 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/
Dcharger_touch.c37 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/hammerhead/libsensors/
DLightSensor.cpp54 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/
Dmm_camera_stream.c172 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()
234 rc = ioctl(stream->fd, VIDIOC_G_CROP, &crop); in mm_camera_stream_util_proc_get_crop()
244 int32_t mm_camera_util_s_ctrl( int32_t fd, uint32_t id, int32_t value) in mm_camera_util_s_ctrl() argument
252 rc = ioctl (fd, VIDIOC_S_CTRL, &control); in mm_camera_util_s_ctrl()
256 __func__, fd, id, (uint32_t)value, rc); in mm_camera_util_s_ctrl()
262 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
270 rc = ioctl (fd, MSM_CAM_V4L2_IOCTL_PRIVATE_S_CTRL, &v4l2_ioctl); in mm_camera_util_private_s_ctrl()
274 __func__, fd, id, (uint32_t)value, rc); in mm_camera_util_private_s_ctrl()
[all …]
Dmm_camera_sock.c94 void mm_camera_socket_close(int fd) in mm_camera_socket_close() argument
96 if (fd > 0) { in mm_camera_socket_close()
97 close(fd); in mm_camera_socket_close()
111 int fd, in mm_camera_socket_sendmsg() argument
156 return sendmsg(fd, &(msgh), 0); in mm_camera_socket_sendmsg()
171 int fd, in mm_camera_socket_recvmsg() argument
199 if ( (rcvd_len = recvmsg(fd, &(msgh), 0)) <= 0) { in mm_camera_socket_recvmsg()
Dmm_camera_sock.h43 int fd,
49 int fd,
54 void mm_camera_socket_close(int fd);
/device/samsung/manta/libsensors/
DIioSensorBase.cpp127 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/generic/goldfish/sensors/
Dsensors_qemu.c128 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/
Dlights.c61 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/asus/flo/camera/QCamera2/HAL3/
DQCamera3Mem.cpp63 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/samsung/manta/voicefx/
DeS305VoiceProcessing.cpp133 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/lge/mako/camera/QCamera/stack/mm-camera-interface/src/
Dmm_camera_thread.c123 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()
Dmm_camera_sock.c94 void mm_camera_socket_close(int fd) in mm_camera_socket_close() argument
96 if (fd > 0) { in mm_camera_socket_close()
97 close(fd); in mm_camera_socket_close()
111 int fd, in mm_camera_socket_sendmsg() argument
156 return sendmsg(fd, &(msgh), 0); in mm_camera_socket_sendmsg()
171 int fd, in mm_camera_socket_recvmsg() argument
199 if ( (rcvd_len = recvmsg(fd, &(msgh), 0)) <= 0) { in mm_camera_socket_recvmsg()
/device/generic/goldfish/audio/
Daudio_hw.c48 int fd; member
102 static int out_dump(const struct audio_stream *stream, int fd) in out_dump() argument
106 fdprintf(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 fdprintf(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()
457 if (adev->fd >= 0) in adev_init_check()
[all …]
/device/generic/goldfish/libqemu/
Dtest_util.c47 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/asus/flo/camera/QCamera2/stack/mm-camera-interface/src/
Dmm_camera_sock.c98 void mm_camera_socket_close(int fd) in mm_camera_socket_close() argument
100 if (fd > 0) { in mm_camera_socket_close()
101 close(fd); in mm_camera_socket_close()
116 int fd, in mm_camera_socket_sendmsg() argument
161 return sendmsg(fd, &(msgh), 0); in mm_camera_socket_sendmsg()
177 int fd, in mm_camera_socket_recvmsg() argument
205 if ( (rcvd_len = recvmsg(fd, &(msgh), 0)) <= 0) { in mm_camera_socket_recvmsg()
/device/samsung/manta/liblights/
Dlights.c74 int fd; in write_int() local
78 fd = open(path, O_RDWR); in write_int()
80 if (fd >= 0) { in write_int()
83 int amt = write(fd, buffer, bytes); in write_int()
84 close(fd); in write_int()
174 int fd; in led_sysfs_write() local
190 fd = open(path_name, O_WRONLY); in led_sysfs_write()
192 if (fd < 0) { in led_sysfs_write()
199 } while (fd < 0); in led_sysfs_write()
207 err = write(fd, buf, len); in led_sysfs_write()
[all …]
/device/generic/goldfish/gps/
Dgps_qemu.c586 int fd; member
609 close( s->fd ); s->fd = -1; in gps_state_done()
645 epoll_register( int epoll_fd, int fd ) in epoll_register() argument
651 flags = fcntl(fd, F_GETFL); in epoll_register()
652 fcntl(fd, F_SETFL, flags | O_NONBLOCK); in epoll_register()
655 ev.data.fd = fd; in epoll_register()
657 ret = epoll_ctl( epoll_fd, EPOLL_CTL_ADD, fd, &ev ); in epoll_register()
664 epoll_deregister( int epoll_fd, int fd ) in epoll_deregister() argument
668 ret = epoll_ctl( epoll_fd, EPOLL_CTL_DEL, fd, NULL ); in epoll_deregister()
684 int gps_fd = state->fd; in gps_state_thread()
[all …]
/device/asus/flo/camera/QCamera2/HAL/
DQCameraMem.cpp66 mMemInfo[i].fd = 0; in QCameraMemory()
120 cache_inv_data.fd = mMemInfo[index].fd; in cacheOpsInternal()
127 __func__, cache_inv_data.vaddr, cache_inv_data.fd, in cacheOpsInternal()
152 return mMemInfo[index].fd; in getFd()
206 bufDef.fd = mMemInfo[index].fd; in getBufDef()
215 bufDef.planes[0].m.userptr = mMemInfo[index].fd; in getBufDef()
220 bufDef.planes[i].m.userptr = mMemInfo[i].fd; in getBufDef()
333 memInfo.fd = ion_info_fd.fd; in allocOneBuffer()
362 if (memInfo.fd > 0) { in deallocOneBuffer()
363 close(memInfo.fd); in deallocOneBuffer()
[all …]
/device/asus/grouper/power/
Dpower.c36 int fd = open(path, O_WRONLY); in sysfs_write() local
38 if (fd < 0) { in sysfs_write()
44 len = write(fd, s, strlen(s)); in sysfs_write()
50 close(fd); in sysfs_write()
/device/asus/flo/camera/QCamera2/stack/mm-camera-interface/inc/
Dmm_camera_sock.h43 int fd,
49 int fd,
54 void mm_camera_socket_close(int fd);

123456