Lines Matching refs:delay
23 #include <linux/delay.h>
618 /* calculate runtime delay from LPIB */
625 int delay;
628 delay = pos - lpib_pos;
630 delay = lpib_pos - pos;
631 if (delay < 0) {
632 if (delay >= azx_dev->core.delay_negative_threshold)
633 delay = 0;
635 delay += azx_dev->core.bufsize;
638 if (delay >= azx_dev->core.period_bytes) {
640 "Unstable LPIB (%d >= %d); disabling LPIB delay counting\n",
641 delay, azx_dev->core.period_bytes);
642 delay = 0;
647 return bytes_to_frames(substream->runtime, delay);
682 * Returns 1 if OK to proceed, 0 for delay handling, -1 for skipping update
888 unsigned int pos, delay;
894 runtime->delay = AMD_FIFO_SIZE;
895 delay = frames_to_bytes(runtime, AMD_FIFO_SIZE);
897 if (pos < delay) {
898 delay = pos;
899 runtime->delay = bytes_to_frames(runtime, pos);
907 if (pos < delay)
909 pos -= delay;
921 return substream->runtime->delay;
1873 dev_dbg(chip->card->dev, "Enable delay in RIRB handling\n");