1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

#![doc = include_str!("../README.md")]
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(
    clippy::approx_constant,
    clippy::type_complexity,
    clippy::unreadable_literal,
    clippy::upper_case_acronyms
)]
#![cfg_attr(docsrs, feature(doc_cfg))]

#[allow(unused_imports)]
use libc::{
    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
    intptr_t, size_t, ssize_t, uintptr_t, FILE,
};

#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

// Enums
pub type ALSACtlCardError = c_int;
pub const ALSACTL_CARD_ERROR_FAILED: ALSACtlCardError = 0;
pub const ALSACTL_CARD_ERROR_DISCONNECTED: ALSACtlCardError = 1;
pub const ALSACTL_CARD_ERROR_ELEM_NOT_FOUND: ALSACtlCardError = 2;
pub const ALSACTL_CARD_ERROR_ELEM_NOT_SUPPORTED: ALSACtlCardError = 3;
pub const ALSACTL_CARD_ERROR_ELEM_OWNED: ALSACtlCardError = 4;
pub const ALSACTL_CARD_ERROR_ELEM_EXIST: ALSACtlCardError = 5;

pub type ALSACtlElemIfaceType = c_int;
pub const ALSACTL_ELEM_IFACE_TYPE_CARD: ALSACtlElemIfaceType = 0;
pub const ALSACTL_ELEM_IFACE_TYPE_HWDEP: ALSACtlElemIfaceType = 1;
pub const ALSACTL_ELEM_IFACE_TYPE_MIXER: ALSACtlElemIfaceType = 2;
pub const ALSACTL_ELEM_IFACE_TYPE_PCM: ALSACtlElemIfaceType = 3;
pub const ALSACTL_ELEM_IFACE_TYPE_RAWMIDI: ALSACtlElemIfaceType = 4;
pub const ALSACTL_ELEM_IFACE_TYPE_TIMER: ALSACtlElemIfaceType = 5;
pub const ALSACTL_ELEM_IFACE_TYPE_SEQUENCER: ALSACtlElemIfaceType = 6;

pub type ALSACtlElemType = c_int;
pub const ALSACTL_ELEM_TYPE_NONE: ALSACtlElemType = 0;
pub const ALSACTL_ELEM_TYPE_BOOLEAN: ALSACtlElemType = 1;
pub const ALSACTL_ELEM_TYPE_INTEGER: ALSACtlElemType = 2;
pub const ALSACTL_ELEM_TYPE_ENUMERATED: ALSACtlElemType = 3;
pub const ALSACTL_ELEM_TYPE_BYTES: ALSACtlElemType = 4;
pub const ALSACTL_ELEM_TYPE_IEC60958: ALSACtlElemType = 5;
pub const ALSACTL_ELEM_TYPE_INTEGER64: ALSACtlElemType = 6;

pub type ALSACtlEventType = c_int;
pub const ALSACTL_EVENT_TYPE_ELEM: ALSACtlEventType = 0;

// Flags
pub type ALSACtlElemAccessFlag = c_uint;
pub const ALSACTL_ELEM_ACCESS_FLAG_READ: ALSACtlElemAccessFlag = 1;
pub const ALSACTL_ELEM_ACCESS_FLAG_WRITE: ALSACtlElemAccessFlag = 2;
pub const ALSACTL_ELEM_ACCESS_FLAG_VOLATILE: ALSACtlElemAccessFlag = 4;
pub const ALSACTL_ELEM_ACCESS_FLAG_TLV_READ: ALSACtlElemAccessFlag = 16;
pub const ALSACTL_ELEM_ACCESS_FLAG_TLV_WRITE: ALSACtlElemAccessFlag = 32;
pub const ALSACTL_ELEM_ACCESS_FLAG_TLV_COMMAND: ALSACtlElemAccessFlag = 64;
pub const ALSACTL_ELEM_ACCESS_FLAG_INACTIVE: ALSACtlElemAccessFlag = 256;
pub const ALSACTL_ELEM_ACCESS_FLAG_LOCK: ALSACtlElemAccessFlag = 512;
pub const ALSACTL_ELEM_ACCESS_FLAG_OWNER: ALSACtlElemAccessFlag = 1024;
pub const ALSACTL_ELEM_ACCESS_FLAG_TLV_CALLBACK: ALSACtlElemAccessFlag = 268435456;
pub const ALSACTL_ELEM_ACCESS_FLAG_USER: ALSACtlElemAccessFlag = 536870912;

pub type ALSACtlElemEventMask = c_uint;
pub const ALSACTL_ELEM_EVENT_MASK_VALUE: ALSACtlElemEventMask = 1;
pub const ALSACTL_ELEM_EVENT_MASK_INFO: ALSACtlElemEventMask = 2;
pub const ALSACTL_ELEM_EVENT_MASK_ADD: ALSACtlElemEventMask = 4;
pub const ALSACTL_ELEM_EVENT_MASK_TLV: ALSACtlElemEventMask = 8;
pub const ALSACTL_ELEM_EVENT_MASK_REMOVE: ALSACtlElemEventMask = 16;

// Records
#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlCardClass {
    pub parent_class: gobject::GObjectClass,
    pub handle_elem_event:
        Option<unsafe extern "C" fn(*mut ALSACtlCard, *const ALSACtlElemId, ALSACtlElemEventMask)>,
    pub handle_disconnection: Option<unsafe extern "C" fn(*mut ALSACtlCard)>,
}

impl ::std::fmt::Debug for ALSACtlCardClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlCardClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .field("handle_elem_event", &self.handle_elem_event)
            .field("handle_disconnection", &self.handle_disconnection)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlCardInfoClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for ALSACtlCardInfoClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlCardInfoClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[repr(C)]
pub struct ALSACtlElemId {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for ALSACtlElemId {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemId @ {self:p}"))
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoBooleanClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for ALSACtlElemInfoBooleanClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoBooleanClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoBytesClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for ALSACtlElemInfoBytesClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoBytesClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoCommonInterface {
    pub parent_iface: gobject::GTypeInterface,
}

impl ::std::fmt::Debug for ALSACtlElemInfoCommonInterface {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoCommonInterface @ {self:p}"))
            .field("parent_iface", &self.parent_iface)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoEnumeratedClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for ALSACtlElemInfoEnumeratedClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoEnumeratedClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoIec60958Class {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for ALSACtlElemInfoIec60958Class {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoIec60958Class @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoInteger64Class {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for ALSACtlElemInfoInteger64Class {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoInteger64Class @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoIntegerClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for ALSACtlElemInfoIntegerClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoIntegerClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoSingleArrayInterface {
    pub parent_iface: gobject::GTypeInterface,
}

impl ::std::fmt::Debug for ALSACtlElemInfoSingleArrayInterface {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoSingleArrayInterface @ {self:p}"))
            .field("parent_iface", &self.parent_iface)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemValueClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for ALSACtlElemValueClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemValueClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

// Classes
#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlCard {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for ALSACtlCard {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlCard @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlCardInfo {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for ALSACtlCardInfo {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlCardInfo @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoBoolean {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for ALSACtlElemInfoBoolean {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoBoolean @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoBytes {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for ALSACtlElemInfoBytes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoBytes @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoEnumerated {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for ALSACtlElemInfoEnumerated {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoEnumerated @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoIec60958 {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for ALSACtlElemInfoIec60958 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoIec60958 @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoInteger {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for ALSACtlElemInfoInteger {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoInteger @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemInfoInteger64 {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for ALSACtlElemInfoInteger64 {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemInfoInteger64 @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct ALSACtlElemValue {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for ALSACtlElemValue {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("ALSACtlElemValue @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

// Interfaces
#[repr(C)]
pub struct ALSACtlElemInfoCommon {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for ALSACtlElemInfoCommon {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "ALSACtlElemInfoCommon @ {self:p}")
    }
}

#[repr(C)]
pub struct ALSACtlElemInfoSingleArray {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for ALSACtlElemInfoSingleArray {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "ALSACtlElemInfoSingleArray @ {self:p}")
    }
}

#[link(name = "alsactl")]
extern "C" {

    //=========================================================================
    // ALSACtlCardError
    //=========================================================================
    pub fn alsactl_card_error_get_type() -> GType;
    pub fn alsactl_card_error_quark() -> glib::GQuark;

    //=========================================================================
    // ALSACtlElemIfaceType
    //=========================================================================
    pub fn alsactl_elem_iface_type_get_type() -> GType;

    //=========================================================================
    // ALSACtlElemType
    //=========================================================================
    pub fn alsactl_elem_type_get_type() -> GType;

    //=========================================================================
    // ALSACtlEventType
    //=========================================================================
    pub fn alsactl_event_type_get_type() -> GType;

    //=========================================================================
    // ALSACtlElemAccessFlag
    //=========================================================================
    pub fn alsactl_elem_access_flag_get_type() -> GType;

    //=========================================================================
    // ALSACtlElemEventMask
    //=========================================================================
    pub fn alsactl_elem_event_mask_get_type() -> GType;

    //=========================================================================
    // ALSACtlElemId
    //=========================================================================
    pub fn alsactl_elem_id_get_type() -> GType;
    pub fn alsactl_elem_id_new_by_name(
        iface: ALSACtlElemIfaceType,
        device_id: c_uint,
        subdevice_id: c_uint,
        name: *const c_char,
        index: c_uint,
    ) -> *mut ALSACtlElemId;
    pub fn alsactl_elem_id_new_by_numid(numid: c_uint) -> *mut ALSACtlElemId;
    pub fn alsactl_elem_id_equal(
        self_: *const ALSACtlElemId,
        target: *const ALSACtlElemId,
    ) -> gboolean;
    pub fn alsactl_elem_id_get_device_id(self_: *const ALSACtlElemId, device_id: *mut c_uint);
    pub fn alsactl_elem_id_get_iface(self_: *const ALSACtlElemId, iface: *mut ALSACtlElemIfaceType);
    pub fn alsactl_elem_id_get_index(self_: *const ALSACtlElemId, index: *mut c_uint);
    pub fn alsactl_elem_id_get_name(self_: *const ALSACtlElemId, name: *mut *const c_char);
    pub fn alsactl_elem_id_get_numid(self_: *const ALSACtlElemId, numid: *mut c_uint);
    pub fn alsactl_elem_id_get_subdevice_id(self_: *const ALSACtlElemId, subdevice_id: *mut c_uint);

    //=========================================================================
    // ALSACtlCard
    //=========================================================================
    pub fn alsactl_card_get_type() -> GType;
    pub fn alsactl_card_new() -> *mut ALSACtlCard;
    pub fn alsactl_card_add_elems(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        elem_count: c_uint,
        elem_info: *mut ALSACtlElemInfoCommon,
        entries: *mut *mut glib::GList,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_command_elem_tlv(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        container: *const *mut u32,
        container_count: *mut size_t,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_create_source(
        self_: *mut ALSACtlCard,
        gsrc: *mut *mut glib::GSource,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_get_elem_id_list(
        self_: *mut ALSACtlCard,
        entries: *mut *mut glib::GList,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_get_elem_info(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        elem_info: *mut *mut ALSACtlElemInfoCommon,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_get_info(
        self_: *mut ALSACtlCard,
        card_info: *mut *mut ALSACtlCardInfo,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_get_protocol_version(
        self_: *mut ALSACtlCard,
        proto_ver_triplet: *mut *const [u16; 3],
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_lock_elem(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        lock: gboolean,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_open(
        self_: *mut ALSACtlCard,
        card_id: c_uint,
        open_flag: c_int,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_read_elem_tlv(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        container: *const *mut u32,
        container_count: *mut size_t,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_read_elem_value(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        elem_value: *const *mut ALSACtlElemValue,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_remove_elems(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_replace_elems(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        elem_count: c_uint,
        elem_info: *mut ALSACtlElemInfoCommon,
        entries: *mut *mut glib::GList,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_write_elem_tlv(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        container: *const u32,
        container_count: size_t,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_card_write_elem_value(
        self_: *mut ALSACtlCard,
        elem_id: *const ALSACtlElemId,
        elem_value: *const ALSACtlElemValue,
        error: *mut *mut glib::GError,
    ) -> gboolean;

    //=========================================================================
    // ALSACtlCardInfo
    //=========================================================================
    pub fn alsactl_card_info_get_type() -> GType;

    //=========================================================================
    // ALSACtlElemInfoBoolean
    //=========================================================================
    pub fn alsactl_elem_info_boolean_get_type() -> GType;
    pub fn alsactl_elem_info_boolean_new() -> *mut ALSACtlElemInfoBoolean;

    //=========================================================================
    // ALSACtlElemInfoBytes
    //=========================================================================
    pub fn alsactl_elem_info_bytes_get_type() -> GType;
    pub fn alsactl_elem_info_bytes_new() -> *mut ALSACtlElemInfoBytes;

    //=========================================================================
    // ALSACtlElemInfoEnumerated
    //=========================================================================
    pub fn alsactl_elem_info_enumerated_get_type() -> GType;
    pub fn alsactl_elem_info_enumerated_new() -> *mut ALSACtlElemInfoEnumerated;

    //=========================================================================
    // ALSACtlElemInfoIec60958
    //=========================================================================
    pub fn alsactl_elem_info_iec60958_get_type() -> GType;
    pub fn alsactl_elem_info_iec60958_new() -> *mut ALSACtlElemInfoIec60958;

    //=========================================================================
    // ALSACtlElemInfoInteger
    //=========================================================================
    pub fn alsactl_elem_info_integer_get_type() -> GType;
    pub fn alsactl_elem_info_integer_new() -> *mut ALSACtlElemInfoInteger;

    //=========================================================================
    // ALSACtlElemInfoInteger64
    //=========================================================================
    pub fn alsactl_elem_info_integer64_get_type() -> GType;
    pub fn alsactl_elem_info_integer64_new() -> *mut ALSACtlElemInfoInteger64;

    //=========================================================================
    // ALSACtlElemValue
    //=========================================================================
    pub fn alsactl_elem_value_get_type() -> GType;
    pub fn alsactl_elem_value_new() -> *mut ALSACtlElemValue;
    pub fn alsactl_elem_value_equal(
        self_: *const ALSACtlElemValue,
        target: *const ALSACtlElemValue,
    ) -> gboolean;
    pub fn alsactl_elem_value_get_bool(
        self_: *mut ALSACtlElemValue,
        values: *mut *const [gboolean; 128],
    );
    pub fn alsactl_elem_value_get_bytes(
        self_: *mut ALSACtlElemValue,
        values: *mut *const [u8; 512],
    );
    pub fn alsactl_elem_value_get_enum(
        self_: *mut ALSACtlElemValue,
        values: *mut *const [u32; 128],
    );
    pub fn alsactl_elem_value_get_iec60958_channel_status(
        self_: *mut ALSACtlElemValue,
        status: *mut *const [u8; 24],
    );
    pub fn alsactl_elem_value_get_iec60958_user_data(
        self_: *mut ALSACtlElemValue,
        data: *mut *const [u8; 147],
    );
    pub fn alsactl_elem_value_get_int(self_: *mut ALSACtlElemValue, values: *mut *const [i32; 128]);
    pub fn alsactl_elem_value_get_int64(
        self_: *mut ALSACtlElemValue,
        values: *mut *const [i64; 64],
    );
    pub fn alsactl_elem_value_set_bool(
        self_: *mut ALSACtlElemValue,
        values: *const gboolean,
        value_count: size_t,
    );
    pub fn alsactl_elem_value_set_bytes(
        self_: *mut ALSACtlElemValue,
        values: *const u8,
        value_count: size_t,
    );
    pub fn alsactl_elem_value_set_enum(
        self_: *mut ALSACtlElemValue,
        values: *const u32,
        value_count: size_t,
    );
    pub fn alsactl_elem_value_set_iec60958_channel_status(
        self_: *mut ALSACtlElemValue,
        status: *const u8,
        length: size_t,
    );
    pub fn alsactl_elem_value_set_iec60958_user_data(
        self_: *mut ALSACtlElemValue,
        data: *const u8,
        length: size_t,
    );
    pub fn alsactl_elem_value_set_int(
        self_: *mut ALSACtlElemValue,
        values: *const i32,
        value_count: size_t,
    );
    pub fn alsactl_elem_value_set_int64(
        self_: *mut ALSACtlElemValue,
        values: *const i64,
        value_count: size_t,
    );

    //=========================================================================
    // ALSACtlElemInfoCommon
    //=========================================================================
    pub fn alsactl_elem_info_common_get_type() -> GType;

    //=========================================================================
    // ALSACtlElemInfoSingleArray
    //=========================================================================
    pub fn alsactl_elem_info_single_array_get_type() -> GType;

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn alsactl_get_card_id_list(
        entries: *mut *mut c_uint,
        entry_count: *mut size_t,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_get_card_sysname(
        card_id: c_uint,
        sysname: *mut *mut c_char,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_get_control_devnode(
        card_id: c_uint,
        devnode: *mut *mut c_char,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_get_control_sysname(
        card_id: c_uint,
        sysname: *mut *mut c_char,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn alsactl_sigs_marshal_VOID__BOXED_FLAGS(
        closure: *mut gobject::GClosure,
        return_value: *mut gobject::GValue,
        n_param_values: c_uint,
        param_values: *const gobject::GValue,
        invocation_hint: gpointer,
        marshal_data: gpointer,
    );

}