From 04a2881b03f14dea52364382f695b28a43764031 Mon Sep 17 00:00:00 2001 From: Judy Hsiao Date: Tue, 26 May 2020 18:15:56 +0800 Subject: ac97: Uses audio_streams::BoxError audio_streams export BoxError which can be passed between threads. Adopts the API change accordingly. BUG=b:149437381 TEST=emerge-{BOARD} crosvm Cq-Depend: chromium:2215772 Change-Id: I524e9d7ab3c16b7b6d3714187f166dce72d243cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2214971 Tested-by: Judy Hsiao Reviewed-by: Chih-Yang Hsia Reviewed-by: Dylan Reid Commit-Queue: Judy Hsiao --- devices/src/pci/ac97_bus_master.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/devices/src/pci/ac97_bus_master.rs b/devices/src/pci/ac97_bus_master.rs index 22f3c92..2769f8d 100644 --- a/devices/src/pci/ac97_bus_master.rs +++ b/devices/src/pci/ac97_bus_master.rs @@ -15,7 +15,7 @@ use std::time::{Duration, Instant}; use audio_streams::{ shm_streams::{ShmStream, ShmStreamSource}, - DummyStreamControl, SampleFormat, StreamControl, StreamDirection, StreamEffect, + BoxError, DummyStreamControl, SampleFormat, StreamControl, StreamDirection, StreamEffect, }; use sync::{Condvar, Mutex}; use sys_util::{ @@ -105,7 +105,7 @@ type GuestMemoryResult = std::result::Result; #[derive(Debug)] enum AudioError { // Failed to create a new stream. - CreateStream(Box), + CreateStream(BoxError), // Invalid buffer offset received from the audio server. InvalidBufferOffset, // Guest did not provide a buffer when needed. @@ -113,9 +113,9 @@ enum AudioError { // Failure to read guest memory. ReadingGuestError(GuestMemoryError), // Failure to respond to the ServerRequest. - RespondRequest(Box), + RespondRequest(BoxError), // Failure to wait for a request from the stream. - WaitForAction(Box), + WaitForAction(BoxError), } impl std::error::Error for AudioError {} -- cgit 1.4.1