roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

Auto-pause devices and pipelines

Open gavv opened this issue 1 year ago • 0 comments

Requires these tasks to be completed first:

  • #677
  • #678
  • #679
  • #706

In sndio::Pump, we need to do the following:

  • [ ] if source becomes idle:
    • [ ] if there is backup source, pause main source, switch to backup source, use it until main source becomes ready, then pause backup source, resume main source, and switch to it
    • [ ] if there is no backup source, pause source and sink, then sleep until source becomes ready, then resume source and sink
  • [ ] if sink becomes idle:
    • [ ] pause source and sink, then sleep until sink becomes ready, then resume source and sink

After doing this, pump we will obtain the following behavior:

  • on sender, while input device is idle, we don't send packets
  • on receiver, while there are no sessions, we don't use device and CPU
  • on receiver, while device is unavailable, we don't use device and CPU (requires #529)

gavv avatar Jan 26 '24 14:01 gavv