mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
7c97b2e7d3
Improvements: - Once a {playback, capture} stream is initiated. We should start write (read) audio in each callback period or the underlaying audio server will underrun (overrun). (Even in the WorkerStatus::Pause state). - Change the polling loop logic to wait for next buffer -> check status -> try_next desc_chain or exit -> transfer data or exit And make start_pcm_worker act like real audio hw device, which consumes data in every fixed period. - Right before leaving from WorkerStatus::Quit, we still need to transfer data to/from the running stream to prevent underrun or overrun. Changes: - changes in start_pcm_worker: - extract read_data, write_data utils - implement From<Result<()>, Error> for virtio_snd_pcm_status - poll next_{capture, playback}_buffer - if status == WorkerStatus::Pause, still need to transfer data to prevent underrun or overrun - split Output and Input stream logic - use copy_from or copy_to instead to io::copy - remove Condvar usage - changes in audio_streams - add copy_from in AudioBuffer and AsyncPlaybackBuffer - add copy_to in AudioBuffer and AsyncCaptureBuffer BUG=b:210197743 TEST=alsa_conformance_test and make sure there is no `ERR cras_server[1818]: Error reading msg from client: rc: -104` or `ERR cras_server[1818]: fetch err: -32 for 6490001` errors. Change-Id: I004969040881cb2d46b54589e3e7e634ea67d152 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3341135 Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org> |
||
---|---|---|
.. | ||
assertions | ||
audio_streams | ||
base | ||
cros-fuzz | ||
cros_async | ||
cros_asyncv2 | ||
data_model | ||
io_uring | ||
p9 | ||
sync | ||
sys_util | ||
README.md |
Crosvm General Purpose Libraries
The crates in this folder are general purpose libraries used by other projects in ChromeOS as well.
To make them accessible independendly of crosvm, each of these crates is excluded from the crosvm workspace.