pub struct Ac97BusMaster {
    mem: GuestMemory,
    regs: Arc<Mutex<Ac97BusMasterRegs>>,
    acc_sema: u8,
    po_info: AudioThreadInfo,
    pi_info: AudioThreadInfo,
    pmic_info: AudioThreadInfo,
    audio_server: Box<dyn ShmStreamSource<Error>>,
    irq_resample_thread: Option<JoinHandle<()>>,
    sys: Ac97BusMasterSys,
}
Expand description

Ac97BusMaster emulates the bus master portion of AC97. It exposes a register read/write interface compliant with the ICH bus master.

Fields§

§mem: GuestMemory§regs: Arc<Mutex<Ac97BusMasterRegs>>§acc_sema: u8§po_info: AudioThreadInfo§pi_info: AudioThreadInfo§pmic_info: AudioThreadInfo§audio_server: Box<dyn ShmStreamSource<Error>>§irq_resample_thread: Option<JoinHandle<()>>§sys: Ac97BusMasterSys

Implementations§

Creates an Ac97BusMasterobject that plays audio frommemto streams provided byaudio_server`.

Returns any file descriptors that need to be kept open when entering a jail.

Provides the events needed to raise interrupts in the guest.

Called when mixer has been changed and the new values should be applied to currently active streams.

Checks if the bus master is in the cold reset state.

Reads a byte from the given offset.

Reads a word from the given offset.

Reads a 32-bit word from the given offset.

Writes the byte val to the register specified by offset.

Writes the word val to the register specified by offset.

Writes the 32-bit val to the register specified by offset.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.