/external/adhd/cras/src/server/ |
D | dev_stream.c | 193 struct cras_rstream *rstream = dev_stream->stream; in dev_stream_mix() local 210 buffer_offset = cras_rstream_dev_offset(rstream, dev_stream->dev_id); in dev_stream_mix() 220 rstream, buffer_offset + fr_read, &frames); in dev_stream_mix() 238 cras_rstream_get_mute(rstream), mix_vol); in dev_stream_mix() 244 cras_rstream_dev_offset_update(rstream, fr_read, dev_stream->dev_id); in dev_stream_mix() 299 struct cras_rstream *rstream, in capture_copy_converted_to_stream() argument 312 shm = cras_rstream_input_shm(rstream); in capture_copy_converted_to_stream() 317 offset = cras_rstream_dev_offset(rstream, dev_stream->dev_id); in capture_copy_converted_to_stream() 321 cras_rstream_get_cb_threshold(rstream), in capture_copy_converted_to_stream() 322 &rstream->audio_area->frames); in capture_copy_converted_to_stream() [all …]
|
D | cras_rstream.c | 303 void cras_rstream_record_fetch_interval(struct cras_rstream *rstream, in cras_rstream_record_fetch_interval() argument 308 if (rstream->last_fetch_ts.tv_sec || rstream->last_fetch_ts.tv_nsec) { in cras_rstream_record_fetch_interval() 309 subtract_timespecs(now, &rstream->last_fetch_ts, &ts); in cras_rstream_record_fetch_interval() 310 if (timespec_after(&ts, &rstream->longest_fetch_interval)) in cras_rstream_record_fetch_interval() 311 rstream->longest_fetch_interval = ts; in cras_rstream_record_fetch_interval() 370 void cras_rstream_dev_attach(struct cras_rstream *rstream, in cras_rstream_dev_attach() argument 374 if (buffer_share_add_id(rstream->buf_state, dev_id, dev_ptr) == 0) in cras_rstream_dev_attach() 375 rstream->num_attached_devs++; in cras_rstream_dev_attach() 380 if (rstream->master_dev.dev_id == NO_DEVICE) { in cras_rstream_dev_attach() 381 rstream->master_dev.dev_id = dev_id; in cras_rstream_dev_attach() [all …]
|
D | cras_rstream.h | 281 void cras_rstream_record_fetch_interval(struct cras_rstream *rstream, 292 void cras_rstream_dev_attach(struct cras_rstream *rstream, 295 void cras_rstream_dev_detach(struct cras_rstream *rstream, unsigned int dev_id); 298 void cras_rstream_dev_offset_update(struct cras_rstream *rstream, 302 void cras_rstream_update_input_write_pointer(struct cras_rstream *rstream); 303 void cras_rstream_update_output_read_pointer(struct cras_rstream *rstream); 305 unsigned int cras_rstream_dev_offset(const struct cras_rstream *rstream, 308 static inline unsigned int cras_rstream_level(struct cras_rstream *rstream) in cras_rstream_level() argument 310 const struct cras_audio_shm *shm = cras_rstream_input_shm(rstream); in cras_rstream_level() 314 static inline int cras_rstream_input_level_met(struct cras_rstream *rstream) in cras_rstream_input_level_met() argument [all …]
|
D | cras_iodev_list.c | 378 struct cras_rstream *rstream; in remove_all_streams_from_dev() local 382 DL_FOREACH(stream_list_get(stream_list), rstream) { in remove_all_streams_from_dev() 383 if (rstream->apm_list == NULL) in remove_all_streams_from_dev() 385 cras_apm_list_remove(rstream->apm_list, dev); in remove_all_streams_from_dev() 511 struct cras_rstream *rstream) in init_device() argument 521 rc = cras_iodev_open(dev, rstream->cb_threshold, &rstream->format); in init_device() 537 struct cras_rstream *rstream; in suspend_devs() local 539 DL_FOREACH(stream_list_get(stream_list), rstream) { in suspend_devs() 540 if (rstream->is_pinned) { in suspend_devs() 543 if ((rstream->flags & HOTWORD_STREAM) == HOTWORD_STREAM) in suspend_devs() [all …]
|
D | stream_list.h | 15 typedef int (stream_callback)(struct cras_rstream *rstream); 17 struct cras_rstream **rstream); 18 typedef void (stream_destroy_func)(struct cras_rstream *rstream);
|
D | dev_io.c | 114 struct cras_rstream *rstream = dev_stream->stream; in fetch_streams() local 116 cras_rstream_output_shm(rstream); in fetch_streams() 129 cras_rstream_set_is_draining(rstream, 1); in fetch_streams() 146 cras_rstream_id(rstream), in fetch_streams() 154 ATLOG(atlog, AUDIO_THREAD_FETCH_STREAM, rstream->stream_id, in fetch_streams() 155 cras_rstream_get_cb_threshold(rstream), delay); in fetch_streams() 160 rc, cras_rstream_id(rstream)); in fetch_streams() 161 cras_rstream_set_is_draining(rstream, 1); in fetch_streams() 223 struct cras_rstream *rstream; in get_stream_limit() local 231 rstream = stream->stream; in get_stream_limit() [all …]
|
D | audio_thread.c | 430 struct cras_rstream *rstream) in thread_find_stream() argument 435 DL_FOREACH(thread->open_devs[rstream->direction], open_dev) { in thread_find_stream() 437 if (s->stream == rstream) in thread_find_stream() 466 struct cras_rstream *rstream) in thread_drain_stream_ms_remaining() argument 471 if (rstream->direction != CRAS_STREAM_OUTPUT) in thread_drain_stream_ms_remaining() 474 shm = cras_rstream_output_shm(rstream); in thread_drain_stream_ms_remaining() 480 cras_rstream_set_is_draining(rstream, 1); in thread_drain_stream_ms_remaining() 482 return 1 + cras_frames_to_ms(fr_in_buff, rstream->format.frame_rate); in thread_drain_stream_ms_remaining() 489 struct cras_rstream *rstream) in thread_drain_stream() argument 493 if (!thread_find_stream(thread, rstream)) in thread_drain_stream() [all …]
|
D | cras_iodev.c | 814 const struct cras_rstream *rstream) in cras_iodev_rm_stream() argument 823 if (out->stream == rstream) { in cras_iodev_rm_stream() 825 rstream->stream_id); in cras_iodev_rm_stream()
|
/external/adhd/cras/src/tests/ |
D | rstream_stub.cc | 26 void rstream_stub_dev_offset(const cras_rstream* rstream, in rstream_stub_dev_offset() argument 29 auto data = data_map.find(rstream); in rstream_stub_dev_offset() 33 data_map.insert({rstream, new_data}); in rstream_stub_dev_offset() 39 void rstream_stub_pending_reply(const cras_rstream* rstream, in rstream_stub_pending_reply() argument 41 auto data = data_map.find(rstream); in rstream_stub_pending_reply() 45 data_map.insert({rstream, new_data}); in rstream_stub_pending_reply() 53 void cras_rstream_record_fetch_interval(struct cras_rstream *rstream, in cras_rstream_record_fetch_interval() argument 57 void cras_rstream_dev_attach(struct cras_rstream *rstream, in cras_rstream_dev_attach() argument 62 void cras_rstream_dev_detach(struct cras_rstream *rstream, unsigned int dev_id) { in cras_rstream_dev_detach() argument 65 unsigned int cras_rstream_dev_offset(const struct cras_rstream *rstream, in cras_rstream_dev_offset() argument [all …]
|
D | dev_io_stubs.cc | 39 RstreamPtr rstream( in create_rstream() local 41 rstream->stream_id = id; in create_rstream() 42 rstream->direction = direction; in create_rstream() 43 rstream->fd = RSTREAM_FAKE_POLL_FD; in create_rstream() 44 rstream->buffer_frames = cb_threshold * 2; in create_rstream() 45 rstream->cb_threshold = cb_threshold; in create_rstream() 46 rstream->shm.area = shm; in create_rstream() 47 rstream->shm.config = shm->config; in create_rstream() 48 rstream->format = *format; in create_rstream() 50 rstream->format.frame_rate, in create_rstream() [all …]
|
D | iodev_list_unittest.cc | 273 struct cras_rstream rstream, rstream2, rstream3; in TEST_F() local 277 memset(&rstream, 0, sizeof(rstream)); in TEST_F() 290 DL_APPEND(stream_list, &rstream); in TEST_F() 291 stream_add_cb(&rstream); in TEST_F() 334 struct cras_rstream rstream; in TEST_F() local 337 memset(&rstream, 0, sizeof(rstream)); in TEST_F() 350 DL_APPEND(stream_list, &rstream); in TEST_F() 352 stream_add_cb(&rstream); in TEST_F() 361 struct cras_rstream rstream; in TEST_F() local 364 memset(&rstream, 0, sizeof(rstream)); in TEST_F() [all …]
|
D | audio_thread_unittest.cc | 121 void SetupRstream(struct cras_rstream *rstream, in SetupRstream() argument 123 memset(rstream, 0, sizeof(*rstream)); in SetupRstream() 124 rstream->direction = direction; in SetupRstream() 125 rstream->cb_threshold = 480; in SetupRstream() 126 rstream->shm.area = static_cast<cras_audio_shm_area*>( in SetupRstream() 127 calloc(1, sizeof(*rstream->shm.area))); in SetupRstream() 130 void TearDownRstream(struct cras_rstream *rstream) { in TearDownRstream() argument 131 free(rstream->shm.area); in TearDownRstream() 134 void SetupPinnedStream(struct cras_rstream *rstream, in SetupPinnedStream() argument 137 SetupRstream(rstream, direction); in SetupPinnedStream() [all …]
|
D | timing_unittest.cc | 87 stream->rstream->next_cb_ts = start; in TEST_F() 97 EXPECT_EQ(dev_time.tv_sec, streams[0]->rstream->next_cb_ts.tv_sec); in TEST_F() 98 EXPECT_EQ(dev_time.tv_nsec, streams[0]->rstream->next_cb_ts.tv_nsec); in TEST_F() 116 stream->rstream->next_cb_ts = start; in TEST_F() 147 stream->rstream->next_cb_ts = start; in TEST_F() 175 stream->rstream->next_cb_ts = start; in TEST_F() 204 stream1->rstream->next_cb_ts = start; in TEST_F() 210 stream2->rstream->next_cb_ts = start; in TEST_F() 240 stream1->rstream->next_cb_ts = start; in TEST_F() 245 stream2->rstream->next_cb_ts = start; in TEST_F() [all …]
|
D | stream_list_unittest.cc | 16 static int added_cb(struct cras_rstream *rstream) { in added_cb() argument 23 static int removed_cb(struct cras_rstream *rstream) { in removed_cb() argument 25 rmed_stream = rstream; in removed_cb() 43 static void destroy_rstream_cb(struct cras_rstream *rstream) { in destroy_rstream_cb() argument 45 destroyed_stream = rstream; in destroy_rstream_cb()
|
D | dev_io_stubs.h | 34 Stream(ShmPtr shm, RstreamPtr rstream, DevStreamPtr dstream) : in Stream() 36 rstream(std::move(rstream)), in Stream() 40 RstreamPtr rstream; member 64 DevStreamPtr create_dev_stream(unsigned int dev_id, cras_rstream* rstream);
|
D | audio_thread_unittest_obsolete.cc | 130 void SetupRstream(struct cras_rstream **rstream, int fd) { in SetupRstream() argument 133 *rstream = (struct cras_rstream *)calloc(1, sizeof(**rstream)); in SetupRstream() 134 memcpy(&(*rstream)->format, &cras_iodev_set_format_val, in SetupRstream() 136 (*rstream)->direction = CRAS_STREAM_INPUT; in SetupRstream() 137 (*rstream)->cb_threshold = cb_threshold_; in SetupRstream() 138 (*rstream)->client = (struct cras_rclient *)this; in SetupRstream() 140 shm = cras_rstream_input_shm(*rstream); in SetupRstream() 558 void SetupRstream(struct cras_rstream **rstream, int fd) { in SetupRstream() argument 561 *rstream = (struct cras_rstream *)calloc(1, sizeof(**rstream)); in SetupRstream() 562 memcpy(&(*rstream)->format, &fmt_, sizeof(fmt_)); in SetupRstream() [all …]
|
D | dev_stream_unittest.cc | 80 struct cras_rstream *rstream; member 613 EXPECT_EQ(dev_stream.stream, rstream_get_readable_call.rstream); in TEST_F() 640 EXPECT_EQ(dev_stream.stream, rstream_get_readable_call.rstream); in TEST_F() 1096 void cras_rstream_record_fetch_interval(struct cras_rstream *rstream, in cras_rstream_record_fetch_interval() argument 1100 void cras_rstream_update_input_write_pointer(struct cras_rstream *rstream) { in cras_rstream_update_input_write_pointer() argument 1103 void cras_rstream_update_output_read_pointer(struct cras_rstream *rstream) { in cras_rstream_update_output_read_pointer() argument 1106 void cras_rstream_dev_offset_update(struct cras_rstream *rstream, in cras_rstream_dev_offset_update() argument 1111 void cras_rstream_dev_attach(struct cras_rstream *rstream, unsigned int dev_id, in cras_rstream_dev_attach() argument 1116 void cras_rstream_dev_detach(struct cras_rstream *rstream, unsigned int dev_id) in cras_rstream_dev_detach() argument 1120 unsigned int cras_rstream_dev_offset(const struct cras_rstream *rstream, in cras_rstream_dev_offset() argument [all …]
|
D | rstream_stub.h | 13 void rstream_stub_dev_offset(const cras_rstream* rstream, 18 void rstream_stub_pending_reply(const cras_rstream* rstream,
|
D | dev_io_unittest.cc | 55 stream->rstream->next_cb_ts = start; in TEST_F()
|
D | iodev_unittest.cc | 1481 struct cras_rstream rstream; in TEST() local 1485 memset(&rstream, 0, sizeof(rstream)); in TEST() 1489 rstream.cb_threshold = 800; in TEST() 1490 rstream.flags = TRIGGER_ONLY; in TEST() 1491 stream.stream = &rstream; in TEST() 1494 cras_iodev_open(&iodev, rstream.cb_threshold, &audio_fmt); in TEST()
|
/external/skia/tests/ |
D | StreamTest.cpp | 161 std::unique_ptr<SkStreamAsset> rstream(wstream.detachAsStream()); in TestPackedUInt() local 164 if (!rstream->readPackedUInt(&n)) { in TestPackedUInt()
|
D | SerializationTest.cpp | 644 std::unique_ptr<SkStreamAsset> rstream(wstream.detachAsStream()); in copy_picture_via_serialization() local 645 return SkPicture::MakeFromStream(rstream.get()); in copy_picture_via_serialization()
|
/external/skqp/tests/ |
D | StreamTest.cpp | 161 std::unique_ptr<SkStreamAsset> rstream(wstream.detachAsStream()); in TestPackedUInt() local 164 if (!rstream->readPackedUInt(&n)) { in TestPackedUInt()
|
D | PictureTest.cpp | 782 std::unique_ptr<SkStream> rstream(wstream.detachAsStream()); in DEF_TEST() local 783 sk_sp<SkPicture> deserializedPicture(SkPicture::MakeFromStream(rstream.get())); in DEF_TEST()
|
D | SerializationTest.cpp | 644 std::unique_ptr<SkStreamAsset> rstream(wstream.detachAsStream()); in copy_picture_via_serialization() local 645 return SkPicture::MakeFromStream(rstream.get()); in copy_picture_via_serialization()
|