mixer_controls.h (967B)
1 #ifndef MIXER_CONTROLS_H_INCLUDED 2 #define MIXER_CONTROLS_H_INCLUDED 3 4 #include <alsa/asoundlib.h> 5 6 struct control { 7 snd_mixer_elem_t *elem; 8 char *name; 9 unsigned int flags; 10 #define TYPE_PVOLUME (1u << 4) 11 #define TYPE_CVOLUME (1u << 5) 12 #define TYPE_PSWITCH (1u << 6) 13 #define TYPE_CSWITCH (1u << 7) 14 #define TYPE_ENUM (1u << 8) 15 #define HAS_VOLUME_0 (1u << 9) 16 #define HAS_VOLUME_1 (1u << 10) 17 #define HAS_PSWITCH_0 (1u << 11) 18 #define HAS_PSWITCH_1 (1u << 12) 19 #define HAS_CSWITCH_0 (1u << 13) 20 #define HAS_CSWITCH_1 (1u << 14) 21 #define IS_MULTICH (1u << 15) 22 #define IS_ACTIVE (1u << 16) 23 #define MULTICH_MASK (0x0000f) 24 snd_mixer_selem_channel_id_t volume_channels[2]; 25 snd_mixer_selem_channel_id_t pswitch_channels[2]; 26 snd_mixer_selem_channel_id_t cswitch_channels[2]; 27 unsigned int enum_channel_bits; 28 }; 29 30 extern struct control *controls; 31 extern unsigned int controls_count; 32 33 bool are_there_any_controls(void); 34 void create_controls(void); 35 void free_controls(void); 36 37 #endif