mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
e4f6374761
Read PCM device parameters and set CRAS client's client type and stream type. Fallback to the virtio snd device's client type and CRAS_STREAM_TYPE_DEFAULT if not set. Resize the PCM device config of the provided parameters to match the number of PCM devices. Also add unit test for the virtio-snd::new function which checks the PCM device config resizing and the data that are derived from the parameters. BUG=b:269984052 TEST=cargo test --features audio,audio_cras TEST=FEATURES=test emerge-amd64-generic crosvm TEST=Setting client_type and stream_type on ARCVM Change-Id: I692881a1e4117f8c67b162d2966acfab9282011a Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4275361 Commit-Queue: Pattara Teerapong <pteerapong@chromium.org> Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
Stub crate for libcras
libcras is used by ChromeOS to play audio through the cras server.
In ChromeOS builds, the audio_cras
cargo feature is enabled and this crate is replaced with the
actual libcras implementation.
On other platforms, the feature flag will remain disabled and this crate is used to satisfy cargo dependencies on libcras.