Home
last modified time | relevance | path

Searched refs:frame_bytes (Results 1 – 25 of 29) sorted by relevance

12

/external/adhd/cras/src/common/
Dcras_shm.h27 uint32_t frame_bytes; member
236 return (write_offset - read_offset) / shm->config.frame_bytes; in cras_shm_get_curr_read_frames()
263 const unsigned frame_bytes = shm->config.frame_bytes; in cras_shm_get_writeable_frames() local
267 written = write_offset / frame_bytes; in cras_shm_get_writeable_frames()
293 final_offset = read_offset + offset * shm->config.frame_bytes; in cras_shm_get_readable_frames()
305 *frames = (write_offset - final_offset) / shm->config.frame_bytes; in cras_shm_get_readable_frames()
334 if (bytes % shm->config.frame_bytes != 0) in cras_shm_get_frames()
336 return bytes / shm->config.frame_bytes; in cras_shm_get_frames()
353 return (write_offset - read_offset) / shm->config.frame_bytes; in cras_shm_get_frames_in_curr_buffer()
372 return shm->config.used_size / shm->config.frame_bytes; in cras_shm_get_num_writeable()
[all …]
/external/adhd/cras/src/tests/
Dshm_unittest.cc51 shm_.header->write_offset[0] = 100 * shm_.header->config.frame_bytes; in TEST_F()
56 EXPECT_EQ((frames_ - 9) * shm_.config.frame_bytes, in TEST_F()
65 shm_.header->write_offset[0] = 100 * shm_.config.frame_bytes; in TEST_F()
66 shm_.header->read_offset[0] = 50 * shm_.config.frame_bytes; in TEST_F()
71 EXPECT_EQ(shm_.header->write_offset[0] - 10 * shm_.config.frame_bytes, in TEST_F()
79 shm_.header->write_offset[0] = 100 * shm_.config.frame_bytes; in TEST_F()
80 shm_.header->read_offset[0] = 50 * shm_.config.frame_bytes; in TEST_F()
84 25 * shm_.header->config.frame_bytes, in TEST_F()
104 EXPECT_EQ(((used_frames / 2) - 10) * shm_.config.frame_bytes, in TEST_F()
150 EXPECT_EQ(((used_frames / 2) - 10) * shm_.config.frame_bytes, in TEST_F()
[all …]
Ddev_io_stubs.cc24 uint32_t frame_bytes = 4; in create_shm() local
25 uint32_t used_size = cb_threshold * 2 * frame_bytes; in create_shm()
34 shm->header->config.frame_bytes = frame_bytes; in create_shm()
Dcras_client_unittest.cc186 header->config.frame_bytes = format_bytes; in StreamConnected()
231 header.config.frame_bytes = format_bytes; in StreamConnectedFail()
Daudio_thread_unittest.cc113 uint32_t frame_bytes = 4; in SetupRstream() local
114 uint32_t used_size = 4096 * frame_bytes; in SetupRstream()
128 cras_shm_set_frame_bytes(rstream->shm, frame_bytes); in SetupRstream()
/external/adhd/cras/src/server/
Dcras_loopback_iodev.c73 unsigned int frame_bytes = cras_get_format_bytes(fmt); in sample_hook() local
78 frames_to_copy = MIN(buf_writable(sbuf) / frame_bytes, nframes); in sample_hook()
82 bytes_to_copy = frames_to_copy * frame_bytes; in sample_hook()
143 unsigned int frame_bytes = cras_get_format_bytes(iodev->format); in frames_queued() local
155 MIN(buf_writable(sbuf) / frame_bytes, frames_to_fill); in frames_queued()
157 bytes_to_fill = frames_to_fill * frame_bytes; in frames_queued()
163 return buf_queued(sbuf) / frame_bytes; in frames_queued()
219 unsigned int frame_bytes = cras_get_format_bytes(iodev->format); in get_record_buffer() local
220 unsigned int avail_frames = buf_readable(sbuf) / frame_bytes; in get_record_buffer()
237 unsigned int frame_bytes = cras_get_format_bytes(iodev->format); in put_record_buffer() local
[all …]
Dcras_mix.c75 size_t cras_mix_mute_buffer(uint8_t *dst, size_t frame_bytes, size_t count) in cras_mix_mute_buffer() argument
77 return ops->mute_buffer(dst, frame_bytes, count); in cras_mix_mute_buffer()
Dcras_iodev.c1135 const unsigned int frame_bytes = cras_get_format_bytes(fmt); in cras_iodev_put_output_buffer() local
1136 cras_mix_mute_buffer(frames, frame_bytes, nframes); in cras_iodev_put_output_buffer()
1181 const unsigned int frame_bytes = cras_get_format_bytes(iodev->format); in cras_iodev_get_input_buffer() local
1216 iodev->input_dsp_offset * frame_bytes, in cras_iodev_get_input_buffer()
1223 iodev->input_dsp_offset * frame_bytes), in cras_iodev_get_input_buffer()
1228 cras_mix_mute_buffer(hw_buffer, frame_bytes, *frames); in cras_iodev_get_input_buffer()
1329 unsigned int frame_bytes, frames_written; in cras_iodev_fill_odev_zeros() local
1338 frame_bytes = cras_get_format_bytes(odev->format); in cras_iodev_fill_odev_zeros()
1349 memset(buf, 0, (size_t)frames_written * (size_t)frame_bytes); in cras_iodev_fill_odev_zeros()
Ddev_stream.c291 unsigned int frame_bytes; in capture_copy_converted_to_stream() local
298 frame_bytes = cras_get_format_bytes(fmt); in capture_copy_converted_to_stream()
306 buf_queued(dev_stream->conv_buffer) / frame_bytes); in capture_copy_converted_to_stream()
314 write_frames /= frame_bytes; in capture_copy_converted_to_stream()
330 (size_t)write_frames * (size_t)frame_bytes); in capture_copy_converted_to_stream()
Dcras_rstream.c39 uint32_t frame_bytes, used_size; in setup_shm_area() local
57 frame_bytes = snd_pcm_format_physical_width(fmt->format) / 8 * in setup_shm_area()
59 used_size = stream->buffer_frames * frame_bytes; in setup_shm_area()
90 cras_shm_set_frame_bytes(stream->shm, frame_bytes); in setup_shm_area()
Dcras_mix.h81 size_t cras_mix_mute_buffer(uint8_t *dst, size_t frame_bytes, size_t count);
Dcras_mix_ops.h45 size_t (*mute_buffer)(uint8_t *dst, size_t frame_bytes, size_t count);
Ddev_io.c654 unsigned int frame_bytes = cras_get_format_bytes(odev->format); in write_streams() local
696 memset(dst + max_offset * frame_bytes, 0, in write_streams()
697 (write_limit - max_offset) * frame_bytes); in write_streams()
713 dst + frame_bytes * offset, in write_streams()
Dcras_mix_ops.c838 static size_t mix_mute_buffer(uint8_t *dst, size_t frame_bytes, size_t count) in mix_mute_buffer() argument
840 memset(dst, 0, count * frame_bytes); in mix_mute_buffer()
/external/adhd/cras/examples/
Dcplay.c18 unsigned int frame_bytes; member
31 nread = read(data->fd, playback_samples, frames * data->frame_bytes); in put_samples()
35 return nread / data->frame_bytes; in put_samples()
77 data->frame_bytes = 4; in main()
/external/adhd/cras/src/libcras/
Dcras_helpers.c16 unsigned int frame_bytes; member
34 to_copy = MIN(to_copy, frames * data->frame_bytes); in play_buffer_callback()
40 return to_copy / data->frame_bytes; in play_buffer_callback()
150 data->frame_bytes = num_channels * PCM_FORMAT_WIDTH(format) / 8; in cras_helper_play_buffer()
152 data->len = frames * data->frame_bytes; in cras_helper_play_buffer()
/external/adhd/cras/src/tools/cras_router/
Dcras_router.c54 int frame_bytes; in got_samples() local
56 frame_bytes = cras_client_format_bytes_per_frame(aud_format); in got_samples()
57 write_size = frames * frame_bytes; in got_samples()
71 uint32_t frame_bytes = cras_client_format_bytes_per_frame(aud_format); in put_samples() local
76 nread = read(fd, buff, MIN(frames * frame_bytes, BUF_SIZE)); in put_samples()
83 return nread / frame_bytes; in put_samples()
/external/webp/src/mux/
Dmuxedit.c100 uint8_t* frame_bytes; in CreateFrameData() local
107 frame_bytes = (uint8_t*)WebPSafeMalloc(1ULL, frame_size); in CreateFrameData()
108 if (frame_bytes == NULL) return WEBP_MUX_MEMORY_ERROR; in CreateFrameData()
110 PutLE24(frame_bytes + 0, info->x_offset / 2); in CreateFrameData()
111 PutLE24(frame_bytes + 3, info->y_offset / 2); in CreateFrameData()
113 PutLE24(frame_bytes + 6, width - 1); in CreateFrameData()
114 PutLE24(frame_bytes + 9, height - 1); in CreateFrameData()
115 PutLE24(frame_bytes + 12, info->duration); in CreateFrameData()
116 frame_bytes[15] = in CreateFrameData()
120 frame->bytes = frame_bytes; in CreateFrameData()
/external/flac/src/flac/
Danalyze.h29 …ame *frame, uint32_t frame_number, FLAC__uint64 frame_offset, uint32_t frame_bytes, analysis_optio…
Danalyze.c65 …ame *frame, uint32_t frame_number, FLAC__uint64 frame_offset, uint32_t frame_bytes, analysis_optio… in flac__analyze_frame() argument
73 …%u\tchannels=%u\tchannel_assignment=%s\n", frame_number, frame_offset, frame_bytes*8, frame->heade… in flac__analyze_frame()
Ddecode.c1010 uint32_t frame_bytes = 0; in write_callback() local
1120 frame_bytes = (uint32_t)(dpos-decoder_session->decode_position); in write_callback()
1132 …oder_session->frame_counter-1, decoder_session->decode_position-frame_bytes, frame_bytes, decoder_… in write_callback()
/external/adhd/cras/src/alsa_plugin/
Dpcm_cras.c128 size_t chan, frame_bytes, sample_bytes; in pcm_cras_process_cb() local
138 frame_bytes = pcm_cras->bytes_per_frame; in pcm_cras_process_cb()
144 memset(samples, 0, nframes * frame_bytes); in pcm_cras_process_cb()
/external/adhd/cras/src/tools/cras_test_client/
Dcras_test_client.c232 int frame_bytes; in got_samples() local
239 frame_bytes = cras_client_format_bytes_per_frame(aud_format); in got_samples()
240 write_size = frames * frame_bytes; in got_samples()
245 MIN(write_size, duration_frames * frame_bytes)); in got_samples()
263 uint32_t frame_bytes = cras_client_format_bytes_per_frame(aud_format); in put_samples() local
287 MIN(frames * frame_bytes, BUF_SIZE)); in put_samples()
292 nread = read(fd, buff, MIN(frames * frame_bytes, BUF_SIZE)); in put_samples()
300 return nread / frame_bytes; in put_samples()
311 uint32_t frame_bytes = cras_client_format_bytes_per_frame(aud_format); in put_stdin_samples() local
313 rc = read(0, playback_samples, (size_t)frames * (size_t)frame_bytes); in put_stdin_samples()
[all …]
/external/pigweed/pw_hdlc/py/
Ddecode_test.py233 frame_bytes = ''.join(rf'\x{byte:02x}'
/external/adhd/cras/client/cras-sys/src/
Dgen.rs4679 pub frame_bytes: u32, field
4705 &(*(::std::ptr::null::<cras_audio_shm_config>())).frame_bytes as *const _ as usize in bindgen_test_layout_cras_audio_shm_config()
4712 stringify!(frame_bytes) in bindgen_test_layout_cras_audio_shm_config()

12