• Home
  • Raw
  • Download

Lines Matching refs:rstream

181 	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()
305 num_frames = MIN(rstream->audio_area->frames - offset, in capture_copy_converted_to_stream()
309 rstream->audio_area->frames, offset); in capture_copy_converted_to_stream()
323 rstream->audio_area, &rstream->format, stream_samples); in capture_copy_converted_to_stream()
325 cras_audio_area_copy(rstream->audio_area, offset, in capture_copy_converted_to_stream()
326 &rstream->format, dev_stream->conv_area, 0, in capture_copy_converted_to_stream()
332 cras_rstream_dev_offset_update(rstream, write_frames, in capture_copy_converted_to_stream()
334 offset = cras_rstream_dev_offset(rstream, dev_stream->dev_id); in capture_copy_converted_to_stream()
337 ATLOG(atlog, AUDIO_THREAD_CAPTURE_WRITE, rstream->stream_id, in capture_copy_converted_to_stream()
347 struct cras_rstream *rstream = dev_stream->stream; in dev_stream_capture() local
366 capture_copy_converted_to_stream(dev_stream, rstream, in dev_stream_capture()
370 cras_rstream_dev_offset(rstream, dev_stream->dev_id); in dev_stream_capture()
373 shm = cras_rstream_shm(rstream); in dev_stream_capture()
375 shm, cras_rstream_get_cb_threshold(rstream), in dev_stream_capture()
376 &rstream->audio_area->frames); in dev_stream_capture()
378 rstream->audio_area, &rstream->format, stream_samples); in dev_stream_capture()
380 nread = cras_audio_area_copy(rstream->audio_area, offset, in dev_stream_capture()
381 &rstream->format, area, in dev_stream_capture()
384 ATLOG(atlog, AUDIO_THREAD_CAPTURE_WRITE, rstream->stream_id, in dev_stream_capture()
386 cras_rstream_dev_offset_update(rstream, nread, in dev_stream_capture()
420 const struct cras_rstream *rstream = dev_stream->stream; in dev_stream_cb_threshold() local
421 unsigned int cb_threshold = cras_rstream_get_cb_threshold(rstream); in dev_stream_cb_threshold()
423 if (rstream->direction == CRAS_STREAM_OUTPUT) in dev_stream_cb_threshold()
434 struct cras_rstream *rstream = dev_stream->stream; in dev_stream_capture_avail() local
440 cras_rstream_dev_offset(rstream, dev_stream->dev_id); in dev_stream_capture_avail()
442 shm = cras_rstream_shm(rstream); in dev_stream_capture_avail()
444 wlimit = cras_rstream_get_max_write_frames(rstream); in dev_stream_capture_avail()
472 struct cras_rstream *rstream = dev_stream->stream; in check_next_wake_time() local
476 if (timespec_after(&now, &rstream->next_cb_ts)) { in check_next_wake_time()
477 rstream->next_cb_ts = now; in check_next_wake_time()
478 add_timespecs(&rstream->next_cb_ts, in check_next_wake_time()
479 &rstream->sleep_interval_ts); in check_next_wake_time()
480 ATLOG(atlog, AUDIO_THREAD_STREAM_RESCHEDULE, rstream->stream_id, in check_next_wake_time()
481 rstream->next_cb_ts.tv_sec, rstream->next_cb_ts.tv_nsec); in check_next_wake_time()
482 cras_server_metrics_missed_cb_event(rstream); in check_next_wake_time()
488 struct cras_rstream *rstream = dev_stream->stream; in dev_stream_update_next_wake_time() local
494 if (rstream->direction == CRAS_STREAM_INPUT && in dev_stream_update_next_wake_time()
495 !timespec_is_nonzero(&rstream->next_cb_ts)) { in dev_stream_update_next_wake_time()
496 clock_gettime(CLOCK_MONOTONIC_RAW, &rstream->next_cb_ts); in dev_stream_update_next_wake_time()
497 add_timespecs(&rstream->next_cb_ts, in dev_stream_update_next_wake_time()
498 &rstream->sleep_interval_ts); in dev_stream_update_next_wake_time()
502 add_timespecs(&rstream->next_cb_ts, &rstream->sleep_interval_ts); in dev_stream_update_next_wake_time()
516 struct cras_rstream *rstream = dev_stream->stream; in late_enough_for_capture_callback() local
519 return timespec_after(&now, &rstream->next_cb_ts); in late_enough_for_capture_callback()
524 struct cras_rstream *rstream = dev_stream->stream; in dev_stream_capture_update_rstream() local
525 unsigned int frames_ready = cras_rstream_get_cb_threshold(rstream); in dev_stream_capture_update_rstream()
528 if ((rstream->flags & TRIGGER_ONLY) && rstream->triggered) in dev_stream_capture_update_rstream()
531 cras_rstream_update_input_write_pointer(rstream); in dev_stream_capture_update_rstream()
537 if (!(rstream->flags & BULK_AUDIO_OK) && in dev_stream_capture_update_rstream()
542 if (!cras_rstream_input_level_met(rstream)) in dev_stream_capture_update_rstream()
546 if (rstream->flags & BULK_AUDIO_OK) in dev_stream_capture_update_rstream()
547 frames_ready = cras_rstream_level(rstream); in dev_stream_capture_update_rstream()
549 ATLOG(atlog, AUDIO_THREAD_CAPTURE_POST, rstream->stream_id, in dev_stream_capture_update_rstream()
550 frames_ready, rstream->shm->header->read_buf_idx); in dev_stream_capture_update_rstream()
552 rc = cras_rstream_audio_ready(rstream, frames_ready); in dev_stream_capture_update_rstream()
557 if (rstream->flags & TRIGGER_ONLY) in dev_stream_capture_update_rstream()
558 rstream->triggered = 1; in dev_stream_capture_update_rstream()
607 struct cras_rstream *rstream = dev_stream->stream; in dev_stream_set_delay() local
611 if (rstream->direction == CRAS_STREAM_OUTPUT) { in dev_stream_set_delay()
612 shm = cras_rstream_shm(rstream); in dev_stream_set_delay()
615 cras_set_playback_timestamp(rstream->format.frame_rate, in dev_stream_set_delay()
620 shm = cras_rstream_shm(rstream); in dev_stream_set_delay()
624 cras_set_capture_timestamp(rstream->format.frame_rate, in dev_stream_set_delay()
675 struct cras_rstream *rstream = dev_stream->stream; in get_input_wake_time() local
720 if ((rstream->flags & USE_DEV_TIMING) && in get_input_wake_time()
721 cras_rstream_is_pending_reply(rstream)) in get_input_wake_time()
724 *wake_time_out = rstream->next_cb_ts; in get_input_wake_time()
742 if (timespec_after(&time_for_sample, &rstream->next_cb_ts)) in get_input_wake_time()
745 if (rstream->flags & USE_DEV_TIMING) in get_input_wake_time()