mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
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>
33 lines
1,017 B
TOML
33 lines
1,017 B
TOML
[package]
|
|
name = "devices"
|
|
version = "0.1.0"
|
|
authors = ["The Chromium OS Authors"]
|
|
|
|
[features]
|
|
wl-dmabuf = []
|
|
gpu = ["gpu_buffer", "gpu_display", "gpu_renderer"]
|
|
tpm = ["tpm2"]
|
|
|
|
[dependencies]
|
|
audio_streams = "*"
|
|
bit_field = { path = "../bit_field" }
|
|
byteorder = "*"
|
|
data_model = { path = "../data_model" }
|
|
gpu_buffer = { path = "../gpu_buffer", optional = true }
|
|
gpu_display = { path = "../gpu_display", optional = true }
|
|
gpu_renderer = { path = "../gpu_renderer", optional = true }
|
|
kvm = { path = "../kvm" }
|
|
libc = "*"
|
|
io_jail = { path = "../io_jail" }
|
|
msg_on_socket_derive = { path = "../msg_socket/msg_on_socket_derive" }
|
|
msg_socket = { path = "../msg_socket" }
|
|
net_sys = { path = "../net_sys" }
|
|
net_util = { path = "../net_util" }
|
|
p9 = { path = "../p9" }
|
|
resources = { path = "../resources" }
|
|
sync = { path = "../sync" }
|
|
sys_util = { path = "../sys_util" }
|
|
tpm2 = { path = "../tpm2", optional = true }
|
|
vhost = { path = "../vhost" }
|
|
virtio_sys = { path = "../virtio_sys" }
|
|
vm_control = { path = "../vm_control" }
|