• Home
  • Raw
  • Download

Lines Matching refs:rstream

111 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()
129 cras_shm_set_used_size(rstream->shm, used_size); in SetupRstream()
132 void TearDownRstream(struct cras_rstream* rstream) { in TearDownRstream() argument
133 free(rstream->shm->samples); in TearDownRstream()
134 free(rstream->shm->header); in TearDownRstream()
135 free(rstream->shm); in TearDownRstream()
181 void SetupPinnedStream(struct cras_rstream* rstream, in SetupPinnedStream() argument
184 SetupRstream(rstream, direction); in SetupPinnedStream()
185 rstream->is_pinned = 1; in SetupPinnedStream()
186 rstream->pinned_dev_idx = pin_to_dev->info.idx; in SetupPinnedStream()
402 struct cras_rstream rstream; in TEST_F() local
408 SetupRstream(&rstream, CRAS_STREAM_INPUT); in TEST_F()
415 thread_add_stream(thread_, &rstream, iodevs, 2); in TEST_F()
428 EXPECT_EQ(&rstream, cras_rstream_dev_offset_rstream_val[0]); in TEST_F()
430 EXPECT_EQ(&rstream, cras_rstream_dev_offset_rstream_val[1]); in TEST_F()
441 TearDownRstream(&rstream); in TEST_F()
490 struct cras_rstream rstream; in TEST_F() local
497 SetupRstream(&rstream, CRAS_STREAM_OUTPUT); in TEST_F()
498 shm_header = rstream.shm->header; in TEST_F()
501 thread_add_stream(thread_, &rstream, &piodev, 1); in TEST_F()
503 EXPECT_EQ(dev_stream->stream, &rstream); in TEST_F()
525 TearDownRstream(&rstream); in TEST_F()
592 struct cras_rstream rstream; in TEST_F() local
599 SetupRstream(&rstream, CRAS_STREAM_OUTPUT); in TEST_F()
605 thread_add_stream(thread_, &rstream, &piodev, 1); in TEST_F()
607 EXPECT_EQ(dev_stream->stream, &rstream); in TEST_F()
617 EXPECT_EQ(dev_stream->stream, &rstream); in TEST_F()
623 EXPECT_EQ(dev_stream->stream, &rstream); in TEST_F()
638 dev_io_remove_stream(&thread_->open_devs[rstream.direction], &rstream, in TEST_F()
654 TearDownRstream(&rstream); in TEST_F()
662 struct cras_rstream rstream; in TEST_F() local
665 SetupRstream(&rstream, CRAS_STREAM_OUTPUT); in TEST_F()
666 shm_header = rstream.shm->header; in TEST_F()
675 thread_add_stream(thread_, &rstream, &piodev, 1); in TEST_F()
698 shm_header->write_offset[0] = cras_shm_used_size(rstream.shm); in TEST_F()
710 TearDownRstream(&rstream); in TEST_F()
917 struct cras_rstream rstream; in TEST_F() local
922 SetupRstream(&rstream, CRAS_STREAM_OUTPUT); in TEST_F()
929 thread_add_stream(thread_, &rstream, &piodev, 1); in TEST_F()
948 TearDownRstream(&rstream); in TEST_F()
953 struct cras_rstream rstream; in TEST_F() local
958 SetupRstream(&rstream, CRAS_STREAM_OUTPUT); in TEST_F()
965 thread_add_stream(thread_, &rstream, &piodev, 1); in TEST_F()
984 TearDownRstream(&rstream); in TEST_F()
988 struct cras_rstream rstream; in TEST() local
992 SetupRstream(&rstream, CRAS_STREAM_OUTPUT); in TEST()
993 shm_header = rstream.shm->header; in TEST()
996 EXPECT_EQ(1, thread_drain_stream_ms_remaining(&thread, &rstream)); in TEST()
999 EXPECT_EQ(10, thread_drain_stream_ms_remaining(&thread, &rstream)); in TEST()
1002 EXPECT_EQ(0, thread_drain_stream_ms_remaining(&thread, &rstream)); in TEST()
1004 rstream.direction = CRAS_STREAM_INPUT; in TEST()
1006 EXPECT_EQ(0, thread_drain_stream_ms_remaining(&thread, &rstream)); in TEST()
1007 TearDownRstream(&rstream); in TEST()
1153 void cras_rstream_dev_attach(struct cras_rstream* rstream, in cras_rstream_dev_attach() argument
1157 void cras_rstream_dev_detach(struct cras_rstream* rstream, in cras_rstream_dev_detach() argument
1162 void cras_rstream_dev_offset_update(struct cras_rstream* rstream, in cras_rstream_dev_offset_update() argument
1167 cras_rstream_dev_offset_update_rstream_val[i] = rstream; in cras_rstream_dev_offset_update()
1174 unsigned int cras_rstream_dev_offset(const struct cras_rstream* rstream, in cras_rstream_dev_offset() argument
1178 cras_rstream_dev_offset_rstream_val[i] = rstream; in cras_rstream_dev_offset()
1186 void cras_rstream_record_fetch_interval(struct cras_rstream* rstream, in cras_rstream_record_fetch_interval() argument
1193 float cras_rstream_get_volume_scaler(struct cras_rstream* rstream) { in cras_rstream_get_volume_scaler() argument