• Home
  • Raw
  • Download

Lines Matching full:frames

24 /* Fake the codec to encode (512/4) frames into 128 bytes. */
189 unsigned frames; in TEST_F() local
206 frames = 1500; in TEST_F()
207 iodev->get_buffer(iodev, &area1, &frames); in TEST_F()
208 ASSERT_EQ(1500, frames); in TEST_F()
209 ASSERT_EQ(1500, area1->frames); in TEST_F()
212 /* 1000 frames takes 8 encode call, FAKE_A2DP_CODE_SIZE / 4 = 128 in TEST_F()
223 frames = 1000; in TEST_F()
224 iodev->get_buffer(iodev, &area2, &frames); in TEST_F()
225 ASSERT_EQ(1000, frames); in TEST_F()
226 ASSERT_EQ(1000, area2->frames); in TEST_F()
233 * Expect to takes 7 more encode calls to process the 804 frames of data. in TEST_F()
240 frames = 50; in TEST_F()
241 iodev->get_buffer(iodev, &area3, &frames); in TEST_F()
242 ASSERT_EQ(50, frames); in TEST_F()
250 /* Expect one a2dp encode call was executed for the left un-encoded frames. in TEST_F()
265 unsigned frames; in TEST_F() local
283 frames = 256; in TEST_F()
284 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
285 ASSERT_EQ(256, frames); in TEST_F()
286 ASSERT_EQ(256, area->frames); in TEST_F()
296 frames = 800; in TEST_F()
297 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
301 /* Some time has passed, same amount of frames are queued. */ in TEST_F()
306 /* Put 900 more frames. next_flush_time not yet passed so expect in TEST_F()
308 frames = 900; in TEST_F()
309 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
315 frames = 300; in TEST_F()
316 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
327 unsigned frames; in TEST_F() local
351 /* Fake that 1000 frames are put and one block got flushed. in TEST_F()
353 frames = 1000; in TEST_F()
354 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
355 ASSERT_EQ(1000, frames); in TEST_F()
356 ASSERT_EQ(1000, area->frames); in TEST_F()
364 /* Same amount of frames are queued after some time has passed. */ in TEST_F()
369 frames = iodev->frames_to_play_in_sleep(iodev, &level, &tstamp); in TEST_F()
372 EXPECT_GE(frames + 1, target); in TEST_F()
373 EXPECT_GE(target + 1, frames); in TEST_F()
382 frames = 1000; in TEST_F()
383 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
390 frames = iodev->frames_to_play_in_sleep(iodev, &level, &tstamp); in TEST_F()
393 EXPECT_GE(frames + 1, target); in TEST_F()
394 EXPECT_GE(target + 1, frames); in TEST_F()
396 /* Put 1000 more frames, and make a fake failure to this flush. */ in TEST_F()
399 frames = 1000; in TEST_F()
400 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
417 frames = iodev->frames_to_play_in_sleep(iodev, &level, &tstamp); in TEST_F()
420 EXPECT_GE(frames + 1, target); in TEST_F()
421 EXPECT_GE(target + 1, frames); in TEST_F()
431 unsigned frames; in TEST_F() local
448 frames = iodev->buffer_size; in TEST_F()
449 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
450 EXPECT_LE(frames, iodev->buffer_size); in TEST_F()
451 EXPECT_EQ(0, iodev->put_buffer(iodev, frames)); in TEST_F()
462 frames = iodev->buffer_size; in TEST_F()
463 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
464 EXPECT_LE(frames, iodev->buffer_size); in TEST_F()
465 EXPECT_EQ(0, iodev->put_buffer(iodev, frames)); in TEST_F()
466 frames = iodev->frames_queued(iodev, &tstamp); in TEST_F()
467 EXPECT_EQ(frames, iodev->buffer_size); in TEST_F()
483 unsigned frames; in TEST_F() local
497 frames = 1500; in TEST_F()
498 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
499 ASSERT_EQ(1500, frames); in TEST_F()
500 ASSERT_EQ(1500, area->frames); in TEST_F()
523 unsigned frames; in TEST_F() local
537 frames = 300; in TEST_F()
538 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
539 ASSERT_EQ(300, frames); in TEST_F()
540 ASSERT_EQ(300, area->frames); in TEST_F()
549 /* Frames queued below min_buffer_level, which is derived from transport MTU. in TEST_F()
550 * Assert min_cb_level of zero frames are filled. */ in TEST_F()
564 unsigned frames; in TEST_F() local
587 frames = iodev->frames_queued(iodev, &tstamp); in TEST_F()
588 EXPECT_LE(iodev->min_buffer_level, frames); in TEST_F()
590 /* Some time has passed and a small stream of 200 frames block is added. in TEST_F()
594 frames = 200; in TEST_F()
595 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
597 frames = iodev->frames_queued(iodev, &tstamp); in TEST_F()
598 EXPECT_LE(iodev->min_buffer_level, frames); in TEST_F()
608 unsigned frames; in TEST_F() local
626 frames = 200; in TEST_F()
627 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
639 frames = iodev->frames_queued(iodev, &tstamp); in TEST_F()
640 EXPECT_EQ(3 * iodev->min_buffer_level, frames); in TEST_F()
646 frames = iodev->frames_queued(iodev, &tstamp); in TEST_F()
647 ASSERT_EQ(2 * iodev->min_buffer_level, frames); in TEST_F()
655 frames = iodev->frames_queued(iodev, &tstamp); in TEST_F()
656 ASSERT_EQ(2 * iodev->min_buffer_level, frames); in TEST_F()
667 unsigned frames, start_level; in TEST_F() local
686 frames = start_level; in TEST_F()
687 iodev->get_buffer(iodev, &area, &frames); in TEST_F()
688 iodev->put_buffer(iodev, frames); in TEST_F()
689 frames = iodev->frames_queued(iodev, &tstamp); in TEST_F()
691 EXPECT_EQ(start_level - iodev->min_buffer_level, frames); in TEST_F()
698 frames = iodev->frames_queued(iodev, &tstamp); in TEST_F()
700 ASSERT_EQ(start_level - 2 * iodev->min_buffer_level, frames); in TEST_F()
705 frames = iodev->frames_queued(iodev, &tstamp); in TEST_F()
708 ASSERT_EQ(start_level - 3 * iodev->min_buffer_level, frames); in TEST_F()
911 int cras_iodev_fill_odev_zeros(struct cras_iodev* odev, unsigned int frames) { in cras_iodev_fill_odev_zeros() argument
914 cras_iodev_fill_odev_zeros_frames = frames; in cras_iodev_fill_odev_zeros()
916 odev->get_buffer(odev, &area, &frames); in cras_iodev_fill_odev_zeros()
917 odev->put_buffer(odev, frames); in cras_iodev_fill_odev_zeros()