Home
last modified time | relevance | path

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

12345

/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/
Daudio_aec.c306 size_t bytes = info->bytes; in write_to_reference_fifo() local
309 ssize_t written_bytes = fifo_write(aec->spk_fifo, buffer, bytes); in write_to_reference_fifo()
310 if (written_bytes != bytes) { in write_to_reference_fifo()
311 ALOGE("Could only write %zu of %zu bytes", written_bytes, bytes); in write_to_reference_fifo()
316 info->bytes = written_bytes; in write_to_reference_fifo()
334 spk_time_offset = (aec->last_spk_info.bytes + aec->read_write_diff_bytes) * usec_per_byte; in get_spk_timestamp()
346 aec->read_write_diff_bytes -= aec->last_spk_info.bytes; in get_spk_timestamp()
365 spk_info.bytes, aec->read_write_diff_bytes, timespec_to_usec(spk_info.timestamp)); in get_spk_timestamp()
366 aec->read_write_diff_bytes -= spk_info.bytes; in get_spk_timestamp()
379 size_t bytes = info->bytes; in get_reference_samples() local
[all …]
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_hw.c370 size_t bytes) in out_write() argument
376 size_t out_frames = bytes / frame_size; in out_write()
378 ALOGV("%s: devices: %d, bytes %zu", __func__, out->devices, bytes); in out_write()
409 info.bytes = out_frames * frame_size; in out_write()
420 usleep((int64_t)bytes * 1000000 / audio_stream_out_frame_size(stream) / in out_write()
424 return bytes; in out_write()
654 size_t bytes) in in_read() argument
660 size_t in_frames = bytes / frame_size; in in_read()
662 ALOGV("in_read: stream: %d, bytes %zu", in->source, bytes); in in_read()
668 info.bytes = bytes; in in_read()
[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);
/device/linaro/dragonboard/audio/
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.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_hw.c344 size_t bytes) in out_write() argument
350 size_t out_frames = bytes / frame_size; in out_write()
352 ALOGV("%s: devices: %d, bytes %zu", __func__, out->devices, bytes); in out_write()
383 info.bytes = out_frames * frame_size; in out_write()
394 usleep((int64_t)bytes * 1000000 / audio_stream_out_frame_size(stream) / in out_write()
398 return bytes; in out_write()
639 size_t bytes) in in_read() argument
645 size_t in_frames = bytes / frame_size; in in_read()
647 ALOGV("in_read: stream: %d, bytes %zu", in->source, bytes); in in_read()
653 info.bytes = bytes; in in_read()
[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);
/device/google/atv/libraries/BluetoothServices/src/com/google/android/tv/btservices/remote/
DTransportUtils.java26 public static String bytesToString(byte[] bytes) { in bytesToString() argument
27 if (bytes == null) { in bytesToString()
32 if (bytes.length > 0) { in bytesToString()
35 for (byte b: bytes) { in bytesToString()
56 public static int parseUnsignedShort(byte[] bytes, int st) { in parseUnsignedShort() argument
57 return (bytes[st] & 0xff) + ((bytes[st + 1] & 0xff) << 8); in parseUnsignedShort()
66 public static void writeUnsignedShort(byte[] bytes, int st, int val) { in writeUnsignedShort() argument
67 bytes[st] = (byte) (val & 0xff); in writeUnsignedShort()
68 bytes[st + 1] = (byte) ((val >> 8) & 0xff); in writeUnsignedShort()
DDfuBinary.java43 byte[] bytes = new byte[fin.available()]; in initialize()
44 fin.read(bytes); in initialize()
46 if (bytes.length < 64) { in initialize()
50 mVersion = readVersion(bytes); in initialize()
55 buildHeader(bytes); in initialize()
56 buildPackets(bytes); in initialize()
57 buildTail(bytes); in initialize()
DTransportManager.java245 void onWritten(int status, byte[] bytes) { in onWritten() argument
246 mHandler.post(() -> { onWrittenImpl(status, bytes); }); in onWritten()
249 private void onWrittenImpl(int status, byte[] bytes) { in onWrittenImpl() argument
267 void onResponse(Transport transport, byte status, byte[] bytes) { in onResponse() argument
268 mHandler.post(() -> { onResponseImpl(transport, status, bytes); }); in onResponse()
271 private void onResponseImpl(Transport transport, byte status, byte[] bytes) { in onResponseImpl() argument
285 if (bytes == null) { in onResponseImpl()
290 result.complete(new Transport.Result(bytes)); in onResponseImpl()
DTransport.java110 final byte[] bytes = gattch != null && gattch.getValue() != null ? gattch.getValue() : null; in onWritten()
111 mManager.onWritten(status, bytes); in onWritten()
118 protected void onResponse(byte status, byte[] bytes) { in onResponse() argument
119 mManager.onResponse(this, status, bytes); in onResponse()
/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/linaro/hikey/audio/
Daudio_hw.c178 …t audio_stream_out *stream, const void *buffer, size_t frame_size, size_t out_frames, size_t bytes) in xa_device_run() argument
185 memcpy(adev->dsp_device.dec_inbuf[0],buffer,bytes); in xa_device_run()
186 adev->dsp_device.read_length=bytes; in xa_device_run()
411 size_t bytes) in out_write() argument
417 size_t out_frames = bytes / frame_size; in out_write()
444 ret = xa_device_run(stream, buffer,frame_size, out_frames, bytes); in out_write()
458 usleep((int64_t)bytes * 1000000 / audio_stream_out_frame_size(stream) / in out_write()
462 return bytes; in out_write()
577 size_t bytes) in in_read() argument
579 ALOGV("in_read: bytes %zu", bytes); in in_read()
[all …]
/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/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/cuttlefish/guest/commands/bt_vhci_forwarder/
Dmain.cpp157 ssize_t bytes = TEMP_FAILURE_RETRY(read(virtio_fd, buf, kBufferSize)); in main() local
158 if (bytes < 0) { in main()
162 if (bytes == 1) { in main()
166 LOG(INFO) << "Discarding " << bytes << " bytes from virtio_fd: " in main()
168 << std::hex << (unsigned)buf[bytes - 1]; in main()
/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/google/tangorpro/lights/
DLights.cpp75 size_t bytes; in sys_write_int() local
78 bytes = snprintf(buffer, sizeof(buffer), "%d\n", value); in sys_write_int()
79 if (bytes >= sizeof(buffer)) { in sys_write_int()
82 amount = write(fd, buffer, bytes); in sys_write_int()
Dled_lut_calibrator.cpp54 int bytes; in ReadCalibrationTable() local
82 bytes = read(fd, buffer.data(), buffer.size()); in ReadCalibrationTable()
83 if (bytes == -1) { in ReadCalibrationTable()
/device/generic/car/emulator/audio/driver/
Daudio_hw.c522 static void out_apply_gain(struct generic_stream_out *out, const void *buffer, size_t bytes) { in out_apply_gain() argument
524 size_t int16_size = bytes / sizeof(int16_t); in out_apply_gain()
543 static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, size_t bytes) { in out_write() argument
547 const size_t frames = bytes / frame_size; in out_write()
585 out_apply_gain(out, buffer, bytes); in out_write()
616 return bytes; in out_write()
1045 static ssize_t in_read(struct audio_stream_in *stream, void *buffer, size_t bytes) { in in_read() argument
1048 const size_t frames = bytes / audio_stream_in_frame_size(stream); in in_read()
1108 int read_bytes = pseudo_pcm_read(buffer, bytes, &in->oscillator); in in_read()
1113 if (in->stereo_to_mono_buf_size < bytes*2) { in in_read()
[all …]
/device/google/cuttlefish/guest/hals/ril/reference-libril/
DRilSapSocket.cpp225 uimFuncs->onRequest(req->id, req->payload->bytes, req->payload->size, currRequest, id); in dispatchRequest()
227 uimFuncs->onRequest(req->id, req->payload->bytes, req->payload->size, currRequest); in dispatchRequest()
253 memcpy(rsp.payload->bytes, response, response_len); in onRequestComplete()
284 memcpy(payload->bytes, data, datalen); in onUnsolicitedResponse()
/device/google/cuttlefish/host/commands/casimir_control_server/
Dmain.cpp94 auto bytes = *(send_res.value()); in SendApdu() local
96 reinterpret_cast<void*>(bytes.data()), bytes.size()); in SendApdu()
/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

12345