Struct devices::pci::ac97_mixer::Ac97Mixer
source · pub struct Ac97Mixer {Show 17 fields
master_volume_l: u8,
master_volume_r: u8,
master_mute: bool,
mic_muted: bool,
mic_20db: bool,
mic_volume: u8,
record_gain_l: u8,
record_gain_r: u8,
record_gain_mute: bool,
pcm_out_vol_l: u16,
pcm_out_vol_r: u16,
pcm_out_mute: bool,
power_down_control: u16,
ext_audio_status_ctl: u16,
pcm_front_dac_rate: u16,
pcm_surr_dac_rate: u16,
pcm_lfe_dac_rate: u16,
}
Expand description
Ac97Mixer
holds the mixer state for the AC97 bus.
The mixer is used by calling the readb
/readw
/readl
functions to read register values and
the writeb
/writew
/writel
functions to set register values.
Fields§
§master_volume_l: u8
§master_volume_r: u8
§master_mute: bool
§mic_muted: bool
§mic_20db: bool
§mic_volume: u8
§record_gain_l: u8
§record_gain_r: u8
§record_gain_mute: bool
§pcm_out_vol_l: u16
§pcm_out_vol_r: u16
§pcm_out_mute: bool
§power_down_control: u16
§ext_audio_status_ctl: u16
§pcm_front_dac_rate: u16
§pcm_surr_dac_rate: u16
§pcm_lfe_dac_rate: u16
Implementations§
source§impl Ac97Mixer
impl Ac97Mixer
pub fn reset(&mut self)
sourcepub fn get_master_volume(&self) -> (bool, f64, f64)
pub fn get_master_volume(&self) -> (bool, f64, f64)
Returns the mute status and left and right attenuation from the master volume register.
sourcepub fn get_sample_rate(&self) -> u16
pub fn get_sample_rate(&self) -> u16
Returns the front sample rate (reg 0x2c).
fn get_master_reg(&self) -> u16
fn set_master_reg(&mut self, val: u16)
fn get_mic_volume(&self) -> u16
fn set_mic_volume(&mut self, val: u16)
fn get_pcm_out_volume(&self) -> u16
fn set_pcm_out_volume(&mut self, val: u16)
fn get_record_gain_reg(&self) -> u16
fn set_record_gain_reg(&mut self, val: u16)
fn set_power_down_reg(&mut self, val: u16)
Auto Trait Implementations§
impl RefUnwindSafe for Ac97Mixer
impl Send for Ac97Mixer
impl Sync for Ac97Mixer
impl Unpin for Ac97Mixer
impl UnwindSafe for Ac97Mixer
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.