Home
last modified time | relevance | path

Searched refs:rstream (Results 1 – 25 of 31) sorted by relevance

12

/external/adhd/cras/src/server/
Ddev_stream.c181 struct cras_rstream *rstream = dev_stream->stream; in dev_stream_mix() local
198 buffer_offset = cras_rstream_dev_offset(rstream, dev_stream->dev_id); in dev_stream_mix()
208 rstream, buffer_offset + fr_read, &frames); in dev_stream_mix()
224 cras_rstream_get_mute(rstream), mix_vol); in dev_stream_mix()
230 cras_rstream_dev_offset_update(rstream, fr_read, dev_stream->dev_id); in dev_stream_mix()
282 struct cras_rstream *rstream, in capture_copy_converted_to_stream() argument
295 shm = cras_rstream_shm(rstream); in capture_copy_converted_to_stream()
300 offset = cras_rstream_dev_offset(rstream, dev_stream->dev_id); in capture_copy_converted_to_stream()
303 shm, cras_rstream_get_cb_threshold(rstream), in capture_copy_converted_to_stream()
304 &rstream->audio_area->frames); in capture_copy_converted_to_stream()
[all …]
Dcras_rstream.c362 void cras_rstream_record_fetch_interval(struct cras_rstream *rstream, in cras_rstream_record_fetch_interval() argument
367 if (rstream->last_fetch_ts.tv_sec || rstream->last_fetch_ts.tv_nsec) { in cras_rstream_record_fetch_interval()
368 subtract_timespecs(now, &rstream->last_fetch_ts, &ts); in cras_rstream_record_fetch_interval()
369 if (timespec_after(&ts, &rstream->longest_fetch_interval)) in cras_rstream_record_fetch_interval()
370 rstream->longest_fetch_interval = ts; in cras_rstream_record_fetch_interval()
428 void cras_rstream_dev_attach(struct cras_rstream *rstream, unsigned int dev_id, in cras_rstream_dev_attach() argument
431 if (buffer_share_add_id(rstream->buf_state, dev_id, dev_ptr) == 0) in cras_rstream_dev_attach()
432 rstream->num_attached_devs++; in cras_rstream_dev_attach()
437 if (rstream->main_dev.dev_id == NO_DEVICE) { in cras_rstream_dev_attach()
438 rstream->main_dev.dev_id = dev_id; in cras_rstream_dev_attach()
[all …]
Dcras_rstream.h248 void cras_rstream_record_fetch_interval(struct cras_rstream *rstream,
259 void cras_rstream_dev_attach(struct cras_rstream *rstream, unsigned int dev_id,
261 void cras_rstream_dev_detach(struct cras_rstream *rstream, unsigned int dev_id);
263 static inline void *cras_rstream_dev_ptr(struct cras_rstream *rstream, in cras_rstream_dev_ptr() argument
266 return buffer_share_get_data(rstream->buf_state, dev_id); in cras_rstream_dev_ptr()
270 void cras_rstream_dev_offset_update(struct cras_rstream *rstream,
273 void cras_rstream_update_input_write_pointer(struct cras_rstream *rstream);
274 void cras_rstream_update_output_read_pointer(struct cras_rstream *rstream);
276 unsigned int cras_rstream_dev_offset(const struct cras_rstream *rstream,
279 static inline unsigned int cras_rstream_level(struct cras_rstream *rstream) in cras_rstream_level() argument
[all …]
Dcras_iodev_list.c344 struct cras_rstream *rstream; in remove_all_streams_from_dev() local
348 DL_FOREACH (stream_list_get(stream_list), rstream) { in remove_all_streams_from_dev()
349 if (rstream->apm_list == NULL) in remove_all_streams_from_dev()
351 cras_apm_list_remove_apm(rstream->apm_list, dev); in remove_all_streams_from_dev()
461 static int init_device(struct cras_iodev *dev, struct cras_rstream *rstream) in init_device() argument
471 rstream->format.num_channels, rstream->format.frame_rate); in init_device()
473 rc = cras_iodev_open(dev, rstream->cb_threshold, &rstream->format); in init_device()
489 struct cras_rstream *rstream; in suspend_devs() local
493 DL_FOREACH (stream_list_get(stream_list), rstream) { in suspend_devs()
494 if (rstream->is_pinned) { in suspend_devs()
[all …]
Dstream_list.h17 typedef int(stream_callback)(struct cras_rstream *rstream);
20 struct cras_rstream **rstream);
21 typedef void(stream_destroy_func)(struct cras_rstream *rstream);
Dstream_list.c155 struct cras_rstream *rstream; in stream_list_has_pinned_stream() local
156 DL_FOREACH (list->streams, rstream) { in stream_list_has_pinned_stream()
157 if (!rstream->is_pinned) in stream_list_has_pinned_stream()
159 if (rstream->pinned_dev_idx == dev_idx) in stream_list_has_pinned_stream()
Ddev_io.c207 struct cras_rstream *rstream = dev_stream->stream; in fetch_streams() local
208 struct cras_audio_shm *shm = cras_rstream_shm(rstream); in fetch_streams()
226 cras_rstream_set_is_draining(rstream, 1); in fetch_streams()
234 if (cras_rstream_is_pending_reply(rstream)) { in fetch_streams()
236 cras_rstream_id(rstream), 0, 0); in fetch_streams()
245 cras_rstream_id(rstream), in fetch_streams()
255 ATLOG(atlog, AUDIO_THREAD_FETCH_STREAM, rstream->stream_id, in fetch_streams()
256 cras_rstream_get_cb_threshold(rstream), in fetch_streams()
257 get_ewma_power_as_int(&rstream->ewma)); in fetch_streams()
262 cras_rstream_id(rstream)); in fetch_streams()
[all …]
Daudio_thread.c364 struct cras_rstream *rstream) in thread_find_stream() argument
369 DL_FOREACH (thread->open_devs[rstream->direction], open_dev) { in thread_find_stream()
371 if (s->stream == rstream) in thread_find_stream()
400 struct cras_rstream *rstream) in thread_drain_stream_ms_remaining() argument
405 if (rstream->direction != CRAS_STREAM_OUTPUT) in thread_drain_stream_ms_remaining()
408 shm = cras_rstream_shm(rstream); in thread_drain_stream_ms_remaining()
414 cras_rstream_set_is_draining(rstream, 1); in thread_drain_stream_ms_remaining()
416 return 1 + cras_frames_to_ms(fr_in_buff, rstream->format.frame_rate); in thread_drain_stream_ms_remaining()
423 struct cras_rstream *rstream) in thread_drain_stream() argument
427 if (!thread_find_stream(thread, rstream)) in thread_drain_stream()
[all …]
Dcras_iodev.c824 const struct cras_rstream *rstream) in cras_iodev_rm_stream() argument
835 if (out->stream == rstream) { in cras_iodev_rm_stream()
837 rstream->stream_id); in cras_iodev_rm_stream()
/external/adhd/cras/src/tests/
Drstream_stub.cc26 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, int ret_value) { in rstream_stub_pending_reply() argument
40 auto data = data_map.find(rstream); in rstream_stub_pending_reply()
44 data_map.insert({rstream, new_data}); in rstream_stub_pending_reply()
52 void cras_rstream_record_fetch_interval(struct cras_rstream* rstream, in cras_rstream_record_fetch_interval() argument
55 void cras_rstream_dev_attach(struct cras_rstream* rstream, in cras_rstream_dev_attach() argument
59 void cras_rstream_dev_detach(struct cras_rstream* rstream, in cras_rstream_dev_detach() argument
62 unsigned int cras_rstream_dev_offset(const struct cras_rstream* rstream, in cras_rstream_dev_offset() argument
[all …]
Dtiming_unittest.cc125 RstreamPtr rstream = in TEST_F() local
128 dev_io_append_stream(&odev_list_, &idev_list_, rstream.get(), &iodev, 1); in TEST_F()
130 EXPECT_EQ(0, rstream->next_cb_ts.tv_sec); in TEST_F()
131 EXPECT_EQ(0, rstream->next_cb_ts.tv_nsec); in TEST_F()
210 stream1->rstream->next_cb_ts = start; in TEST_F()
213 stream2->rstream->next_cb_ts = start; in TEST_F()
214 stream2->rstream->next_cb_ts.tv_sec += 5; in TEST_F()
215 rstream_stub_dev_offset(stream2->rstream.get(), 1, 200); in TEST_F()
240 stream1->rstream->next_cb_ts = start; in TEST_F()
241 stream1->rstream->next_cb_ts.tv_sec += 2; in TEST_F()
[all …]
Ddev_io_stubs.cc54 RstreamPtr rstream( in create_rstream() local
56 rstream->stream_id = id; in create_rstream()
57 rstream->direction = direction; in create_rstream()
58 rstream->fd = RSTREAM_FAKE_POLL_FD; in create_rstream()
59 rstream->buffer_frames = cb_threshold * 2; in create_rstream()
60 rstream->cb_threshold = cb_threshold; in create_rstream()
61 rstream->shm = shm; in create_rstream()
62 rstream->format = *format; in create_rstream()
63 cras_frames_to_time(cb_threshold, rstream->format.frame_rate, in create_rstream()
64 &rstream->sleep_interval_ts); in create_rstream()
[all …]
Diodev_list_unittest.cc303 struct cras_rstream rstream, rstream2, rstream3; in TEST_F() local
307 memset(&rstream, 0, sizeof(rstream)); in TEST_F()
322 DL_APPEND(stream_list, &rstream); in TEST_F()
323 stream_add_cb(&rstream); in TEST_F()
368 struct cras_rstream rstream, rstream2; in TEST_F() local
372 memset(&rstream, 0, sizeof(rstream)); in TEST_F()
374 rstream.format = fmt_; in TEST_F()
390 DL_APPEND(stream_list, &rstream); in TEST_F()
392 stream_add_cb(&rstream); in TEST_F()
432 struct cras_rstream rstream, rstream2; in TEST_F() local
[all …]
Daudio_thread_unittest.cc111 void SetupRstream(struct cras_rstream* rstream, in SetupRstream() argument
116 memset(rstream, 0, sizeof(*rstream)); in SetupRstream()
117 rstream->direction = direction; in SetupRstream()
118 rstream->cb_threshold = 480; in SetupRstream()
119 rstream->format.frame_rate = 48000; in SetupRstream()
121 rstream->shm = static_cast<cras_audio_shm*>(calloc(1, sizeof(*rstream->shm))); in SetupRstream()
122 rstream->shm->header = static_cast<cras_audio_shm_header*>( in SetupRstream()
123 calloc(1, sizeof(*rstream->shm->header))); in SetupRstream()
125 rstream->shm->samples = static_cast<uint8_t*>( in SetupRstream()
128 cras_shm_set_frame_bytes(rstream->shm, frame_bytes); in SetupRstream()
[all …]
Ddev_io_stubs.h38 Stream(ShmPtr shm, RstreamPtr rstream, DevStreamPtr dstream) in Stream()
40 rstream(std::move(rstream)), in Stream()
43 RstreamPtr rstream; member
63 DevStreamPtr create_dev_stream(unsigned int dev_id, cras_rstream* rstream);
Dstream_list_unittest.cc16 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()
50 static void destroy_rstream_cb(struct cras_rstream* rstream) { in destroy_rstream_cb() argument
52 destroyed_stream = rstream; in destroy_rstream_cb()
53 free(rstream); in destroy_rstream_cb()
Drstream_stub.h13 void rstream_stub_dev_offset(const cras_rstream* rstream,
18 void rstream_stub_pending_reply(const cras_rstream* rstream, int ret_value);
Daudio_thread_unittest_obsolete.cc130 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()
547 void SetupRstream(struct cras_rstream** rstream, int fd) { in SetupRstream() argument
550 *rstream = (struct cras_rstream*)calloc(1, sizeof(**rstream)); in SetupRstream()
551 memcpy(&(*rstream)->format, &fmt_, sizeof(fmt_)); in SetupRstream()
[all …]
Ddev_stream_unittest.cc82 struct cras_rstream* rstream; member
645 EXPECT_EQ(dev_stream.stream, rstream_get_readable_call.rstream); in TEST_F()
672 EXPECT_EQ(dev_stream.stream, rstream_get_readable_call.rstream); in TEST_F()
1139 void cras_rstream_record_fetch_interval(struct cras_rstream* rstream, in cras_rstream_record_fetch_interval() argument
1142 void cras_rstream_update_input_write_pointer(struct cras_rstream* rstream) {} in cras_rstream_update_input_write_pointer() argument
1144 void cras_rstream_update_output_read_pointer(struct cras_rstream* rstream) {} in cras_rstream_update_output_read_pointer() argument
1146 void cras_rstream_dev_offset_update(struct cras_rstream* rstream, in cras_rstream_dev_offset_update() argument
1150 void cras_rstream_dev_attach(struct cras_rstream* rstream, in cras_rstream_dev_attach() argument
1154 void cras_rstream_dev_detach(struct cras_rstream* rstream, in cras_rstream_dev_detach() argument
1157 unsigned int cras_rstream_dev_offset(const struct cras_rstream* rstream, in cras_rstream_dev_offset() argument
[all …]
Dinput_data_unittest.cc139 float cras_rstream_get_volume_scaler(struct cras_rstream* rstream) { in cras_rstream_get_volume_scaler() argument
Diodev_unittest.cc1514 struct cras_rstream rstream; in TEST() local
1518 memset(&rstream, 0, sizeof(rstream)); in TEST()
1522 rstream.cb_threshold = 800; in TEST()
1523 rstream.flags = TRIGGER_ONLY; in TEST()
1524 stream.stream = &rstream; in TEST()
1527 cras_iodev_open(&iodev, rstream.cb_threshold, &audio_fmt); in TEST()
2043 struct cras_rstream rstream; in TEST() local
2056 rstream.cb_threshold = min_cb_level; in TEST()
2057 stream.stream = &rstream; in TEST()
/external/llvm-project/openmp/runtime/src/
DextractExternal.cpp63 class rstream : public _rstream { class
65 template <class T> inline rstream &doRead(T &x) { in doRead()
85 rstream(const char *buf, streamsize size) in rstream() function in rstream
89 rstream(const char *fileName) : _rstream(getBuf(fileName)) {} in rstream() function in rstream
90 rstream &operator>>(int &x) { return doRead(x); } in operator >>()
91 rstream &operator>>(unsigned &x) { return doRead(x); } in operator >>()
92 rstream &operator>>(short &x) { return doRead(x); } in operator >>()
93 rstream &operator>>(unsigned short &x) { return doRead(x); } in operator >>()
94 rstream &operator>>(Symbol &e) { in operator >>()
136 StringTable(rstream &f) { in StringTable()
[all …]
/external/skia/tests/
DStreamTest.cpp166 std::unique_ptr<SkStreamAsset> rstream(wstream.detachAsStream()); in TestPackedUInt() local
169 if (!rstream->readPackedUInt(&n)) { in TestPackedUInt()
/external/skqp/tests/
DStreamTest.cpp161 std::unique_ptr<SkStreamAsset> rstream(wstream.detachAsStream()); in TestPackedUInt() local
164 if (!rstream->readPackedUInt(&n)) { in TestPackedUInt()
DSerializationTest.cpp644 std::unique_ptr<SkStreamAsset> rstream(wstream.detachAsStream()); in copy_picture_via_serialization() local
645 return SkPicture::MakeFromStream(rstream.get()); in copy_picture_via_serialization()

12