Lines Matching refs:hw_level
75 unsigned int hw_level, fr_to_write; in default_no_stream_playback() local
83 hw_level = rc; in default_no_stream_playback()
86 if (hw_level == 0) { in default_no_stream_playback()
87 rc = cras_iodev_output_underrun(odev, hw_level, 0); in default_no_stream_playback()
94 hw_level = rc; in default_no_stream_playback()
98 hw_level, target_hw_level); in default_no_stream_playback()
100 fr_to_write = cras_iodev_buffer_avail(odev, hw_level); in default_no_stream_playback()
101 if (hw_level <= target_hw_level) { in default_no_stream_playback()
102 fr_to_write = MIN(target_hw_level - hw_level, fr_to_write); in default_no_stream_playback()
1315 int cras_iodev_buffer_avail(struct cras_iodev *iodev, unsigned hw_level) in cras_iodev_buffer_avail() argument
1318 return hw_level; in cras_iodev_buffer_avail()
1320 if (hw_level + iodev->min_buffer_level > iodev->buffer_size) in cras_iodev_buffer_avail()
1323 return iodev->buffer_size - iodev->min_buffer_level - hw_level; in cras_iodev_buffer_avail()
1358 int cras_iodev_output_underrun(struct cras_iodev *odev, unsigned int hw_level, in cras_iodev_output_underrun() argument
1361 ATLOG(atlog, AUDIO_THREAD_UNDERRUN, odev->info.idx, hw_level, in cras_iodev_output_underrun()
1386 unsigned int *hw_level, in cras_iodev_default_frames_to_play_in_sleep() argument
1392 *hw_level = level; in cras_iodev_default_frames_to_play_in_sleep()
1405 if (*hw_level > odev->min_cb_level && dev_playback_frames(odev)) in cras_iodev_default_frames_to_play_in_sleep()
1406 return *hw_level - odev->min_cb_level; in cras_iodev_default_frames_to_play_in_sleep()
1431 unsigned int *hw_level, in cras_iodev_frames_to_play_in_sleep() argument
1437 return odev->frames_to_play_in_sleep(odev, hw_level, hw_tstamp); in cras_iodev_frames_to_play_in_sleep()
1440 odev, hw_level, hw_tstamp); in cras_iodev_frames_to_play_in_sleep()
1623 unsigned int hw_level) in cras_iodev_update_highest_hw_level() argument
1633 if (hw_level == iodev->buffer_size && in cras_iodev_update_highest_hw_level()
1636 hw_level, 0); in cras_iodev_update_highest_hw_level()
1638 if (iodev->highest_hw_level != hw_level) in cras_iodev_update_highest_hw_level()
1641 iodev->highest_hw_level = MAX(iodev->highest_hw_level, hw_level); in cras_iodev_update_highest_hw_level()