diff options
author | Dylan Reid <dgreid@chromium.org> | 2018-12-06 19:47:18 +0000 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-01-26 10:43:20 -0800 |
commit | b58b5529403c1d86a74cd973abf5796a9da4c348 (patch) | |
tree | f0584ba5b3725e81f9cf750196948fa526e983da /src/main.rs | |
parent | 1f909a21ba90197500ccfc17608acdd6ea2c799a (diff) | |
download | crosvm-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 'src/main.rs')
0 files changed, 0 insertions, 0 deletions