summary refs log tree commit diff
path: root/Cargo.toml
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2018-12-06 19:47:18 +0000
committerchrome-bot <chrome-bot@chromium.org>2019-01-26 10:43:20 -0800
commitb58b5529403c1d86a74cd973abf5796a9da4c348 (patch)
treef0584ba5b3725e81f9cf750196948fa526e983da /Cargo.toml
parent1f909a21ba90197500ccfc17608acdd6ea2c799a (diff)
downloadcrosvm-b58b5529403c1d86a74cd973abf5796a9da4c348.tar
crosvm-b58b5529403c1d86a74cd973abf5796a9da4c348.tar.gz
crosvm-b58b5529403c1d86a74cd973abf5796a9da4c348.tar.bz2
crosvm-b58b5529403c1d86a74cd973abf5796a9da4c348.tar.lz
crosvm-b58b5529403c1d86a74cd973abf5796a9da4c348.tar.xz
crosvm-b58b5529403c1d86a74cd973abf5796a9da4c348.tar.zst
crosvm-b58b5529403c1d86a74cd973abf5796a9da4c348.zip
devices: Add an Ac97 PCI device
The Ac97 device provides the guest with an audio playback device. All
input devices are stubbed out. Only playback at 48kHz is supported.

The device is emulated by `Ac97Dev` which interfaces with the PCI bus.
`Ac97Dev` uses `Ac97` to drive audio functions and emulate the device
registers. Physical Ac97 devices consist of two parts, the bus master
and a mixer. These two sets of registers are emulated by the
`Ac97BusMaster` and `Ac97Mixer` structures.

`Ac97BusMaster` handles audio samples and uses `Ac97Mixer` to determine
the configuration of the audio backend.

BUG=chromium:781398
TEST=crosvm run --disable-sandbox --null-audio --rwdisk gentoo.ext4 -c2
-m2048 -p 'root=/dev/vda snd_intel8x0.inside_vm=1
snd_intel8x0.ac97_clock=48000' vmlinux.bin
and play audio with aplay -d2 -Dhw:0,0 -f dat /dev/urandom
CQ-DEPEND=CL:1402264
CQ-DEPEND=CL:1421588
CQ-DEPEND=CL:1433794
CQ-DEPEND=CL:1432835

Change-Id: I9985ffad753bccc1bf468ebbdacec0876560a5e0
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1366544
Commit-Ready: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index dd720fb..29ad554 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -68,6 +68,7 @@ sys_util = "*"
 
 [patch.crates-io]
 assertions = { path = "assertions" }
+audio_streams = { path = "../../third_party/adhd/audio_streams" } # ignored by ebuild
 data_model = { path = "data_model" }
 poll_token_derive = { path = "sys_util/poll_token_derive" }
 sync = { path = "sync" }