Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 75) sorted by relevance

123

/device/google/fuchsia/bioniccompat/src/
Dsendfile.cc39 int bytes = read(in_fd, buffer, sizeof(buffer)); in sendfile() local
40 if (bytes == 0) { in sendfile()
44 if (bytes < 0) { in sendfile()
45 return bytes; in sendfile()
48 count -= bytes; in sendfile()
51 while(bytes > 0) { in sendfile()
52 int written = write(out_fd, data, bytes); in sendfile()
58 bytes -= written; in sendfile()
/device/generic/goldfish-opengl/android-emu/android/base/
DPool.h58 size_t bytes = sizeof(T) * count; in allocArray() local
59 void* res = alloc(bytes); in allocArray()
64 size_t bytes = strlen(toCopy) + 1; in strDup() local
65 void* res = alloc(bytes); in strDup()
66 memset(res, 0x0, bytes); in strDup()
67 memcpy(res, toCopy, bytes); in strDup()
81 void* dupArray(const void* buf, size_t bytes) { in dupArray() argument
82 void* res = alloc(bytes); in dupArray()
83 memcpy(res, buf, bytes); in dupArray()
DAndroidSubAllocator.h67 size_t bytes = sizeof(T) * count; in allocArray() local
68 void* res = alloc(bytes); in allocArray()
73 size_t bytes = strlen(toCopy) + 1; in strDup() local
74 void* res = alloc(bytes); in strDup()
75 memset(res, 0x0, bytes); in strDup()
76 memcpy(res, toCopy, bytes); in strDup()
90 void* dupArray(const void* buf, size_t bytes) { in dupArray() argument
91 void* res = alloc(bytes); in dupArray()
92 memcpy(res, buf, bytes); in dupArray()
Dring_buffer.c69 bool ring_buffer_can_write(const struct ring_buffer* r, uint32_t bytes) { in ring_buffer_can_write() argument
72 return get_ring_pos(read_view - r->write_pos - 1) >= bytes; in ring_buffer_can_write()
75 bool ring_buffer_can_read(const struct ring_buffer* r, uint32_t bytes) { in ring_buffer_can_read() argument
78 return get_ring_pos(write_view - r->read_pos) >= bytes; in ring_buffer_can_read()
242 uint32_t bytes) { in ring_buffer_view_can_write() argument
246 v, read_view - r->write_pos - 1) >= bytes; in ring_buffer_view_can_write()
252 uint32_t bytes) { in ring_buffer_view_can_read() argument
256 v, write_view - r->read_pos) >= bytes; in ring_buffer_view_can_read()
413 uint32_t bytes) { in ring_buffer_wait_write() argument
416 v ? ring_buffer_view_can_write(r, v, bytes) : in ring_buffer_wait_write()
[all …]
Dring_buffer.h119 uint32_t bytes);
123 uint32_t bytes);
130 uint32_t bytes);
135 uint32_t bytes);
145 uint32_t bytes,
152 uint32_t bytes,
161 const struct ring_buffer* r, uint32_t bytes);
163 const struct ring_buffer* r, uint32_t bytes);
167 uint32_t bytes);
171 uint32_t bytes);
/device/google/contexthub/firmware/os/drivers/ams_tmd2772/
Dams_tmd2772.c153 uint8_t bytes[AMS_TMD2772_MAX_I2C_TRANSFER_SIZE]; member
256 xfer->txrxBuf.bytes[0] = reg; in writeRegister()
257 xfer->txrxBuf.bytes[1] = value; in writeRegister()
258 ret = i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf.bytes, 2, i2cCallback, xfer); in writeRegister()
311 xfer->txrxBuf.bytes[0] = AMS_TMD2772_REG_ENABLE; in setMode()
312 xfer->txrxBuf.bytes[1] = POWER_ON_BIT | WAIT_ENABLE_BIT | in setMode()
314 xfer->txrxBuf.bytes[2] = AMS_TMD2772_ATIME_SETTING; in setMode()
315 xfer->txrxBuf.bytes[3] = AMS_TMD2772_PTIME_SETTING; in setMode()
316 …xfer->txrxBuf.bytes[4] = alsOn ? AMS_TMD2772_WTIME_SETTING_ALS_ON : AMS_TMD2772_WTIME_SETTING_ALS_… in setMode()
317 i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf.bytes, 5, i2cCallback, xfer); in setMode()
[all …]
/device/amlogic/yukawa/hal/audio/
Dfifo_wrapper.cpp33 void *fifo_init(uint32_t bytes, bool reader_throttles_writer) { in fifo_init() argument
35 interface->p_buffer = new int8_t[bytes]; in fifo_init()
40 … interface->p_fifo = new audio_utils_fifo(bytes, 1, interface->p_buffer, reader_throttles_writer); in fifo_init()
56 ssize_t fifo_read(void *fifo_itfe, void *buffer, size_t bytes) { in fifo_read() argument
58 return interface->p_fifo_reader->read(buffer, bytes); in fifo_read()
61 ssize_t fifo_write(void *fifo_itfe, void *buffer, size_t bytes) { in fifo_write() argument
63 return interface->p_fifo_writer->write(buffer, bytes); in fifo_write()
Daudio_aec.c300 size_t bytes = info->bytes; in write_to_reference_fifo() local
303 ssize_t written_bytes = fifo_write(aec->spk_fifo, buffer, bytes); in write_to_reference_fifo()
304 if (written_bytes != bytes) { in write_to_reference_fifo()
305 ALOGE("Could only write %zu of %zu bytes", written_bytes, bytes); in write_to_reference_fifo()
310 info->bytes = written_bytes; in write_to_reference_fifo()
328 spk_time_offset = (aec->last_spk_info.bytes + aec->read_write_diff_bytes) * usec_per_byte; in get_spk_timestamp()
340 aec->read_write_diff_bytes -= aec->last_spk_info.bytes; in get_spk_timestamp()
359 spk_info.bytes, aec->read_write_diff_bytes, timespec_to_usec(spk_info.timestamp)); in get_spk_timestamp()
360 aec->read_write_diff_bytes -= spk_info.bytes; in get_spk_timestamp()
373 size_t bytes = info->bytes; in get_reference_samples() local
[all …]
Dfifo_wrapper.h24 void *fifo_init(uint32_t bytes, bool reader_throttles_writer);
26 ssize_t fifo_read(void *fifo_itfe, void *buffer, size_t bytes);
27 ssize_t fifo_write(void *fifo_itfe, void *buffer, size_t bytes);
Daudio_hw.c320 size_t bytes) in out_write() argument
326 size_t out_frames = bytes / frame_size; in out_write()
328 ALOGV("%s: devices: %d, bytes %zu", __func__, out->devices, bytes); in out_write()
359 info.bytes = out_frames * frame_size; in out_write()
370 usleep((int64_t)bytes * 1000000 / audio_stream_out_frame_size(stream) / in out_write()
374 return bytes; in out_write()
614 size_t bytes) in in_read() argument
620 size_t in_frames = bytes / frame_size; in in_read()
622 ALOGV("in_read: stream: %d, bytes %zu", in->source, bytes); in in_read()
628 info.bytes = bytes; in in_read()
[all …]
/device/google/contexthub/util/nanotool/
Dandroidcontexthub.cpp60 const uint8_t *bytes = (const uint8_t *) data; in AppendBytes() local
62 buffer.push_back(bytes[i]); in AppendBytes()
67 sp<JSONObject> json, std::vector<uint8_t>& bytes) { in CopyInt32Array() argument
73 AppendBytes(&val, sizeof(uint32_t), bytes); in CopyInt32Array()
82 sp<JSONObject> json, std::vector<uint8_t>& bytes) { in CopyFloatArray() argument
88 AppendBytes(&val, sizeof(float), bytes); in CopyFloatArray()
97 std::vector<uint8_t>& bytes) { in GetCalibrationBytes() argument
108 success = CopyInt32Array(key, json, bytes); in GetCalibrationBytes()
112 success = CopyFloatArray(key, json, bytes); in GetCalibrationBytes()
120 AppendBytes(&value, sizeof(float), bytes); in GetCalibrationBytes()
[all …]
/device/generic/goldfish-opengl/android-emu/android/base/files/
DStream.cpp91 uint8_t bytes[sizeof(float)]; in putFloat() member
94 this->write(u.bytes, sizeof(u.bytes)); in putFloat()
100 uint8_t bytes[sizeof(float)]; in getFloat() member
102 this->read(u.bytes, sizeof(u.bytes)); in getFloat()
/device/google/cuttlefish/common/libs/device_config/
Ddevice_config.cpp45 auto bytes = fd->Write(buffer + sent, kDataSize - sent); in SendRawData() local
46 if (bytes < 0) { in SendRawData()
50 sent += bytes; in SendRawData()
/device/google/contexthub/firmware/os/core/
Dheap.c237 int bytes = 0; in heapGetFreeSize() local
249 bytes += node->size + sizeof(struct HeapNode); in heapGetFreeSize()
255 return bytes; in heapGetFreeSize()
262 int bytes = 0; in heapGetTaskSize() local
272 bytes += node->size + sizeof(struct HeapNode); in heapGetTaskSize()
277 return bytes; in heapGetTaskSize()
/device/generic/goldfish-opengl/system/vulkan_enc/
DVulkanStreamGuest.cpp40 void alloc(void **ptrAddr, size_t bytes) { in alloc() argument
41 if (!bytes) { in alloc()
46 *ptrAddr = mPool.alloc(bytes); in alloc()
129 void VulkanStreamGuest::alloc(void** ptrAddr, size_t bytes) { in alloc() argument
130 mImpl->alloc(ptrAddr, bytes); in alloc()
/device/google/wahoo/liblight/
Dlights.c125 size_t bytes = snprintf(buffer, sizeof(buffer), "%d\n", value); in write_int() local
126 if(bytes >= sizeof(buffer)) return -EINVAL; in write_int()
127 ssize_t amt = write(fd, buffer, bytes); in write_int()
148 size_t bytes = snprintf(buffer, sizeof(buffer), "%d %d\n", value1, value2); in write_double_int() local
149 if(bytes >= sizeof(buffer)) return -EINVAL; in write_double_int()
150 ssize_t amt = write(fd, buffer, bytes); in write_double_int()
/device/amlogic/yukawa/hal/lights/
Dlights.cpp68 size_t bytes; in sys_write_int() local
71 bytes = snprintf(buffer, sizeof(buffer), "%d\n", value); in sys_write_int()
72 if (bytes >= sizeof(buffer)) return -EINVAL; in sys_write_int()
73 amount = write(fd, buffer, bytes); in sys_write_int()
/device/linaro/hikey/audio/
Daudio_hw.c179 …t audio_stream_out *stream, const void *buffer, size_t frame_size, size_t out_frames, size_t bytes) in xa_device_run() argument
186 memcpy(adev->dsp_device.dec_inbuf[0],buffer,bytes); in xa_device_run()
187 adev->dsp_device.read_length=bytes; in xa_device_run()
412 size_t bytes) in out_write() argument
418 size_t out_frames = bytes / frame_size; in out_write()
445 ret = xa_device_run(stream, buffer,frame_size, out_frames, bytes); in out_write()
459 usleep((int64_t)bytes * 1000000 / audio_stream_out_frame_size(stream) / in out_write()
463 return bytes; in out_write()
578 size_t bytes) in in_read() argument
580 ALOGV("in_read: bytes %zu", bytes); in in_read()
[all …]
/device/linaro/poplar/audio/
Daudio_hw.c242 size_t bytes) in out_write() argument
248 size_t out_frames = bytes / frame_size; in out_write()
275 usleep((int64_t)bytes * 1000000 / audio_stream_out_frame_size(stream) / in out_write()
279 return bytes; in out_write()
394 size_t bytes) in in_read() argument
396 ALOGV("in_read: bytes %zu", bytes); in in_read()
398 usleep((int64_t)bytes * 1000000 / audio_stream_in_frame_size(stream) / in in_read()
400 memset(buffer, 0, bytes); in in_read()
401 return bytes; in in_read()
/device/google/contexthub/util/stm32_flash/
Dstm32_bl.c26 uint8_t checksum(__attribute__((unused)) handle_t *handle, uint8_t *bytes, int length) in checksum() argument
32 csum = ~bytes[0]; in checksum()
35 csum ^= bytes[i]; in checksum()
/device/google/cuttlefish/guest/hals/ril/reference-libril/
DRilSapSocket.cpp226 uimFuncs->onRequest(req->id, req->payload->bytes, req->payload->size, currRequest, id); in dispatchRequest()
228 uimFuncs->onRequest(req->id, req->payload->bytes, req->payload->size, currRequest); in dispatchRequest()
254 memcpy(rsp.payload->bytes, response, response_len); in onRequestComplete()
285 memcpy(payload->bytes, data, datalen); in onUnsolicitedResponse()
/device/generic/goldfish/radio/libril/
DRilSapSocket.cpp226 uimFuncs->onRequest(req->id, req->payload->bytes, req->payload->size, currRequest, id); in dispatchRequest()
228 uimFuncs->onRequest(req->id, req->payload->bytes, req->payload->size, currRequest); in dispatchRequest()
254 memcpy(rsp.payload->bytes, response, response_len); in onRequestComplete()
285 memcpy(payload->bytes, data, datalen); in onUnsolicitedResponse()
/device/google/cuttlefish/guest/hals/ril/libril/
DRilSapSocket.cpp226 uimFuncs->onRequest(req->id, req->payload->bytes, req->payload->size, currRequest, id); in dispatchRequest()
228 uimFuncs->onRequest(req->id, req->payload->bytes, req->payload->size, currRequest); in dispatchRequest()
254 memcpy(rsp.payload->bytes, response, response_len); in onRequestComplete()
285 memcpy(payload->bytes, data, datalen); in onUnsolicitedResponse()
/device/generic/goldfish/radio/librilutils/proto/
Dsap-api.proto26 required bytes payload = 5;
176 required bytes command = 2;
194 optional bytes apduResponse = 3;
214 optional bytes atr = 2; //must be present on SUCCESS
/device/google/contexthub/firmware/os/cpu/cortexm4/
Dcpu.c64 uint32_t bytes = 0; in getPersistedData() local
65 void *loc = platGetPersistentRamStore(&bytes); in getPersistedData()
67 …return bytes >= sizeof(struct RamPersistedDataAndDropbox) ? (struct RamPersistedDataAndDropbox*)lo… in getPersistedData()

123