5005 lines
140 KiB
Rust
5005 lines
140 KiB
Rust
// Copyright 2019 The Chromium OS Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
/*
|
|
* generated from files in cras/src/common in adhd:
|
|
* cras_audio_format.h
|
|
* cras_iodev_info.h
|
|
* cras_messages.h
|
|
* cras_shm.h
|
|
* cras_types.h
|
|
* cras_util.h
|
|
* packet_status_logger.h
|
|
*/
|
|
|
|
#![allow(clippy::unreadable_literal)]
|
|
#![allow(clippy::cognitive_complexity)]
|
|
/* automatically generated by rust-bindgen */
|
|
|
|
pub const CRAS_IODEV_NAME_BUFFER_SIZE: u32 = 64;
|
|
pub const CRAS_NODE_TYPE_BUFFER_SIZE: u32 = 32;
|
|
pub const CRAS_NODE_MIC_POS_BUFFER_SIZE: u32 = 128;
|
|
pub const CRAS_NODE_NAME_BUFFER_SIZE: u32 = 64;
|
|
pub const CRAS_NODE_HOTWORD_MODEL_BUFFER_SIZE: u32 = 16;
|
|
pub const CRAS_MAX_IODEVS: u32 = 20;
|
|
pub const CRAS_MAX_IONODES: u32 = 20;
|
|
pub const CRAS_MAX_ATTACHED_CLIENTS: u32 = 20;
|
|
pub const CRAS_MAX_AUDIO_THREAD_SNAPSHOTS: u32 = 10;
|
|
pub const CRAS_MAX_HOTWORD_MODEL_NAME_SIZE: u32 = 12;
|
|
pub const MAX_DEBUG_DEVS: u32 = 4;
|
|
pub const MAX_DEBUG_STREAMS: u32 = 8;
|
|
pub const CRAS_BT_EVENT_LOG_SIZE: u32 = 1024;
|
|
pub const CRAS_SERVER_STATE_VERSION: u32 = 2;
|
|
pub const CRAS_PROTO_VER: u32 = 7;
|
|
pub const CRAS_SERV_MAX_MSG_SIZE: u32 = 256;
|
|
pub const CRAS_CLIENT_MAX_MSG_SIZE: u32 = 256;
|
|
pub const CRAS_MAX_HOTWORD_MODELS: u32 = 243;
|
|
pub const CRAS_MAX_REMIX_CHANNELS: u32 = 8;
|
|
pub const CRAS_MAX_TEST_DATA_LEN: u32 = 224;
|
|
pub const CRAS_AEC_DUMP_FILE_NAME_LEN: u32 = 128;
|
|
pub const CRAS_NUM_SHM_BUFFERS: u32 = 2;
|
|
pub const CRAS_SHM_BUFFERS_MASK: u32 = 1;
|
|
pub type __int8_t = ::std::os::raw::c_schar;
|
|
pub type __uint8_t = ::std::os::raw::c_uchar;
|
|
pub type __int32_t = ::std::os::raw::c_int;
|
|
pub type __uint32_t = ::std::os::raw::c_uint;
|
|
pub type __int64_t = ::std::os::raw::c_long;
|
|
pub type __uint64_t = ::std::os::raw::c_ulong;
|
|
pub type __time_t = ::std::os::raw::c_long;
|
|
pub type __syscall_slong_t = ::std::os::raw::c_long;
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_iodev_info {
|
|
pub idx: u32,
|
|
pub name: [::std::os::raw::c_char; 64usize],
|
|
pub stable_id: u32,
|
|
pub max_supported_channels: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_iodev_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_iodev_info>(),
|
|
76usize,
|
|
concat!("Size of: ", stringify!(cras_iodev_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_iodev_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_iodev_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_iodev_info>())).idx as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_iodev_info),
|
|
"::",
|
|
stringify!(idx)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_iodev_info>())).name as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_iodev_info),
|
|
"::",
|
|
stringify!(name)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_iodev_info>())).stable_id as *const _ as usize },
|
|
68usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_iodev_info),
|
|
"::",
|
|
stringify!(stable_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_iodev_info>())).max_supported_channels as *const _ as usize
|
|
},
|
|
72usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_iodev_info),
|
|
"::",
|
|
stringify!(max_supported_channels)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_ionode_info {
|
|
pub iodev_idx: u32,
|
|
pub ionode_idx: u32,
|
|
pub plugged: i32,
|
|
pub active: i32,
|
|
pub plugged_time: cras_ionode_info__bindgen_ty_1,
|
|
pub volume: u32,
|
|
pub capture_gain: i32,
|
|
pub ui_gain_scaler: f32,
|
|
pub left_right_swapped: i32,
|
|
pub type_enum: u32,
|
|
pub stable_id: u32,
|
|
pub type_: [::std::os::raw::c_char; 32usize],
|
|
pub name: [::std::os::raw::c_char; 64usize],
|
|
pub active_hotword_model: [::std::os::raw::c_char; 16usize],
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_ionode_info__bindgen_ty_1 {
|
|
pub tv_sec: i64,
|
|
pub tv_usec: i64,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_ionode_info__bindgen_ty_1() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_ionode_info__bindgen_ty_1>(),
|
|
16usize,
|
|
concat!("Size of: ", stringify!(cras_ionode_info__bindgen_ty_1))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_ionode_info__bindgen_ty_1>(),
|
|
8usize,
|
|
concat!("Alignment of ", stringify!(cras_ionode_info__bindgen_ty_1))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_ionode_info__bindgen_ty_1>())).tv_sec as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info__bindgen_ty_1),
|
|
"::",
|
|
stringify!(tv_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_ionode_info__bindgen_ty_1>())).tv_usec as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info__bindgen_ty_1),
|
|
"::",
|
|
stringify!(tv_usec)
|
|
)
|
|
);
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_ionode_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_ionode_info>(),
|
|
168usize,
|
|
concat!("Size of: ", stringify!(cras_ionode_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_ionode_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_ionode_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).iodev_idx as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(iodev_idx)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).ionode_idx as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(ionode_idx)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).plugged as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(plugged)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).active as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(active)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).plugged_time as *const _ as usize },
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(plugged_time)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).volume as *const _ as usize },
|
|
32usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(volume)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).capture_gain as *const _ as usize },
|
|
36usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(capture_gain)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).ui_gain_scaler as *const _ as usize },
|
|
40usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(ui_gain_scaler)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_ionode_info>())).left_right_swapped as *const _ as usize
|
|
},
|
|
44usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(left_right_swapped)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).type_enum as *const _ as usize },
|
|
48usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(type_enum)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).stable_id as *const _ as usize },
|
|
52usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(stable_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).type_ as *const _ as usize },
|
|
56usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(type_)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).name as *const _ as usize },
|
|
88usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(name)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_ionode_info>())).active_hotword_model as *const _ as usize
|
|
},
|
|
152usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_ionode_info),
|
|
"::",
|
|
stringify!(active_hotword_model)
|
|
)
|
|
);
|
|
}
|
|
pub const ionode_attr_IONODE_ATTR_PLUGGED: ionode_attr = 0;
|
|
pub const ionode_attr_IONODE_ATTR_VOLUME: ionode_attr = 1;
|
|
pub const ionode_attr_IONODE_ATTR_CAPTURE_GAIN: ionode_attr = 2;
|
|
pub const ionode_attr_IONODE_ATTR_SWAP_LEFT_RIGHT: ionode_attr = 3;
|
|
pub type ionode_attr = u32;
|
|
#[repr(C)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct timespec {
|
|
pub tv_sec: __time_t,
|
|
pub tv_nsec: __syscall_slong_t,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_timespec() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<timespec>(),
|
|
16usize,
|
|
concat!("Size of: ", stringify!(timespec))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<timespec>(),
|
|
8usize,
|
|
concat!("Alignment of ", stringify!(timespec))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<timespec>())).tv_sec as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(timespec),
|
|
"::",
|
|
stringify!(tv_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<timespec>())).tv_nsec as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(timespec),
|
|
"::",
|
|
stringify!(tv_nsec)
|
|
)
|
|
);
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_LAST: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_DSD_U32_BE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_S16: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_S16_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_U16: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_U16_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_S24: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_S24_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_U24: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_U24_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_S32: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_S32_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_U32: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_U32_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_FLOAT: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_FLOAT_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_FLOAT64: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_FLOAT64_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_IEC958_SUBFRAME: _snd_pcm_format =
|
|
_snd_pcm_format::SND_PCM_FORMAT_IEC958_SUBFRAME_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_S20: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_S20_LE;
|
|
}
|
|
impl _snd_pcm_format {
|
|
pub const SND_PCM_FORMAT_U20: _snd_pcm_format = _snd_pcm_format::SND_PCM_FORMAT_U20_LE;
|
|
}
|
|
#[repr(i32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum _snd_pcm_format {
|
|
SND_PCM_FORMAT_UNKNOWN = -1,
|
|
SND_PCM_FORMAT_S8 = 0,
|
|
SND_PCM_FORMAT_U8 = 1,
|
|
SND_PCM_FORMAT_S16_LE = 2,
|
|
SND_PCM_FORMAT_S16_BE = 3,
|
|
SND_PCM_FORMAT_U16_LE = 4,
|
|
SND_PCM_FORMAT_U16_BE = 5,
|
|
SND_PCM_FORMAT_S24_LE = 6,
|
|
SND_PCM_FORMAT_S24_BE = 7,
|
|
SND_PCM_FORMAT_U24_LE = 8,
|
|
SND_PCM_FORMAT_U24_BE = 9,
|
|
SND_PCM_FORMAT_S32_LE = 10,
|
|
SND_PCM_FORMAT_S32_BE = 11,
|
|
SND_PCM_FORMAT_U32_LE = 12,
|
|
SND_PCM_FORMAT_U32_BE = 13,
|
|
SND_PCM_FORMAT_FLOAT_LE = 14,
|
|
SND_PCM_FORMAT_FLOAT_BE = 15,
|
|
SND_PCM_FORMAT_FLOAT64_LE = 16,
|
|
SND_PCM_FORMAT_FLOAT64_BE = 17,
|
|
SND_PCM_FORMAT_IEC958_SUBFRAME_LE = 18,
|
|
SND_PCM_FORMAT_IEC958_SUBFRAME_BE = 19,
|
|
SND_PCM_FORMAT_MU_LAW = 20,
|
|
SND_PCM_FORMAT_A_LAW = 21,
|
|
SND_PCM_FORMAT_IMA_ADPCM = 22,
|
|
SND_PCM_FORMAT_MPEG = 23,
|
|
SND_PCM_FORMAT_GSM = 24,
|
|
SND_PCM_FORMAT_S20_LE = 25,
|
|
SND_PCM_FORMAT_S20_BE = 26,
|
|
SND_PCM_FORMAT_U20_LE = 27,
|
|
SND_PCM_FORMAT_U20_BE = 28,
|
|
SND_PCM_FORMAT_SPECIAL = 31,
|
|
SND_PCM_FORMAT_S24_3LE = 32,
|
|
SND_PCM_FORMAT_S24_3BE = 33,
|
|
SND_PCM_FORMAT_U24_3LE = 34,
|
|
SND_PCM_FORMAT_U24_3BE = 35,
|
|
SND_PCM_FORMAT_S20_3LE = 36,
|
|
SND_PCM_FORMAT_S20_3BE = 37,
|
|
SND_PCM_FORMAT_U20_3LE = 38,
|
|
SND_PCM_FORMAT_U20_3BE = 39,
|
|
SND_PCM_FORMAT_S18_3LE = 40,
|
|
SND_PCM_FORMAT_S18_3BE = 41,
|
|
SND_PCM_FORMAT_U18_3LE = 42,
|
|
SND_PCM_FORMAT_U18_3BE = 43,
|
|
SND_PCM_FORMAT_G723_24 = 44,
|
|
SND_PCM_FORMAT_G723_24_1B = 45,
|
|
SND_PCM_FORMAT_G723_40 = 46,
|
|
SND_PCM_FORMAT_G723_40_1B = 47,
|
|
SND_PCM_FORMAT_DSD_U8 = 48,
|
|
SND_PCM_FORMAT_DSD_U16_LE = 49,
|
|
SND_PCM_FORMAT_DSD_U32_LE = 50,
|
|
SND_PCM_FORMAT_DSD_U16_BE = 51,
|
|
SND_PCM_FORMAT_DSD_U32_BE = 52,
|
|
}
|
|
pub use self::_snd_pcm_format as snd_pcm_format_t;
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_CHANNEL {
|
|
CRAS_CH_FL = 0,
|
|
CRAS_CH_FR = 1,
|
|
CRAS_CH_RL = 2,
|
|
CRAS_CH_RR = 3,
|
|
CRAS_CH_FC = 4,
|
|
CRAS_CH_LFE = 5,
|
|
CRAS_CH_SL = 6,
|
|
CRAS_CH_SR = 7,
|
|
CRAS_CH_RC = 8,
|
|
CRAS_CH_FLC = 9,
|
|
CRAS_CH_FRC = 10,
|
|
CRAS_CH_MAX = 11,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_audio_format {
|
|
pub format: snd_pcm_format_t,
|
|
pub frame_rate: usize,
|
|
pub num_channels: usize,
|
|
pub channel_layout: [i8; 11usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_audio_format() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_audio_format>(),
|
|
40usize,
|
|
concat!("Size of: ", stringify!(cras_audio_format))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_audio_format>(),
|
|
8usize,
|
|
concat!("Alignment of ", stringify!(cras_audio_format))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_format>())).format as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_format),
|
|
"::",
|
|
stringify!(format)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_format>())).frame_rate as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_format),
|
|
"::",
|
|
stringify!(frame_rate)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_format>())).num_channels as *const _ as usize },
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_format),
|
|
"::",
|
|
stringify!(num_channels)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_format>())).channel_layout as *const _ as usize
|
|
},
|
|
24usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_format),
|
|
"::",
|
|
stringify!(channel_layout)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_audio_format_packed {
|
|
pub format: i32,
|
|
pub frame_rate: u32,
|
|
pub num_channels: u32,
|
|
pub channel_layout: [i8; 11usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_audio_format_packed() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_audio_format_packed>(),
|
|
23usize,
|
|
concat!("Size of: ", stringify!(cras_audio_format_packed))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_audio_format_packed>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_audio_format_packed))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_format_packed>())).format as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_format_packed),
|
|
"::",
|
|
stringify!(format)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_format_packed>())).frame_rate as *const _ as usize
|
|
},
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_format_packed),
|
|
"::",
|
|
stringify!(frame_rate)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_format_packed>())).num_channels as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_format_packed),
|
|
"::",
|
|
stringify!(num_channels)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_format_packed>())).channel_layout as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_format_packed),
|
|
"::",
|
|
stringify!(channel_layout)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct packet_status_logger {
|
|
pub data: [u8; 64usize],
|
|
pub size: ::std::os::raw::c_int,
|
|
pub wp: ::std::os::raw::c_int,
|
|
pub num_wraps: ::std::os::raw::c_int,
|
|
pub ts: timespec,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_packet_status_logger() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<packet_status_logger>(),
|
|
96usize,
|
|
concat!("Size of: ", stringify!(packet_status_logger))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<packet_status_logger>(),
|
|
8usize,
|
|
concat!("Alignment of ", stringify!(packet_status_logger))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<packet_status_logger>())).data as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(packet_status_logger),
|
|
"::",
|
|
stringify!(data)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<packet_status_logger>())).size as *const _ as usize },
|
|
64usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(packet_status_logger),
|
|
"::",
|
|
stringify!(size)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<packet_status_logger>())).wp as *const _ as usize },
|
|
68usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(packet_status_logger),
|
|
"::",
|
|
stringify!(wp)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<packet_status_logger>())).num_wraps as *const _ as usize },
|
|
72usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(packet_status_logger),
|
|
"::",
|
|
stringify!(num_wraps)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<packet_status_logger>())).ts as *const _ as usize },
|
|
80usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(packet_status_logger),
|
|
"::",
|
|
stringify!(ts)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_timespec {
|
|
pub tv_sec: i64,
|
|
pub tv_nsec: i64,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_timespec() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_timespec>(),
|
|
16usize,
|
|
concat!("Size of: ", stringify!(cras_timespec))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_timespec>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_timespec))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_timespec>())).tv_sec as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_timespec),
|
|
"::",
|
|
stringify!(tv_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_timespec>())).tv_nsec as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_timespec),
|
|
"::",
|
|
stringify!(tv_nsec)
|
|
)
|
|
);
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_SPECIAL_DEVICE {
|
|
NO_DEVICE = 0,
|
|
SILENT_RECORD_DEVICE = 1,
|
|
SILENT_PLAYBACK_DEVICE = 2,
|
|
SILENT_HOTWORD_DEVICE = 3,
|
|
MAX_SPECIAL_DEVICE_IDX = 4,
|
|
}
|
|
pub const TEST_IODEV_TYPE_TEST_IODEV_HOTWORD: TEST_IODEV_TYPE = 0;
|
|
pub type TEST_IODEV_TYPE = u32;
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_TEST_IODEV_CMD {
|
|
TEST_IODEV_CMD_HOTWORD_TRIGGER = 0,
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_CONNECTION_TYPE {
|
|
CRAS_CONTROL = 0,
|
|
CRAS_PLAYBACK = 1,
|
|
CRAS_CAPTURE = 2,
|
|
CRAS_VMS_LEGACY = 3,
|
|
CRAS_VMS_UNIFIED = 4,
|
|
CRAS_PLUGIN_PLAYBACK = 5,
|
|
CRAS_PLUGIN_UNIFIED = 6,
|
|
CRAS_NUM_CONN_TYPE = 7,
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_STREAM_DIRECTION {
|
|
CRAS_STREAM_OUTPUT = 0,
|
|
CRAS_STREAM_INPUT = 1,
|
|
CRAS_STREAM_UNDEFINED = 2,
|
|
CRAS_STREAM_POST_MIX_PRE_DSP = 3,
|
|
CRAS_NUM_DIRECTIONS = 4,
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_INPUT_STREAM_FLAG {
|
|
BULK_AUDIO_OK = 1,
|
|
USE_DEV_TIMING = 2,
|
|
HOTWORD_STREAM = 3,
|
|
TRIGGER_ONLY = 4,
|
|
SERVER_ONLY = 8,
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_LOOPBACK_TYPE {
|
|
LOOPBACK_POST_MIX_PRE_DSP = 0,
|
|
LOOPBACK_POST_DSP = 1,
|
|
LOOPBACK_NUM_TYPES = 2,
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_STREAM_TYPE {
|
|
CRAS_STREAM_TYPE_DEFAULT = 0,
|
|
CRAS_STREAM_TYPE_MULTIMEDIA = 1,
|
|
CRAS_STREAM_TYPE_VOICE_COMMUNICATION = 2,
|
|
CRAS_STREAM_TYPE_SPEECH_RECOGNITION = 3,
|
|
CRAS_STREAM_TYPE_PRO_AUDIO = 4,
|
|
CRAS_STREAM_TYPE_ACCESSIBILITY = 5,
|
|
CRAS_STREAM_NUM_TYPES = 6,
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_CLIENT_TYPE {
|
|
CRAS_CLIENT_TYPE_UNKNOWN = 0,
|
|
CRAS_CLIENT_TYPE_LEGACY = 1,
|
|
CRAS_CLIENT_TYPE_TEST = 2,
|
|
CRAS_CLIENT_TYPE_PCM = 3,
|
|
CRAS_CLIENT_TYPE_CHROME = 4,
|
|
CRAS_CLIENT_TYPE_ARC = 5,
|
|
CRAS_CLIENT_TYPE_CROSVM = 6,
|
|
CRAS_CLIENT_TYPE_SERVER_STREAM = 7,
|
|
CRAS_CLIENT_TYPE_LACROS = 8,
|
|
CRAS_CLIENT_TYPE_PLUGIN = 9,
|
|
CRAS_CLIENT_TYPE_ARCVM = 10,
|
|
CRAS_NUM_CLIENT_TYPE = 11,
|
|
}
|
|
impl CRAS_STREAM_EFFECT {
|
|
pub const APM_ECHO_CANCELLATION: CRAS_STREAM_EFFECT = CRAS_STREAM_EFFECT(1);
|
|
}
|
|
impl CRAS_STREAM_EFFECT {
|
|
pub const APM_NOISE_SUPRESSION: CRAS_STREAM_EFFECT = CRAS_STREAM_EFFECT(2);
|
|
}
|
|
impl CRAS_STREAM_EFFECT {
|
|
pub const APM_GAIN_CONTROL: CRAS_STREAM_EFFECT = CRAS_STREAM_EFFECT(4);
|
|
}
|
|
impl CRAS_STREAM_EFFECT {
|
|
pub const APM_VOICE_DETECTION: CRAS_STREAM_EFFECT = CRAS_STREAM_EFFECT(8);
|
|
}
|
|
impl ::std::ops::BitOr<CRAS_STREAM_EFFECT> for CRAS_STREAM_EFFECT {
|
|
type Output = Self;
|
|
#[inline]
|
|
fn bitor(self, other: Self) -> Self {
|
|
CRAS_STREAM_EFFECT(self.0 | other.0)
|
|
}
|
|
}
|
|
impl ::std::ops::BitOrAssign for CRAS_STREAM_EFFECT {
|
|
#[inline]
|
|
fn bitor_assign(&mut self, rhs: CRAS_STREAM_EFFECT) {
|
|
self.0 |= rhs.0;
|
|
}
|
|
}
|
|
impl ::std::ops::BitAnd<CRAS_STREAM_EFFECT> for CRAS_STREAM_EFFECT {
|
|
type Output = Self;
|
|
#[inline]
|
|
fn bitand(self, other: Self) -> Self {
|
|
CRAS_STREAM_EFFECT(self.0 & other.0)
|
|
}
|
|
}
|
|
impl ::std::ops::BitAndAssign for CRAS_STREAM_EFFECT {
|
|
#[inline]
|
|
fn bitand_assign(&mut self, rhs: CRAS_STREAM_EFFECT) {
|
|
self.0 &= rhs.0;
|
|
}
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub struct CRAS_STREAM_EFFECT(pub u32);
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_attached_client_info {
|
|
pub id: u32,
|
|
pub pid: i32,
|
|
pub uid: u32,
|
|
pub gid: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_attached_client_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_attached_client_info>(),
|
|
16usize,
|
|
concat!("Size of: ", stringify!(cras_attached_client_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_attached_client_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_attached_client_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_attached_client_info>())).id as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_attached_client_info),
|
|
"::",
|
|
stringify!(id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_attached_client_info>())).pid as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_attached_client_info),
|
|
"::",
|
|
stringify!(pid)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_attached_client_info>())).uid as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_attached_client_info),
|
|
"::",
|
|
stringify!(uid)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_attached_client_info>())).gid as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_attached_client_info),
|
|
"::",
|
|
stringify!(gid)
|
|
)
|
|
);
|
|
}
|
|
pub type cras_node_id_t = u64;
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_BT_LOG_EVENTS {
|
|
BT_ADAPTER_ADDED = 0,
|
|
BT_ADAPTER_REMOVED = 1,
|
|
BT_AUDIO_GATEWAY_INIT = 2,
|
|
BT_AUDIO_GATEWAY_START = 3,
|
|
BT_AVAILABLE_CODECS = 4,
|
|
BT_A2DP_CONFIGURED = 5,
|
|
BT_A2DP_START = 6,
|
|
BT_A2DP_SUSPENDED = 7,
|
|
BT_CODEC_SELECTION = 8,
|
|
BT_DEV_CONNECTED = 9,
|
|
BT_DEV_DISCONNECTED = 10,
|
|
BT_DEV_CONN_WATCH_CB = 11,
|
|
BT_DEV_SUSPEND_CB = 12,
|
|
BT_HFP_NEW_CONNECTION = 13,
|
|
BT_HFP_REQUEST_DISCONNECT = 14,
|
|
BT_HFP_SUPPORTED_FEATURES = 15,
|
|
BT_HFP_HF_INDICATOR = 16,
|
|
BT_HFP_SET_SPEAKER_GAIN = 17,
|
|
BT_HFP_UPDATE_SPEAKER_GAIN = 18,
|
|
BT_HSP_NEW_CONNECTION = 19,
|
|
BT_HSP_REQUEST_DISCONNECT = 20,
|
|
BT_NEW_AUDIO_PROFILE_AFTER_CONNECT = 21,
|
|
BT_RESET = 22,
|
|
BT_SCO_CONNECT = 23,
|
|
BT_TRANSPORT_ACQUIRE = 24,
|
|
BT_TRANSPORT_RELEASE = 25,
|
|
BT_TRANSPORT_SET_VOLUME = 26,
|
|
BT_TRANSPORT_UPDATE_VOLUME = 27,
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct audio_thread_event {
|
|
pub tag_sec: u32,
|
|
pub nsec: u32,
|
|
pub data1: u32,
|
|
pub data2: u32,
|
|
pub data3: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_audio_thread_event() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<audio_thread_event>(),
|
|
20usize,
|
|
concat!("Size of: ", stringify!(audio_thread_event))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<audio_thread_event>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(audio_thread_event))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_thread_event>())).tag_sec as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_thread_event),
|
|
"::",
|
|
stringify!(tag_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_thread_event>())).nsec as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_thread_event),
|
|
"::",
|
|
stringify!(nsec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_thread_event>())).data1 as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_thread_event),
|
|
"::",
|
|
stringify!(data1)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_thread_event>())).data2 as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_thread_event),
|
|
"::",
|
|
stringify!(data2)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_thread_event>())).data3 as *const _ as usize },
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_thread_event),
|
|
"::",
|
|
stringify!(data3)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct audio_thread_event_log {
|
|
pub write_pos: u64,
|
|
pub sync_write_pos: u64,
|
|
pub len: u32,
|
|
pub log: [audio_thread_event; 6144usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_audio_thread_event_log() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<audio_thread_event_log>(),
|
|
122900usize,
|
|
concat!("Size of: ", stringify!(audio_thread_event_log))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<audio_thread_event_log>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(audio_thread_event_log))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_thread_event_log>())).write_pos as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_thread_event_log),
|
|
"::",
|
|
stringify!(write_pos)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_thread_event_log>())).sync_write_pos as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_thread_event_log),
|
|
"::",
|
|
stringify!(sync_write_pos)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_thread_event_log>())).len as *const _ as usize },
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_thread_event_log),
|
|
"::",
|
|
stringify!(len)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_thread_event_log>())).log as *const _ as usize },
|
|
20usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_thread_event_log),
|
|
"::",
|
|
stringify!(log)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct audio_dev_debug_info {
|
|
pub dev_name: [::std::os::raw::c_char; 64usize],
|
|
pub buffer_size: u32,
|
|
pub min_buffer_level: u32,
|
|
pub min_cb_level: u32,
|
|
pub max_cb_level: u32,
|
|
pub frame_rate: u32,
|
|
pub num_channels: u32,
|
|
pub est_rate_ratio: f64,
|
|
pub direction: u8,
|
|
pub num_underruns: u32,
|
|
pub num_severe_underruns: u32,
|
|
pub highest_hw_level: u32,
|
|
pub runtime_sec: u32,
|
|
pub runtime_nsec: u32,
|
|
pub longest_wake_sec: u32,
|
|
pub longest_wake_nsec: u32,
|
|
pub software_gain_scaler: f64,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_audio_dev_debug_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<audio_dev_debug_info>(),
|
|
133usize,
|
|
concat!("Size of: ", stringify!(audio_dev_debug_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<audio_dev_debug_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(audio_dev_debug_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_dev_debug_info>())).dev_name as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(dev_name)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).buffer_size as *const _ as usize
|
|
},
|
|
64usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(buffer_size)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).min_buffer_level as *const _ as usize
|
|
},
|
|
68usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(min_buffer_level)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).min_cb_level as *const _ as usize
|
|
},
|
|
72usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(min_cb_level)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).max_cb_level as *const _ as usize
|
|
},
|
|
76usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(max_cb_level)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_dev_debug_info>())).frame_rate as *const _ as usize },
|
|
80usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(frame_rate)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).num_channels as *const _ as usize
|
|
},
|
|
84usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(num_channels)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).est_rate_ratio as *const _ as usize
|
|
},
|
|
88usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(est_rate_ratio)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_dev_debug_info>())).direction as *const _ as usize },
|
|
96usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(direction)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).num_underruns as *const _ as usize
|
|
},
|
|
97usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(num_underruns)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).num_severe_underruns as *const _
|
|
as usize
|
|
},
|
|
101usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(num_severe_underruns)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).highest_hw_level as *const _ as usize
|
|
},
|
|
105usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(highest_hw_level)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).runtime_sec as *const _ as usize
|
|
},
|
|
109usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(runtime_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).runtime_nsec as *const _ as usize
|
|
},
|
|
113usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(runtime_nsec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).longest_wake_sec as *const _ as usize
|
|
},
|
|
117usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(longest_wake_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).longest_wake_nsec as *const _ as usize
|
|
},
|
|
121usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(longest_wake_nsec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_dev_debug_info>())).software_gain_scaler as *const _
|
|
as usize
|
|
},
|
|
125usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_dev_debug_info),
|
|
"::",
|
|
stringify!(software_gain_scaler)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct audio_stream_debug_info {
|
|
pub stream_id: u64,
|
|
pub dev_idx: u32,
|
|
pub direction: u32,
|
|
pub stream_type: u32,
|
|
pub client_type: u32,
|
|
pub buffer_frames: u32,
|
|
pub cb_threshold: u32,
|
|
pub effects: u64,
|
|
pub flags: u32,
|
|
pub frame_rate: u32,
|
|
pub num_channels: u32,
|
|
pub longest_fetch_sec: u32,
|
|
pub longest_fetch_nsec: u32,
|
|
pub num_missed_cb: u32,
|
|
pub num_overruns: u32,
|
|
pub is_pinned: u32,
|
|
pub pinned_dev_idx: u32,
|
|
pub runtime_sec: u32,
|
|
pub runtime_nsec: u32,
|
|
pub stream_volume: f64,
|
|
pub channel_layout: [i8; 11usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_audio_stream_debug_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<audio_stream_debug_info>(),
|
|
103usize,
|
|
concat!("Size of: ", stringify!(audio_stream_debug_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<audio_stream_debug_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(audio_stream_debug_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).stream_id as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(stream_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_stream_debug_info>())).dev_idx as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(dev_idx)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).direction as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(direction)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).stream_type as *const _ as usize
|
|
},
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(stream_type)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).client_type as *const _ as usize
|
|
},
|
|
20usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(client_type)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).buffer_frames as *const _ as usize
|
|
},
|
|
24usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(buffer_frames)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).cb_threshold as *const _ as usize
|
|
},
|
|
28usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(cb_threshold)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_stream_debug_info>())).effects as *const _ as usize },
|
|
32usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(effects)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_stream_debug_info>())).flags as *const _ as usize },
|
|
40usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(flags)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).frame_rate as *const _ as usize
|
|
},
|
|
44usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(frame_rate)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).num_channels as *const _ as usize
|
|
},
|
|
48usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(num_channels)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).longest_fetch_sec as *const _
|
|
as usize
|
|
},
|
|
52usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(longest_fetch_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).longest_fetch_nsec as *const _
|
|
as usize
|
|
},
|
|
56usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(longest_fetch_nsec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).num_missed_cb as *const _ as usize
|
|
},
|
|
60usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(num_missed_cb)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).num_overruns as *const _ as usize
|
|
},
|
|
64usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(num_overruns)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).is_pinned as *const _ as usize
|
|
},
|
|
68usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(is_pinned)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).pinned_dev_idx as *const _ as usize
|
|
},
|
|
72usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(pinned_dev_idx)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).runtime_sec as *const _ as usize
|
|
},
|
|
76usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(runtime_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).runtime_nsec as *const _ as usize
|
|
},
|
|
80usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(runtime_nsec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).stream_volume as *const _ as usize
|
|
},
|
|
84usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(stream_volume)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<audio_stream_debug_info>())).channel_layout as *const _ as usize
|
|
},
|
|
92usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_stream_debug_info),
|
|
"::",
|
|
stringify!(channel_layout)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct audio_debug_info {
|
|
pub num_streams: u32,
|
|
pub num_devs: u32,
|
|
pub devs: [audio_dev_debug_info; 4usize],
|
|
pub streams: [audio_stream_debug_info; 8usize],
|
|
pub log: audio_thread_event_log,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_audio_debug_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<audio_debug_info>(),
|
|
124264usize,
|
|
concat!("Size of: ", stringify!(audio_debug_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<audio_debug_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(audio_debug_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_debug_info>())).num_streams as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_debug_info),
|
|
"::",
|
|
stringify!(num_streams)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_debug_info>())).num_devs as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_debug_info),
|
|
"::",
|
|
stringify!(num_devs)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_debug_info>())).devs as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_debug_info),
|
|
"::",
|
|
stringify!(devs)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_debug_info>())).streams as *const _ as usize },
|
|
540usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_debug_info),
|
|
"::",
|
|
stringify!(streams)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_debug_info>())).log as *const _ as usize },
|
|
1364usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_debug_info),
|
|
"::",
|
|
stringify!(log)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct main_thread_event {
|
|
pub tag_sec: u32,
|
|
pub nsec: u32,
|
|
pub data1: u32,
|
|
pub data2: u32,
|
|
pub data3: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_main_thread_event() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<main_thread_event>(),
|
|
20usize,
|
|
concat!("Size of: ", stringify!(main_thread_event))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<main_thread_event>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(main_thread_event))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<main_thread_event>())).tag_sec as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(main_thread_event),
|
|
"::",
|
|
stringify!(tag_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<main_thread_event>())).nsec as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(main_thread_event),
|
|
"::",
|
|
stringify!(nsec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<main_thread_event>())).data1 as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(main_thread_event),
|
|
"::",
|
|
stringify!(data1)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<main_thread_event>())).data2 as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(main_thread_event),
|
|
"::",
|
|
stringify!(data2)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<main_thread_event>())).data3 as *const _ as usize },
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(main_thread_event),
|
|
"::",
|
|
stringify!(data3)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct main_thread_event_log {
|
|
pub write_pos: u32,
|
|
pub len: u32,
|
|
pub log: [main_thread_event; 1024usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_main_thread_event_log() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<main_thread_event_log>(),
|
|
20488usize,
|
|
concat!("Size of: ", stringify!(main_thread_event_log))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<main_thread_event_log>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(main_thread_event_log))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<main_thread_event_log>())).write_pos as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(main_thread_event_log),
|
|
"::",
|
|
stringify!(write_pos)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<main_thread_event_log>())).len as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(main_thread_event_log),
|
|
"::",
|
|
stringify!(len)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<main_thread_event_log>())).log as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(main_thread_event_log),
|
|
"::",
|
|
stringify!(log)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct main_thread_debug_info {
|
|
pub main_log: main_thread_event_log,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_main_thread_debug_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<main_thread_debug_info>(),
|
|
20488usize,
|
|
concat!("Size of: ", stringify!(main_thread_debug_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<main_thread_debug_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(main_thread_debug_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<main_thread_debug_info>())).main_log as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(main_thread_debug_info),
|
|
"::",
|
|
stringify!(main_log)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_bt_event {
|
|
pub tag_sec: u32,
|
|
pub nsec: u32,
|
|
pub data1: u32,
|
|
pub data2: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_bt_event() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_bt_event>(),
|
|
16usize,
|
|
concat!("Size of: ", stringify!(cras_bt_event))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_bt_event>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_bt_event))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_bt_event>())).tag_sec as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_bt_event),
|
|
"::",
|
|
stringify!(tag_sec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_bt_event>())).nsec as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_bt_event),
|
|
"::",
|
|
stringify!(nsec)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_bt_event>())).data1 as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_bt_event),
|
|
"::",
|
|
stringify!(data1)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_bt_event>())).data2 as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_bt_event),
|
|
"::",
|
|
stringify!(data2)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_bt_event_log {
|
|
pub write_pos: u32,
|
|
pub len: u32,
|
|
pub log: [cras_bt_event; 1024usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_bt_event_log() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_bt_event_log>(),
|
|
16392usize,
|
|
concat!("Size of: ", stringify!(cras_bt_event_log))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_bt_event_log>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_bt_event_log))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_bt_event_log>())).write_pos as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_bt_event_log),
|
|
"::",
|
|
stringify!(write_pos)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_bt_event_log>())).len as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_bt_event_log),
|
|
"::",
|
|
stringify!(len)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_bt_event_log>())).log as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_bt_event_log),
|
|
"::",
|
|
stringify!(log)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_bt_debug_info {
|
|
pub bt_log: cras_bt_event_log,
|
|
pub wbs_logger: packet_status_logger,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_bt_debug_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_bt_debug_info>(),
|
|
16488usize,
|
|
concat!("Size of: ", stringify!(cras_bt_debug_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_bt_debug_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_bt_debug_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_bt_debug_info>())).bt_log as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_bt_debug_info),
|
|
"::",
|
|
stringify!(bt_log)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_bt_debug_info>())).wbs_logger as *const _ as usize },
|
|
16392usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_bt_debug_info),
|
|
"::",
|
|
stringify!(wbs_logger)
|
|
)
|
|
);
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_AUDIO_THREAD_EVENT_TYPE {
|
|
AUDIO_THREAD_EVENT_A2DP_OVERRUN = 0,
|
|
AUDIO_THREAD_EVENT_A2DP_THROTTLE = 1,
|
|
AUDIO_THREAD_EVENT_BUSYLOOP = 2,
|
|
AUDIO_THREAD_EVENT_DEBUG = 3,
|
|
AUDIO_THREAD_EVENT_SEVERE_UNDERRUN = 4,
|
|
AUDIO_THREAD_EVENT_UNDERRUN = 5,
|
|
AUDIO_THREAD_EVENT_DROP_SAMPLES = 6,
|
|
AUDIO_THREAD_EVENT_DEV_OVERRUN = 7,
|
|
AUDIO_THREAD_EVENT_TYPE_COUNT = 8,
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_audio_thread_snapshot {
|
|
pub timestamp: timespec,
|
|
pub event_type: CRAS_AUDIO_THREAD_EVENT_TYPE,
|
|
pub audio_debug_info: audio_debug_info,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_audio_thread_snapshot() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_audio_thread_snapshot>(),
|
|
124284usize,
|
|
concat!("Size of: ", stringify!(cras_audio_thread_snapshot))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_audio_thread_snapshot>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_audio_thread_snapshot))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_thread_snapshot>())).timestamp as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_thread_snapshot),
|
|
"::",
|
|
stringify!(timestamp)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_thread_snapshot>())).event_type as *const _ as usize
|
|
},
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_thread_snapshot),
|
|
"::",
|
|
stringify!(event_type)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_thread_snapshot>())).audio_debug_info as *const _
|
|
as usize
|
|
},
|
|
20usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_thread_snapshot),
|
|
"::",
|
|
stringify!(audio_debug_info)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_audio_thread_snapshot_buffer {
|
|
pub snapshots: [cras_audio_thread_snapshot; 10usize],
|
|
pub pos: ::std::os::raw::c_int,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_audio_thread_snapshot_buffer() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_audio_thread_snapshot_buffer>(),
|
|
1242844usize,
|
|
concat!("Size of: ", stringify!(cras_audio_thread_snapshot_buffer))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_audio_thread_snapshot_buffer>(),
|
|
1usize,
|
|
concat!(
|
|
"Alignment of ",
|
|
stringify!(cras_audio_thread_snapshot_buffer)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_thread_snapshot_buffer>())).snapshots as *const _
|
|
as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_thread_snapshot_buffer),
|
|
"::",
|
|
stringify!(snapshots)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_thread_snapshot_buffer>())).pos as *const _ as usize
|
|
},
|
|
1242840usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_thread_snapshot_buffer),
|
|
"::",
|
|
stringify!(pos)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_server_state {
|
|
pub state_version: u32,
|
|
pub volume: u32,
|
|
pub min_volume_dBFS: i32,
|
|
pub max_volume_dBFS: i32,
|
|
pub mute: i32,
|
|
pub user_mute: i32,
|
|
pub mute_locked: i32,
|
|
pub suspended: i32,
|
|
pub capture_gain: i32,
|
|
pub capture_mute: i32,
|
|
pub capture_mute_locked: i32,
|
|
pub num_streams_attached: u32,
|
|
pub num_output_devs: u32,
|
|
pub num_input_devs: u32,
|
|
pub output_devs: [cras_iodev_info; 20usize],
|
|
pub input_devs: [cras_iodev_info; 20usize],
|
|
pub num_output_nodes: u32,
|
|
pub num_input_nodes: u32,
|
|
pub output_nodes: [cras_ionode_info; 20usize],
|
|
pub input_nodes: [cras_ionode_info; 20usize],
|
|
pub num_attached_clients: u32,
|
|
pub client_info: [cras_attached_client_info; 20usize],
|
|
pub update_count: u32,
|
|
pub num_active_streams: [u32; 4usize],
|
|
pub last_active_stream_time: cras_timespec,
|
|
pub audio_debug_info: audio_debug_info,
|
|
pub default_output_buffer_size: i32,
|
|
pub non_empty_status: i32,
|
|
pub aec_supported: i32,
|
|
pub aec_group_id: i32,
|
|
pub snapshot_buffer: cras_audio_thread_snapshot_buffer,
|
|
pub bt_debug_info: cras_bt_debug_info,
|
|
pub bt_wbs_enabled: i32,
|
|
pub deprioritize_bt_wbs_mic: i32,
|
|
pub main_thread_debug_info: main_thread_debug_info,
|
|
pub num_input_streams_with_permission: [u32; 11usize],
|
|
pub noise_cancellation_enabled: i32,
|
|
pub hotword_pause_at_suspend: i32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_server_state() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_server_state>(),
|
|
1414344usize,
|
|
concat!("Size of: ", stringify!(cras_server_state))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_server_state>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_server_state))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).state_version as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(state_version)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).volume as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(volume)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).min_volume_dBFS as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(min_volume_dBFS)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).max_volume_dBFS as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(max_volume_dBFS)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).mute as *const _ as usize },
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(mute)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).user_mute as *const _ as usize },
|
|
20usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(user_mute)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).mute_locked as *const _ as usize },
|
|
24usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(mute_locked)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).suspended as *const _ as usize },
|
|
28usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(suspended)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).capture_gain as *const _ as usize },
|
|
32usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(capture_gain)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).capture_mute as *const _ as usize },
|
|
36usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(capture_mute)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).capture_mute_locked as *const _ as usize
|
|
},
|
|
40usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(capture_mute_locked)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).num_streams_attached as *const _ as usize
|
|
},
|
|
44usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(num_streams_attached)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).num_output_devs as *const _ as usize
|
|
},
|
|
48usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(num_output_devs)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).num_input_devs as *const _ as usize
|
|
},
|
|
52usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(num_input_devs)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).output_devs as *const _ as usize },
|
|
56usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(output_devs)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).input_devs as *const _ as usize },
|
|
1576usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(input_devs)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).num_output_nodes as *const _ as usize
|
|
},
|
|
3096usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(num_output_nodes)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).num_input_nodes as *const _ as usize
|
|
},
|
|
3100usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(num_input_nodes)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).output_nodes as *const _ as usize },
|
|
3104usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(output_nodes)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).input_nodes as *const _ as usize },
|
|
6464usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(input_nodes)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).num_attached_clients as *const _ as usize
|
|
},
|
|
9824usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(num_attached_clients)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).client_info as *const _ as usize },
|
|
9828usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(client_info)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).update_count as *const _ as usize },
|
|
10148usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(update_count)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).num_active_streams as *const _ as usize
|
|
},
|
|
10152usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(num_active_streams)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).last_active_stream_time as *const _
|
|
as usize
|
|
},
|
|
10168usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(last_active_stream_time)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).audio_debug_info as *const _ as usize
|
|
},
|
|
10184usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(audio_debug_info)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).default_output_buffer_size as *const _
|
|
as usize
|
|
},
|
|
134448usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(default_output_buffer_size)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).non_empty_status as *const _ as usize
|
|
},
|
|
134452usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(non_empty_status)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).aec_supported as *const _ as usize },
|
|
134456usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(aec_supported)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).aec_group_id as *const _ as usize },
|
|
134460usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(aec_group_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).snapshot_buffer as *const _ as usize
|
|
},
|
|
134464usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(snapshot_buffer)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_state>())).bt_debug_info as *const _ as usize },
|
|
1377308usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(bt_debug_info)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).bt_wbs_enabled as *const _ as usize
|
|
},
|
|
1393796usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(bt_wbs_enabled)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).deprioritize_bt_wbs_mic as *const _
|
|
as usize
|
|
},
|
|
1393800usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(deprioritize_bt_wbs_mic)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).main_thread_debug_info as *const _
|
|
as usize
|
|
},
|
|
1393804usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(main_thread_debug_info)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).num_input_streams_with_permission
|
|
as *const _ as usize
|
|
},
|
|
1414292usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(num_input_streams_with_permission)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).noise_cancellation_enabled as *const _
|
|
as usize
|
|
},
|
|
1414336usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(noise_cancellation_enabled)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_server_state>())).hotword_pause_at_suspend as *const _
|
|
as usize
|
|
},
|
|
1414340usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_state),
|
|
"::",
|
|
stringify!(hotword_pause_at_suspend)
|
|
)
|
|
);
|
|
}
|
|
pub const cras_notify_device_action_CRAS_DEVICE_ACTION_ADD: cras_notify_device_action = 0;
|
|
pub const cras_notify_device_action_CRAS_DEVICE_ACTION_REMOVE: cras_notify_device_action = 1;
|
|
pub const cras_notify_device_action_CRAS_DEVICE_ACTION_CHANGE: cras_notify_device_action = 2;
|
|
pub type cras_notify_device_action = u32;
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_ALSA_CARD_TYPE {
|
|
ALSA_CARD_TYPE_INTERNAL = 0,
|
|
ALSA_CARD_TYPE_USB = 1,
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_alsa_card_info {
|
|
pub card_type: CRAS_ALSA_CARD_TYPE,
|
|
pub card_index: u32,
|
|
pub usb_vendor_id: u32,
|
|
pub usb_product_id: u32,
|
|
pub usb_serial_number: [::std::os::raw::c_char; 64usize],
|
|
pub usb_desc_checksum: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_alsa_card_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_alsa_card_info>(),
|
|
84usize,
|
|
concat!("Size of: ", stringify!(cras_alsa_card_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_alsa_card_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_alsa_card_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_alsa_card_info>())).card_type as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_alsa_card_info),
|
|
"::",
|
|
stringify!(card_type)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_alsa_card_info>())).card_index as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_alsa_card_info),
|
|
"::",
|
|
stringify!(card_index)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_alsa_card_info>())).usb_vendor_id as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_alsa_card_info),
|
|
"::",
|
|
stringify!(usb_vendor_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_alsa_card_info>())).usb_product_id as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_alsa_card_info),
|
|
"::",
|
|
stringify!(usb_product_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_alsa_card_info>())).usb_serial_number as *const _ as usize
|
|
},
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_alsa_card_info),
|
|
"::",
|
|
stringify!(usb_serial_number)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_alsa_card_info>())).usb_desc_checksum as *const _ as usize
|
|
},
|
|
80usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_alsa_card_info),
|
|
"::",
|
|
stringify!(usb_desc_checksum)
|
|
)
|
|
);
|
|
}
|
|
pub type cras_stream_id_t = u32;
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_NODE_TYPE {
|
|
CRAS_NODE_TYPE_INTERNAL_SPEAKER = 0,
|
|
CRAS_NODE_TYPE_HEADPHONE = 1,
|
|
CRAS_NODE_TYPE_HDMI = 2,
|
|
CRAS_NODE_TYPE_HAPTIC = 3,
|
|
CRAS_NODE_TYPE_LINEOUT = 4,
|
|
CRAS_NODE_TYPE_MIC = 5,
|
|
CRAS_NODE_TYPE_HOTWORD = 6,
|
|
CRAS_NODE_TYPE_POST_MIX_PRE_DSP = 7,
|
|
CRAS_NODE_TYPE_POST_DSP = 8,
|
|
CRAS_NODE_TYPE_BLUETOOTH_NB_MIC = 9,
|
|
CRAS_NODE_TYPE_USB = 10,
|
|
CRAS_NODE_TYPE_BLUETOOTH = 11,
|
|
CRAS_NODE_TYPE_FALLBACK_NORMAL = 12,
|
|
CRAS_NODE_TYPE_FALLBACK_ABNORMAL = 13,
|
|
CRAS_NODE_TYPE_UNKNOWN = 14,
|
|
CRAS_NODE_TYPE_ECHO_REFERENCE = 15,
|
|
CRAS_NODE_TYPE_ALSA_LOOPBACK = 16,
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_NODE_POSITION {
|
|
NODE_POSITION_EXTERNAL = 0,
|
|
NODE_POSITION_INTERNAL = 1,
|
|
NODE_POSITION_FRONT = 2,
|
|
NODE_POSITION_REAR = 3,
|
|
NODE_POSITION_KEYBOARD = 4,
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_SERVER_MESSAGE_ID {
|
|
CRAS_SERVER_CONNECT_STREAM = 0,
|
|
CRAS_SERVER_DISCONNECT_STREAM = 1,
|
|
CRAS_SERVER_SWITCH_STREAM_TYPE_IODEV = 2,
|
|
CRAS_SERVER_SET_SYSTEM_VOLUME = 3,
|
|
CRAS_SERVER_SET_SYSTEM_MUTE = 4,
|
|
CRAS_SERVER_SET_USER_MUTE = 5,
|
|
CRAS_SERVER_SET_SYSTEM_MUTE_LOCKED = 6,
|
|
CRAS_SERVER_SET_SYSTEM_CAPTURE_GAIN = 7,
|
|
CRAS_SERVER_SET_SYSTEM_CAPTURE_MUTE = 8,
|
|
CRAS_SERVER_SET_SYSTEM_CAPTURE_MUTE_LOCKED = 9,
|
|
CRAS_SERVER_SET_NODE_ATTR = 10,
|
|
CRAS_SERVER_SELECT_NODE = 11,
|
|
CRAS_SERVER_RELOAD_DSP = 12,
|
|
CRAS_SERVER_DUMP_DSP_INFO = 13,
|
|
CRAS_SERVER_DUMP_AUDIO_THREAD = 14,
|
|
CRAS_SERVER_DUMP_SNAPSHOTS = 15,
|
|
CRAS_SERVER_ADD_ACTIVE_NODE = 16,
|
|
CRAS_SERVER_RM_ACTIVE_NODE = 17,
|
|
CRAS_SERVER_ADD_TEST_DEV = 18,
|
|
CRAS_SERVER_TEST_DEV_COMMAND = 19,
|
|
CRAS_SERVER_SUSPEND = 20,
|
|
CRAS_SERVER_RESUME = 21,
|
|
CRAS_CONFIG_GLOBAL_REMIX = 22,
|
|
CRAS_SERVER_GET_HOTWORD_MODELS = 23,
|
|
CRAS_SERVER_SET_HOTWORD_MODEL = 24,
|
|
CRAS_SERVER_REGISTER_NOTIFICATION = 25,
|
|
CRAS_SERVER_SET_AEC_DUMP = 26,
|
|
CRAS_SERVER_RELOAD_AEC_CONFIG = 27,
|
|
CRAS_SERVER_DUMP_BT = 28,
|
|
CRAS_SERVER_SET_BT_WBS_ENABLED = 29,
|
|
CRAS_SERVER_GET_ATLOG_FD = 30,
|
|
CRAS_SERVER_DUMP_MAIN = 31,
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_CLIENT_MESSAGE_ID {
|
|
CRAS_CLIENT_CONNECTED = 0,
|
|
CRAS_CLIENT_STREAM_CONNECTED = 1,
|
|
CRAS_CLIENT_AUDIO_DEBUG_INFO_READY = 2,
|
|
CRAS_CLIENT_GET_HOTWORD_MODELS_READY = 3,
|
|
CRAS_CLIENT_OUTPUT_VOLUME_CHANGED = 4,
|
|
CRAS_CLIENT_OUTPUT_MUTE_CHANGED = 5,
|
|
CRAS_CLIENT_CAPTURE_GAIN_CHANGED = 6,
|
|
CRAS_CLIENT_CAPTURE_MUTE_CHANGED = 7,
|
|
CRAS_CLIENT_NODES_CHANGED = 8,
|
|
CRAS_CLIENT_ACTIVE_NODE_CHANGED = 9,
|
|
CRAS_CLIENT_OUTPUT_NODE_VOLUME_CHANGED = 10,
|
|
CRAS_CLIENT_NODE_LEFT_RIGHT_SWAPPED_CHANGED = 11,
|
|
CRAS_CLIENT_INPUT_NODE_GAIN_CHANGED = 12,
|
|
CRAS_CLIENT_NUM_ACTIVE_STREAMS_CHANGED = 13,
|
|
CRAS_CLIENT_ATLOG_FD_READY = 14,
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_server_message {
|
|
pub length: u32,
|
|
pub id: CRAS_SERVER_MESSAGE_ID,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_server_message() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_server_message>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_server_message))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_server_message>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_server_message))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_message>())).length as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_message),
|
|
"::",
|
|
stringify!(length)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_server_message>())).id as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_server_message),
|
|
"::",
|
|
stringify!(id)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_message {
|
|
pub length: u32,
|
|
pub id: CRAS_CLIENT_MESSAGE_ID,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_message() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_message>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_client_message))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_message>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_client_message))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_client_message>())).length as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_message),
|
|
"::",
|
|
stringify!(length)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_client_message>())).id as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_message),
|
|
"::",
|
|
stringify!(id)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_connect_message {
|
|
pub header: cras_server_message,
|
|
pub proto_version: u32,
|
|
pub direction: CRAS_STREAM_DIRECTION,
|
|
pub stream_id: cras_stream_id_t,
|
|
pub stream_type: CRAS_STREAM_TYPE,
|
|
pub buffer_frames: u32,
|
|
pub cb_threshold: u32,
|
|
pub flags: u32,
|
|
pub format: cras_audio_format_packed,
|
|
pub dev_idx: u32,
|
|
pub effects: u64,
|
|
pub client_type: CRAS_CLIENT_TYPE,
|
|
pub client_shm_size: u64,
|
|
pub buffer_offsets: [u64; 2usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_connect_message() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_connect_message>(),
|
|
99usize,
|
|
concat!("Size of: ", stringify!(cras_connect_message))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_connect_message>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_connect_message))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_connect_message>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_connect_message>())).proto_version as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(proto_version)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_connect_message>())).direction as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(direction)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_connect_message>())).stream_id as *const _ as usize },
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(stream_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_connect_message>())).stream_type as *const _ as usize
|
|
},
|
|
20usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(stream_type)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_connect_message>())).buffer_frames as *const _ as usize
|
|
},
|
|
24usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(buffer_frames)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_connect_message>())).cb_threshold as *const _ as usize
|
|
},
|
|
28usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(cb_threshold)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_connect_message>())).flags as *const _ as usize },
|
|
32usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(flags)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_connect_message>())).format as *const _ as usize },
|
|
36usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(format)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_connect_message>())).dev_idx as *const _ as usize },
|
|
59usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(dev_idx)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_connect_message>())).effects as *const _ as usize },
|
|
63usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(effects)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_connect_message>())).client_type as *const _ as usize
|
|
},
|
|
71usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(client_type)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_connect_message>())).client_shm_size as *const _ as usize
|
|
},
|
|
75usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(client_shm_size)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_connect_message>())).buffer_offsets as *const _ as usize
|
|
},
|
|
83usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_connect_message),
|
|
"::",
|
|
stringify!(buffer_offsets)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_disconnect_stream_message {
|
|
pub header: cras_server_message,
|
|
pub stream_id: cras_stream_id_t,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_disconnect_stream_message() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_disconnect_stream_message>(),
|
|
12usize,
|
|
concat!("Size of: ", stringify!(cras_disconnect_stream_message))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_disconnect_stream_message>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_disconnect_stream_message))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_disconnect_stream_message>())).header as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_disconnect_stream_message),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_disconnect_stream_message>())).stream_id as *const _
|
|
as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_disconnect_stream_message),
|
|
"::",
|
|
stringify!(stream_id)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_switch_stream_type_iodev {
|
|
pub header: cras_server_message,
|
|
pub stream_type: CRAS_STREAM_TYPE,
|
|
pub iodev_idx: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_switch_stream_type_iodev() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_switch_stream_type_iodev>(),
|
|
16usize,
|
|
concat!("Size of: ", stringify!(cras_switch_stream_type_iodev))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_switch_stream_type_iodev>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_switch_stream_type_iodev))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_switch_stream_type_iodev>())).header as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_switch_stream_type_iodev),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_switch_stream_type_iodev>())).stream_type as *const _
|
|
as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_switch_stream_type_iodev),
|
|
"::",
|
|
stringify!(stream_type)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_switch_stream_type_iodev>())).iodev_idx as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_switch_stream_type_iodev),
|
|
"::",
|
|
stringify!(iodev_idx)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_set_system_volume {
|
|
pub header: cras_server_message,
|
|
pub volume: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_set_system_volume() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_set_system_volume>(),
|
|
12usize,
|
|
concat!("Size of: ", stringify!(cras_set_system_volume))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_set_system_volume>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_set_system_volume))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_system_volume>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_system_volume),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_system_volume>())).volume as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_system_volume),
|
|
"::",
|
|
stringify!(volume)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_set_system_mute {
|
|
pub header: cras_server_message,
|
|
pub mute: i32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_set_system_mute() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_set_system_mute>(),
|
|
12usize,
|
|
concat!("Size of: ", stringify!(cras_set_system_mute))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_set_system_mute>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_set_system_mute))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_system_mute>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_system_mute),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_system_mute>())).mute as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_system_mute),
|
|
"::",
|
|
stringify!(mute)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_set_node_attr {
|
|
pub header: cras_server_message,
|
|
pub node_id: cras_node_id_t,
|
|
pub attr: ionode_attr,
|
|
pub value: i32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_set_node_attr() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_set_node_attr>(),
|
|
24usize,
|
|
concat!("Size of: ", stringify!(cras_set_node_attr))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_set_node_attr>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_set_node_attr))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_node_attr>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_node_attr),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_node_attr>())).node_id as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_node_attr),
|
|
"::",
|
|
stringify!(node_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_node_attr>())).attr as *const _ as usize },
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_node_attr),
|
|
"::",
|
|
stringify!(attr)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_node_attr>())).value as *const _ as usize },
|
|
20usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_node_attr),
|
|
"::",
|
|
stringify!(value)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_select_node {
|
|
pub header: cras_server_message,
|
|
pub direction: CRAS_STREAM_DIRECTION,
|
|
pub node_id: cras_node_id_t,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_select_node() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_select_node>(),
|
|
20usize,
|
|
concat!("Size of: ", stringify!(cras_select_node))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_select_node>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_select_node))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_select_node>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_select_node),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_select_node>())).direction as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_select_node),
|
|
"::",
|
|
stringify!(direction)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_select_node>())).node_id as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_select_node),
|
|
"::",
|
|
stringify!(node_id)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_add_active_node {
|
|
pub header: cras_server_message,
|
|
pub direction: CRAS_STREAM_DIRECTION,
|
|
pub node_id: cras_node_id_t,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_add_active_node() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_add_active_node>(),
|
|
20usize,
|
|
concat!("Size of: ", stringify!(cras_add_active_node))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_add_active_node>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_add_active_node))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_add_active_node>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_add_active_node),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_add_active_node>())).direction as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_add_active_node),
|
|
"::",
|
|
stringify!(direction)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_add_active_node>())).node_id as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_add_active_node),
|
|
"::",
|
|
stringify!(node_id)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_rm_active_node {
|
|
pub header: cras_server_message,
|
|
pub direction: CRAS_STREAM_DIRECTION,
|
|
pub node_id: cras_node_id_t,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_rm_active_node() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_rm_active_node>(),
|
|
20usize,
|
|
concat!("Size of: ", stringify!(cras_rm_active_node))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_rm_active_node>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_rm_active_node))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_rm_active_node>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_rm_active_node),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_rm_active_node>())).direction as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_rm_active_node),
|
|
"::",
|
|
stringify!(direction)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_rm_active_node>())).node_id as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_rm_active_node),
|
|
"::",
|
|
stringify!(node_id)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_reload_dsp {
|
|
pub header: cras_server_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_reload_dsp() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_reload_dsp>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_reload_dsp))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_reload_dsp>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_reload_dsp))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_reload_dsp>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_reload_dsp),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_dump_dsp_info {
|
|
pub header: cras_server_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_dump_dsp_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_dump_dsp_info>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_dump_dsp_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_dump_dsp_info>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_dump_dsp_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_dump_dsp_info>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_dump_dsp_info),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_dump_audio_thread {
|
|
pub header: cras_server_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_dump_audio_thread() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_dump_audio_thread>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_dump_audio_thread))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_dump_audio_thread>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_dump_audio_thread))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_dump_audio_thread>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_dump_audio_thread),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_get_atlog_fd {
|
|
pub header: cras_server_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_get_atlog_fd() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_get_atlog_fd>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_get_atlog_fd))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_get_atlog_fd>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_get_atlog_fd))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_get_atlog_fd>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_get_atlog_fd),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_dump_main {
|
|
pub header: cras_server_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_dump_main() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_dump_main>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_dump_main))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_dump_main>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_dump_main))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_dump_main>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_dump_main),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_dump_bt {
|
|
pub header: cras_server_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_dump_bt() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_dump_bt>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_dump_bt))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_dump_bt>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_dump_bt))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_dump_bt>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_dump_bt),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_dump_snapshots {
|
|
pub header: cras_server_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_dump_snapshots() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_dump_snapshots>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_dump_snapshots))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_dump_snapshots>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_dump_snapshots))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_dump_snapshots>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_dump_snapshots),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_add_test_dev {
|
|
pub header: cras_server_message,
|
|
pub type_: TEST_IODEV_TYPE,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_add_test_dev() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_add_test_dev>(),
|
|
12usize,
|
|
concat!("Size of: ", stringify!(cras_add_test_dev))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_add_test_dev>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_add_test_dev))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_add_test_dev>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_add_test_dev),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_add_test_dev>())).type_ as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_add_test_dev),
|
|
"::",
|
|
stringify!(type_)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_test_dev_command {
|
|
pub header: cras_server_message,
|
|
pub command: ::std::os::raw::c_uint,
|
|
pub iodev_idx: ::std::os::raw::c_uint,
|
|
pub data_len: ::std::os::raw::c_uint,
|
|
pub data: [u8; 224usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_test_dev_command() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_test_dev_command>(),
|
|
244usize,
|
|
concat!("Size of: ", stringify!(cras_test_dev_command))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_test_dev_command>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_test_dev_command))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_test_dev_command>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_test_dev_command),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_test_dev_command>())).command as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_test_dev_command),
|
|
"::",
|
|
stringify!(command)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_test_dev_command>())).iodev_idx as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_test_dev_command),
|
|
"::",
|
|
stringify!(iodev_idx)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_test_dev_command>())).data_len as *const _ as usize },
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_test_dev_command),
|
|
"::",
|
|
stringify!(data_len)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_test_dev_command>())).data as *const _ as usize },
|
|
20usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_test_dev_command),
|
|
"::",
|
|
stringify!(data)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_config_global_remix {
|
|
pub header: cras_server_message,
|
|
pub num_channels: ::std::os::raw::c_uint,
|
|
pub coefficient: [f32; 64usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_config_global_remix() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_config_global_remix>(),
|
|
268usize,
|
|
concat!("Size of: ", stringify!(cras_config_global_remix))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_config_global_remix>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_config_global_remix))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_config_global_remix>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_config_global_remix),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_config_global_remix>())).num_channels as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_config_global_remix),
|
|
"::",
|
|
stringify!(num_channels)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_config_global_remix>())).coefficient as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_config_global_remix),
|
|
"::",
|
|
stringify!(coefficient)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_get_hotword_models {
|
|
pub header: cras_server_message,
|
|
pub node_id: cras_node_id_t,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_get_hotword_models() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_get_hotword_models>(),
|
|
16usize,
|
|
concat!("Size of: ", stringify!(cras_get_hotword_models))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_get_hotword_models>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_get_hotword_models))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_get_hotword_models>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_get_hotword_models),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_get_hotword_models>())).node_id as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_get_hotword_models),
|
|
"::",
|
|
stringify!(node_id)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_set_hotword_model {
|
|
pub header: cras_server_message,
|
|
pub node_id: cras_node_id_t,
|
|
pub model_name: [::std::os::raw::c_char; 12usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_set_hotword_model() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_set_hotword_model>(),
|
|
28usize,
|
|
concat!("Size of: ", stringify!(cras_set_hotword_model))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_set_hotword_model>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_set_hotword_model))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_hotword_model>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_hotword_model),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_hotword_model>())).node_id as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_hotword_model),
|
|
"::",
|
|
stringify!(node_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_set_hotword_model>())).model_name as *const _ as usize
|
|
},
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_hotword_model),
|
|
"::",
|
|
stringify!(model_name)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_set_aec_dump {
|
|
pub header: cras_server_message,
|
|
pub stream_id: cras_stream_id_t,
|
|
pub start: ::std::os::raw::c_uint,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_set_aec_dump() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_set_aec_dump>(),
|
|
16usize,
|
|
concat!("Size of: ", stringify!(cras_set_aec_dump))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_set_aec_dump>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_set_aec_dump))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_aec_dump>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_aec_dump),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_aec_dump>())).stream_id as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_aec_dump),
|
|
"::",
|
|
stringify!(stream_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_aec_dump>())).start as *const _ as usize },
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_aec_dump),
|
|
"::",
|
|
stringify!(start)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_reload_aec_config {
|
|
pub header: cras_server_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_reload_aec_config() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_reload_aec_config>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_reload_aec_config))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_reload_aec_config>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_reload_aec_config))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_reload_aec_config>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_reload_aec_config),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_set_bt_wbs_enabled {
|
|
pub header: cras_server_message,
|
|
pub enabled: ::std::os::raw::c_uint,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_set_bt_wbs_enabled() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_set_bt_wbs_enabled>(),
|
|
12usize,
|
|
concat!("Size of: ", stringify!(cras_set_bt_wbs_enabled))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_set_bt_wbs_enabled>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_set_bt_wbs_enabled))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_bt_wbs_enabled>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_bt_wbs_enabled),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_set_bt_wbs_enabled>())).enabled as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_set_bt_wbs_enabled),
|
|
"::",
|
|
stringify!(enabled)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_register_notification {
|
|
pub header: cras_server_message,
|
|
pub msg_id: u32,
|
|
pub do_register: ::std::os::raw::c_int,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_register_notification() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_register_notification>(),
|
|
16usize,
|
|
concat!("Size of: ", stringify!(cras_register_notification))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_register_notification>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_register_notification))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_register_notification>())).header as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_register_notification),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_register_notification>())).msg_id as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_register_notification),
|
|
"::",
|
|
stringify!(msg_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_register_notification>())).do_register as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_register_notification),
|
|
"::",
|
|
stringify!(do_register)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_connected {
|
|
pub header: cras_client_message,
|
|
pub client_id: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_connected() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_connected>(),
|
|
12usize,
|
|
concat!("Size of: ", stringify!(cras_client_connected))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_connected>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_client_connected))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_client_connected>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_connected),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_client_connected>())).client_id as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_connected),
|
|
"::",
|
|
stringify!(client_id)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_stream_connected {
|
|
pub header: cras_client_message,
|
|
pub err: i32,
|
|
pub stream_id: cras_stream_id_t,
|
|
pub format: cras_audio_format_packed,
|
|
pub samples_shm_size: u32,
|
|
pub effects: u64,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_stream_connected() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_stream_connected>(),
|
|
51usize,
|
|
concat!("Size of: ", stringify!(cras_client_stream_connected))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_stream_connected>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_client_stream_connected))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_stream_connected>())).header as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_stream_connected),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_stream_connected>())).err as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_stream_connected),
|
|
"::",
|
|
stringify!(err)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_stream_connected>())).stream_id as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_stream_connected),
|
|
"::",
|
|
stringify!(stream_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_stream_connected>())).format as *const _ as usize
|
|
},
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_stream_connected),
|
|
"::",
|
|
stringify!(format)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_stream_connected>())).samples_shm_size as *const _
|
|
as usize
|
|
},
|
|
39usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_stream_connected),
|
|
"::",
|
|
stringify!(samples_shm_size)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_stream_connected>())).effects as *const _ as usize
|
|
},
|
|
43usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_stream_connected),
|
|
"::",
|
|
stringify!(effects)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_audio_debug_info_ready {
|
|
pub header: cras_client_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_audio_debug_info_ready() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_audio_debug_info_ready>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_client_audio_debug_info_ready))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_audio_debug_info_ready>(),
|
|
1usize,
|
|
concat!(
|
|
"Alignment of ",
|
|
stringify!(cras_client_audio_debug_info_ready)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_audio_debug_info_ready>())).header as *const _
|
|
as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_audio_debug_info_ready),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_atlog_fd_ready {
|
|
pub header: cras_client_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_atlog_fd_ready() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_atlog_fd_ready>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_client_atlog_fd_ready))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_atlog_fd_ready>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_client_atlog_fd_ready))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_atlog_fd_ready>())).header as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_atlog_fd_ready),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_client_get_hotword_models_ready {
|
|
pub header: cras_client_message,
|
|
pub hotword_models_size: i32,
|
|
pub hotword_models: [u8; 244usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_get_hotword_models_ready() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_get_hotword_models_ready>(),
|
|
256usize,
|
|
concat!(
|
|
"Size of: ",
|
|
stringify!(cras_client_get_hotword_models_ready)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_get_hotword_models_ready>(),
|
|
1usize,
|
|
concat!(
|
|
"Alignment of ",
|
|
stringify!(cras_client_get_hotword_models_ready)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_get_hotword_models_ready>())).header as *const _
|
|
as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_get_hotword_models_ready),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_get_hotword_models_ready>())).hotword_models_size
|
|
as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_get_hotword_models_ready),
|
|
"::",
|
|
stringify!(hotword_models_size)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_get_hotword_models_ready>())).hotword_models
|
|
as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_get_hotword_models_ready),
|
|
"::",
|
|
stringify!(hotword_models)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_volume_changed {
|
|
pub header: cras_client_message,
|
|
pub volume: i32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_volume_changed() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_volume_changed>(),
|
|
12usize,
|
|
concat!("Size of: ", stringify!(cras_client_volume_changed))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_volume_changed>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_client_volume_changed))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_volume_changed>())).header as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_volume_changed),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_volume_changed>())).volume as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_volume_changed),
|
|
"::",
|
|
stringify!(volume)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_mute_changed {
|
|
pub header: cras_client_message,
|
|
pub muted: i32,
|
|
pub user_muted: i32,
|
|
pub mute_locked: i32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_mute_changed() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_mute_changed>(),
|
|
20usize,
|
|
concat!("Size of: ", stringify!(cras_client_mute_changed))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_mute_changed>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_client_mute_changed))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_client_mute_changed>())).header as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_mute_changed),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_client_mute_changed>())).muted as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_mute_changed),
|
|
"::",
|
|
stringify!(muted)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_mute_changed>())).user_muted as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_mute_changed),
|
|
"::",
|
|
stringify!(user_muted)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_mute_changed>())).mute_locked as *const _ as usize
|
|
},
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_mute_changed),
|
|
"::",
|
|
stringify!(mute_locked)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_nodes_changed {
|
|
pub header: cras_client_message,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_nodes_changed() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_nodes_changed>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_client_nodes_changed))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_nodes_changed>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_client_nodes_changed))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_nodes_changed>())).header as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_nodes_changed),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_active_node_changed {
|
|
pub header: cras_client_message,
|
|
pub direction: u32,
|
|
pub node_id: cras_node_id_t,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_active_node_changed() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_active_node_changed>(),
|
|
20usize,
|
|
concat!("Size of: ", stringify!(cras_client_active_node_changed))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_active_node_changed>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_client_active_node_changed))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_active_node_changed>())).header as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_active_node_changed),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_active_node_changed>())).direction as *const _
|
|
as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_active_node_changed),
|
|
"::",
|
|
stringify!(direction)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_active_node_changed>())).node_id as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_active_node_changed),
|
|
"::",
|
|
stringify!(node_id)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_node_value_changed {
|
|
pub header: cras_client_message,
|
|
pub node_id: cras_node_id_t,
|
|
pub value: i32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_node_value_changed() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_node_value_changed>(),
|
|
20usize,
|
|
concat!("Size of: ", stringify!(cras_client_node_value_changed))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_node_value_changed>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_client_node_value_changed))
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_node_value_changed>())).header as *const _ as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_node_value_changed),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_node_value_changed>())).node_id as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_node_value_changed),
|
|
"::",
|
|
stringify!(node_id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_node_value_changed>())).value as *const _ as usize
|
|
},
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_node_value_changed),
|
|
"::",
|
|
stringify!(value)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_client_num_active_streams_changed {
|
|
pub header: cras_client_message,
|
|
pub direction: u32,
|
|
pub num_active_streams: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_client_num_active_streams_changed() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_client_num_active_streams_changed>(),
|
|
16usize,
|
|
concat!(
|
|
"Size of: ",
|
|
stringify!(cras_client_num_active_streams_changed)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_client_num_active_streams_changed>(),
|
|
1usize,
|
|
concat!(
|
|
"Alignment of ",
|
|
stringify!(cras_client_num_active_streams_changed)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_num_active_streams_changed>())).header as *const _
|
|
as usize
|
|
},
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_num_active_streams_changed),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_num_active_streams_changed>())).direction as *const _
|
|
as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_num_active_streams_changed),
|
|
"::",
|
|
stringify!(direction)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_client_num_active_streams_changed>())).num_active_streams
|
|
as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_client_num_active_streams_changed),
|
|
"::",
|
|
stringify!(num_active_streams)
|
|
)
|
|
);
|
|
}
|
|
#[repr(u32)]
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
pub enum CRAS_AUDIO_MESSAGE_ID {
|
|
AUDIO_MESSAGE_REQUEST_DATA = 0,
|
|
AUDIO_MESSAGE_DATA_READY = 1,
|
|
AUDIO_MESSAGE_DATA_CAPTURED = 2,
|
|
NUM_AUDIO_MESSAGES = 3,
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct audio_message {
|
|
pub id: CRAS_AUDIO_MESSAGE_ID,
|
|
pub error: i32,
|
|
pub frames: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_audio_message() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<audio_message>(),
|
|
12usize,
|
|
concat!("Size of: ", stringify!(audio_message))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<audio_message>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(audio_message))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_message>())).id as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_message),
|
|
"::",
|
|
stringify!(id)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_message>())).error as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_message),
|
|
"::",
|
|
stringify!(error)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<audio_message>())).frames as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(audio_message),
|
|
"::",
|
|
stringify!(frames)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_audio_shm_config {
|
|
pub used_size: u32,
|
|
pub frame_bytes: u32,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_audio_shm_config() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_audio_shm_config>(),
|
|
8usize,
|
|
concat!("Size of: ", stringify!(cras_audio_shm_config))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_audio_shm_config>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_audio_shm_config))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_shm_config>())).used_size as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_config),
|
|
"::",
|
|
stringify!(used_size)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_config>())).frame_bytes as *const _ as usize
|
|
},
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_config),
|
|
"::",
|
|
stringify!(frame_bytes)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C, packed)]
|
|
#[derive(Debug, Copy, Clone)]
|
|
pub struct cras_audio_shm_header {
|
|
pub config: cras_audio_shm_config,
|
|
pub read_buf_idx: u32,
|
|
pub write_buf_idx: u32,
|
|
pub read_offset: [u32; 2usize],
|
|
pub write_offset: [u32; 2usize],
|
|
pub write_in_progress: [i32; 2usize],
|
|
pub volume_scaler: f32,
|
|
pub mute: i32,
|
|
pub callback_pending: i32,
|
|
pub num_overruns: u32,
|
|
pub ts: cras_timespec,
|
|
pub buffer_offset: [u64; 2usize],
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_audio_shm_header() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_audio_shm_header>(),
|
|
88usize,
|
|
concat!("Size of: ", stringify!(cras_audio_shm_header))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_audio_shm_header>(),
|
|
1usize,
|
|
concat!("Alignment of ", stringify!(cras_audio_shm_header))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_shm_header>())).config as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(config)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_header>())).read_buf_idx as *const _ as usize
|
|
},
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(read_buf_idx)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_header>())).write_buf_idx as *const _ as usize
|
|
},
|
|
12usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(write_buf_idx)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_header>())).read_offset as *const _ as usize
|
|
},
|
|
16usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(read_offset)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_header>())).write_offset as *const _ as usize
|
|
},
|
|
24usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(write_offset)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_header>())).write_in_progress as *const _ as usize
|
|
},
|
|
32usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(write_in_progress)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_header>())).volume_scaler as *const _ as usize
|
|
},
|
|
40usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(volume_scaler)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_shm_header>())).mute as *const _ as usize },
|
|
44usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(mute)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_header>())).callback_pending as *const _ as usize
|
|
},
|
|
48usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(callback_pending)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_header>())).num_overruns as *const _ as usize
|
|
},
|
|
52usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(num_overruns)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_shm_header>())).ts as *const _ as usize },
|
|
56usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(ts)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe {
|
|
&(*(::std::ptr::null::<cras_audio_shm_header>())).buffer_offset as *const _ as usize
|
|
},
|
|
72usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm_header),
|
|
"::",
|
|
stringify!(buffer_offset)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_shm_info {
|
|
pub fd: ::std::os::raw::c_int,
|
|
pub name: [::std::os::raw::c_char; 255usize],
|
|
pub length: usize,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_shm_info() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_shm_info>(),
|
|
272usize,
|
|
concat!("Size of: ", stringify!(cras_shm_info))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_shm_info>(),
|
|
8usize,
|
|
concat!("Alignment of ", stringify!(cras_shm_info))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_shm_info>())).fd as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_shm_info),
|
|
"::",
|
|
stringify!(fd)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_shm_info>())).name as *const _ as usize },
|
|
4usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_shm_info),
|
|
"::",
|
|
stringify!(name)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_shm_info>())).length as *const _ as usize },
|
|
264usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_shm_info),
|
|
"::",
|
|
stringify!(length)
|
|
)
|
|
);
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Copy, Clone)]
|
|
pub struct cras_audio_shm {
|
|
pub config: cras_audio_shm_config,
|
|
pub header_info: cras_shm_info,
|
|
pub header: *mut cras_audio_shm_header,
|
|
pub samples_info: cras_shm_info,
|
|
pub samples: *mut u8,
|
|
}
|
|
#[test]
|
|
fn bindgen_test_layout_cras_audio_shm() {
|
|
assert_eq!(
|
|
::std::mem::size_of::<cras_audio_shm>(),
|
|
568usize,
|
|
concat!("Size of: ", stringify!(cras_audio_shm))
|
|
);
|
|
assert_eq!(
|
|
::std::mem::align_of::<cras_audio_shm>(),
|
|
8usize,
|
|
concat!("Alignment of ", stringify!(cras_audio_shm))
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_shm>())).config as *const _ as usize },
|
|
0usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm),
|
|
"::",
|
|
stringify!(config)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_shm>())).header_info as *const _ as usize },
|
|
8usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm),
|
|
"::",
|
|
stringify!(header_info)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_shm>())).header as *const _ as usize },
|
|
280usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm),
|
|
"::",
|
|
stringify!(header)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_shm>())).samples_info as *const _ as usize },
|
|
288usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm),
|
|
"::",
|
|
stringify!(samples_info)
|
|
)
|
|
);
|
|
assert_eq!(
|
|
unsafe { &(*(::std::ptr::null::<cras_audio_shm>())).samples as *const _ as usize },
|
|
560usize,
|
|
concat!(
|
|
"Offset of field: ",
|
|
stringify!(cras_audio_shm),
|
|
"::",
|
|
stringify!(samples)
|
|
)
|
|
);
|
|
}
|