Lines Matching refs:odev
1817 static int adjust_appl_ptr_for_leaving_free_run(struct cras_iodev *odev) in adjust_appl_ptr_for_leaving_free_run() argument
1819 struct alsa_io *aio = (struct alsa_io *)odev; in adjust_appl_ptr_for_leaving_free_run()
1822 ahead = odev->min_buffer_level + odev->min_cb_level; in adjust_appl_ptr_for_leaving_free_run()
1830 static int adjust_appl_ptr_for_underrun(struct cras_iodev *odev) in adjust_appl_ptr_for_underrun() argument
1832 struct alsa_io *aio = (struct alsa_io *)odev; in adjust_appl_ptr_for_underrun()
1835 ahead = odev->min_buffer_level + odev->min_cb_level + in adjust_appl_ptr_for_underrun()
1836 odev->min_cb_level / 2; in adjust_appl_ptr_for_underrun()
1844 static int adjust_appl_ptr_samples_remaining(struct cras_iodev *odev) in adjust_appl_ptr_samples_remaining() argument
1846 struct alsa_io *aio = (struct alsa_io *)odev; in adjust_appl_ptr_samples_remaining()
1855 rc = odev->frames_queued(odev, &hw_tstamp); in adjust_appl_ptr_samples_remaining()
1864 if (real_hw_level <= odev->min_buffer_level) in adjust_appl_ptr_samples_remaining()
1865 return cras_iodev_output_underrun(odev, real_hw_level, 0); in adjust_appl_ptr_samples_remaining()
1870 offset = MAX(odev->min_buffer_level + odev->min_cb_level, valid_sample); in adjust_appl_ptr_samples_remaining()
1874 rc = cras_iodev_fill_odev_zeros(odev, offset - real_hw_level); in adjust_appl_ptr_samples_remaining()
1881 static int alsa_output_underrun(struct cras_iodev *odev) in alsa_output_underrun() argument
1887 rc = fill_whole_buffer_with_zeros(odev); in alsa_output_underrun()
1891 return adjust_appl_ptr_for_underrun(odev); in alsa_output_underrun()
1894 static int possibly_enter_free_run(struct cras_iodev *odev) in possibly_enter_free_run() argument
1896 struct alsa_io *aio = (struct alsa_io *)odev; in possibly_enter_free_run()
1907 rc = odev->frames_queued(odev, &hw_tstamp); in possibly_enter_free_run()
1913 if (real_hw_level <= odev->min_buffer_level) { in possibly_enter_free_run()
1914 rc = cras_iodev_output_underrun(odev, real_hw_level, 0); in possibly_enter_free_run()
1923 rc = fill_whole_buffer_with_zeros(odev); in possibly_enter_free_run()
1932 odev->format->frame_rate), in possibly_enter_free_run()
1933 odev->buffer_size - real_hw_level); in possibly_enter_free_run()
1934 rc = cras_iodev_fill_odev_zeros(odev, fr_to_write); in possibly_enter_free_run()
1942 static int leave_free_run(struct cras_iodev *odev) in leave_free_run() argument
1944 struct alsa_io *aio = (struct alsa_io *)odev; in leave_free_run()
1949 cras_iodev_reset_rate_estimator(odev); in leave_free_run()
1952 rc = adjust_appl_ptr_for_leaving_free_run(odev); in leave_free_run()
1954 rc = adjust_appl_ptr_samples_remaining(odev); in leave_free_run()
1957 odev->info.name, rc); in leave_free_run()
1972 static int no_stream(struct cras_iodev *odev, int enable) in no_stream() argument
1975 return possibly_enter_free_run(odev); in no_stream()
1977 return leave_free_run(odev); in no_stream()
1980 static int is_free_running(const struct cras_iodev *odev) in is_free_running() argument
1982 struct alsa_io *aio = (struct alsa_io *)odev; in is_free_running()
2011 static int get_valid_frames(struct cras_iodev *odev, struct timespec *tstamp) in get_valid_frames() argument
2013 struct alsa_io *aio = (struct alsa_io *)odev; in get_valid_frames()
2027 rc = odev->frames_queued(odev, tstamp); in get_valid_frames()