Struct alsa_ctl_tlv_codec::DbInterval
source · [−]Expand description
The data to express dB interval in TLV (Type-Length-Value) of ALSA control interface.
It has three variants below;
- SNDRV_CTL_TLVT_DB_LINEAR(=2)
- SNDRV_CTL_TLVT_DB_MINMAX(=4)
- SNDRV_CTL_TLVT_DB_MINMAX_MUTE(=5)
All of them have two elements in value field.
Fields
min: i32The minimum value by dB expression, in 0.1 dB unit. This corresponds to the minimum value in the state of control element.
max: i32The maximum value by dB expression, 0.1 dB unit. This corresponds to the maximum value in the state of control element.
linear: boolIf true, the value in the state of control element increases linearly, thus need calculation to convert to the value by dB expression. The calculation shall be:
20 * log10( current_value / ( maximum_value - minimum_value ) ) (* 100 in 0.1dB unit)
Else, the value in the state of control element corresponds to dB expression itself.
mute_avail: boolIf true, the value less than or equals to CTL_VALUE_MUTE (=-9999999) is available to
mute the control element explicitly.
Trait Implementations
sourceimpl Clone for DbInterval
impl Clone for DbInterval
sourcefn clone(&self) -> DbInterval
fn clone(&self) -> DbInterval
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for DbInterval
impl Debug for DbInterval
sourceimpl Default for DbInterval
impl Default for DbInterval
sourcefn default() -> DbInterval
fn default() -> DbInterval
Returns the “default value” for a type. Read more
sourceimpl From<&DbInterval> for Vec<u32>
impl From<&DbInterval> for Vec<u32>
sourcefn from(data: &DbInterval) -> Self
fn from(data: &DbInterval) -> Self
Converts to this type from the input type.
sourceimpl From<DbInterval> for Vec<u32>
impl From<DbInterval> for Vec<u32>
sourcefn from(data: DbInterval) -> Self
fn from(data: DbInterval) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<DbInterval> for DbInterval
impl PartialEq<DbInterval> for DbInterval
sourcefn eq(&self, other: &DbInterval) -> bool
fn eq(&self, other: &DbInterval) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &DbInterval) -> bool
fn ne(&self, other: &DbInterval) -> bool
This method tests for !=.
sourceimpl RangeUtil<i32> for DbInterval
impl RangeUtil<i32> for DbInterval
sourceimpl<'a> TlvData<'a> for DbInterval
impl<'a> TlvData<'a> for DbInterval
sourcefn value_type(&self) -> u32
fn value_type(&self) -> u32
Return the value of type field. It should come from UAPI of Linux kernel.
sourcefn value_length(&self) -> usize
fn value_length(&self) -> usize
Return the length of value field. It should be in byte unit and multiples of 4 as result.
sourceimpl ToDbInterval for DbInterval
impl ToDbInterval for DbInterval
fn to_dbinterval(&self, _: &ValueRange) -> Result<DbInterval, ToDbIntervalError>
sourceimpl ToValueRange for DbInterval
impl ToValueRange for DbInterval
fn to_valuerange(&self, range: &ValueRange) -> Option<ValueRange>
sourceimpl TryFrom<&[u32]> for DbInterval
impl TryFrom<&[u32]> for DbInterval
impl Copy for DbInterval
impl Eq for DbInterval
impl StructuralEq for DbInterval
impl StructuralPartialEq for DbInterval
Auto Trait Implementations
impl RefUnwindSafe for DbInterval
impl Send for DbInterval
impl Sync for DbInterval
impl Unpin for DbInterval
impl UnwindSafe for DbInterval
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more