mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
ac97: Set CRAS_CLIENT_TYPE_CROSVM for crosvm
Set client type for debug log and ucm. BUG=b:140401362 TEST=Build, deploy and run `aplay -f dat /dev/zeros` and check `cras_test_client --dump_a` results Change-Id: I2b040ddaaafe0b7d6e7c3a6f3973598d0a79ff82 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2142836 Reviewed-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Chih-Yang Hsia <paulhsia@chromium.org> Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
This commit is contained in:
parent
03164ca9d8
commit
4ee9bffbd5
1 changed files with 2 additions and 1 deletions
|
@ -12,7 +12,7 @@ use audio_streams::{
|
|||
shm_streams::{NullShmStreamSource, ShmStreamSource},
|
||||
StreamEffect,
|
||||
};
|
||||
use libcras::CrasClient;
|
||||
use libcras::{CrasClient, CrasClientType};
|
||||
use resources::{Alloc, MmioType, SystemAllocator};
|
||||
use sys_util::{error, EventFd, GuestMemory};
|
||||
|
||||
|
@ -119,6 +119,7 @@ impl Ac97Dev {
|
|||
fn create_cras_audio_device(params: Ac97Parameters, mem: GuestMemory) -> Result<Ac97Dev> {
|
||||
let mut server =
|
||||
Box::new(CrasClient::new().map_err(|e| pci_device::Error::CreateCrasClientFailed(e))?);
|
||||
server.set_client_type(CrasClientType::CRAS_CLIENT_TYPE_CROSVM);
|
||||
if params.capture {
|
||||
server.enable_cras_capture();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue